scolen Posted September 17, 2023 Share Posted September 17, 2023 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
alex17" Posted September 17, 2023 Share Posted September 17, 2023 (edited) 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 September 17, 2023 by alex17" 1 Link to comment
scolen Posted September 17, 2023 Author Share Posted September 17, 2023 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
FLUSHBICEPS Posted September 17, 2023 Share Posted September 17, 2023 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
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