public infect_antidote(id) { if(!is_user_alive(id) && !is_user_zombie(id)) { return PLUGIN_HANDLED; //prevent other see /antidote in chat }
static money; money = cs_get_user_money(id); if(money < ITEM_COST) { client_print(id, print_center, "You need 5000$ to buy an antidote!") return PLUGIN_HANDLED; //prevent other see /antidote in chat }
//check alive zombies if(FnGetAliveZombies() <= MIN_ZOMBIE) { client_print(id, print_center, "Cannot use antidote at this time..") return PLUGIN_HANDLED; //prevent other see /antidote in chat }
cs_set_user_money(id, money - ITEM_COST) client_print(id, print_center, "You have used an antidote!") cs_set_user_team(id, CS_TEAM_CT) cure_user(id)
return PLUGIN_CONTINUE; //let other see /antidote in chat, so they know you buy it. }
public infect_antidote(id)
{
if(!is_user_alive(id) && !is_user_zombie(id))
{
return PLUGIN_HANDLED; //prevent other see /antidote in chat
}
static money; money = cs_get_user_money(id);
if(money < ITEM_COST)
{
client_print(id, print_center, "You need 5000$ to buy an antidote!")
return PLUGIN_HANDLED; //prevent other see /antidote in chat
}
//check alive zombies
if(FnGetAliveZombies() <= MIN_ZOMBIE)
{
client_print(id, print_center, "Cannot use antidote at this time..")
return PLUGIN_HANDLED; //prevent other see /antidote in chat
}
cs_set_user_money(id, money - ITEM_COST)
client_print(id, print_center, "You have used an antidote!")
cs_set_user_team(id, CS_TEAM_CT)
cure_user(id)
return PLUGIN_CONTINUE; //let other see /antidote in chat, so they know you buy it.
}