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! [More]
To download this demo for your Linux/Mac installation, enter this on your command line:

DreamDownload byond://DarkerLegends.betatest##version=0

Emulator users, in the BYOND pager go to File | Open Location and enter this URL:

byond://DarkerLegends.betatest##version=0

65 downloads
Latest Version
Date added: Aug 11 2011
4 fans
-Version[0.1]
Initial release.

Comments

Dr.Penguin: (Aug 29 2012, 12:06 am)
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.
Dr.Penguin: (Aug 28 2012, 11:51 pm)
You welcome :P
Darker Legends: (Aug 28 2012, 11:50 pm)
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.
Dr.Penguin: (Aug 28 2012, 10:31 pm)
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 ..()
2Saruman2: (Oct 10 2011, 10:18 am)
short..but simple and nice