ID:145287
 
Code:mob/System_Create/verb
CreateOrRemove()
set name = "Create/Remove Admins"
set category = "Admin"
switch(alert("Create or Remove?","Create/Remove","Create New","Remove Old"))
if("Create New")
var/list/Optionss = list()
for(var/mob/MO in world)
if(MO.client && MO!=usr && Master_Admin!=MO.key && !Super_Admins.Find(MO) && !Great_Admins.Find(MO) && !Less_Admins.Find(MO) && !Admins.Find(MO) && !Temp_Admins.Find(MO))
Optionss+=MO
if(!Optionss.len)
return usr<<"There is no one available to give admin to!"
var/mob/M = input("Who shalt you give admin?","Who?") in Optionss + ("Cancel")
switch(alert("What type of admin?","Type?","Temporary","Perminant"))
if("Temporary")
world<<"[usr] has given [M] Temporary Admin!"
if(!M.cPanel)
M.verbs += typesof(/mob/Toggle/verb/)
M.verbs += typesof(/mob/Temp_Admin/verb/)
M.Temp_Admin = 1
Admin_Players += M
Temp_Admins+=M

if("Perminant")
var/list/Options = list("Super Admin","Greater Admin","Admin","Lesser Admin")
var/T = input("What type?","Type") in Options
if(T=="Super Admin")
world<<"
[usr] has given [M] Super Admin!"
if(!M.cPanel)
M.verbs += typesof(/mob/Toggle/verb/)
M.verbs += typesof(/mob/Super_Admin/verb/)
Admin_Players += M
Super_Admins+=M
if(T=="Greater Admin")
world<<"[usr] has given [M] Greater Admin!"
if(!M.cPanel)
M.verbs += typesof(/mob/Toggle/verb/)
M.verbs += typesof(/mob/Greater_Admin/verb/)
Admin_Players += M
Great_Admins+=M
if(T=="Admin")
world<<"
[usr] has given [M] Admin!"
if(!M.cPanel)
M.verbs += typesof(/mob/Toggle/verb/)
M.verbs += typesof(/mob/Admin/verb/)
Admin_Players += M
Admins+=M
if(T=="Lesser Admin")
world<<"[usr] has given [M] Lesser Admin!"
if(!M.cPanel)
M.verbs += typesof(/mob/Toggle/verb/)
M.verbs += typesof(/mob/Lesser_Admin/verb/)
Admin_Players += M
Less_Admins+=M
if("Remove Old")
var/list/Options = list()
for(var/M in Super_Admins)
Options+=M
for(var/M in Great_Admins)
Options+=M
for(var/M in Admins)
Options+=M
for(var/M in Less_Admins)
Options+=M
for(var/M in Temp_Admins)
Options+=M
var/mob/who = input("Select an admin from the list below") in Options + ("Cancel")
if(who=="Cancel")
return
if(!Super_Admins.Find(usr))
for(var/M in Super_Admins)

if(M==who)
Super_Admins-=M
world<<"
[usr] has removed [M]'s Admin!"
for(var/mob/MOB in world)
if(MOB == who)
MOB.verbs -= typesof(/mob/Toggle/verb/)
MOB.verbs -= typesof(/mob/Super_Admin/verb/)
Admin_Players -= MOB
return
for(var/M in Great_Admins)
if(M==who)
Great_Admins-=M
world<<"[usr] has removed [M]'s Admin!"
for(var/mob/MOB in world)
if(MOB.name == who)
MOB.verbs -= typesof(/mob/Toggle/verb/)
MOB.verbs -= typesof(/mob/Greater_Admin/verb/)
Admin_Players -= MOB
return
for(var/M in Admins)
if(M==who.name)
Admins-=M
world<<"
[usr] has removed [M]'s Admin!"
for(var/mob/MOB in world)
if(MOB == who)
MOB.verbs -= typesof(/mob/Toggle/verb/)
MOB.verbs -= typesof(/mob/Admin/verb/)
Admin_Players -= MOB
return
for(var/M in Less_Admins)
if(M==who)
Less_Admins-=M
world<<"[usr] has removed [M]'s Admin!"
for(var/mob/MOB in world)
if(MOB == who)
MOB.verbs -= typesof(/mob/Toggle/verb/)
MOB.verbs -= typesof(/mob/Lesser_Admin/verb/)
Admin_Players -= MOB
return
for(var/M in Temp_Admins)
if(M==who)
Temp_Admins-=M
world<<"
[usr] has removed [M]'s Admin!"
for(var/mob/MOB in world)
if(MOB == who)
MOB.verbs -= typesof(/mob/Toggle/verb/)
MOB.verbs -= typesof(/mob/Temp_Admin/verb/)
Admin_Players -= MOB
return


Problem description: i know this is probably a stupid questiong...but how excatly do i make it so that im an admin in my game. i just cant figure it out.XD. Please help me

