Quote:
Originally Posted by Matthias_
Why not use a simple array?
pawn Код:
new aVehicles[5];
aVehicles[0] = AddStaticVehicle(...); aVehicles[1] = AddStaticVehicle(...); aVehicles[2] = AddStaticVehicle(...); aVehicles[3] = AddStaticVehicle(...); aVehicles[4] = AddStaticVehicle(...);
for(i = 0; i < 6; i++) { SetVehicleVirtualWorld(aVehicles[i], 3); }
|
Wouldn't it make more sense to use a couple of variables to determine the first vehicle and the last and just loop through the IDs based on them and then set it to the virtual world instead of assigning each and every vehicle to an array?
pawn Код:
v_VehicleWorlds[0] = AddStaticVehicle(...);
AddStaticVehicle(...);
AddStaticVehicle(...);
v_VehicleWorlds[1] = AddStaticVehicle(...);
for(new vid = v_VehicleWorlds[0]; vid < v_VehicleWorlds[1]; vid++)
{
SetVehicleVirtualWorld(vid, 1);
}