no!
im not work with Admin ACL
im working with ElementData
example :
setElementData(thePlayer,"staff,10)
10 is Server Owner
plz fix my code with ElementData
hi guys!
what is my problem ?
function getOnlineAdmins()
local t = {}
for k,v in ipairs ( getElementsByType("player") ) do
while true do
local acc = getElementData(v,"esmeAcc")
if not acc then break end
local isAdmin = getElementData(acc,"staff")
if isAdmin == true then
table.insert(t,v)
end
break
end
end
return t
end
exports [ "scoreboard" ]:addScoreboardColumn ( "ID", getRootElement() )
function showID (player)
for index, player in ipairs ( getElementsByType "player" ) do
setElementData(player,"ID",getElementData(player,"id"))
end
end
addEventHandler("onPlayerJoin",getRootElement(),showID)