Jump to content

Custom Blip and dxText


Recommended Posts

When i do like tihs
function cadirkur () 
local x,y,z = getElementPosition(getLocalPlayer()) 
cadir = createObject(1678,x,y+3,z) 
addEventHandler('onClientRender', root, Dx) 
end 
addCommandHandler("kur",cadirkur) 
  
function Dx() 
    local x,y,z = getElementPosition(cadir) 
    local isim = getPlayerName(getLocalPlayer()) 
    local sx,sy = getScreenFromWorldPosition(x,y,z+1) 
    dxDrawText (isim,sx,sy-1) 
end 

I get error at sy

You tested this and a text appeards on top of the object?

Link to comment

yes i did but your coords are wrong its not ontop of it its inside it.

function cadirkur () 
local x,y,z = getElementPosition(getLocalPlayer()) 
cadir = createObject(1678,x,y+3,z) 
addEventHandler('onClientRender', root, Dx) 
end 
addCommandHandler("kur",cadirkur) 
  
function Dx() 
    local x,y,z = getElementPosition(cadir) 
    local isim = getPlayerName(getLocalPlayer()) 
    local sx,sy = getScreenFromWorldPosition(x,y,z+4) 
    dxDrawText (isim,sx,sy-1) 
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...