^#Dream Posted July 14, 2014 Share Posted July 14, 2014 ابي مساعددهه الـ Text ماتطلع sx,sy = guiGetScreenSize() textsToDraw = {} maxrange = 5 addEventHandler("onClientRender",root, function() for a,b in pairs(textsToDraw) do x,y,z = b[1],b[2],b[3] scx,scy = getScreenFromWorldPosition (x,y,z) camX,camY,camZ = getCameraMatrix() if scx and scy and getDistanceBetweenPoints3D(camX,camY,camZ,x,y,z+5) <= maxrange then dxDrawFramedText(b[4],scx-0.5*dxGetTextWidth(b[4],0.30,"pricedown"),scy+30-0.5*dxGetFontHeight(0.30,"pricedown"),sx, sy+5,tocolor ( b[5], b[6], b[7], 255 ), 0.80,"pricedown") end end end ) function add3DText(x,y,z,text,r,g,b) table.insert(textsToDraw,{x,y,z,text,r,g,b}) end function dxDrawFramedText ( message , left , top , width , height , color , scale , font , alignX , alignY , clip , wordBreak , postGUI , frameColor ) color = color or tocolor ( 255 , 255 , 255 , 255 ) frameColor = frameColor or tocolor ( 0 , 0 , 0 , 255 ) scale = scale or 1 alignX = alignX or "left" alignY = alignY or "top" clip = clip or false wordBreak = wordBreak or false postGUI = postGUI or false dxDrawText ( message , left , top , width , height , color , scale , font , alignX , alignY , clip , wordBreak , postGUI ) end add3DText( 1534.9,-1443.0,13.3, "Admin Base", 6, 183, 248 ) 1534.9 X -1443.0 Y 13.3 Z سويت ديبق ماطلع اي شي Link to comment
^#Dream Posted July 14, 2014 Author Share Posted July 14, 2014 ......................... Link to comment
al-Kobra Posted July 14, 2014 Share Posted July 14, 2014 addEventHandler('onClientRender',root, function() local x,y,z = الاحداثيات local MX,MY,MZ = getCameraMatrix() if getDistanceBetweenPoints3D( MX, MY,MZ,x,y,z ) <= 10 then local WX,WY = getScreenFromWorldPosition(x-0.50,y,z + 0.85,0) if WX and WY then dxDrawText('الكتابة',WX,WY,WX,WY,tocolor(255,255,0),1.5,'default-bold') end end end ) عدل مكان الاحداثيات والكتابة Link to comment
^#Dream Posted July 14, 2014 Author Share Posted July 14, 2014 عدلت الاحداثيات والكتابهه بس ماطلعت الكتابهه Link to comment
#DRAGON!FIRE Posted July 14, 2014 Share Posted July 14, 2014 Just remove marker on line 2 and set ur marker name and set Text 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
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