Jump to content

Vehicle destroy.


^_^ LOL ^_^

Recommended Posts

Posted

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.

Posted

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) 
  

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...