I trying to force a zombie to duck and may not jump
PHP Code:
#include <hamsandwich>
PHP Code:
RegisterHam(Ham_Player_PreThink, "player", "fwd_Player_PreThink")
PHP Code:
public fwd_Player_PreThink(id)
{
if (!zp_get_user_zombie(id) || zp_get_user_nemesis(id))
HAM_IGNORED
if (zp_get_user_zombie_class(id) != g_zclass_hczombie)
HAM_IGNORED
set_pev(id, pev_oldbuttons, pev(id, pev_oldbuttons)|IN_JUMP|IN_DUCK)
{
return HAM_SUPERCEDE
}
return HAM_IGNORED
}
but it didn't work.
__________________