Rat32 Posted March 1, 2015 Posted March 1, 2015 Hi. I have a problem with a permanent marker. Calls the function after EVERY marker upon entry, and I would like to invoke only one. Please help and possibly explain my mistake . MARKER: gunmarker = createMarker(1914.39136, -1870.26575, 12.56373, "cylinder", 0.5, 100) FUNCTION: function dealGUND(thePlayer, gunmarker) outputChatBox("Dealer: Yo, what you need, bro?") gun = false guiSetVisible(oknodila, true) showCursor(true) end addEventHandler("onClientMarkerHit", getRootElement(), dealGUND) All in clientside. PS. sorry for my bad English, I'm from Poland .
xeon17 Posted March 1, 2015 Posted March 1, 2015 (edited) gunmarker = createMarker(1914.39136, -1870.26575, 12.56373, "cylinder", 0.5, 100) function dealGUND(thePlayer, dimensions) if thePlayer == localPlayer and dimensions then if source == gunmarker then outputChatBox("Dealer: Yo, what you need, bro?") gun = false guiSetVisible(oknodila, true) showCursor(true) end end end addEventHandler("onClientMarkerHit", getRootElement(), dealGUND) Edited March 1, 2015 by Guest
Rat32 Posted March 1, 2015 Author Posted March 1, 2015 Not work. Debugscript: "bad argument @ "addEventHandler" [Expected at argument 2, got nil]. //Gunmarker is on the function up
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