How to make this a extra item (feel free to use ZP natives,I will edit for biohazard) and how to set that can be purchased only if have more than 3 zombies alive??
PHP Code:
#include <amxmodx>
#include <cstrike>
#include <biohazard>
#if !defined _biohazard_included
#assert Biohazard functions file required!
#endif
#define PLUGIN "biohazard Zombie Antidote"
#define VERSION "1.0"
#define AUTHOR "ds811888"
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
if(!is_biomod_active()) pause("ad")
register_clcmd("say /antidote", "infect_antidote")
}
public infect_antidote(id)
{
if(!is_user_alive(id) && !is_user_zombie(id))
return;
new money = cs_get_user_money(id)
new cost = 5000
if(money <= cost)
{
client_print(id, print_center, "You need 5000$ to buy an antidote!")
}
else
{
cs_set_user_money(id, money - cost)
client_print(id, print_center, "You have used an antidote!")
cs_set_user_team(id, CS_TEAM_CT)
cure_user(id)
}
}