Cze??, og?lnie mam stary kod na DUTY, i nie wiem gdzie jest b??d. Pomo?ecie?
CLIENT
|
V
[code]
local w, h = guiGetScreenSize()
skala = 0.7
wartosc = 0
czcionka = dxCreateFont("czcionka.ttf", 17)
tgn = false
addEventHandler("onClientRender",root,function()
local wartosc = wartosc + 0.05
for key, value in ipairs(getElementsByType("player")) do
if value ~= localPlayer then
setPlayerNametagShowing(value, false)
local nick = getPlayerName(value)
local cx, cy, cz = getCameraMatrix(value)
local x,y,z = getPedBonePosition(value, 8)
local wzWartosc = math.cos(wartosc)/10
local xs,ys,ds = getScreenFromWorldPosition(x,y,z+0.40)
local nx,ny,nz = getElementPosition(localPlayer)
local px, py,pz = getElementPosition(value)
local odleglosc = getDistanceBetweenPoints3D(nx,ny,nz,px,py,pz)
a = 255
if xs and ys and ds then
if isLineOfSightClear(cx,cy,cz,x,y,z,true,false,false,true,true,true,true,value) then
Grupa = ""
if getElementData(value, "duty")=="nadana_elementdata" then Grupa="napis widocznny nad glowa" end
if getElementData(value, "duty")=="admin" then Grupa="#830405Administrator RCON" end
if getElementData(value, "duty")=="DMPD" then Grupa="#0066FFDMPD | Cadet" end
if getElementData(value, "duty")=="smod" then Grupa="#007F01Support" end
local text="#FFFFFF "..Grupa..&qu...
Witam zastanawiam si? jak zrobi? ikonki nad nametag'iem wzio?em co? z newplace by da? to pod ogrpg i nie wiem czy dobrze bedzie dzia?a? co usun?? a co doda? prosze o pomoc macie tego kawa?ek:
[lua] local duty = getElementData(p, "duty")
local premium = getElementData(p, "premium")
local frakcja = getElementData(p, "player:faction")
local zycie = getElementHealth(p)
local isAFK=getElementData(p, 'afk') or false
local isChatTyping=getElementData(p, 'chat_typing') or false
local isPremium=getElementData(p, 'premium') or false
local isAdm=getElementData(p, 'player:admin') or false
local liczbaikonek = {}
zycie = string.format("%1d", zycie)
if isAFK==true then
table.insert(liczbaikonek, {grafika='afk.png', waznosc=10})
end
if isChatTyping==true then
table.insert(liczbaikonek, {grafika='czat.png', waznosc=10})
end
if isPremium then
table.insert(liczbaikonek, {grafika='premium.png', waznosc=50})
end
if isAdm then
table.insert(liczbaikonek, {grafika='admins.png', waznosc=60})
end
if #liczbaikonek == 1 then
dxDrawImage(sx-20, sy-45, 40, 40, 'ikonki/' ..liczbaikonek[1].grafika, 0, 0, 0, tocolor(255, 255, 255, 255))
elseif #liczbaikonek == 2 then
table.sort(liczbaikonek, function(a,b) return a.waznosc>b.waznosc end)
dxDrawImage(sx-40, sy-45, 40, 40, 'ikonki/' ..liczbaikonek[1].grafika, 0, 0, 0, tocolor(255, 255,...
Witam zrobi?em sobie ElementDate na to by pokazywa?o jak kto? zminimalizuje mta to pokazywa?o nad nim napis AFK. chcia?bym doda? jeszcze czas tego afka by to jakos lepiej wygl?da?o i by?o bardziej pomocne dla administracji. Wie kto? z was jak napisa? taki skrypt?
Cze??
Mam skromne pytanie, mam w planach zrobienie nick?w nad g?ow? wraz z ID. Lecz nie wiem jak si? za to zabra? ze strony wizualnej, tzn jak wy?wietli? takie co? nad g?ow??
cze??, chcia?bym troch? zmodyfikowa? freeroam'owy/play'owy nametag (to gdzie w graczu pisze jego nick hp itp.) i nie mog? tego znale??, mo?e wy wiecie, gdzie to jest?