You should cache a players team when a team is joined; this will be more efficient than constantly calling get_user_team when this ham forward is fired (which is alot).
The reason it isn't working at all is your forward function name does not match the function name used to register.
RegisterHam( Ham_Touch, "weaponbox",
"FwdHamPlayerWeaponTouch" );
RegisterHam( Ham_Touch, "armoury_entity",
"FwdHamPlayerWeaponTouch" );
Try this:
PHP Code:
public FwdHamPlayerWeaponTouch( const iEntity, const id )
return ( 1 <= id <= g_iMaxPlayers ) ? HAM_SUPERCEDE : HAM_IGNORED;
__________________