ID:1243028
 
(See the best response by FIREking.)
Hello I need To know How To List Mods And Admins On A Seprate List On My ss13 server Please Respond Asap ,thanks

Best response
Not sure what the ss13 specifics would be, but you'd basically loop through all the clients connected, compare it to a known list of mods or admins OR take a look at whatever variable declares the client's connected mob as an admin or mod (perhaps by key, by type, or by value)... and then add them to a list. from there, you can spit out the contents of the list.

Example:

var/global/list/admin_keys = list("chadlen", "fireking") //must be all lower-case

proc/get_admins_by_key()
var/list/admins = list()
for(var/client/c in clients)
if(admin_keys && admin_keys.Find(c.ckey)) admins += c
world << "The admins are:"
for(var/a in admins)
world << a

proc/get_admins_by_type()
var/list/admins = list()
for(var/client/c in clients)
if(c && c.mob && istype(c.mob, /mob/admin))
admins += c
world << "The admins are:"
for(var/a in admins)
world << a

//this next one assumes mobs have an is_admin variable
proc/get_admins_by_value()
var/list/admins = list()
for(var/client/c in clients)
if(c && c.mob && c.mob.is_admin == 1)
admins += c
world << "The admins are:"
for(var/a in admins)
world << a


These are just examples, and very basic! I encourage you to form your own method of doing it, hopefully I've given you an idea on how to do that.