gokalpfirat Posted June 25, 2011 Author Share Posted June 25, 2011 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
JR10 Posted June 25, 2011 Share Posted June 25, 2011 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
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