Jump to content

Help Destroy Vehicle


Annas

Recommended Posts

Posted

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) 
  

Posted
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) 

Posted
I cant as it's a complete script. and it's just

If (Hide Vehicle)

Then triggerserverevent ..

Try to check if the selected is returns true, by outputing it in somewhere

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