Jump to content

Vehicle destroy.


^_^ LOL ^_^

Recommended Posts

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

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...