Login()
var/savefile/F = new(ckey)
Read(F)
switch(input("Which race would you like to be?") in list ("Human","Elf","Vampire","Lycan","Demon","Angel"))
if("Human")
src.icon = 'human.dmi'
if("Elf")
src.icon = 'elf.dmi'
if("Vampire")
src.icon = 'vampire.dmi'
if("Lycan")
src.icon = 'lycan.dmi'
if("Demon")
src.icon = 'demon.dmi'
if("Angel")
src.icon = 'angel.dmi'
..() //the gender of their key. Then call the parent!
world << "[usr] has entered!"
return ..()
Logout()
world<<"Player [src] has logged out.."
var/savefile/F = new(ckey)
Write(F)
del(src)
As you can see, when a player logs in, they are asked which race they are going to be, which changes their icon appropriately. When they log out, their stats are saved.
However, when they log back in, their stats are loaded, but they are asked which race they want to be again.
How can I make it so that the race they chose will be saved and loaded the next time they enter the world?
Do something like this: