local screenWidth,screenHeight = guiGetScreenSize()
function renderDisplay ( )
local seconds = getTickCount() / 1000
local angle = math.sin(seconds) * 80
players = getElementsByType ( \"player\" )
for k,v in ipairs(players) do
local accountname = \"\"
if (isGuestAccount(getPlayerAccount(v)) == false) then
accountname = getAccountName (getPlayerAccount(v))
if isObjectInACLGroup ( \"user.\" .. accountname, aclGetGroup ( \"admin\" ) ) then
dxDrawImage ( screenWidth/2 - 50, 0, 100, 240, \'arrow.png\', angle, 0, -120 )
end
end
end
end
addEventHandler(\"onClientRender\", root, renderDisplay)
Elvileg ez működőképes. Bár nem nagyon szórakoztam még ACL-el. Viszont így nem lesz a fejük felett a logo. Arra figyelj.
local screenWidth, screenHeight = guiGetScreenSize()
addEventHandler(\"onClientRender\", getRootElement(), function()
local lx, ly, lz = getElementPosition(localPlayer)
for k,v in ipairs(getElementsByType(\"player\")) do
if isElement(v) and isElementOnScreen(v) then
if v ~= localPlayer then
local tx, ty, tz = getElementPosition(v) --másik játékos pozíciója
local bx, by, bz = getPedBonePosition(v, 4) -- fejcsont pozíció
if getDistanceBetweenPoints3D(lx, ly, lz, tx, ty, tz) < 20 then
local sx, sy = getScreenFromWorldPosition(tx, ty, bz+0.5)
if sx and sy then
local accountName = getAccountName(getPlayerAccount(v))
if isObjectInACLGroup ( \"user.\" .. accountName, aclGetGroup ( \"admin\" ) ) then
local w, h = 100, 100
local sx, sy = sx-w/2, sy-h
dxDrawImage (sx, sy, w, h, \"arrow.png\")
end
end
end
end
end
end
end)
Gyorsan elkészítettem egyet, lehetőleg középre helyezi a képet a játékos fölött. Még nem teszteltem, de ha gond van jelezd!