ID:179803
 
i need a simple login code that ask what is your name and allows u to load a saved character and allows u to have a new character
SSJVegetto26 wrote:
i need a simple login code that ask what is your name and allows u to load a saved character and allows u to have a new character




Download Deadrons character handling.
In response to Nadrew
i used that but for some reason it won't do it
it was working before but now it isn't
In response to SSJVegetto26
i got it checked but it is not working it just logs me on without asking who i want to be or nothing
In response to SSJVegetto26
Alright, read the comments in the library. Make sure you have you have

client/base_num_characters_allowed = x


somwhere in your code, where x is a number greater than 1. Basically, if x = 3, then people can save up to 3 characters. However, if it is 1, then once you make a character it will automatically log you into it.
In response to sapphiremagus
mob
Login()
var/first_name
while (!first_name)
first_name = input(src, "What is your first name?", "First Name")

name = "[first_name]"

src << "Your name is [name]."
return ..()

usr.loc = locate(2,1,1)

var/race = input("What race do u want to be?") in list ("Goku","Gohan","LittleGohan","Goten","16","17","18","Cell","N amek","Jeice","Burter","Guldo","Recomme","Ginyu","Yamcha")
switch(race)
if("Goku")
icon = 'Goku.dmi'
if("Gohan")
icon = 'Gohan.dmi'
if("LittleGohan")
icon = 'Little Gohan.dmi'
if("Goten")
icon = 'Goten.dmi'
if("16")
icon = '16.dmi'
if("17")
icon = '17.dmi'
if("18")
icon = '18.dmi'
if("Cell")
icon = 'Cell.dmi'
if("Namek")
icon = 'namek.dmi'
if("Goku")
icon = 'Goku.dmi'
if("Jeice")
icon = 'Jeice.dmi'
if("Burter")
icon = 'Burter.dmi'
if("Guldo")
icon = 'guldo.dmi'
if("Recomme")
icon = 'Recomme.dmi'
if("Ginyu")
icon = 'Ginyu.dmi'
if("Yamcha")
icon = 'Yamcha.dmi'
..()



mob
Login() // logining in (DUH)
usr.loc = locate(2,1,1)
usr << "DBZ GT Quest for Power!"
world << " [usr] Wants to be the strongest!"



mob
Login()
loc = locate(/turf/Start)
..()
In response to SSJVegetto26
That is one of the worst login codes I have ever seen!


try:

mob/Login()
src.loc=locate(/turf/Start)
var/Name=input("Whats your name?")
src.name=Name
switch(input("What race?")in list("Stupid DBZ race one","Stupid DBZ race two"))
if("Stupid DBZ race one")
..()
else
..()

I'm sure you can figure out how to make this work to your specifications, Good luck and I hope not to play your game.