function startAntiLogOut(p: player): set {antiLogOut::%{_p}%} and {_var} to 20 loop 20 times: {antiLogOut::%{_p}%} is not set: stop {antiLogOut::%{_p}%} > {_var}: stop {antiLogOutEnemy::%{_p}%} is not set: send "&8&l» &a&lTwój przeciwnik wyszedl!" to {_p} send "&8&l» &a&lMozesz juz sie wylogowac!" to {_p} send action bar "&8&l» &a&lMozesz juz sie wylogowac!" to {_p} clear {antiLogOut::%{_p}%} stop send action bar "&3&lANTYLOGUT &8&l(&2&l%{antiLogOut::%{_p}%}%&8&l)" to {_p} remove 1 from {antiLogOut::%{_p}%} and {_var} wait 1 second clear {antiLogOut::%{_p}%} send "&8&l» &a&lMozesz juz sie wylogowac!" to {_p} send action bar "&8&l» &a&lMozesz juz sie wylogowac!" to {_p} on damage of player: attacker is a player attacker is not victim set {antiLogOutEnemy::%victim%} to attacker set {antiLogOutEnemy::%attacker%} to victim startAntiLogOut(victim) startAntiLogOut(attacker) on quit: {antiLogOut::%player%} is set clear {antiLogOutEnemy::%{antiLogOutEnemy::%player%}%} clear {antiLogOutEnemy::%player%} kill player on command: command is not "helpop" or "zglos" or "msg" {antiLogOut::%player%} is set cancel event send "&8&l» &c&lNie mozesz uzywac tej komendy gdy jestes w pvp!" to player