MisterQuestions Posted November 17, 2014 Share Posted November 17, 2014 Hey, i have a dude, how to draw a text on a 3D position on GTA World? Link to comment
The Don Posted November 17, 2014 Share Posted November 17, 2014 https://community.multitheftauto.com/in ... ls&id=7613 dxDraw3DText = exports["3d_dx_texts"]:dxDraw3DText("text here",x,y,z) Link to comment
MisterQuestions Posted November 17, 2014 Author Share Posted November 17, 2014 Thanks!! Link to comment
SkatCh Posted November 17, 2014 Share Posted November 17, 2014 Here you go e.g: local x = -- x coordination local y = -- y coordination local z = -- z coordination 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 ( "XeroxMTA", 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
MisterQuestions Posted November 17, 2014 Author Share Posted November 17, 2014 Fixed, now i got a error on this , whats wrong? local Leaders = { [1] = { 0, 2934.3000488281, -2052.1000976563, 3.5, 179.252929 }, [2] = { 0, 2935.6999511719, -2052.1000976563, 3.5, 179.252929 }, [3] = { 0, 2937.1000976563, -2052.1000976563, 3.5, 179.252929 }, } m1, x1, y1, z1, r1 = unpack ( Leaders[1] ) m2, x2, y2, z2, r2 = unpack ( Leaders[2] ) m3, x3, y3, z3, r3 = unpack ( Leaders[3] ) function CreateThePeds() ped1 = createPed ( m1, x1, y1, z1, r1 ) ped2 = createPed ( m2, x2, y2, z2, r2 ) ped3 = createPed ( m3, x3, y3, z3, r3 ) end Link to comment
Feche1320 Posted November 17, 2014 Share Posted November 17, 2014 local Leaders = { { 0, 2934.3000488281, -2052.1000976563, 3.5, 179.252929 }, { 0, 2935.6999511719, -2052.1000976563, 3.5, 179.252929 }, { 0, 2937.1000976563, -2052.1000976563, 3.5, 179.252929 } } m1, x1, y1, z1, r1 = unpack ( Leaders[1] ) m2, x2, y2, z2, r2 = unpack ( Leaders[2] ) m3, x3, y3, z3, r3 = unpack ( Leaders[3] ) function CreateThePeds() ped1 = createPed ( m1, x1, y1, z1, r1 ) ped2 = createPed ( m2, x2, y2, z2, r2 ) ped3 = createPed ( m3, x3, y3, z3, r3 ) end Link to comment
The Don Posted November 18, 2014 Share Posted November 18, 2014 Thanks!! Your welcome mate. 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