ID:263627
 
Code:Reboot
    verb
Reboot()
if(src.key=="****" || "<This is being used>")
set category = "Staff"
set name = "Reboot"
world << "World Rebooting in 5 second"
sleep(10)
world << "World Rebooting in 4 second"
sleep(10)
world << "World Rebooting in 3 second"
sleep(10)
world << "World Rebooting in 2 second"
sleep(10)
world << "World Rebooting in 1 second"
world << "Rejoin here: byond://24.32.171.51:55832"
world.Reboot()


Problem description:It gives it to everyone no matter what I do, Ive put it where the quatation marks are empty and it give it to everybody, then I put my alpha testers name there and still everyone gets it. What can I do to fix this?


if(src.key=="****" || "<This is being used>")


Change this to if(src.key in *some list*). Your problem is that a text string always is equivalent to true, and your if() statement is along the lines of "if (key is equal to this) OR (this text string)". That's always true, so everybody can use the verb. Using the "in" operator is easier and less prone to this sort of error.
var/list/Staff = list("John Doe","Jane Doe")    //your staff keys


mob/Login() //when someone logs into the game
..()
if(src.key in Staff) //check if their key is in the Staff list
src << "Here are your Staff Commands."
src.verbs += typesof(/mob/Admin/verb) //if so, give them the admin verbs


mob/Admin/verb //your admin verbs

Reboot() //Reboot verb
set category = "Staff"
set name = "Reboot"
world << "World Rebooting in 5 second"
sleep(10)
world << "World Rebooting in 4 second"
sleep(10)
world << "World Rebooting in 3 second"
sleep(10)
world << "World Rebooting in 2 second"
sleep(10)
world << "World Rebooting in 1 second"
world << "Rejoin here: byond://24.32.171.51:55832"
world.Reboot()


A simple little admin system.
In response to Dice1989
Administration verbs don't need to be defined under mob. Every time I did that when I was starting, I was scolded by my elders. /admin/verb would do the job nicely.

What's more, all those sleeps are dull, how does a for() loop grab you?

var/list/staff = list("tiberath","mobiusevalon")

Admin
verb
Reboot()
for(var/i = 10; i > 0; i--)
if(i <= 5) world << "World is rebooting in [i] seconds."
sleep(10)
world << "World is rebooting now!"
world.Reboot()

mob
Login()
if(src.ckey in staff) src.verbs.Add(typesof(/Admin/verb))
..()


See the for() loop will count backwards from 10. It saves line code as well. Essentially it's the same thing, but it does give you a lot more freedom. If you wanted to interrupt the reboot, you could cancel the countdown or even allow the administrator to set how long it will take for the reboot to happen.

Check up the DM Reference about loops (for() while() and do()), it'll give you a world of ideas.
In response to Tiberath
While we're at it: take that out of Login() and put it in client/New(). Giving mobs verbs that only the admins should have access to is Bad News. What if players are given an ability to switch mobs with another player? Harmless... until they take an admin's mob and can use their verbs.

You can't go wrong with clients, though.