Vehicle Looping - 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: Vehicle Looping (
/showthread.php?tid=333693)
Vehicle Looping -
serj009 - 12.04.2012
What is the best way to loop through all the vehicles spawned in a server and detect their positions?
Re: Vehicle Looping -
SomebodyAndMe - 12.04.2012
pawn Код:
new Float:x, Float:y, Float:z;
for (new i; i < 2000; i++)
GetVehiclePos(i,x,y,z);
Re: Vehicle Looping -
Shabi RoxX - 12.04.2012
This: ?
pawn Код:
new VehPosX[Max_Vehicles];
new VehPosY[Max_Vehicles];
new VehPosZ[Max_Vehicles];
for(new i = 0;i < MAX_VEHICLES;i++)
{
GetVehiclePos(i,VehPosX[i],VehPosY[i],VehPosZ[i]);
//VehPosX[0] = PosX for Vehicleid 0
}
Re: Vehicle Looping -
serj009 - 12.04.2012
Quote:
Originally Posted by SomebodyAndMe
pawn Код:
new Float:x, Float:y, Float:z; for (new i; i < 2000; i++) GetVehiclePos(i,x,y,z);
|
Thank you sir