Jump to content

Excuse me Answer ?


Recommended Posts

Posted

greetings

..excuse me my friends the cars doesnt remove from the server it staying whats the resource or command for delete it constantly ? :roll:

I Would like To learn the Scripting But?

no one Helping in this world ¬¬

  • 4 weeks later...
  • 1 month later...
Posted
  
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 :)

sup?

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

I Would like To learn the Scripting But?

no one Helping in this world ¬¬

Posted
addEventHandler("onVehicleExplode",root, 
function () 
destroyElement(source) 
end) 

thanks my friend i will try this too ...

I Would like To learn the Scripting But?

no one Helping in this world ¬¬

Posted

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) 

sup?

Posted
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

I Would like To learn the Scripting But?

no one Helping in this world ¬¬

Posted
His script is doing the same as my.

thanks for you guys i havent seen it yet because im doing different script when i finish it i will try it

I Would like To learn the Scripting But?

no one Helping in this world ¬¬

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