When i hosted my game and i have this var/People = 0
mob/Login()
if(!People)
alert("You are the descendent of the great Erdrick.")
usr.icon = 'Erdrick.dmi'
src.loc=locate("King")
..()
else
src<<"This is a one player game!"
del(src)
so its only supposed to be one player
yes tothere people joined my game
ID:179624
![]() Nov 26 2001, 4:07 pm
|
|
I had this question awhile ago myself...lemme try to help you out. First of all....you need to give the world a var, like so,
var People Then when somone logs in, you can add one to this or something. Then when somone else logs in, or tries to, hehe, have it check to see if the people var is at it's max, one in this case, and if it is, then del(src) or whatever.Hope this helped. |
Oh so would i do this
mob/Login() var/People = 0 usr.People=1 if(!People) alert("You are the descendent of the great Erdrick.") usr.icon = 'Erdrick.dmi' src.loc=locate("King") ..() else src<<"This is a one player game!" del(src) Would this work |
Okay, I can't manage to make any sense of that. But the problem you're having is that in the if(!People) block, when the player logs in you don't set People to 1. So when a second player logs in, People is still 0 and so the same block of code executes.
Lummox JR