About cycles. - 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: About cycles. (
/showthread.php?tid=356213)
About cycles. -
budelis - 02.07.2012
Hi i want to ask something here:
Код:
for(new i = 0; i < MAX_PLAYERS; i++)
{
my MAX_PLAYERS is 100. It will be from 0 to 100? or 0 to 99 maybe need that: (=)
Код:
for(new i = 0; i =< MAX_PLAYERS; i++)
{
Respuesta: About cycles. -
[DOG]irinel1996 - 02.07.2012
From 0 to 500:
pawn Код:
for(new i = 0; i <= MAX_PLAYERS; i++)
From 0 to 499:
pawn Код:
for(new i = 0, i < MAX_PLAYERS; i++)
MAX_PLAYERS has a value of 500. If you want 100 you can do that:
pawn Код:
#undef MAX_PLAYERS
#define MAX_PLAYERS (100)
//Should put it under #include <a_samp>
Best regards!