select player random
#9

I really need it. I need to make him only choose the president and the vice president only once. In the countdown, he chooses the president and the vice president at every moment.

CODE:

PHP код:
P_INFO[TIME_START] --; 
    if(
P_INFO[TIME_START] >= 1)  
    { 
        for(new 
playerid 0GetPlayerPoolSize(); playerid <= jplayerid++) 
        { 
            if(
IsPlayerConnected(playerid)) 
            { 
                if(
Player[playerid][M_PTP] == 1
                { 
                    new 
str[10]; format(strsizeof(str), "%d"P_INFO[TIME_START]); 
                    
GameTextForPlayer(playeridstr10003); 
                 
                    new 
Iter_Random(PlayersInEvent); 
                    if(!
P_INFO[PRESIDENT_READY]) 
                    { 
                        
Iter_Remove(PlayersInEventr); 
                        
P_INFO[PRESIDENT_READY] = true
                        
Player[r][PLAYER_SERVICE_SECRET] = PRESIDENT
                        
SendClientMessageEx(playerid, -1"%s is the new president"Player[r][NAME]); 
                    } 
                    else 
                    { 
                        
Player[r][PLAYER_SERVICE_SECRET] = VICE_PRESIDENT
                        
SendClientMessageEx(playerid, -1"%s is the new vice president"Player[r][NAME]); 
                    } 
                } 
            } 
        } 
    } 
I need to have him only choose the president and the vice president once, and only show the countdown and not the message again. Any idea how to do that?
Reply


Messages In This Thread
select player random - by SapMan - 16.09.2018, 01:23
Re: select player random - by SyS - 16.09.2018, 02:21
Re: select player random - by TheToretto - 20.09.2018, 22:35
Re: select player random - by KinderClans - 20.09.2018, 22:42
Re: select player random - by TheToretto - 20.09.2018, 22:47
Re: select player random - by KinderClans - 20.09.2018, 22:51
Re: select player random - by SyS - 22.09.2018, 03:41
Re: select player random - by SapMan - 22.09.2018, 15:41
Re: select player random - by SapMan - 25.09.2018, 04:31
Re: select player random - by SapMan - 25.09.2018, 19:42
Re: select player random - by Calisthenics - 25.09.2018, 20:01
Re: select player random - by SapMan - 25.09.2018, 20:21

Forum Jump:


Users browsing this thread: 1 Guest(s)