Hi ther i have a script problem with respawn i want to protect from dublicate
when player press in RESPAWN Button in menu as it script:
PHP Code:
menu_additem(menu, "Respawn - \r6000XP", _, _, (!is_user_alive(id) && xp >= 6000) ? -1 : call);
and it function:
PHP Code:
case 4:
{
if(!is_user_alive(id))
{
set_pev(id, pev_deadflag, DEAD_RESPAWNABLE);
set_task(0.2, "respawn", id)
set_user_xp(id, get_user_xp(id)-6000);
}
and respawn tast function:
PHP Code:
public respawn(id) { ExecuteHamB(Ham_CS_RoundRespawn, id); }
and my problem is when press in button its dublicate respawn then get respawn as fell like round get restart as you know guy so i want protect from 2 dublicat respawn as it dont took 2 times xp only respawn 2 times in 1 secound....
__________________