I need some help in my script, im using onClientRender and getScreenFomWorld position but the dxDrawText wont work! heres my program:
marker = createMarker(-662.33703613281,2365.9025878906,178.9553527832, "cylinder", 1.5, 0, 100, 100, 200)
function Texto()
if(getDistanceBetweenPoints3D(0, 0, 4+.5, getElementPosition(getLocalPlayer()))) < 20 then
local coords = {getScreenFromWorldPosition(-662.33703613281,2365.9025878906,178.9553527832)}
if coords[1] and coords[2] then
dxDrawText("CJ", coords[1], coords[2], coords[1], coords[2], tocolor(255,0,0,255), 10, "sans", "center", "center", false, false, false, false)
end
end
end
addEventHandler("onClientRender", root, Texto)