ID:1247334
 
(See the best response by Gokussj99.)

how do you get the admin and mods to appear on a diffrent list?
Best response
add them to diff lists upon login?

EpicDatum
var
mods[] = list()
admins[] = list()

proc
AddAdmin(mob/m){admins+=m.name}

AddMod(mob/m){mods+=m.name}

RemAdmin(mob/m){admins-=m.name}

RemMod(mob/m){mods-=m.name}

CheckAccess(mob/m,access)
{
if(access=="admin"){if(m.admin){return 1}else{return 0}}
else if(access=="moderator"){if(m.moderator){return 1}else{return 0}}
else return 0
}

var/EpicDatum/Epic = new()

mob
var
admin=0
moderator=0

Login()
world<<"[src] has entered the world!"
if(Epic.CheckAccess(src,"admin")){Epic.AddAdmin(src)}
if(Epic.CheckAccess(src,"moderator")){Epic.AddMod(src)}
return ..()

Logout()
world<<"[src] has left the world!"
if(Epic.CheckAccess(src,"admin")){Epic.RemAdmin(src)}
if(Epic.CheckAccess(src,"moderator")){Epic.RemMod(src)}
return ..()
In response to Gokussj99
It's weird. I use the global variable, but I guess that works.
In response to Dark-DVF
Dark-DVF wrote:
It's weird. I use the global variable, but I guess that works.

my mistake derp i just woke up why would i wanto store that variable on a mob lol

myself i actually store that kinda stuff in a datum lol.
Goku just went super saiyan with that code there. I was prepared to just ask him, "Do you have a current admin list code?" And I'd just give admins a set level number.. Mods would be 1.. admins would be 2.. Owner/Co would be 3. That's what I do to just avoid frustrating myself by writing long codes. Lol. Is that bad to do though?

Admin list would for loop all players in in the world and check who has what level then output it to the player!