mob
var
disguised = 0
health = 100
proc
Start()
var/R = alert("What team do you want to be on?","Pick a team","Blue","Red")
switch(R)
if("Blue")
client.mob = /mob/BlueTeam
if("Red")
client.mob = /mob/RedTeam
var/N = input("What is your name?")
usr.name = N
Login()
world << "[usr] has logged in!"
..()
Start()
Logout()
world << "[usr] has logged out!"
mob/BlueTeam
New()
loc = locate(/area/bluestart)
mob/RedTeam
New()
loc = locate(/area/redstart)
Problem description: After you pick a team, it says you logged out, and regardless of your mob, you're always positioned at one location.
mob/Login() is called when a client is assigned a mob, which is part of client/New()'s default action. Similarly, mob/Logout is called when a client is leaving a mob (which is then immediately followed by client/Del() or another mob/Login(), as a client must be connected to a mob at all reasonable times or be disconnected).