AARGH. DM tags are there for a reason!
mob/System_Create/verb
CreateOrRemove()
set name = "Create/Remove Admins"
set category = "Admin"
switch(alert("Create or Remove?","Create/Remove","Create New","Remove Old"))
if("Create New")
var/list/Optionss = list()
for(var/mob/MO in world)
if(MO.client && MO!=usr && Master_Admin!=MO.key && !Super_Admins.Find(MO) && !Great_Admins.Find(MO) && !Less_Admins.Find(MO) && !Admins.Find(MO) && !Temp_Admins.Find(MO))
Optionss+=MO
if(!Optionss.len)
return usr<<"There is no one available to give admin to!"
var/mob/M = input("Who shalt you give admin?","Who?") in Optionss + ("Cancel")
switch(alert("What type of admin?","Type?","Temporary","Perminant"))
if("Temporary")
world<<"[usr] has given [M] Temporary Admin!"
if(!M.cPanel)
M.verbs += typesof(/mob/Toggle/verb/)
M.verbs += typesof(/mob/Temp_Admin/verb/)
M.Temp_Admin = 1
Admin_Players += M
Temp_Admins+=M

if("Perminant")
var/list/Options = list("Super Admin","Greater Admin","Admin","Lesser Admin")
var/T = input("What type?","Type") in Options
if(T=="Super Admin")
world<<"[usr] has given [M] Super Admin!"
if(!M.cPanel)
M.verbs += typesof(/mob/Toggle/verb/)
M.verbs += typesof(/mob/Super_Admin/verb/)
Admin_Players += M
Super_Admins+=M
if(T=="Greater Admin")
world<<"[usr] has given [M] Greater Admin!"
if(!M.cPanel)
M.verbs += typesof(/mob/Toggle/verb/)
M.verbs += typesof(/mob/Greater_Admin/verb/)
Admin_Players += M
Great_Admins+=M
if(T=="Admin")
world<<"[usr] has given [M] Admin!"
if(!M.cPanel)
M.verbs += typesof(/mob/Toggle/verb/)
M.verbs += typesof(/mob/Admin/verb/)
Admin_Players += M
Admins+=M
if(T=="Lesser Admin")
world<<"[usr] has given [M] Lesser Admin!"
if(!M.cPanel)
M.verbs += typesof(/mob/Toggle/verb/)
M.verbs += typesof(/mob/Lesser_Admin/verb/)
Admin_Players += M
Less_Admins+=M
if("Remove Old")
var/list/Options = list()
for(var/M in Super_Admins)
Options+=M
for(var/M in Great_Admins)
Options+=M
for(var/M in Admins)
Options+=M
for(var/M in Less_Admins)
Options+=M
for(var/M in Temp_Admins)
Options+=M
var/mob/who = input("Select an admin from the list below") in Options + ("Cancel")
if(who=="Cancel")
return
if(!Super_Admins.Find(usr))
for(var/M in Super_Admins)

if(M==who)
Super_Admins-=M
world<<"[usr] has removed [M]'s Admin!"
for(var/mob/MOB in world)
if(MOB == who)
MOB.verbs -= typesof(/mob/Toggle/verb/)
MOB.verbs -= typesof(/mob/Super_Admin/verb/)
Admin_Players -= MOB
return
for(var/M in Great_Admins)
if(M==who)
Great_Admins-=M
world<<"[usr] has removed [M]'s Admin!"
for(var/mob/MOB in world)
if(MOB.name == who)
MOB.verbs -= typesof(/mob/Toggle/verb/)
MOB.verbs -= typesof(/mob/Greater_Admin/verb/)
Admin_Players -= MOB
return
for(var/M in Admins)
if(M==who.name)
Admins-=M
world<<"[usr] has removed [M]'s Admin!"
for(var/mob/MOB in world)
if(MOB == who)
MOB.verbs -= typesof(/mob/Toggle/verb/)
MOB.verbs -= typesof(/mob/Admin/verb/)
Admin_Players -= MOB
return
for(var/M in Less_Admins)
if(M==who)
Less_Admins-=M
world<<"[usr] has removed [M]'s Admin!"
for(var/mob/MOB in world)
if(MOB == who)
MOB.verbs -= typesof(/mob/Toggle/verb/)
MOB.verbs -= typesof(/mob/Lesser_Admin/verb/)
Admin_Players -= MOB
return
for(var/M in Temp_Admins)
if(M==who)
Temp_Admins-=M
world<<"[usr] has removed [M]'s Admin!"
for(var/mob/MOB in world)
if(MOB == who)
MOB.verbs -= typesof(/mob/Toggle/verb/)
MOB.verbs -= typesof(/mob/Temp_Admin/verb/)
Admin_Players -= MOB
return


... And besides that being ugly code, there are plenty of Admin librarys / demos. Just search for them.
In response to Mysame
//Umm, do you have somthing familiar to this in your login?

var/admin=list("admin"=list("admin ckey"),"gm"=list("gm ckey"))

mob/Login()
if(ckey(key) in admin["admin"])
verbs+=typesof(/mob/your admin verb type here/verb,/mob/your gm verb type here/verb)
if(ckey(key) in admin["gm"])
verbs+=typesof(/mob/your gm verb type here/verb)
..()
In response to DivineO'peanut
no....is that what makes me a gm when i login?