Offline |
|
|
Csatlakozott: 2016.12.25. 20:51 Hozzászólások: 57
Megköszönték neki: 4 alkalommal
|
Valaki bele irná nekem ,hogy ha meg van az 100-ölés és meg veszi a vip akkor legyen VIP-a neve előtt ? VIP Prefix kéne! #include <amxmisc> new const PLUGIN[] = { "VIP SyStem" } new const VERSION[] = { "1.0" } new const AUTHOR[] = { "KillerBoy12" } new iVip[33], Points[33] public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) register_clcmd("say /vip", "CmdBuyVip") register_event("DeathMsg", "CmdDead", "a") } public CmdBuyVip(id) { new String[512], Menu format(String, 511, "\yVIP Vásárlás^n\wPont:\r %i", Points[id]) Menu = menu_create(String, "CmdBuyViph") if(iVip[id] == 1) menu_additem(Menu, "\yVIP\w 1000 Pont\y [Vip Tag vagy]", "0", 0) else format(String, 511, "\yVIP\w [1000/%d] Pont", Points[id]), menu_additem(Menu, String, "0", 0) menu_additem(Menu, "\wMit tud a VIP?^n\d Kick, Mapvaltas", "1", 0) menu_display(id, Menu, 0) } public CmdBuyViph(id, Menu, Item) { switch(Item) { case 0: { if(iVip[id] == 1) client_print(id, print_chat, "Te már vásároltál VIP tagságot!") else if(Points[id] >= 1000) { iVip[id] = 1 client_print(id, print_chat, "Sikeres vásárlás!") Points[id] -= 1000 set_user_flags(id, read_flags("cf")) } else client_print(id, print_chat, "Kell mĂ©g %i Pont", 1000-Points[id]) } case 1: CmdBuyVip(id) } menu_destroy(Menu) return PLUGIN_HANDLED } public CmdDead() { new id = read_data(1) if(id == read_data(2) || id == 0) return PLUGIN_HANDLED Points[id] += 2 return PLUGIN_HANDLED } public client_putinserver(id) { Load(id) } public client_disconnect(id) { Save(id) } public Load(id) { if(is_user_connected(id)) { new File[192], szName[32] get_user_name(id, szName, sizeof(szName) -1) formatex(File, charsmax(File), "addons/amxmodx/configs/Mentes/%s.ini", szName) new FilePointer = fopen(File, "r") if(!FilePointer) { Points[id] = 0 } fclose(FilePointer) new P[32] if(is_user_connected(id)) { new Buff[512], Len read_file(File, 0, Buff, charsmax(Buff), Len) parse(Buff, P, 31) Points[id] = str_to_num(P) } } return PLUGIN_CONTINUE } public Save(id) { if(is_user_connected(id)) { new File[192], szName[32], Saves[512] get_user_name(id, szName, sizeof(szName) -1) formatex(File, charsmax(File), "addons/amxmodx/configs/Mentes/%s.ini", szName) format(Saves, charsmax(Saves), "%i", Points[id]) write_file(File, Saves, 0) } }
_________________ razer*Csapat| Global Offensive *Statrak**197SIKIN*|Láda eventek| ip: 37.221.209.97:27302
|
|