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)
+--- Thread: loop (
/showthread.php?tid=476781)
loop -
newbie scripter - 20.11.2013
how to loop through the objects which are already created and the one we make??
is it
pawn Код:
for(new i = 0; i < MAX_OBJECTS; i++ )
Re: loop -
Djole1337 - 20.11.2013
pawn Код:
for (new iIndex = 0; iIndex != MAX_OBJECTS; ++ iIndex)
{
if (IsValidObject(iIndex))
{
printf("Object ID %i is valid.", iIndex);
}
}
Re: loop -
newbie scripter - 20.11.2013
im making an fs of a drivable object so will it be this ??
pawn Код:
for (new iIndex = 0; iIndex != MAX_OBJECTS; ++ iIndex)
{
if (IsValidObject(iIndex))
{
if (iIndex == objectid)
{
// blah?
}
}
}