SA-MP Forums Archive
Vehicle spawn info - 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 spawn info (/showthread.php?tid=653909)



Vehicle spawn info - andrejc999 - 16.05.2018

Is there a way to set a vehicles spawn info like for players?

Because I made some variables for vehicle spawn coords and angle but the angle doesn't get set for some reason,
and after I put a timer to set it's Z angle it works like magic.

Is there a way to do this without a timer and why is it not turning the right way?


Re: Vehicle spawn info - CodeStyle175 - 16.05.2018

no, timer doesn't work, just teleport realy far away and back and z angle is back again.
you have to destroy vehicle and create vehicle when vehicle respawns to have right angle.


Re: Vehicle spawn info - andrejc999 - 16.05.2018

Oh ok, didn't know that thx...

Could I just set the vehicles position to it's current position to fix this?


Re: Vehicle spawn info - CodeStyle175 - 16.05.2018

well for example when you have roleplay server and player has parked his vehicle somewhere, then you store the values to array.
and when vehicle respawns you destroy vehicle and take coordinates from array.


Re: Vehicle spawn info - andrejc999 - 16.05.2018

K, I already did that but I didn't want to destroy the vehicle and spawn it again, so I just made them go to specific coords after spawning. Thank you rep+