[HOW TO] Assign ID to spawned cars. - 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: [HOW TO] Assign ID to spawned cars. (
/showthread.php?tid=514657)
[HOW TO] Assign ID to spawned cars. -
Kratory - 22.05.2014
Hello guys.
I dont really know if there is a tutorial about this in the forum already. If there is, send it in a coment.
This is the plot: I want to learn how to give an ID for each vehicle that's spawned.
That's all for now.
TY!
Re: [HOW TO] Assign ID to spawned cars. -
AndySedeyn - 22.05.2014
Let's say that you have some AddStaticVehicle's under OnGameModeInit().
Let's say some Police Cruisers.
Add this to your global defines:
Then go to OnGameModeInit and add a static vehicle:
pawn Код:
pdcar1 = AddStaticVehicle(/*The information*/);
Keep doing this for each /police/ vehicle if you want.
Re: [HOW TO] Assign ID to spawned cars. -
Kratory - 22.05.2014
Lets say that a player buy a car, how i assing a ID to this car?