This is a poor way to make the player duck.
You can do what's following :
PHP Code:
SetUserOrigin_Safe(id, Float:flOrigin[3])
{
entity_set_origin(id, flOrigin)
entity_set_int(id, EV_INT_flags, entity_get_int(id, EV_INT_flags) | FL_DUCKING)
call_think(id)
}
Or better IMO :
PHP Code:
new const Float:VEC_DUCK_HULL_MIN[3] = {-16.0, -16.0, -18.0 }
new const Float:VEC_DUCK_HULL_MAX[3] = { 16.0, 16.0, 18.0 }
SetUserOrigin_Safe(id, Float:flOrigin[3])
{
engfunc(EngFunc_SetSize, id, VEC_DUCK_HULL_MIN, VEC_DUCK_HULL_MAX)
engfunc(EngFunc_SetOrigin, id, flOrigin)
}
__________________