αвυ-wαleed Posted June 25, 2015 Share Posted June 25, 2015 ابغى فنكشات اكتب كتابة فوق اللاعب وشكرا Link to comment
' A F . Posted June 25, 2015 Share Posted June 25, 2015 onClientRender getElementPosition dxDrawText Link to comment
αвυ-wαleed Posted June 25, 2015 Author Share Posted June 25, 2015 function abu () local x, y, z = getElementPosition ( localPlayer ) dxDrawText("text",x, y, z,??, tocolor(18, 212, 8, 255), 1.60, "default", "left", "top", false, false, false, false, false) end addEventHandler ( "onClientRender", root, abu ) هي كذا صح بس ترى dxDrawText ماعرفت له ممكن شرح له Link to comment
' A F . Posted June 25, 2015 Share Posted June 25, 2015 not localPlayer - the marker - آسم الماركر آتوقع اني مو كل الفنكنشات Link to comment
Simple. Posted June 25, 2015 Share Posted June 25, 2015 [ جرب هذا ما اتذكر من وين نسختة بس المهم يشتغل function renderIng( ) local x, y, z = getCameraMatrix( ) local dimension = getElementDimension( localPlayer ) for key, marker in ipairs ( getElementsByType( "marker", resourceRoot ) ) do if getElementDimension( marker ) == dimension then local px, py, pz = getElementPosition( marker ) local distance = getDistanceBetweenPoints3D( px, py, pz, x, y, z ) if distance <= 50 then local text = getElementData( marker, "message" ) if text and ( distance < 3 or isLineOfSightClear( x, y, z, px, py, pz + 1.7, true, true, true, true, false, false, true, localPlayer ) ) then local sx, sy = getScreenFromWorldPosition( px, py, pz + 1.7 ) if sx and sy then local w = dxGetTextWidth( tostring( text ) ) local h = ( text and 3 or 1 ) * dxGetFontHeight( ) dxDrawText( tostring( text ), sx, sy, sx, sy, tocolor( 255, 255, 255, 255 ), 4, "Tahoma", "center", "center" ) end end end end end end addEventHandler( "onClientRender", getRootElement( ),renderIng) Marker = createMarker ( x, y, z, "cylinder", s, r, g, b, a ) setElementData(Marker,"message","الكتابة") هذا للماركر انت عدله وخله للآعب ! Link to comment
αвυ-wαleed Posted June 25, 2015 Author Share Posted June 25, 2015 function abu () for index, thePlayer in ipairs(getElementsByType("player"))do local x, y, z = getElementPosition (thePlayer ) dxDrawText( "text", sx, sy, sx, sy, tocolor( 255, 255, 255, 255 ), 4, "Tahoma", "center", "center" ) end addEventHandler ( "onClientRender", root, abu ) ' طيب كذا 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