why are you using const flags? lol
HTML Code:
function onCreated(){
this.allowed = {"ACCT1", "ACCT2", "ACCT3"};
this.admins = {"ACCT1", "ACCT2"};
this.d_open = true;
this.show();
}
function onPlayerTouchsMe(){
if(this.d_open == true || (this.d_open == null && player.account in this.allowed)) {
this.hide();
setTimer(2);
}
}
//For some reason, the timeout is less laggy (clientside, ever so slightly, thought I'd add it)
function onTimeout() {
this.show();
}
function onPlayerChats(){
if(!(player.account in this.admins)) return;
if(player.chat == "/allowall") this.d_open = true;
else if (player.chat == "/disallowall") this.d_open = false;
else if(player.chat.starts("/allow")) {
temp.act = player.chat.substring(7);
this.allowed.add(temp.act);
player.chat = temp.act SPC "is now allowed through!";
}
}
(don't need a const...)