Jump to content

Nesecito un Draw3DText


Recommended Posts

  • 2 months later...

Buenas pudes guiarte de aqui:
https://wiki.multitheftauto.com/wiki/Resource:DxDraw3DText
https://wiki.multitheftauto.com/wiki/DxDrawText

 

 

  ---Elaborado por: GTX
local x = 2306.7126464844 
local y = -3898.6943359375 
local z = 236.62010192871 
  
addEventHandler("onClientRender",getRootElement(), 
function() 
    local px,py,pz = getElementPosition(getLocalPlayer()) 
    local distance = getDistanceBetweenPoints3D ( x,y,z,px,py,pz ) 
    if distance <= 150 then 
        local sx,sy = getScreenFromWorldPosition ( x, y, z+0.95, 0.06 ) 
        if not sx then return end 
        local scale = 1/(0.3 * (distance / 150)) 
        dxDrawText ( "3D text", sx, sy - 30, sx, sy - 30, tocolor(255,255,255,255), math.min ( 0.4*(150/distance)*1.4,4), "bankgothic", "center", "bottom", false, false, false ) 
    end 
end 
) 
 

 

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...