SA-MP Forums Archive
DisablePlayerCheckpoint in a loop - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: DisablePlayerCheckpoint in a loop (/showthread.php?tid=99799)



DisablePlayerCheckpoint in a loop - Striker_Moe - 30.09.2009

Код:
  	for(new i=0; i<MAX_PLAYERS; i++)
  {
    DisablePlayerCheckpoint();
  }
Why does that not work? The checkpoint still gets displayed.


Re: DisablePlayerCheckpoint in a loop - dice7 - 30.09.2009

https://sampwiki.blast.hk/wiki/DisablePlayerCheckpoint


Re: DisablePlayerCheckpoint in a loop - SpiderPork - 30.09.2009

You haven't used any parameters in the function:
pawn Код:
for(new i = 0; i < MAX_PLAYERS; i++)
{
   DisablePlayerCheckpoint(i);
}



Re: DisablePlayerCheckpoint in a loop - curtisshakur - 30.09.2009

Quote:
Originally Posted by SpiderPork
You haven't used any parameters in the function:
pawn Код:
for(new i = 0; i < MAX_PLAYERS; i++)
{
  DisablePlayerCheckpoint(i);
}
try this:

for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
DisablePlayerCheckpoint(i);
}
}


Re: DisablePlayerCheckpoint in a loop - curtisshakur - 30.09.2009


try this:

Код:
for(new i = 0; i < MAX_PLAYERS; i++)
{
 if(IsPlayerConnected(i))
  {
   DisablePlayerCheckpoint(i);
  }
}