Hello. I have a problem with my plugin. I have applied when a player holds E(+USE) he freezes and when he releases he unfreezes. but my code doesnt work.. anyone knows how to fix this?
Heres some code for just understanding what i mean...
PHP Code:
new g_nomove[33]
public fw_PlayerPreThink(id)
{
if (g_nomove[id])
{
set_pev(id, pev_maxspeed, 1.0)
}
return PLUGIN_CONTINUE
}
public freeze_starts_here_on_pressing_e(id)
{
g_nomove[id] = true; // this is where i want it to work but it doesnt
}