PHP Code:
public show_menu_(tid){
new id=tid-TASK_SHOWMENU;
if(!is_user_connected(id)) return
new iTeam=get_user_team(id);
new menu_id, keys;
new menuUp = player_menu_info( id, menu_id, keys );
// Only display menu if another isn't shown
if ( iTeam && (menuUp <= 0 || menu_id < 0) ){
new iTime=get_pcvar_num(gcvarFRVoteTime);
new iOffset=get_systime()-giVoteStart;
iTime-=iOffset;
new szMenu[128];
formatex(szMenu, 127, "\yDa li zelite FreeRun?^n^n\w1. Da^n2. Ne");
show_menu(id, KeysFFVote, szMenu, iTime, "FRVote");
}else
show_menu_(tid) // you don't have to set task for that
}
or
PHP Code:
public client_disconnect(id) {
if(task_exists(id+TASK_SHOWMENU)) remove_task(id+TASK_SHOWMENU)
}
when someone disconnects, you must remove the tasks that related to the player. Otherwise task will continue and engine cant find the player.