Siema, mam taki kod, kt?ry powoduje, ?e znika mi pasek ?ycia i nick z postaci graczy.
W tym problem, ?e chce widzie? nick innych graczy ale nie pasek ?ycia, a ten kod powoduje znikni?cie tego i tego.
local czcionka = "clear"
local wysok = dxGetFontHeight(1,czcionka)
local glowneX, glowneY = guiGetScreenSize()
function rysujNametagi()
local myX,myY,myZ = getCameraMatrix()
for i,gracz in ipairs(getElementsByType("player",root,true)) do
if gracz ~= localPlayer and getElementInterior(gracz) == getElementInterior(localPlayer) and getElementDimension(gracz) == getElementDimension(localPlayer) and getElementAlpha(gracz)>0 then
local gX,gY,gZ = getPedBonePosition(gracz,8)
local bX,bY,bZ = getPedBonePosition(gracz,2)
if isLineOfSightClear(myX,myY,myZ,gX,gY,gZ,true,false,false,true,false,true) and getDistanceBetweenPoints3D(myX,myY,myZ,gX,gY,gZ)<50 then
local eX,eY = getScreenFromWorldPosition(gX,gY,gZ+0.36)
local name = getPlayerName(gracz)
local dystans = getDistanceBetweenPoints3D(myX,myY,myZ,gX,gY,gZ)/50
if eX and eY then
dxDrawText(name, eX, eY+1, eX, eY+1, tocolor(0, 0, 0, 225), 2-dystans, czcionka, "center", "center",false,false,false,true)
dxDrawText(name, eX, eY, eX, eY, tocolor(200, 200, 200, 155), 2-dystans, czcionka, "center", "center", false, false, false, true)
end
end
end
end
end
addEventHandler("onClientRender",root,rysujNametagi)
Nie możesz pisać nowych tematów Nie możesz odpowiadać w tematach Nie możesz zmieniać swoich postów Nie możesz usuwać swoich postów Nie możesz głosować w ankietach