SA-MP Forums Archive
Destroying vehicle - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Destroying vehicle (/showthread.php?tid=183152)



Destroying vehicle - SkizzoTrick - 14.10.2010

Hello everyone,how do i destroy a vehicle and respawn it after arriving a checkpoint for example?PLS HELP!


Re: Destroying vehicle - ColdXX - 14.10.2010

OnPlayerEnterCheckpoint
..
..
new veh = GetPlayerVehicleID(playerid);
DestroyVehicle(veh)

im not pretty sure about how can u be placed in a vehicle without any command in the same place that u left the old one! But....

PutPlayerInVehicle

"veh" gets he VehicleID!

Im not so good in explanations! Hope it helped


Re: Destroying vehicle - LarzI - 14.10.2010

pawn Код:
//global
new myCar;

//gamemodeinit or wherever you spawn the vehicle the first time
myCar = AddStaticVehicle(...);

//where you want to destroy
DestroyVehicle(myCar);

//onplayerentercheckpoint
myCar = CreateVehicle(...);



Re: Destroying vehicle - SkizzoTrick - 14.10.2010

ThankYou SOOOO MUCH!


Re: Destroying vehicle - LarzI - 14.10.2010

No problem.