Merhabalar! Şuanda acil yardıma ihtiyacım var. Bir Minigame kodladım "Running Race" adında ve bunu sunucuma ekleyecektim fakat 4 error verdi. Hata'dan iyi anlayan arkadaşlar yardımcı olursa sevinirim.
SORUN ÇÖZÜLMÜŞTÜR, TEŞEKKÜRLER!
Verdiği Hatalar:
Kod:
SORUN ÇÖZÜLMÜŞTÜR, TEŞEKKÜRLER!
Verdiği Hatalar:
Kod:
Kod:
# ------------------------------|
# Running RACE! Minigame v1.0.1 |
# ------------------------------|
# Author: DepsyX
options:
p: &3&lRRACE&f» &7
np: &3&lRRACE&f» &cYou don't have permission!
command /runningrace [<text>] [<text>] [<number>]:
aliases: /rr
trigger:
if arg 1 is not set:
if arg 2 is not set:
if arg 3 is not set:
send "&8&l&m======================================"
send "&8/&3runningrace &bjoin &8[&cArena&8] » &7Join an arena."
send "&8/&3runningrace &bleave &8[&cArena&8] » &7Leave the arena."
send "&8&l&m======================================"
if arg 1 is set:
if arg 3 is not set:
if arg 2 is set:
if arg 1 is "leave":
if {Arenas::*} contains arg 2:
if {ArenaStarted.%arg 2%} is true:
set player's gamemode to survival
set player's flight mode to false
wait 0.3 tick
clear player's inventory
heal the player
execute console command "effect %player% clear"
wait 2 tick
remove player from {PlayersList::%arg 2%}
set {Playing.%player%} to false
delete {JoinedArena.%player%}
send "{@p} &c%player% &7has left the game! &8[&b%amount of {PlayersList::%arg 2%}%&8/&310&8]" to {PlayersList::%arg 2%}
wait 1.5 tick
set slot 0 of player to compass named "&f- &bServers &f- &7(Right click)"
set slot 4 of player to paper named "&f- &dUpdates &f- &7(Right click)" with lore "&8» &7Last Update&8: &912&8/&b30&8/&a17"
set slot 8 of player to chest named "&f- &aVIP Menu &f- &7(Right click)" with lore "&8» &7Only VIP's can use this menu&8!"
teleport player to {Loc.HUB}
else:
send "{@p} &cThe game is not started!"
else:
send "{@p} &cThis arena doesn't exists!"
if arg 1 is "join":
if {Arenas::*} contains arg 2:
if {ArenaStarted.%arg 2%} is false:
set player's gamemode to survival
set player's flight mode to false
wait 0.3 tick
clear player's inventory
heal the player
execute console command "effect %player clear%"
wait 2 tick
add player to {PlayersList::%arg 2%}
set {Playing.%player%} to true
set {JoinedArena.%player%} to arg 2
send "{@p} &b%player% &7has joined the game! &8[&b%amount of {PlayersList::%arg 2%}%&8/&310&8]" to {PlayersList::%arg 2%}
wait 1.5 tick
set slot 8 of player to gray dye named "&cBack to Lobby &7(Right click)"
teleport player to {ArenaSpawn.%arg 2%.%amount of {PlayersList::%arg 2%}%}
else:
send "{@p} &cArena already started!"
else:
send "{@p} &cThis arena doesn't exists!"
if arg 1 is "createarena":
send "{@p} Arena creating..."
wait 1 second
add arg 2 to {Arenas::*}
set {ArenaStarted.%arg 2%} to false
send "{@p} Arena ready! &8[&a%arg 2%&8]"
if arg 1 is "removearena":
if {Arenas::*} contains arg 2:
send "{@p} Arena removing..."
wait 1 second
remove arg 2 from {Arenas::*}
delete {ArenaStarted.%arg 2%}
send "{@p} Arena successful removed! &8[&c%arg 2%&8]"
else:
send "{@p} &cError! %arg 2% is not set."
if arg 1 is "setspawn":
if {Arenas::*} contains arg 2:
if arg 3 is set:
set {ArenaSpawn.%arg 2%.%arg 3%} to location of player
send "{@p} Spawn &b%arg 3% &7successfully set!"
else:
send "{@p} Please enter Spawn ID!"
else:
send "{@p} &cError! %arg 2% is not set."
on rightclick with gray dye:
if player's tool is gray dye named "&cBack to Lobby &7(Right click)":
cancel event
execute console command "runningrace leave %{JoinedArena.%player%}%"
on command:
if {Playing.%player%} is true:
if command is not "runningrace" or "msg" or "w" or "tell" or "r":
cancel event
send "{@p} &cError! You are playing game, Please continue..."
on quit:
if {Playing.%player%} is true:
execute player command "runningrace leave %{JoinedArena.%player%}%"
on break:
if {Playing.%player%} is true:
cancel event
on place:
if {Playing.%player%} is true:
cancel event
on drop:
if {Playing.%player%} is true:
cancel event
on pickup:
if {Playing.%player%} is true:
cancel event
on walking on diamond block:
if {Playing.%player%} is true:
send "{@p} &b%player% &a&lhas won the game! Congratulations..." to {PlayersList::%{JoinedArena.%player%}%}
loop all players:
if {Playing.%loop-player%} is true:
if {JoinedArena.%loop-player%} is {JoinedArena.%player%}:
execute loop-player command "runningrace leave %{JoinedArena.%loop-player%}%"
Son düzenleme: