I have a problem that when a player kills one player, he sometimes writes: Duels ► Player PlesCZ won Duel against PlesCZ
So PlesCZ stays in the game and the other player teleports to spawn so PlesCZ must give / leave
And then when a player wants to join the arena he writes the game in the game and in gui it is written by the players: -1/2
Do not you know how to fix it so that it does not sound that PlesCZ has won a duel against PlesCZ and to write it PlesCZ has won Duel against Plesik?
So PlesCZ stays in the game and the other player teleports to spawn so PlesCZ must give / leave
And then when a player wants to join the arena he writes the game in the game and in gui it is written by the players: -1/2
Do not you know how to fix it so that it does not sound that PlesCZ has won a duel against PlesCZ and to write it PlesCZ has won Duel against Plesik?
code_language.skript:
on death of player:
if player's world is "1vs1":
if {DUEL::PLAYER::%victim%::INGAME} is true:
if {DUEL::Arena::%{DUEL::PLAYER::%victim%::Arena}%::STATUS} is "&4&lINGAME":
set death message to ""
if {Sounds} is "true":
play raw sound "%{Sound_on_Kill}%" at attacker with pitch 1 volume 1
set {_arena} to {DUEL::PLAYER::%victim%::Arena}
remove attacker from {DUEL::PLAYER::Combo}
loop {DUEL::Arena::%{_arena}%::PLAYERS::*}:
set {_winner} to loop-value
remove 2 from {DUEL::Arena::%{_arena}%::PLAYERS}
add 10 to {DUEL::PLAYER::%{_winner}%::ELO}
remove 5 from {DUEL::PLAYER::%victim%::ELO}
add 1 to {DUEL::PLAYER::%{_winner}%::KILLS}
add 1 to {DUEL::PLAYER::%victim%::DEATHS}
add 1 to {DUEL::PLAYER::%{_winner}%::WIN}
execute console command "regen"
wait 10 second
set {DUEL::PLAYER::%victim%::INGAME} to false
set {DUEL::PLAYER::%{_winner}%::INGAME} to false
loop {DUEL::Arena::%{_arena}%::BLOCKS::*}:
set block at loop-value to air
set {_losser} to victim
set level of victim to 0
set victim's hunger to 20
set victim's health to 20
set level of {_winner} to 0
set {_winner}'s hunger to 20
set {_winner}'s health to 20
set {DUEL::PLAYER::%{_winner}%::BUILD} to false
set {DUEL::PLAYER::%victim%::BUILD} to false
invoke "give-inv" from {_winner}
invoke "give-inv" from {_losser}
broadcast "&e&lDuels &7&l► &7Player &c%{_winner}% &7won Duel against &c%{_losser}%" in player's world
remove {_winner} from {DUEL::Arena::%{_arena}%::PLAYERS::*}
teleport {_winner} to {DUEL::Arena::SETTINGS::MAINLOBBY}
teleport {_losser} to {DUEL::Arena::SETTINGS::MAINLOBBY}
clear player's inventory
wait 2 seconds
set {DUEL::Arena::%{_arena}%::STATUS} to "&aWaiting"
clear {DUEL::PLAYER::%player%Combo}
delete {DUEL::Arena::%{_arena}%::PLAYERS::*}
set {DUEL::Arena::%{_arena}%::PLAYERS} to 0
set {DUEL::Arena::%{_arena}%::PVP} to false