Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.
GTAONLINE.PL
Tematy otagowane jako: nametagi.
1. nametagi.
witam, jak mog? zrobi? tak, ?eby wida? sw?j nametag nad g?ow?? tzn. zawsze nie wida? swojego, to jak mam zrobi? tak, ?eby by?o wida? te? sw?j? nie moge tego zrobi?.

kod:

function nametags()
    
local rootx,rooty,rootz = getCameraMatrix()
    for 
i,v in ipairs(getElementsByType("player"), root, true) do
    if 
v ~= localPlayer and getElementAlpha(v) > 50 then
    local x
,y,z = getPedBonePosition(v, 8)
    
local sx,sy = getScreenFromWorldPosition(x, y, z+0.1)
    if 
sx and sy then
    local nick 
= ""..getPlayerName(v)..""
    
local distance = getDistanceBetweenPoints3D(rootx,rooty,rootz,x,y,z)
    if 
distance <= 17 then      
    dxDrawText
(nick, sx, sy, sx, sy,  tocolor(255, 255, 255, 255), 1.7, "default", "center", "center")
      
end
      end
      end
      end
   end
addEventHandler
("onClientRender", root, nametags)