View Single Post
  #5  
Old 07-12-2011, 03:33 PM
callimuc callimuc is offline
ジ
callimuc's Avatar
Join Date: Nov 2010
Location: Germany
Posts: 1,015
callimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to behold
Quote:
Originally Posted by Gunderak View Post
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
__________________
MEEP!
Reply With Quote