Jump to content

Marker Trigger Command


CodyLewis

Recommended Posts

  • Moderators
marker = createMarker( 0, 0, 3, "cylinder", 1 ) 
  
addEventHandler('onClientMarkerHit', marker, function( hitElement) 
    if hitElement == localPlayer or hitElement == getPedOccupiedVehicle ( localPlayer ) then 
        exports.hedit:toggleEditor() 
    end 
end) 

Nope, it will do the same.

@CodeLewis: check if the function toggleEditor has arguments. Maybe you can specify the player to show it.

Otherwise, modify that function to do so.

Huh? Why would it? hitElement is the element that has entered the marker, I don't get it why would it be the same.

Yeah my bad, forgot we were on the client side

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