PHP Code:
#include <amxmodx>
#include <fun>
#include <zombieplague>
new const item_name[] = "Buy 2500 HP!"
new g_itemid_buyhp, g_maxplayers, bool:g_iTem[33]
new hpamount
public plugin_init()
{
register_plugin("[ZoZ] Buy Health Points", "1.0", "T[h]E Dis[as]teR")
hpamount = register_cvar("zp_buyhp_amount", "2500")
g_itemid_buyhp = zp_register_extra_item(item_name, 5, ZP_TEAM_HUMAN & ZP_TEAM_ZOMBIE)
register_event("HLTV", "event_round_start", "a", "1=0", "2=0")
g_maxplayers = get_maxplayers()
}
public zp_extra_item_selected(id,itemid)
{
if(itemid==g_itemid_buyhp)
{
if(g_iTem[id])
{
client_print(id, print_chat,"[ZoZ] Not enough Ammopacks!");
return ZP_PLUGIN_HANDLED
}
set_user_health(id,get_user_health(id)+get_pcvar_num(hpamount));
client_print(id, print_chat,"[ZP] You Bought HP!");
g_iTem[id] = true
}
return PLUGIN_CONTINUE;
}
public client_connect(id)
{
g_iTem[id] = false
}
public event_round_start()
{
for (new player; player <= g_maxplayers; player++)
{
g_iTem[player] = false
}
}
Did it for u bcuz i dont expect you to understand these