milvus Posted April 30, 2013 Share Posted April 30, 2013 Hello, i dont understand. Why markers what i created from lua script is - detect player in normal distance - dont detect when player in vehicle load from mymap.map - detect player and player in vehicle in 3 meters, when marker have size=1 or less script.lua local myMarker = createMarker ( 1576.59998, -1636.5, 14.2, "arrow", 1, 255, 255, 0, 170 ) function markerHitCheck(thePlayer) outputChatBox("work", thePlayer) end addEventHandler("onMarkerHit", getRootElement(), markerHitCheck) mymap.map "marker (arrow) (3)" type="arrow" color="#D7B100FF" size="0.7" interior="0" dimension="0" alpha="255" posX="1583.40002" posY="-1638.90002" posZ="14" rotX="0" rotY="0" rotZ="0"> meta.xml "YourName" type="gamemode" name="My Server" description="My first MTA server" /> "mymap.map" dimension="0"> Link to comment
PaiN^ Posted April 30, 2013 Share Posted April 30, 2013 From what i understod, This is what you want : local myMarker = createMarker ( 1576.59998, -1636.5, 14.2, 'arrow', 1, 255, 255, 0, 170 ) function markerHitCheck(thePlayer) if getElementType ( thePlayer ) ~= 'player' then return end outputChatBox( 'work', thePlayer ) end addEventHandler( 'onMarkerHit', myMarker, markerHitCheck ) 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