it is like a botton prethink
i mean, see this code then you realize
PHP Code:
public client_PreThink(id)
{
if(!is_user_alive(id) || !zp_get_user_zombie(id) || zp_get_user_nemesis(id))
return PLUGIN_CONTINUE
if(zp_get_user_zombie_class(id) != g_zclass_ghost)
return PLUGIN_CONTINUE
new nzbut = get_user_button(id)
new ozbut = get_user_oldbutton(id)
if((nzbut & IN_JUMP) && !(get_entity_flags(id) & FL_ONGROUND) && !(ozbut & IN_JUMP))
{
if (jumpznum[id] < get_pcvar_num(cvar_jumps))
{
dozjump[id] = true
jumpznum[id]++
return PLUGIN_CONTINUE
}
}
if((nzbut & IN_JUMP) && (get_entity_flags(id) & FL_ONGROUND))
{
jumpznum[id] = 0
return PLUGIN_CONTINUE
}
return PLUGIN_CONTINUE
}