Add :
PHP Code:
public zp_fw_items_select_pre(id, itemid)
{
if(itemid == g_deadlyshot)
{
if(zp_core_is_zombie(id)
return ZP_ITEM_DONT_SHOW
else
return ZP_ITEM_AVAILABLE
}
return PLUGIN_CONTINUE
}
right before :
PHP Code:
public zp_fw_items_select_post(id, itemid)
{
if(itemid != g_deadlyshot)
return PLUGIN_HANDLED
if(!has_item[id] || using_item[id])
{
client_print(id, print_chat, "[ZP] You bought Deadly Shot !!!")
has_item[id] = true
using_item[id] = false
set_task(0.1, "show_hud", id+TASK_HUD, _, _, "b")
} else {
client_print(id, print_chat, "[ZP] You can't buy Deadly Shot at this time...")
zp_ammopacks_set(id, zp_ammopacks_get(id) + get_pcvar_num(cvar_deadlyshot_cost))
}
return PLUGIN_CONTINUE
}
__________________