Jump to content

Excuse me Answer ?


Recommended Posts

  • 4 weeks later...
  • 1 month later...
  
function dAllC(thePlayer) 
    accountname = getAccountName(getPlayerAccount(thePlayer)) 
    if isObjectInACLGroup("user." .. accountname, aclGetGroup("Admin")) then 
        vehicles = getElementsByType("vehicle") 
        for i,v in ipairs(vehicles) do 
            destroyElement(getElementData(v, "parent")) 
            destroyElement(v) 
            outputChatBox("Cars have been deleted !",thePlayer, 255, 0, 0, false)            
        end 
    end 
end 
addCommandHandler("dallvehs", dAllC) 

try it :)

Link to comment
  
function dAllC(thePlayer) 
    accountname = getAccountName(getPlayerAccount(thePlayer)) 
    if isObjectInACLGroup("user." .. accountname, aclGetGroup("Admin")) then 
        vehicles = getElementsByType("vehicle") 
        for i,v in ipairs(vehicles) do 
            destroyElement(getElementData(v, "parent")) 
            destroyElement(v) 
            outputChatBox("Cars have been deleted !",thePlayer, 255, 0, 0, false)            
        end 
    end 
end 
addCommandHandler("dallvehs", dAllC) 

try it :)

Good and thank you i tried to Make destroying for IDLE vehicles but if someone new enter the server and Buy if vehicle for e.g if i use this command it will destroy i want just for old car..!!

Link to comment

oh u mean u want to remove the exploded cars

ok then try this

-- 1 seg = 1000 
local tiempoparadesaparecer = 5000 
-- Function 
function desaparecer() 
    setTimer(destroyElement, tiempoparadesaparecer, 1, source) 
end 
-- Event 
addEventHandler("onVehicleExplode", getRootElement(), desaparecer) 

Link to comment
oh u mean u want to remove the exploded cars

ok then try this

-- 1 seg = 1000 
local tiempoparadesaparecer = 5000 
-- Function 
function desaparecer() 
    setTimer(destroyElement, tiempoparadesaparecer, 1, source) 
end 
-- Event 
addEventHandler("onVehicleExplode", getRootElement(), desaparecer) 

Thanks my friend i will try it

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