uhm lets see this is my test func, i call with a command my menu normally menu display all okay at there, when the menu display im setting a task for this random_choose of 10 segs. so i wait the 10 segs i got that random player was choosen but the menu still displaying to me, i want to close it
PHP Code:
public random_choose(id)
{
new player
new ran;
new name[32]
new selected[32]
new count
if(rand == true)
{
ran = random(iNum);
selected[count++] = iPlayers[ran];
iPlayers[ran] = iPlayers[--iNum];
player = iPlayers[ran];
check = true;
if(swap == false)
{
cs_set_user_team(player, CS_TEAM_CT)
get_user_name(player,name,31)
client_print(0,print_chat,"%s Has Sido Elegido Por el Capitan de los CT's",name)
swap = true
client_cmd(id, "slot10")
//set_task(5.0,"AwesomeMenu",id)
return PLUGIN_HANDLED;
}
if(swap == true)
{
cs_set_user_team(player, CS_TEAM_T)
get_user_name(player,name,31)
client_print(0,print_chat,"%s Has Sido Elegido Por el Capitan de los T's",name)
swap = false
client_cmd(id, "slot10")
//set_task(5.0,"AwesomeMenu",id)
return PLUGIN_HANDLED;
}
}
}