Thread: Dissapearence.
View Single Post
  #2  
Old 06-28-2009, 04:06 PM
Gambet Gambet is offline
Registered User
Join Date: Oct 2003
Posts: 2,712
Gambet is on a distinguished road
hide() makes an image disappear, show() makes it reappear. To read a player's chat you would do
if (player.chat == "stuffHere"), so in your case:

PHP Code:
function onPlayerChats() {
  if (
player.chat == "/on") {
    
//Stuff
  
} else if (player.chat == "/off") {
    
//More Stuff
  
}


But if you're doing it in the offline editor then you won't be able to use GS2. Either way, you might have to play with it a bit so that it doesn't just hide for you but it hides for everyone else as well. There are block-type stuff posted around this section of the forums that already does similar things to what you want, just use the search function and search for hide() or dontBlock()/blockAgain() since it's similar concepts.
Reply With Quote