Quote:
Originally Posted by Bugsy
Try something like this, check the weapon in addplayeritem fwd.
Untested, written mostly on my phone. You will need to add additional checks to see if player was just spawned.
PHP Code:
RegisterHam(Ham_AddPlayerItem, "player", "AddPlayerItem"); public AddPlayerItem(Cl, Ent) { new iWeapID = cs_get_weapon_id( Ent ); //prevent item from being given if ( condition ) { SetHamReturnInteger(false); return HAM_SUPERCEDE; } return HAM_IGNORED; }
|
You should also kill the entity
Code:
entity_set_int(Ent, EV_INT_flags, FL_KILLME);
__________________