A Question about Scripting - 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: A Question about Scripting (
/showthread.php?tid=87780)
A Question about Scripting -
Mowgli - 22.07.2009
I been making a script llately and i keep coming across this when i look at other peoples scripts.
pawn Код:
for(new i = 0; i < MAX_PLAYERS; i++)
{
Ive seen this quite alot and not totally sure what it means but i asume it does somthing like, Chooses everyone in the game? im not really that sure.... IF someone could explain it, that wuld be great,
Also if it does what i think it does, so it chooses all players in the game, would this code work?(it wont be accurate cos im typeing it straight into the forum box)
pawn Код:
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(stracci[playerid] == 1)
{
SetCheckpoint(blahblah)
}
}
}
So if that script was to work, It would set a checkpoint for all Stracci Members...so would that work, im not sure because i still confused about that first bit...Thanks for help everyone!