Choosing a random player bug
#1

Hey, I registered an account as I browse this forum a lot. So, let's get to the point. This is my code:
PHP код:
    for(new 0MAX_PLAYERSi++)
{
    if(
IsPlayerConnected(i))
    {
        if(
pInEvent[i] == 1)
        {
        new 
president random(i);
        if(
president == playerid)
                {
                
SetPlayerSkin(playerid228);
                
GivePlayerWeapon(playerid2499999);
                }
                else if(
president != playerid)
                {
                
SetPlayerSkin(playerid165);
                
GivePlayerWeapon(playerid2399999);
                } 
Basically this should choose a random player as the president and the rest of the people as the agents. I already made the event commands etc but this block of code is my problem.
Any fix?
Reply


Messages In This Thread
Choosing a random player bug - by TroubleFingers - 05.11.2016, 10:37
Re: Choosing a random player bug - by SyS - 05.11.2016, 11:24
Re: Choosing a random player bug - by Logic_ - 05.11.2016, 11:56

Forum Jump:


Users browsing this thread: 1 Guest(s)