Destroying vehicle
#1

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

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
Reply
#3

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(...);
Reply
#4

ThankYou SOOOO MUCH!
Reply
#5

No problem.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)