function createTop(name: string, size: number, list: objects, format: string="[PLAYER] - [VALUE]") :: strings:
set {_index} to 1
loop {_list::*}:
if {%{_name}%::%loop-value%} is set:
if {%{_name}%::%loop-value%} is a number:
set {_top::%{_index}%} to {%{_name}%::%loop-value%}
set {_players::%{_index}%} to "%loop-value%"
add 1 to {_index}
if {_size} > (size of {_players::*}):
set {_size} to (size of {_players::*})
loop {_size} times:
loop {_top::*}:
if {_max} is not set:
set {_max} to loop-value-2
set {_index} to loop-index
else:
if loop-value-2 > {_max}:
set {_max} to loop-value-2
set {_index} to loop-index
set {_var} to {_format}
replace "[PLAYER]" with {_players::%{_index}%} in {_var}
replace "[INDEX]" with "%loop-number%" in {_var}
replace "[VALUE]" with "%{_max}%" in {_var}
add {_var} to {_return::*}
delete {_players::%{_index}%}, {_top::%{_index}%}, {_max} and {_index}
return {_return::*}
command /topka [<text>]:
trigger:
loop {lvl::*}:
add loop-index to {_return::*}
send createTop("lvl", 20, {_return::*}, "&6[INDEX]. &e[PLAYER] &6-> &e[VALUE]")
Co zrobić żeby do topki nie wliczało gracza o nicku "Lubie_RPG" i "TestowyGracz"?
Pytanie
LubieRPG 0
Siema mam taki skrypt na topke lvli:
Co zrobić żeby do topki nie wliczało gracza o nicku "Lubie_RPG" i "TestowyGracz"?
Odnośnik do komentarza
https://skript.pl/temat/37860-topka-2/Udostępnij na innych stronach
3 odpowiedzi na to pytanie
Rekomendowane odpowiedzi