variables:
worldborder = 2000
every 1 tick:
loop all players:
set {_x} to x coordinate of loop-player
set {_y} to y coordinate of loop-player
set {_z} to z coordinate of loop-player
if {_x} is more than {worldborder}:
set {_x} to {worldborder}
set {_tp} to true
if {_x} is less than {worldborder}*-1:
set {_x} to {worldborder}*-1
set {_tp} to true
if {_z} is more than {worldborder}:
set {_z} to {worldborder}
set {_tp} to true
if {_z} is less than {worldborder}*-1:
set {_z} to {worldborder}*-1
set {_tp} to true
if {_tp} is true:
set {_xyz} to the location at {_x}, {_y}, {_z} in loop-player's world
teleport loop-player to {_xyz}
if distance between loop-player and {granica} is less than 20:
set action bar of loop-player to coloured "&AZBLIZASZ SIE DO GRANICY MAPY!!!"
command /worldborder [<number>] [<text>]:
trigger:
if player has permission "worldborder.*":
if argument 1 is set:
if argument 1 is number:
set {worldborder} to argument 1
message "&7Ustawiono granice mapy = &2%argument 1%k."
else:
message "&7Poprawne uzycie &2/worldborder <number>"
else:
message "&7Poprawne uzycie &2/worldborder <number>"
else:
message "&cNie masz dostepu do tej komendy!"
dokladnie o to chodzi
if distance between loop-player and {granica} is less than 20:
set action bar of loop-player to coloured "&AZBLIZASZ SIE DO GRANICY MAPY!!!"
Pytanie
marsjanin 0
nie chce sie wyswietlac wiadomosc
dokladnie o to chodzi
if distance between loop-player and {granica} is less than 20: set action bar of loop-player to coloured "&AZBLIZASZ SIE DO GRANICY MAPY!!!"
Edytowane przez marsjaninOdnośnik do komentarza
https://skript.pl/temat/27403-problem-z-granica/Udostępnij na innych stronach
4 odpowiedzi na to pytanie
Rekomendowane odpowiedzi
Dołącz do dyskusji
Możesz dodać zawartość już teraz a zarejestrować się później. Jeśli posiadasz już konto, zaloguj się aby dodać zawartość za jego pomocą.