FbzinnN Posted March 4, 2022 Share Posted March 4, 2022 -- Server -- markersposto = { {1943.3129882812,-1767.2844238281,13.390598297119}, {1943.189453125,-1771.5206298828,13.390598297119}, } for _, marker in ipairs(markersposto) do local createMarkerposto = createMarker(marker[1], marker[2], marker[3] - 1, "cylinder", 1.2, 0,255,173, 30) createBlipAttachedTo(createMarkerposto, 44, _, _, _, _, _, _, 200) end function DxPosto1MenssagemWorldS () local x, y, z = getElementPosition( markersposto ) local Mx, My, Mz = getCameraMatrix( ) if ( getDistanceBetweenPoints3D( x, y, z, Mx, My, Mz ) <= 5 ) then local WorldPositionX, WorldPositionY = getScreenFromWorldPosition( x, y, z +0.5, 0.0 ) if ( WorldPositionX and WorldPositionY ) then triggerClientEvent (source, "FB:DxPosto1MenssagemWorld", root) ---dxDrawText("aperte 'E' para abrir", WorldPositionX - 1, WorldPositionY + 1, WorldPositionX - 1, WorldPositionY + 1, tocolor(255, 255, 255, 255), 1, "arial", "center", "center", false, false, false, false, false) end end end addEventHandler ( "onClientRender", root, DxPosto1MenssagemWorldS ) --Client-- function DxPosto1MenssagemWorldC () dxDrawText("aperte 'E' para abrir", WorldPositionX - 1, WorldPositionY + 1, WorldPositionX - 1, WorldPositionY + 1, tocolor(255, 255, 255, 255), 1, "arial", "center", "center", false, false, false, false, false) end addEvent("FB:DxPosto1MenssagemWorld", true) addEventHandler("FB:DxPosto1MenssagemWorld", root, DxPosto1MenssagemWorldC) 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