I'm trying to block a spectator player to touch on certain amount of entities in the server
Examples
Code:
opening a door
pick up weapons
touching a button
touch a football ball
pick up presents from the ground
Sound - USE FUNCTION (when the spectator players use "E" the other players in Terrorist / CT dont hear the sound of him using E)
As far as I tried I come up with this, but I have little understanding of the func_ and the classnames of the entities.
PHP Code:
RegisterHam(Ham_Touch, "weaponbox", "blocked_entity");
RegisterHam(Ham_Touch, "armoury_entity", "blocked_entity");
RegisterHam(Ham_Touch, "weapon_shield", "blocked_entity");
RegisterHam(Ham_Touch, "func_wall", "blocked_entity");
RegisterHam(Ham_Use, "func_button", "blocked_entity");
RegisterHam(Ham_Touch, "func_door", "blocked_entity");
RegisterHam(Ham_Touch, "func_door_rotation", "blocked_entity");
RegisterHam(Ham_Touch, "func_touchable", "blocked_entity");
blocked entity public function
PHP Code:
public blocked_entity(weapon,id)
{
if(!is_user_connected(id))
return HAM_IGNORED
if(cs_get_user_team(id) == CS_TEAM_SPECTATOR)
return HAM_SUPERCEDE
return HAM_IGNORED;
}
Note
Code:
Use buttons - working
PickUp weapons - working
touching a button - working
opening a door - working
__________________