Jump to content

online admins[CLOSED]


kevin11

Recommended Posts

i tried making a command !admins that show online admins and, junior-admins

but it isnt working

it gives this error

[02:59:49] SCRIPT ERROR: ...an Andreas/serverrace/mods/deathmatch/resources/online_admins/server.lua:29: 'end' expected (to close 'function' at line 3) near '<eof>'
[02:59:49] WARNING: Loading script failed: ...an Andreas/serverrace/mods/deathmatch/resources/online_admins/server.lua:29: 'end' expected (to close 'function' at line 3) near '<eof>'

admins = ""
 
function processAdminList()
  players = getElementsByType ( "player" )
  admins = ""
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, Junior-admin" ) ) then
if (admins == "") then
outputChatBox( "Online Admins Are: getPlayerAccount(v)",getRootElement(),0,0,255)
else
              admins = admins .. ", " .. getPlayerName(v)
end
end
end
end
addEvent("admins", true)
addEventHandler( "admins",getRootElement(),processAdminList )
 
function checkCommand ( message, messageType )
if ( messageType == 0 ) then
if ( message == "!admins"  ) then
setTimer( triggerEvent, 100, 1, "admins", source )
end
end
end
addEventHandler ( "onPlayerChat", getRootElement(), checkCommand )

Edited by Guest
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...