ID:162379
 
I have a turf that transports you to gm room but i want it to ask you a for a password before it telleports you this is the code i have done.

TOGMBASE
density = 0
Enter(A)
if(ismob(A))
var/mob/M = A
if(M.client)
M.loc = locate(40,57,31)
else
if(istype(A,/obj/)) del(A)


I need to it to prevent people from entering that are not gms. My gm code is not working for a wierd reason so im doing it like this. Please help ^^
If you want it to ask you for a password, just use input().
In response to Armiris
So they have to input say the password is blah would it be like if input is blah go 2 da cords i set and if else return? obviosly i know thats not how you code it but is that like the drift?
In response to Setox
Looking at this code structure this should help.

//example of an input code, not indented
mob
verb
input_code()
var/code = input("Enter code")as password
if(code != "blah") // if pass isnt equal to blah
usr<<"bad code" // its wrong.
return
/// otherwise if they type in blah
usr<<"Correct code"