Destroy the vehicle on spawn of a new one?
#1

When you spawn a vehicle how would i make it destroy the old one because this looks alittle complex

http://mlk.pastebin.com/m718a53d5
Reply
#2

Quote:
Originally Posted by [mad
MLK (dino-host.com) ]
When you spawn a vehicle how would i make it destroy the old one because this looks alittle complex

http://mlk.pastebin.com/m718a53d5
If I read that right, all you have to do is at the top of the script do this:
pawn Code:
new SpawnedCar[MAX_PLAYERS];
Then when you make a new car do:
pawn Code:
SpawnedCar[playerid] = CreateVehicle(...);
Now the vehicle's ID should be stored there so you can do:
pawn Code:
DestoryVehicle(SpawnedCar[playerid]);
Reply
#3

Credits to donny for this script he made it i just added destroy system and /car /call commands
ps. Donny if you don't approve i will delete this post..

[REL] vDialog - Vehicle spawning dialog - 0.1c with vehicle destroy system
Pastbin
http://pastebin.com/fd584725
Reply
#4

It's for 0.3
Reply
#5

Quote:
Originally Posted by {MadMan}
Credits to donny for this script he made it i just added destroy system and /car /call commands
ps. Donny if you don't approve i will delete this post..

[REL] vDialog - Vehicle spawning dialog - 0.1c with vehicle destroy system
Pastbin
http://pastebin.com/fd584725
No that's fine dude, it's open source for a reason.

Anyway maybe you guys want to check out the thread again as it's version 0.2a now and that script there is from 0.1c so it's four versions behind.

Quote:

In 0.1d I've included a compile option for spawn messages and fixed some key issues (thanks ******, I've not read that key page before).
In 0.1e I've rewritten most of the script, optimised it so it's easier to read, added a compile option to ignore virtual worlds and now the vehicles are linked to the players interior when spawned.
In 0.1f I've added a few more compile options/configs, added vehicle activation for the dialog with a compile option and an extra spawn message, the vehicle is now created directly at your position also and the angle is fixed (no longer + 90).
In 0.2a I've removed key activation and made it command activated only (/vdialog), vehicles now have a default 'respawn_delay' of ten minutes instead of around 18 hours (lmao, my bad!!) and vehicles which are created by the dialog (only the dialog) will by default be destroyed when they respawn (requested) but there is a compile option to control this.

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)