Jump to content

help| not hit this marker


scolen

Recommended Posts

what is problem this code ? 

gate = createObject(980, 364.82147, 186.89452, 1019.98438)
setElementInterior(gate, 3)
bombMarker = createMarker(364.70267, 186.29311, 1019.98438 -0.5, "cylinder", 1, 255, 0, 0)
setElementInterior(bombMarker, 3)

addEventHandler("onMarkerHit", bombMarker, function(player)
    outputChatBox("ugh!")
end)

 

Link to comment

When markers are inside cause problems, the server side event doesn't always fire.
I suggest you work on it in the client, you won't have this problem there.

gate = createObject(980, 364.82147, 186.89452, 1019.98438)
setElementInterior(gate, 3)
bombMarker = createMarker(364.70267, 186.29311, 1019.98438 -0.5, "cylinder", 1, 255, 0, 0)
setElementInterior(bombMarker, 3)

addEventHandler("onClientMarkerHit", bombMarker, function(player)
    outputChatBox("ugh!")
end)

 

Edited by alex17"
  • Thanks 1
Link to comment
15 minutes ago, alex17" said:

When markers are inside cause problems, the server side event doesn't always fire.
I suggest you work on it in the client, you won't have this problem there.

gate = createObject(980, 364.82147, 186.89452, 1019.98438)
setElementInterior(gate, 3)
bombMarker = createMarker(364.70267, 186.29311, 1019.98438 -0.5, "cylinder", 1, 255, 0, 0)
setElementInterior(bombMarker, 3)

addEventHandler("onClientMarkerHit", bombMarker, function(player)
    outputChatBox("ugh!")
end)

 

oky ❤️

 

Link to comment

theres a small issue in your code The Z position in the createMarker function has a subtraction without proper spacing

change this line

bombMarker = createMarker(364.70267, 186.29311, 1019.98438 -0.5, "cylinder", 1, 255, 0, 0)

to this line

bombMarker = createMarker(364.70267, 186.29311, 1019.98438 - 0.5, "cylinder", 1, 255, 0, 0)

 

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