Hello, i'm working on murder mystery skript, i have everything done, but i have 1 problem..
I don't know, how to code role selecting (Murder, Detective, Innocent). I tried some, but it doesn't works.
Screen from game: It gives all roles at arena start.
Thank's for any answer/help.
Start command code:
I don't know, how to code role selecting (Murder, Detective, Innocent). I tried some, but it doesn't works.
Screen from game: It gives all roles at arena start.
Thank's for any answer/help.
Start command code:
Code:
variables:
{mu.players.} = 0
{murder.%player%} = false
{innocent.%player%} = false
{detective.%player%} = false
{mu.join.%player%} = false
{arena.} = 0
{mu.start.} = false
{mu.d.%player%} = 0
{mu.w.%player%} = 0
{mu.coins::%player%} = 0
{mu.kills::%player%} = 0
{mustart.arena.} = false
#ROLE-SELECT#
{murder.c} = 0
{murder.p.%player%} = false
{detective.c} = 0
{detective.p.%player%} = false
{innocent.c} = 0
{innocent.p.%player%} = false
if arg-1 is "start":
if arg-2 is set:
if {muarenatoggle.%arg 2%} is true:
if {arena.%arg 2%} exist:
if {muarena.%arg 2%} is set:
if player's gamemode is survival:
if player has permission "*":
set {mustart.arena.%arg 2%} to true
if {mustart.arena.%arg 2%} is true:
broadcast "{@mpx} Aréna &e%arg 2% &7startuje za &65 vteřin."
wait 1 second
broadcast "{@mpx} Aréna &e%arg 2% &7startuje za &64 vteřiny."
wait 1 second
broadcast "{@mpx} Aréna &e%arg 2% &7startuje za &63 vteřiny."
wait 1 second
broadcast "{@mpx} Aréna &e%arg 2% &7startuje za &62 vteřiny."
wait 1 second
broadcast "{@mpx} Aréna &e%arg 2% &7startuje za &61 vteřinu."
wait 1 second
broadcast "{@mpx} Aréna &e%arg 2% &7odstartovala."
loop all players:
teleport loop-player to {muarena.%arg 2%}
if {murder.c} is less than 1:
chance of 100%
add 1 to {murder.c}
set {murder.p.%loop-player%} to true
send "{@mpx} &cYou are a murderer." to loop-player
if {detective.c} is less than 1:
chance of 50%
add 1 to {detective.c}
set {detective.p.%loop-player%} to true
send "{@mpx} &bYou are a detective." to loop-player
if {innocent.c} is less than 8:
chance of 50%
add 1 to {innocent.c}
set {innocent.p.%loop-player%} to true
send "{@mpx} &aYou are a innocent." to loop-player
else:
send "{@mpx} &cHra je jiz ve hre"
else:
send "{@mpx} &cNemáš dostatečné pravomoce."
else:
send "{@mpx} &cSundej si creative."
else:
send "{@mpx} &cNení uložena spawn pozice arény."
else:
send "{@mpx} &cAréna s tímto názvem neexistuje."
else:
send "{@mpx} &cAréna je vypnutá. /murder toggle &a%arg 2%"