ID:154308
 
Okay, say your testing your game and you want just your groupies allowed in, you can just add a nifty little bit to your code....
mob
Login()
usr << "Passing you through the check-in desk..."
if(usr.key in allowed_key_list)
usr << "okay, go ahead..."
else
usr << "This is a secure test...."
del(usr)


p.s.
most of you advanced coders know how to do this, so this is for the newer, less experienced guys.
You need more than that!

var/list/users_allowed = list("Nadrew","Nadrew's slightly ugly clones")

mob/Login()
if(users_allowed.Find(src.key))
src<<"Enter!"
..()
else
src<<"Bye!"
del(src)
unimatrix wrote:
Okay, say your testing your game and you want just your
if(usr.key in allowed_key_list)
usr << "okay, go ahead..."


Might want to put a ..() after that message to usr. Also, use src, not usr, throughout this proc :p
In response to Nadrew
yes you guyz i know, it's an example.....supposed to be full of bugz for those less experienced to figure out...