Post by LegendofWarior on Oct 21, 2015 19:10:06 GMT
Do You Want To Disnable an Extra Item In Modes? Like Armaggdon, Survivor, Sniper, Nemesis, Assassin. etc First, You Need To Below Next Code After
public zp_extra_item_selected(player, itemid)
Here is The Code:
public zp_extra_item_selected(player, itemid)
{
if(zp_is_swarm_round() || zp_is_plague_round())
{
client_print(player, print_chat, "[ZP] This Extra Item Are Disnable in This Mode.")
return ZP_PLUGIN_HANDLED
}
return PLUGIN_CONTINUE
}You Can Change The Text, The Mode Type. Here is A List of all The Game Mode Code:
zp_is_swarm_round() //To Disnable The Item in Swarm Mode zp_is_plague_round() //To Disnable The Item in Plague Mode zp_is_lnj_round() //To Disnable The Item in Armaggdon Mode zp_is_nemesis_round() //To Disnable The Item in Nemesis Mode zp_is_assassin_round() //To Disnable The Item in Assassin Mode zp_is_survivor_round() //To Disnable The Item in Survivor Mode zp_is_sniper_round() //To Disnable The Item in Sniper Mode and Dont Forgot To Add ")" Exemple of One Mode
if(zp_is_swarm_round()) Exemple Of Two Modes
if(zp_is_swarm_round() || zp_is_plague_round())
Exemple Of Three Modes
if(zp_is_swarm_round() || zp_is_plague_round() || zp_is_nemesis_round())I Cant Explain This, Im Not Good In English, Also if Compile Failed, Post Your Code Here. Or Download This. Also i Hope its Help You
Nice sharing. Yet, it will give error if you do just below:
public zp_extra_item_selected(player, itemid) { if(zp_is_swarm_round() || zp_is_plague_round()) { client_print(player, print_chat, "[ZP] This Extra Item Are Disnable in This Mode.") return PLUGIN_HANDLED } } Next, there will be problem with ammo pack also. Player cannot get the item and at the same time will lost their AP.
So, the correct way, you should use return ZP_PLUGIN_HANDLED.
Full code as below:
public zp_extra_item_selected(player, itemid) { if(zp_is_swarm_round() || zp_is_plague_round()) { client_print(player, print_chat, "[ZP] This Extra Item Are Disnable in This Mode.") return ZP_PLUGIN_HANDLED }