mob/Login()
usr.icon='player.dmi'
usr<<'Under Siege.ogg'
src.addname("[src.key]")
usr.icon_state="default"
usr.loc=locate(7,8,1)
maxplayers += 1
if(maxplayers > 8)
alert("Enjoy the game.")
world <<"[usr] has joined the game!"
else
if(maxplayers == 8)
alert("This server is full. Go find another homie.")
del usr
mob/Logout()
world <<"[usr] has left the game."
maxplayers -= 1
del src
Problem description:
I'm trying to make a competitive take on the floor is lava which is a pretty common game for children. Wondering if this player limit code is correct. Haven't actually gotten around to testing out 8 people at once though.
Which is... entirely opposite of what you're wanting to do.
I would also advise against using src and usr in the same context, as they won't always be the same thing. usr in Login() is in itself not a very good practice.