Hi there,
Is there any way to check if an admin is online before executing a command?
I have installed the "[URL="http://facepunch.com/showthread.php?t=1271100"]RDM Manager[/URL]" addon to my server. Because the addon sends a admin chat message I'm wondering if there is any way to check if an admin/moderator is online before activating the client gui. Here's the server code.
[CODE]util.AddNetworkString("Playerdead")
function playerdead(victim, _, _)
net.Start("Playerdead") //This line opens up the client gui. I'd like to make sure an admin/moderator is online before this line runs.
net.Send(victim)
end
hook.Add("PlayerDeath","RDM",playerdead)[/CODE]
Yes there is;
[lua]
function isThereAModeratorCurrentlyOnlineOnTheServerAtThisMomentInTime()
for _, ply in pairs( player.GetAll() )
if ( ply:IsAdmin() || ply:IsUserGroup( "dildo throwers" ) ) then
return true;
end
end
end
[/lua]
Sorry, you need to Log In to post a reply to this thread.