Tokio Posted May 27, 2018 Posted May 27, 2018 vas1 = createObject ( 3529, -2112.55103, -249.87376, 35.32031, 0, 0, 0 ) function repairClickedVehicle( button, state, player ) if button == "left" and state == "down" then if getElementType( source ) == "object" then destroyElement(vas1) end end end addEventHandler( "onElementClicked", getRootElement( ), repairClickedVehicle ) This working fine... but when i reconnect, the object appear again.. how to fix this? My servers: Fun: Derby(DD):
itHyperoX Posted May 27, 2018 Posted May 27, 2018 (edited) You should use onPlayerQuit then use if isElement(vas1) then destroyElements(vas1) and addEventHandler("onResourceStart", resourceRootElement(getThisResource()), function() vas1 = createObject ( 3529, -2112.55103, -249.87376, 35.32031, 0, 0, 0 ) end) Edited May 27, 2018 by TheMOG 1
Tokio Posted May 27, 2018 Author Posted May 27, 2018 6 minutes ago, TheMOG said: You should use onPlayerQuit then use if isElement(vas1) then destroyElements(vas1) thaanks My servers: Fun: Derby(DD):
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now