Jump to content

Problem with onClientMarkerHit.


Rat32

Recommended Posts

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

Link to comment

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