Jump to content

Help Destroy Vehicle


Annas

Recommended Posts

Hi , i have made a script to destroy selected vehicle , but idk why it's not working

--- SERVER SIDE 
function destroyvehicles(player, selected) 
    destroyElement(selected) 
    outputChatBox("You Destroyed This Vehicle Vehicle", player, 0, 250, 0). 
    end 
end 
addEvent("CSTdestroy.destroyvehicle", true) 
addEventHandler("CSTdestroy.destroyvehicle", root, destroyvehicles) 
  

Link to comment
function destroyvehicles(player, selected) 
    if selected and isElement(selected) then 
        destroyElement(selected) 
        outputChatBox("You Destroyed This Vehicle Vehicle", player, 0, 250, 0). 
    end 
end 
addEvent("CSTdestroy.destroyvehicle", true) 
addEventHandler("CSTdestroy.destroyvehicle", root, destroyvehicles) 

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