Hello, I'm trying to block the velocity that is applied when player press IN_BACK. I tried the following but doesn't work properly.
Code:
public CBasePlayer_PreThink(this)
{
if (!is_user_alive(this))
return HC_CONTINUE;
static bitsButton;
bitsButton = get_entvar(this, var_button);
if (bitsButton & IN_BACK)
set_entvar(this, var_button, bitsButton & ~IN_BACK);
return HC_CONTINUE;
}
Also I tried to disable maxspeed, but doesn't worked.
Code:
public CBasePlayer_ResetMaxSpeed_Post(this)
{
if (!is_user_alive(this))
return;
set_entvar(this, var_maxspeed, 0.0);
}
__________________