ID:156913
 
Hello, I'm a sort of new developer, but I can do some nice work. Im currently looking for 2 things :

1. How make a verb thats for admins only that adds someone to a list
2. A chat verb that only people on that list can use and hear the messages of the people using it.
// Your admin's list.
var/list/admins = list("your_key")

// Your admin verb
mob/admin/verb/Admin_Say(say as text)
set desc = "Say something to the other admins!"
for(var/mob/a in admins) // for all mobs in the admins list
a<<"[usr]: [say]" // output it to the mobs.

mob/admin/verb/Add_Admin(mob/A in world) // the mob/A in world will automatically know to bring up a popup of all mobs in the world.
set desc = "Add a mob to the admins list.
admins.Add(A) // add A to the admins list
In response to Vector2
Thank you. I just have one question, does it save?
In response to Conco
Not in that code, but it's not hard to do.

world/New()
var/savefile/sf = new("admin_list.sav")
sf["admins"] >> admins
usr.Read(sf)

world/Del()
var/savefile/sf = new("admin_list.sav")
sf["admins"] << admins
usr.Write(sf)
In response to Vector2
Yeah, no. usr should not be used in procs. It should DEFINITELY not be used in world/New() or world/Del().