# Walk Distance Counter v1.0
# Every block walked = 1 meter
# Maximum = 5000 meters
# Shows walked distance in chat every 1 second
options:
max-distance: 5000
# Command to reset distance
command /resetdistance:
trigger:
set {walked.%uuid of player%} to 0
send "&aYour walked distance has been reset." to player
# Track walking
on move:
set {_from} to event-location
set {_to} to last location of player
set {_dist} to distance between {_from} and {_to}
add floor({_dist}) to {walked.%uuid of player%}
if {walked.%uuid of player%} > {@max-distance}:
set {walked.%uuid of player%} to {@max-distance}
# Show walked distance in chat every second
every 1 second:
loop all players:
if {walked.%uuid of loop-player%} is not set:
set {walked.%uuid of loop-player%} to 0
send "&7➡ Walked distance: &e%{walked.%uuid of loop-player%}% m" to loop-player
Pytanie
OskarYTYT 1
# Walk Distance Counter v1.0
# Every block walked = 1 meter
# Maximum = 5000 meters
# Shows walked distance in chat every 1 second
options:
max-distance: 5000
# Command to reset distance
command /resetdistance:
trigger:
set {walked.%uuid of player%} to 0
send "&aYour walked distance has been reset." to player
# Track walking
on move:
set {_from} to event-location
set {_to} to last location of player
set {_dist} to distance between {_from} and {_to}
add floor({_dist}) to {walked.%uuid of player%}
if {walked.%uuid of player%} > {@max-distance}:
set {walked.%uuid of player%} to {@max-distance}
# Show walked distance in chat every second
every 1 second:
loop all players:
if {walked.%uuid of loop-player%} is not set:
set {walked.%uuid of loop-player%} to 0
send "&7➡ Walked distance: &e%{walked.%uuid of loop-player%}% m" to loop-player
Odnośnik do komentarza
https://skript.pl/temat/58886-prosze-o-propawienie-skryptu-wywala-mi-taki-blad-cant-understand-this-structure-on-walk/Udostępnij na innych stronach
3 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ą.