ID:166151
 
How would you make a restart verb for a GM.
It should have all this.

- When you restart everyone spawns in different places
- You get to change maps
- Everyone has an empty inventory

mob/GM/verb/Restart()
switch(input("Which map?") in list("Map1","Map2"))
if("Map1")
usr.contents(del)
usr.loc = locate(rand(1,50),rand(1,50),1)
var/turf/t = usr.loc
if(t.density)
for(var/turf/m in view(usr))
if(!m.density)
usr.loc = m
return
if("Map2")
usr.contents(del)
usr.loc = locate(rand(1,50),rand(1,50),2)
var/turf/t = usr.loc
if(t.density)
for(var/turf/m in view(usr))
if(!m.density)
usr.loc = m
return

Just change the z variable of the co-ordinates for different maps, which is this:
usr.loc = locate(rand(1,50),rand(1,50),2)

notice the last number?thats the Z variable.make sure all the maps have different Z variables.

The GM's wont just get the verb, though, everyone will get it, so you want to do this.
var/list/GM=list("persons key here","the other persons key")

mob/Login()
if(src.key in GM)
usr.verbs+=typesof(/mob/GM/verb)

[EDIT] thanks to Exophus Pyro_dragons for the random location code snippet, because it just so happened, that that topic was below.
In response to Dragon_fire6653
You didn't use the one I posted; you used one someone else posted, heh. Anyways that's a not-so good way of going about it. Check the posts Jp and someone else who I forgot put up when replying to my method. They mentioned something that I forgot and didn't realize at the moment. So credits to them!

-Exophus
In response to Exophus
Oh, yea, thanks for telling me, i went back and checked.It was Pyro_dragons.