ID:143006
 
Code:
mob/create_character    //the default mob
var/mob/character //later we'll be switching client to this
Login()
switch(input("What you want to do?","Load,New") in list("New Character","Load Character"))
if("New Character")
var/charactername = input("Prison MMORPG","Choose your name!",null) //you should know this..
switch(input("Prison MMORPG","Choosey your race!","White") in list("White","Black"))
if("White") //if they chose to be a monkey
character = new /mob/White()
usr.Race = "White"
if("Black") //if they wanna be human,
character = new /mob/Black()
usr.Race = "Black"
character.name = charactername //set the name
src.client.mob = character //now, we change the player to this newly defined mob!
del(src) //delete the old mob
world << "[usr.name] ([usr.key]) made new character!"


Problem description:
Ok, so where in here should i put my admin check, so that it would work?
I mean this:
        if(usr.key=="Syntty" | usr.key=="Igooni")
verbs += typesof(/mob/Admin/verb) // give admins all admin verbs


Yes that code under is messed up but I fix it,,
I would make a proc to check for GM's...

mob
proc
GM_Check()
if(src.key==""||src.key=="")
src.verbs += typesof(/mob/Admin/verb)


And add the proc...

mob/create_character    //the default mob
var/mob/character //later we'll be switching client to this
Login()
GM_Check() // <----------------- HERE!
switch(input("What you want to do?","Load,New") in list("New Character","Load Character"))
if("New Character")
var/charactername = input("Prison MMORPG","Choose your name!",null) //you should know this..
switch(input("Prison MMORPG","Choosey your race!","White") in list("White","Black"))
if("White") //if they chose to be a monkey
character = new /mob/White()
usr.Race = "White"
if("Black") //if they wanna be human,
character = new /mob/Black()
usr.Race = "Black"
character.name = charactername //set the name
src.client.mob = character //now, we change the player to this newly defined mob!
del(src) //delete the old mob
world << "[usr.name] ([usr.key]) made new character!"

In response to Howey
Ok thanks.. I try tomorrow
I'm not going to attempt the first code listing, but the second should be simple enough.

Syntty wrote:
Problem description:
Ok, so where in here should i put my admin check, so that it would work?
I mean this:
        if(usr.key=="Syntty" | usr.key=="Igooni")
> verbs += typesof(/mob/Admin/verb) // give admins all admin verbs
>


You noticed that the indentation is messed up here, but it is also important to note that the "or" conditional is not done via the '|'operator, but rather via '||', so the code should be more like:
if(/* something */ || /* something else */)


Hiead