^_^ LOL ^_^ Posted February 3, 2014 Share Posted February 3, 2014 Hello everyone, im working on my dayz server, and i need to destroy a vehicle's but its very slow to destroy only with one. So i have no idea to make a script who destroy all vehicles on server, not blow it up but destroy. Anyone can help me? Thanks. Sorry for bad english. Link to comment
Karuzo Posted February 3, 2014 Share Posted February 3, 2014 Wiki example of destroyElement: function allvehiclesaredoomed() -- get a table of all the vehicles that exist and loop through it vehicles = getElementsByType("vehicle") for i,v in ipairs(vehicles) do -- destroy every vehicle. destroyElement(v) end end --The command handler below will destroy all vehicles once --you enter /vdoom in the chat box or vdoom in the game console. addCommandHandler("vdoom", allvehiclesaredoomed) --This is very useful if you use the freeroam resource and some --heartless players start spawn spamming. --You can also set it on a timer to have your server clear all --vehicles ever 60 minutes, (1 hour). Timer below: setTimer(allvehiclesaredoomed, 3600000, 0) Link to comment
^_^ LOL ^_^ Posted February 3, 2014 Author Share Posted February 3, 2014 Thank you very much. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now