Change color of the name on player ped

like, what.

function DrawText3D(x,y,z) -- some useful function, use it if you want!
	local onScreen,_x,_y=World3dToScreen2d(x,y,z)
	local px,py,pz=table.unpack(GetGameplayCamCoords())
	local dist = GetDistanceBetweenCoords(px,py,pz, x,y,z, 1)
	
	local scale = (1/dist)*10
	local fov = (1/GetGameplayCamFov())*100
	local scale = scale*fov
	
	SetTextScale(0.0*scale, 0.55*scale)
	if onScreen then DrawText(_x,_y) end
end

just use this?
it’s easier, but is delayed by a few frames… your pick!

(Look below to find an updated version, do NOT use this function now)

2 Likes