12.04.2012, 14:38
What is the best way to loop through all the vehicles spawned in a server and detect their positions?
new Float:x, Float:y, Float:z;
for (new i; i < 2000; i++)
GetVehiclePos(i,x,y,z);
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
}