SA-MP Forums Archive
vehicleid - 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: vehicleid (/showthread.php?tid=534171)



vehicleid - MrMou6 - 28.08.2014

first vehicle in server have "vehicleid" 0 or 1?


Re: vehicleid - IceCube! - 28.08.2014

Vehicles ID's start at 0, and progress upwards. However deleteing vehicle 56, and then creating another will fill slot 56 as it no longer has a vehicle assigned to it.

If your asking this because you need to know the ID of a certain vehicle, or set of vehicles assign the ID(s) to a variable or an array.

For one vehicle.

pawn Код:
new Vehicle;
Vehicle = CreateVehicle(...);
For multiple

pawn Код:
new Vehicles[10];
Vehicle[0] = CreateVehicle(...);
Vehicle[1] = CreateVehicle(...);
The above array can go upto 9, as it holds 10 placements. Including 0, just alter the value to suit your needs.


Re: vehicleid - MrMou6 - 28.08.2014

Thanks!