HunT Posted March 22, 2015 Posted March 22, 2015 I used the examples in the wiki but the player is not recognized. What happens? Examples from the 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 onPlayerMarkerHit : function markerAlert(markerHit,matchingDimension) if (matchingDimension) then -- Make sure the player is in the same dimension as the marker (so they're actually going into it). outputChatBox("You have just entered a marker.",source,255,255,0) -- Output that they are. end end addEventHandler("onPlayerMarkerHit",getRootElement(),markerAlert) Before reply please try in local.
TAPL Posted March 22, 2015 Posted March 22, 2015 player inside myMarkerYou have just entered a marker.
HunT Posted March 22, 2015 Author Posted March 22, 2015 player inside myMarkerYou have just entered a marker. kidding?
TAPL Posted March 22, 2015 Posted March 22, 2015 Both codes works fine on my server (Windows 1.4.1 r7085) with client (Windows 1.4.1 r7096).
HunT Posted March 22, 2015 Author Posted March 22, 2015 Both codes works fine on my server (Windows 1.4.1 r7085) with client (Windows 1.4.1 r7096). With latest version of MTAsa 1.4.1 my local - the host server - and other 2 players no work.
TAPL Posted March 22, 2015 Posted March 22, 2015 The first code or the second code or both code doesn't work? What was your dimension?
HunT Posted March 22, 2015 Author Posted March 22, 2015 I have solved but only with client events and trigger server. Probably the events onMarkerHit / onPlayerMarkerHit server side are bugged.
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