Jump to content

BIGGEST PROBLEM EVER!


Dimmitry007

Recommended Posts

Yow can use this for deleting all cars and also coolshape :

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) 

Link to comment
thanks mihaay

No problem,

Use this to destroy a car, do not use 'P' for Spawning or Destroying a car !

function DestroyVehicle(thePlayer) 
    if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(thePlayer)), aclGetGroup("Admin")) then 
        if isPedInVehicle(thePlayer) then 
            local col = getElementData(getPedOccupiedVehicle(thePlayer), "parent") 
            destroyElement(col) 
            destroyElement(getPedOccupiedVehicle(thePlayer)) 
        else 
            outputChatBox("You must be in a vehicle!", thePlayer, 255, 0, 0) 
        end 
    end 
end 
addCommandHandler("destroy", DestroyVehicle)   

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