HunT Posted March 22, 2015 Share 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. Link to comment
TAPL Posted March 22, 2015 Share Posted March 22, 2015 player inside myMarkerYou have just entered a marker. Link to comment
HunT Posted March 22, 2015 Author Share Posted March 22, 2015 player inside myMarkerYou have just entered a marker. kidding? Link to comment
TAPL Posted March 22, 2015 Share Posted March 22, 2015 Both codes works fine on my server (Windows 1.4.1 r7085) with client (Windows 1.4.1 r7096). Link to comment
HunT Posted March 22, 2015 Author Share 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. Link to comment
TAPL Posted March 22, 2015 Share Posted March 22, 2015 The first code or the second code or both code doesn't work? What was your dimension? Link to comment
HunT Posted March 22, 2015 Author Share Posted March 22, 2015 I have solved but only with client events and trigger server. Probably the events onMarkerHit / onPlayerMarkerHit server side are bugged. 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