Hi, i recently started to learn the GLua,
I have a problem I do not know how print the number of online administrators..
Thanks you if you help me.
You have to loop through player.GetHumans like so:
local admins = 0
for _, ply in ipairs( player.GetHumans() ) do
if ply:IsAdmin() then
admins = admins + 1
end
end
print( admins )
Thanks you
Sorry, you need to Log In to post a reply to this thread.