toggling with one command

Discussion in 'Plugin Development' started by nitrousspark, Jun 14, 2012.

Thread Status:
Not open for further replies.
  1. Offline

    nitrousspark

    how would i make it so when a player types /nitro it does something and then when they do /nitro again it toggles it off like

    player types /nitro
    players.hideplayer(player)

    player types /nitro again
    players.showplayer(player)
     
  2. Offline

    NNickey

    Mmm.

    Code:
    player says '/nitro'
      check if player is hidden
      if(hidden==true) {
        player.showplayer()
      } else {
        player.hideplayer()
      }
    }
     
Thread Status:
Not open for further replies.

Share This Page