Quote:
Originally Posted by Gunderak
PHP Code:
function onPlayerChats(){
if (player.account == "Graal780374"){
if (player.chat == "/open"){
this.chat = "Secret Room Is Open!";
if (playertouchsme){
player.chat = "open";
}
}
if (player.chat == "/close"){
this.chat = "Secret Room Is Closed!";
}
if (playertouchsme){
player.chat = "closed";
}
}
}
|
I´d prefer to make it clientside. and if you want the player to say that its open as far as you open it I´d do something like:
PHP Code:
//#CLIENTSIDE
function onCreated() {
this.opencheck = false;
}
function onPlayerTouchsMe() {
if (this.opencheck = false) {
this.opencheck = true;
}
else this.opencheck = false;
player.chat = this.opencheck;
}
That´s just an example and yes ik there is something like this.opencheck = !this.opencheck but I just wanted to tell him this way since I don´t know if he understands now how to do the if conditions and with else
