Making this into
#3

your not seeing entirely where that code is going.
and the goto is right. but i must say, count is positioned wrong.

pawn Код:
public StartInfection(playerid) {
    new count = 0;
    start:
    new Random = Iter_Random(Player);
    if(Random == playerid && Iter_Count(Player) > 1) {
        count++;
        if(count > 3)
        {
             //failed
             return 1;
        }
        goto start;
    }
    OnceOnly = 0;
    return 1;
}
your code won't give it a chance to select another player if random equals to you and there are more players online

this code selects a random player, if the player is you and more than 1 players are online, it skips it and checks again to try to get the other player. well basically count should be around what i put it, unless iter_random keeps selecting the same player 4 times? s:
Reply


Messages In This Thread
Making this into - by Kitten - 08.07.2011, 05:13
Re: Making this into - by leong124 - 08.07.2011, 05:39
Re: Making this into - by Donya - 08.07.2011, 06:24

Forum Jump:


Users browsing this thread: 1 Guest(s)