Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- command /queue:
- trigger:
- if {Playing.%player%} is true:
- send "&cYou are already in-game!"
- stop
- if {inQueue.%player%} is true:
- set {inQueue.%player%} to false
- send "&cYou have left the queue!"
- else:
- set {inQueue.%player%} to true
- send "&aYou have joined the queue!"
- options:
- prefix: &c[&eGameControl-System&c] &a
- variables:
- {Playing.%player%} = false
- command /gamecontrol [<text>]:
- aliases: /gc
- permission: system.gamecontrol
- trigger:
- if arg-1 is not set:
- send "&e===GAME-CONTROL-SYSTEM BY GAMESAWAYHD V0.1==="
- send "&e/gamecontrol start - Starts the game!"
- send "&e/gamecontrol stop - Stops the game!"
- send "&e/gamecontrol queue - Checks the queue!"
- send "&e===GAME-CONTROL-SYSTEM BY GAMESAWAYHD V0.1==="
- else:
- if arg-1 is "start":
- if {gameStarted} is true:
- send "{@prefix} &cThe game is already started!"
- stop
- else:
- startGame()
- send "{@prefix} You have successfuly started the game!"
- stop
- if arg-1 is "stop":
- if {gameStarted} is not set:
- send "{@prefix} &cThe game is already stopped!"
- stop
- if {gameStarted} is false:
- send "{@prefix} &cThe game is already stopped!"
- stop
- if {gameStarted} is true:
- stopGame()
- send "{@prefix} You have successfuly stopped the game!"
- #FUNCTIONS
- #START GAME FUNCTION#
- function startGame():
- set {gameStarted} to true
- loop all players:
- if {inQueue.%loop-player%} is true:
- set {Playing.%loop-player%} to true
- set {inQueue.%loop-player%} to false
- #TP PROCESS
- send "&aThe game has been started!" to loop-player
- wait 1 second
- send "&eTeleportation will occur in 5 seconds..." to loop-player
- wait 1 second
- send "&eTeleportation will occur in 4 seconds..." to loop-player
- wait 1 second
- send "&eTeleportation will occur in 3 seconds..." to loop-player
- wait 1 second
- send "&eTeleportation will occur in 2 seconds..." to loop-player
- wait 1 second
- send "&eTeleportation will occur in 1 second..." to loop-player
- wait 1 second
- send "&eTeleported!" to loop-player
- #TP PROCESS
- wait 1 second
- send "&eThe game will start in 10 seconds..." to loop-player
- wait 1 second
- send "&eThe game will start in 9 seconds..." to loop-player
- wait 1 second
- send "&eThe game will start in 8 seconds..." to loop-player
- wait 1 second
- send "&eThe game will start in 7 seconds..." to loop-player
- wait 1 second
- send "&eThe game will start in 6 seconds..." to loop-player
- wait 1 second
- send "&eThe game will start in 5 seconds..." to loop-player
- wait 1 second
- send "&eThe game will start in 4 seconds..." to loop-player
- wait 1 second
- send "&eThe game will start in 3 seconds..." to loop-player
- wait 1 second
- send "&eThe game will start in 2 seconds..." to loop-player
- wait 1 second
- send "&eThe game will start in 1 second..." to loop-player
- wait 1 second
- send "&eThe game has started!" to loop-player
- #GIVE KITS PROCESS
- #GIVE KITS PROCESS
- #PICK RANDOM TEAM PROCESS
- if "%random integer between 1 and 2%" is "1":
- send "&eYou are now in the &c&lRED TEAM&e!" to loop-player
- else:
- send "&eYou are now in the &9&lBLUE TEAM&e!" to loop-player
- #PICK RANDOM TEAM PROCESS
- set {gameStarted} to true
- #STOP GAME FUNCTION#
- function stopGame():
- loop all players:
- if {Playing.%loop-player%} is true:
- set {Playing.%loop-player%} to false
- make console execute command "spawn %loop-player%"
- send "&cThe game ended!" to loop-player
- set {gameStarted} to false
- stop
- every second:
- if {gameTime} is 0:
- stopGame()
- stop
- else:
- if {gameTime} is greater than 0:
- remove 1 from {gameTime}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement