Witam chciał bym prosić o dopisanie i przerobienie pluginu. Chciał bym aby to wyglądał tak po wpisaniu komendy pojawią się wszyscy gracze klikamy i wpisujemy liczbe ammo packs. Za pomoc lecą Duże ++
/* Plugin generated by AMXX-Studio */ #include <amxmodx> #include <amxmisc> #include <zombieplague> #define PLUGIN "[ZP] Donate Ammo Packs" #define VERSION "1.0" #define AUTHOR "r1laX , PomanoB" new g_UserTotalAmmo[33] new g_CvarAllowDonate new SayText public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) g_CvarAllowDonate = register_cvar("zp_stats_allow_donate", "1") register_clcmd("say", "handleSay") register_clcmd("say_team", "handleSay") register_event("HLTV", "RoundStart", "a", "1=0", "2=0") SayText = get_user_msgid("SayText") } public RoundStart() { if (get_pcvar_num(g_CvarAllowDonate)) set_task(2.2, "MsgOnRoundStart") } public MsgOnRoundStart() { if(get_pcvar_num(g_CvarAllowDonate)) client_printcolor(0, "!g[ZP] !yAby przekazac ap dla graczy wpisz /daj") } public handleSay(id) { new args[64] read_args(args, charsmax(args)) remove_quotes(args) new arg1[16] new arg2[32] strbreak(args, arg1, charsmax(arg1), arg2, charsmax(arg2)) if (get_pcvar_num(g_CvarAllowDonate) && equal(arg1,"/daj", 7)) donate(id, arg2) } public donate(id, arg[]) { new to[32], count[10] strbreak(arg, to, 31, count, 9) if (!to[0] || !count[0]) { client_printcolor(id, "!g[ZP] !yWpisz: say /daj <nick> <ilosc>") return } new ammo_sender = zp_get_user_ammo_packs(id) new ammo if (equal(count, "all")) ammo = ammo_sender else ammo = str_to_num(count) if (ammo <= 0) { client_printcolor(id, "!g[ZP] !yZle napisana komenda") return } ammo_sender -= ammo if (ammo_sender < 0) { ammo+=ammo_sender ammo_sender = 0 } new reciever = cmd_target(id, to, (CMDTARGET_ALLOW_SELF)) if (!reciever || reciever == id) { client_printcolor(id, "!g[ZP] !yPlayer !g%s !yo tym nicku nie znaleziono na serwerze!", to) return } zp_set_user_ammo_packs(reciever, zp_get_user_ammo_packs(reciever) + ammo) g_UserTotalAmmo[reciever] += ammo zp_set_user_ammo_packs(id, ammo_sender) new aName[32], vName[32] get_user_name(id, aName, 31) get_user_name(reciever, vName, 31) set_hudmessage(255, 0, 0, -1.0, 0.3, 0, 6.0, 6.0) show_hudmessage(0, "%s przekazal %d Ammo Packi dla %s!", aName, ammo, vName) } stock client_printcolor(const id, const input[], any:...) { new count = 1, players[32] static msg[191] vformat(msg, 190, input, 3) replace_all(msg, 190, "!g", "^4") // Green Color replace_all(msg, 190, "!y", "^1") // Default Color replace_all(msg, 190, "!t", "^3") // Team Color if (id) players[0] = id; else get_players(players, count, "ch") { for ( new i = 0; i < count; i++ ) { if ( is_user_connected(players[i]) ) { message_begin(MSG_ONE_UNRELIABLE, SayText, _, players[i]) write_byte(players[i]); write_string(msg); message_end(); } } } } /* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE *{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1033\\ f0\\ fs16 \n\\ par } */
Użytkownik kotlet123 edytował ten post 02.07.2014 17:55