So this is the only way in default zp 4.3
PHP Code:
#include <amxmodx>
#include <fakemeta>
#include <cstrike>
#include <zombieplague>
#define PLUGIN "[ZP] Survivor"
#define VERSION "1.0"
#define AUTHOR "Maakera"
new g_survivor
new const g_cost = 18 // Cost of pack
new g_buy_counter
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
g_survivor = zp_register_extra_item("Survivor", g_cost, ZP_TEAM_HUMAN)
register_logevent("event_RoundStart", 2, "1=Round_Start")
}
public event_RoundStart()
{
g_buy_counter = 0
}
public zp_extra_item_selected(player, itemid)
{
if (itemid == g_survivor)
{
if (!zp_has_round_started())
{
return ZP_PLUGIN_HANDLED
}
if (g_buy_counter == 2)
{
client_print(player, print_chat, "Limit reached!")
return ZP_PLUGIN_HANDLED
}
zp_make_user_survivor(player)
new idname[32]
get_user_name(player, idname, charsmax(idname))
set_hudmessage(0, 255, 255, 0.06, 0.39, 1, 6.0, 5.0)
show_hudmessage(0, "%s has bought Survivor !!!", idname)
g_buy_counter++
}
return PLUGIN_CONTINUE
}
__________________