Jump to content

onClientElementDestroy


Bean666

Recommended Posts

hello i have 2 markers , serverside and client, whenever i step on the marker from serverside it destroys the marker in clientside, i know im using resourceRoot, because of the onClientElementDestroy.. it doesnt work when i just put bankmarker, how could i possibly avoid that?

local bankmarker = createMarker( 767.0537109375, 2277.9609375, 8.8, "cylinder", 1.5, 255, 0, 0, 255 ) 
  
addEventHandler("onClientElementDestroy", resourceRoot,function () 
    if getElementType(source) == "marker" then 
    setTimer ( function() 
    local bankmarker = createMarker( 767.0537109375, 2277.9609375, 8.8, "cylinder", 1.5, 255, 0, 0, 255 ) 
    end,3000,1) 
end 
end 
) 
  
function ondeliverhit() 
destroyElement(resourceRoot) 
setElementData(localPlayer, "deliver", true) 
end 
addEventHandler("onClientMarkerHit", resourceRoot, ondeliverhit) 

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