Quote:
Originally Posted by Kalipso22
PHP Code:
/* Plugin generated by AMXX-Studio */
#include <amxmodx> #include <fun>
#define PLUGIN "New Plug-In" #define VERSION "1.0" #define AUTHOR "author"
public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) register_event("CurWeapon", "Event_Change_Weapon", "be", "1=1") }
public Event_Change_Weapon(id) { new weaponID = read_data(2) if(get_user_team(id) == 2){ if(weaponID != CSW_KNIFE && CSW_FLASHBANG && CSW_HEGRENADE && CSW_SMOKEGRENADE){ strip_user_weapons(id) give_item(id,"weapon_knife") } } }
|
PHP Code:
if(weaponID != CSW_KNIFE && CSW_FLASHBANG && CSW_HEGRENADE && CSW_SMOKEGRENADE)
You can't just do this, you have to repeat weaponID != to all defined weapons.
ex:
PHP Code:
if(weaponID != CSW_KNIFE && weaponID !=CSW_FLASHBANG && weaponID !=CSW_HEGRENADE && weaponID !=CSW_SMOKEGRENADE)
Though, this will disarm CT's whenever they pick up a gun. Assuming they have a set of grenades before picking up the gun, it's just going to disarm them back to knife [only] which is inefficient. You have to add something that prohibits CT's from picking up weapons altogether.