#Need help with leaderboards.

1 messages · Page 1 of 1 (latest)

serene cairn
#

Can someone help me with leaderboards? like cointop, leveltop, rebirthtop Its kinda hard for me i need some help can some help?

clever parrot
#

more information please? whats the issue and what do you want to know?

radiant portal
# serene cairn Can someone help me with leaderboards? like cointop, leveltop, rebirthtop Its ki...

to make a leaderboard with skirpt do the following.
-You need to get the info(cointop, leveltop, ect.) and put it in a indicess of list(https://skripthub.net/docs/?id=3736).
-Spawn a armorstand at a location with nbt such as (invisible, marker, mini, nogravity)
-loop your indicess of list and spawn armorstand under the last spawned armorstand with nbt there also. and set the name for each armorstand to the variable.

serene cairn
#

ok

#

ty

#
    trigger:
        set {_sortedList::*} to sorted {coinsbal::*}
        loop {coinsbal::*}:
            add 1 to {_count}
            set {_indexes::%loop-value%} to loop-index
            if mod({_count}, 20) = 0:
                wait 1 tick
        set {_n} to 0
        loop {_sortedList::*}:
            add 1 to {_n}
            set {_current} to {_indexes::%loop-value%} parsed as offline player
            set {_msg::%{_n}%} to "&7%{_current}% &7➜ &e%formatNumber(loop-value)% ᴄᴏɪɴꜱ"
            {_n} = 10
            exit 1 loop
        message "&6&m      &6:sunny: &e&lᴛᴏᴘ ᴄᴏɪɴꜱ &6:sunny:&6&m       "
        loop {_msg::*}:
            set {_current} to loop-index parsed as int - 1
            set {_c} to size of {_msg::*} - {_current}
            add {_msg::%{_c}%} to {_invertedList::*}
        set {_n} to 0
        loop {_invertedList::*}:
            add 1 to {_n}
            message "&e##%{_n}% %loop-value%"```
#

this is my current skript

#

but it does this

serene cairn
#

can u help me please

clever parrot
#

add something like

#

{players::*}

#

then remove the player after they are already listed

#

and then at the start of the function call have it loop through the players and add it to that list

serene cairn
#

how?

#

can u give me an example

#

would apreciate it

clever parrot
#
add players to {playersList::*}

(test)
remove loop-player from {players}
#

also have any other players join the server?

#

if so that could cause the issue

serene cairn
#

i released server

#

so 600 players joined

#

rn 5 are on

#

it was fine with like 2-3 players

#

during development

clever parrot
#

idk man

#

without spoonfeeding there aint much i can show

#

pretty much for the top 10 players on the leader board. Have a list of all the players.
Then while looping through the players. Get rid of the ones in the top 10 and give them their places or smth like that.

serene cairn
#

oh

#

ic

#

like my coin's balance variable is {coinsbal::%player's uuid%}

#

if i get value {coinsbal::*}

#

in ascending order

#

how do i check if the {playerlist::} is the one with {coinsbal::}?

clever parrot
#

yep then loop through the top ten and remove them from that list. OR add them to a list and check to make sure the players uuid isn't already in that lsit

clever parrot
#

then add the player to that list when they are in the top 10

#

using that ascending order like u said

#

then check next time your adding the player to the holigram

#

that they are not already in the list {top10list::*}

serene cairn
#

alr