Sign in to follow this  
misterk99

Understanding On Marker Hit

Recommended Posts

Hey Guys,

For the last couple of hours I have been trying to get OnMarkerHit to trigger, I watched multiple youtube videos and tried using the search function here but none of them helped.

The script is a server sided script, This is the code I am using:

marker = createMarker(1514.5, -1678.2, 13, 'cylinder', 1.0, 19, 132, 38, 150) 
function markerHit(hitElement) 
    setElementPosition(hitElement,0, 0, 0)
    outputChatBox("Hitting marker")
end 
addEventHandler("onMarkerHit", marker , markerHit)  

But nothing happens, and I just don't know why. The object hitting the marker is a player.

Hope someone can help me out.

Greetings.
 

misterk99

Share this post


Link to post

Try to check if your marker is successfuly created. Also make sure your script is server-sided in meta.xml

Share this post


Link to post

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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.