select player random
#12

No, I think that where it is, it's fine. Because thanks to the timer he chooses the president and the vice president in the middle of the count.

I tried to do it that way (I have not tried it yet), but I do not know if it will work or it would be a good idea:

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)
                {
                    if(!
P_INFO[ALL_READY])
                    {
                        new 
president Iter_Random(PlayersInEvent);
                        
Iter_Remove(PlayersInEventpresident);
                        
Player[president][PLAYER_SERVICE_SECRET] = PRESIDENT;
                        
SendClientMessageEx(playerid, -1"%s is the new president"Player[president][NAME]);
                        
                        new 
vice_president Iter_Random(PlayersInEvent);
                        
Player[vice_president][PLAYER_SERVICE_SECRET] = VICE_PRESIDENT;
                        
SendClientMessageEx(playerid, -1"%s is the new vice president"Player[vice_president][NAME]);
                        
P_INFO[ALL_READY] = true;
                    }
                
                    new 
str[10]; format(strsizeof(str), "%d"P_INFO[TIME_START]);
                    
GameTextForPlayer(playeridstr10003);
                }
            }
        }
    } 
@Y_LESS, help me please, you have experience on this.
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: 4 Guest(s)