ID:1088247
 
Keywords: save
(See the best response by Jemai1.)
Code:
mob
// FireNation
FirePlayer
Login()
FirePlayer+=src
src<<"<font color=red><font face=Times New Roman>You learn to bend <i>fire</i>, by opening and closing chi pathways that run throughtout your body!"
// AirNation:
AirPlayer
Login()
AirPlayer+=src
src<<"<font color=silver><font face=Times New Roman>You learn to ben <i>air</i>, by opening and closing chi pathways that run throughout your body!"
// WaterNation:
WaterPlayer
Login()
WaterPlayer+=src
src<<"<font color=blue><font face=Times New Roman>You learn to bend <i>water</i>, by opening and closing chi pathways that run throughout your body!"
// EarthNation:
EarthPlayer
Login()
EarthPlayer+=src
src<<"<font color=gold><font face=Times New Roman>You learn to bend <i>earth</i>, by opening and closing chi pathways that run throughout your body!"
Start
Login()
src<<"Welcome to Avatar Chapter: 0.1, Air! We are currently in Alpha."
Createcharacter()
verb/Createcharacter()
set hidden=1
var/mob/FirePlayer/F = new(locate(1,1,1))
var/mob/AirPlayer/A= new(locate(1,1,1))
var/mob/EarthPlayer/E = new(locate(1,1,1))
var/mob/WaterPlayer/W = new(locate(1,1,1))
var/Picknation=input("Pick your nation.","Nation") in list("Fire","Air","Water","Earth")
if(Picknation=="Fire")
src.world.mob=/mob/FirePlayer
F.icon='Base(Black).dmi'
F.icon_state=""
F.name=name
F.client=client
if(Picknation=="Air")
src.world.mob=/mob/AirPlayer
A.icon='Base(Black).dmi'
A.icon_state=""
A.name=name
A.client=client
if(Picknation=="Water")
src.world.mob=/mob/WaterPlayer
W.icon='Base(Black).dmi'
W.icon_state=""
W.name=name
W.client=client
if(Picknation=="Earth")
src.world.mob=/mob/EarthPlayer
E.icon='Base(Black).dmi'
E.icon_state=""
E.name=name
E.client=client


Problem description:

When you play, it's all normal, but when you host it, if another player joins, it just runs whatever the first player picked.

Please help.
Best response
You are setting world.mob=/mob/FirePlayer // etc.

world.mob determines the type of mob to give the client upon establishing a connection.

Removing those should resolve the issue.

Also, please be aware that input uses usr by default. Createcharacter is being called without usr. Use src instead.
input(src,"Pick your nation.","Nation")
thanks, I got 1 more problem.

Bump(atom/a,mob/M,mob/M as mob)
//for(var/mob/WaterPlayer/W)
if(ismob(a))
var/dmg=usr.Power-M.Defense
world<<"<font color=red>[a] was hit for [dmg]!"
M.Stamina-=dmg
a:Death(src.wee)



Sorry indention is off, it's just doing that :P
Bump expects a single argument and that is the obstacle. You have to define M and give it a value elsewhere.
What would be the best way to do that, outside of Bump?
Somewhere on the Bump's body. Depends on how you use it.