ID:163277
 
How do I make it were only 1 person can log into the world? and its not certain keys
var/players=0

client
New()
.=..()
if(players>1)del src
players++

That should help.
In response to Kakashi24142
Kakashi24142 wrote:
> var/players=0
>
> client
> New()
> .=..()
> if(players>1)del src
> players++
>

That should help.

Might want to edit that; it only checks if its greater than 1 not equal to 1 meaning that 2 people could login.
In response to Mecha Destroyer JD
Oh my bad xD
var/players=0

client
New()
.=..()
if(players>0)del src
players++
In response to Kakashi24142
What about this:
var/player=0
client/New()
if(player) del src // If player is true, meaning anything EXCEPT 0, "" or null
player = 1
..() // I'm sure you want the rest of the client/New() to happen AFTER the check
If you want to keep someone from hosting (Which is the only way someone can get multiple people in a game), you can simply do this:
world/OpenPort() return


I'm not sure, but I think this will also stop people from hosting via Dream Daemon (at least the example in the reference seems to imply this).