Looping
#8

PHP код:
for (new isizeof(Stadium); i++) {
     if(
IsPlayerInRangeOfPoint(playerid2.5StadiumEntrance[i][x], StadiumEntrance[i][y], StadiumEntrance[i][z])) {
        
SendClientMessage(playerid, -1"successful");
                return 
1;
    }
} else {
    
SendClientMessage(playerid, -1"not successful");
    return 
1;

You realize...
You're calling the ELSE statement every single time right?
So lets say you have...
10 Inside your array..
You're going to get 10 messages...
The code Posted above should work.
Reply


Messages In This Thread
Looping (solved) - by Darkwood17 - 10.07.2015, 15:35
Re: Looping - by notime - 10.07.2015, 15:40
Re: Looping - by Darkwood17 - 10.07.2015, 15:45
Re: Looping - by notime - 10.07.2015, 15:46
Re: Looping - by Vince - 10.07.2015, 16:44
Re: Looping - by Darkwood17 - 10.07.2015, 17:48
Re: Loop - by Darkwood17 - 11.07.2015, 05:39
Re: Looping - by Prokill911 - 11.07.2015, 06:12
Re: Looping - by Darkwood17 - 11.07.2015, 06:29
Re: Looping - by Prokill911 - 11.07.2015, 06:34

Forum Jump:


Users browsing this thread: 2 Guest(s)