Jump to content

text


Twisted

Recommended Posts

local x = 4985 
local y = -3575 
local z = 9 
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 ( "HERE'S YOUR TEXT", sx, sy - 30, sx, sy - 30, tocolor(255,155,0,200), math.min ( 0.4*(150/distance)*1.4,4), "default", "center", "bottom", false, false, false ) 
    end 
end 
) 

Link to comment
Use 3dt resource by TheKid

thanks Qais may use this in the future :)

local x = 4985 
local y = -3575 
local z = 9 
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 ( "HERE'S YOUR TEXT", sx, sy - 30, sx, sy - 30, tocolor(255,155,0,200), math.min ( 0.4*(150/distance)*1.4,4), "default", "center", "bottom", false, false, false ) 
    end 
end 
) 

thank you for the example :D

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...