You can use this to freeze players:
PHP Code:
UTIL_FreezePlayer ( index , value )
{
if (!is_user_alive(id))
{
return;
}
new Flags = pev(index , pev_flags);
if (value && !(Flags & FL_FROZEN))
{
set_pev(index, pev_flags, (Flags | FL_FROZEN));
}
else if (!value && (Flags & FL_FROZEN))
{
set_pev(index, pev_flags, (Flags &~ FL_FROZEN));
}
}
UTIL_FreezePlayer(id , 1) freeze a player. UTIL_FreezePlayer(id, 0) unfreeze it.
About your code, set the speed to 0.1 if you want to stop them from moving. Setting to 0.0 let them move normally.