:fp: now I know why when I was an idiot scripter this script haven't worked :fp:
Reason:
addEventHandler("onMarkerHit", gateo)
Example from Wiki: (https://wiki.multitheftauto.com/wiki/OnMarkerHit)
local myMarker = createMarker(-2596.625, 579.358, 15.626, 'cylinder', 2.0, 255, 0, 0, 150) -- create myMarker
function MarkerHit( hitElement, matchingDimension ) -- define MarkerHit function for the handler
local elementType = getElementType( hitElement ) -- get the hit element's type
outputChatBox( elementType.." inside myMarker", getRootElement(), 255, 255, 0 ) -- attach the element's type with the text, and output it
end
addEventHandler( "onMarkerHit", myMarker, MarkerHit ) -- attach onMarkerHit event to MarkerHit function
he forgot to write the marker before the function :fp:
xXMADEXx's script haven't worked with me
cauz there is no specific marker to hit or to leave in the addEventHandler