Witam posiadam plugin a dokładnie zp_extra_gravity lecz item można zakupić tylko raz na mapę proszę o edycję kodu i dopisaniu żeby można było go kupywać co rundę
kod:
#include <amxmodx> #include <zombieplague> #include <fakemeta_util> #define PLUGIN "[ZP] Extra Item: Low Gravity" #define VERSION "1.1" #define AUTHOR "Shaxu" new const g_gravity_cost = 4 new g_iExtraItem , g_value new bool:g_bHasExtraItem[33] new SayText public plugin_init() { register_plugin("PLUGIN", "VERSION", "AUTHOR") g_value = register_cvar("zp_gravity_value", "0.75") g_iExtraItem = zp_register_extra_item("ML_GRAVITY", g_gravity_cost, ZP_TEAM_HUMAN) register_dictionary("zombie_plague.txt") SayText = get_user_msgid("SayText") } public zp_extra_item_selected(id, itemid) { if (itemid == g_iExtraItem) { if(g_bHasExtraItem[id]) { zp_set_user_ammo_packs(id, zp_get_user_ammo_packs(id) + g_gravity_cost) ChatColor(id, "!g[ZP]!y %L", id, "CMD_NOT_ITEM" ) } else { g_bHasExtraItem[id] = true fm_set_user_gravity(id, get_pcvar_float(g_value)) } } } stock ChatColor(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 replace_all(msg, 190, "!t2", "^0") // Team2 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(); } } } }
Użytkownik neXT42 edytował ten post 14.04.2014 21:23