[FilterScript] [FS]Destroy Vehicle System
#1

Hi,here is code to destroy a vehicle without crashing server.
Just type /destroyv ingame

DOWNLOAD:
http://files.filefront.com/DestroyVr.../fileinfo.html
Be free to mirror.
Reply
#2

It destroys the car your in?
Reply
#3

Quote:
Originally Posted by backwardsman97
It destroys the car your in?
yes it will remove u from car and destroy car in 5 seconds
Reply
#4

Quote:
Originally Posted by Seif[P7
]
Snipe, stop making FS that only contains a command...
omg its not only a comand :O
Reply
#5

If your gonna make mini scripts like these, post them here.
Reply
#6

Quote:
Originally Posted by [P7
Pixels^ ]
If your gonna make mini scripts like these, post them here.
lol sorry i never saw that topic
Reply
#7

What if the player enters the car in the 5 seconds between the kick-out-of-car and the destoying of the vehicle..?
Reply
#8

Quote:
Originally Posted by Sandra18[NL
]
What if the player enters the car in the 5 seconds between the kick-out-of-car and the destoying of the vehicle..?
hmm crap ,if the player enter car between 5 seconds before destroy everyone will crash i will edit code to lock the vehicle
thnx
Reply
#9

Quote:
Originally Posted by Seif[P7
]
Quote:
Originally Posted by [TG
Snipe ]
Quote:
Originally Posted by Sandra18[NL
]
What if the player enters the car in the 5 seconds between the kick-out-of-car and the destoying of the vehicle..?
hmm crap ,if the player enter car between 5 seconds before destroy everyone will crash i will edit code to lock the vehicle
thnx
Weird, that comes from my function
Wouldn't it be better to check if anybody is in that car out of connected players, if false destroy it, if true respawn and destroy it within 100 seconds. Respawning a car will kick whoever is in it out.

* I changed my theory into an edit of Seif's code at Useful Snippets topic.
Reply
#10

Quote:
Originally Posted by Seif[P7
]
Quote:
Originally Posted by [TG
Snipe ]
Quote:
Originally Posted by Sandra18[NL
]
What if the player enters the car in the 5 seconds between the kick-out-of-car and the destoying of the vehicle..?
hmm crap ,if the player enter car between 5 seconds before destroy everyone will crash i will edit code to lock the vehicle
thnx
Weird, that comes from my function
omg now if i lock a car its stealed from u...i think u diddnt created the setvehicleparamsforplayer did u? lol
anyway i just changed the timer to 1 second,works fine and the player dont have time to reenter the vehicle and i tested with more than 1 player
Reply
#11

nice one m8
Reply
#12

hehe, well-scripted

Charmander
Reply
#13

Secure way to destroy a car:

1) respawn the car (it forces everyone out off the vehicle without any loops)
2) Onvehiclespawn set vehiclevirtualworld to a world you dont use (no one can enter it)
3) Onvehiclespawn Set a timer to destroy vehicle after 5-10 seconds, this delay ensures no lagging player is in it.

Simple and it works without any loops or other timeconsuming operations which can allow someone to enter it.
Reply
#14

Do that and you have a crashing server..You need the timeout to handle lagging players..
Reply
#15

its not actually lag most of the time...sa-mp needs time to process the player info...ur still registered as inside a vehicle for a few seconds after u exit it - lag will however stack up onto this effect...i've fount that respawning and veitrtualworld setting are the best way to do it and simply destroy 6 seconds afterwards - ive had 0 problems with this ever since i started using this method
Reply
#16

Im glad taxi to hear you had no problems with it as i remember we developed this method together in a topic some time back. Its pretty smooth as there is no looping and other overhead involved and it takes care of pitfalls like lagging players.
Reply
#17

Im going to try that, I have always suffred a lot of problems with destroy Vehicle, But putting em in another world, setting a 6 second timer, not bad
[me=Grove]tries it[/me]
Reply
#18

Happy coding trying it out - im pretty confident that you will have success if you do it as posted here, then you can change your avitar and maybe give taxi and me credit LOL
Reply
#19

hmm i had 5 seconds but now i put 1 second because it works the same i already tested with more players nowone crash he have time to leave vehicle and no time to come back so whats the problem...
Reply
#20

no prob... looks kewl...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)