MedKhiti Posted May 23, 2014 Share Posted May 23, 2014 function createMarkers() for i, med in ipairs(locations) do local marker = createMarker(med[2], med[3], med[4], "cylinder", 1.5, 55, 37, 30) createBlipAttachedTo(marker, 9) markers[marker] = med addEventHandler("onMarkerHit", marker, destMarker) end end addEventHandler("onResourceStart", resourceRoot, createMarkers) How To DrawText For Markers .? help please with Code ;=) Link to comment
#DRAGON!FIRE Posted May 23, 2014 Share Posted May 23, 2014 Event : "onClientRender" getElementPosition getCameraMatrix getDistanceBetweenPoints3D getScreenFromWorldPosition dxDrawText Link to comment
MedKhiti Posted May 23, 2014 Author Share Posted May 23, 2014 can u create the full code for me ? and thanx Link to comment
#DRAGON!FIRE Posted May 23, 2014 Share Posted May 23, 2014 addEventHandler( "onClientRender", root, function ( ) local x, y, z = getElementPosition( marker ) local Mx, My, Mz = getCameraMatrix( ) if ( getDistanceBetweenPoints3D( x, y, z, Mx, My, Mz ) <= 15 ) then local WorldPositionX, WorldPositionY = getScreenFromWorldPosition( x, y, z +1, 0.07 ) if ( WorldPositionX and WorldPositionY ) then dxDrawText ( "Text", WorldPositionX, WorldPositionY, WorldPositionX, WorldPositionY, tocolor(255,255,255,255), 1, "arial" ) end end end ) Link to comment
xXMADEXx Posted May 23, 2014 Share Posted May 23, 2014 can u create the full code for me ? and thanx Please remember, we're here to help, not code it for you. 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