Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- addEventHandler( "onClientRender",getRootElement(), function()
- for i, element in ipairs ( getElementsByType("object") ) do
- if isElement(element) and getElementData(element, "itemName") then
- local wx,wy,wz = getElementPosition(element)
- local text = getElementData(element, "itemName")
- local x,y,z = getScreenFromWorldPosition ( wx, wy, wz + 2 )
- local width = dxGetTextWidth ( text )
- local px,py,pz = getElementPosition(localPlayer)
- local entf = getDistanceBetweenPoints3D (px,py,pz, wx,wy,wz )
- if entf <= 5 then
- dxDrawText ( text, x, y, x, y, tocolor ( 0, 255, 0), 2, "arial" )
- outputDebugString("Drawing")
- end
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment