SA-MP Forums Archive
Question about if statements - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Question about if statements (/showthread.php?tid=587662)



Question about if statements - DarkLored - 01.09.2015

Is it possible to check if a variable increases using an if statement, I am trying to figure out how I can check if the player count increases in a variable to perform a certain function.

here is the variable I am using

gInfo[GAMEONE];


Re: Question about if statements - nezo2001 - 01.09.2015

I think you can use while


Re: Question about if statements - Roberto80 - 01.09.2015

Mmmmm just post some of your codes,and more about idea..
And try:
Код:
while(gInfo[GAMEONE]++)
{
Codes here
}



Re: Question about if statements - DarkLored - 01.09.2015

I have tried that method already but it simply increases the number of the variable.

pawn Код:
while(gInfo[GAMEONE]++)
    {
        new string[250];
        format(string, sizeof(string), "BATTLE ROYALE: Players: %d, join the game by typing /joingame 1.", gInfo[GAMEONE]);
        SendClientMessageToAll(-1, string);
        print(string);
        return 1;
    }