SA-MP Forums Archive
How to do this? - 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 do this? (/showthread.php?tid=471783)



How to do this? - .Mento - 25.10.2013

When I enter a checkpoint, i want the system to give me a new vehicle and destroy my old one, I know how to do this, but if i drive with alot of speed into the checkpoint it stops me, it will put me to 0 kph / mph.

I want to let myself continue in the same direction with the same speed, but in a new vehicle, how do i do this?

Thanks alot


Re: How to do this? - Dragonsaurus - 25.10.2013

pawn Код:
new Float:vx, Float:vy, Float:vz;
GetVehicleVelocity(GetPlayerVehicleID(playerid), vx, vy, vz);
// Destroy current vehicle, create the new one and put the player in driver seat stuff code...
SetVehicleVelocity(GetPlayerVehicleID(playerid), vx, vy, vz);



Re: How to do this? - .Mento - 25.10.2013

thanks!


Re: How to do this? - .Mento - 26.10.2013

I have tried this, and it doesn't work when entering a checkpoint.. But when I use it inside a command it does work...?