Closed Testing

by Darker Legends
Did you ever want to host your game without others connecting? Don't you know how to use Dream Daemon's built in feature? Then this demo is for you!
ID:119796
 
-Version[0.1]
Initial release.
short..but simple and nice
Fixed the code up

var/list/beta_testers=list("")//Put your ckey here. Your ckey is basically your key without spaces or upper-case letters.
var/closed_beta=1//Set to one if closed beta, set to zero if public.

client/New()
if(closed_beta == 1)
if(!(src.ckey in beta_testers))//Check if the user's a tester or not.
src << "You're not allowed to be testing this game, sorry!"//Tell the user he's not allowed to join.
del src//Block the user from going any further.
else
return ..()//User is a tester, continue.
else
return ..()
I don't know how Inever noticed that, but this should work fine.
/*
This is a short demonstration on how to prevent people from logging in if they're not testers.
*/

var/list/beta_testers=list("")//Put your ckey here. Your ckey is basically your key without spaces or upper-case letters.
var/closed_beta=0//Set to one if closed beta, set to zero if public.

client/New()
if(closed_beta)
if(!(src.ckey in beta_testers))//Check if the user's a tester or not.
src << "You're not allowed to be testing this game, sorry!"//Tell the user he's not allowed to join.
del src//Block the user from going any further.
return ..()//User is a tester, continue.
You welcome :P
In response to Darker Legends
Darker Legends wrote:
I don't know how Inever noticed that, but this should work fine.
/*
> This is a short demonstration on how to prevent people from logging in if they're not testers.
> */

> var/list/beta_testers=list("")//Put your ckey here. Your ckey is basically your key without spaces or upper-case letters.
> var/closed_beta=0//Set to one if closed beta, set to zero if public.
>
> client/New()
> if(closed_beta)
> if(!(src.ckey in beta_testers))//Check if the user's a tester or not.
> src << "You're not allowed to be testing this game, sorry!"//Tell the user he's not allowed to join.
> del src//Block the user from going any further.
> return ..()//User is a tester, continue.


Also try to put a sleep on the del src. The players dont even get to see the message.