Birdy_Bot Posted July 1 Share Posted July 1 I want something like a 6 row gui that shows like example killstop would show at top of gui the player with top kills & the gui item of that slot would be the player's head & so on it's something everyone would love but every one i find has like 7 addons needed i got skbee & skrayfall if that helps Link to comment Share on other sites More sharing options...
100_ Posted July 20 Share Posted July 20 (edited) Hi, you can actually do this with just skript, by using vanilla guis and a smart sorting function. Let's assume your kills variable is {kills::%player's uuid%} function sorted(list: numbers, indices: strings) :: strings: loop {_indices::*}: set {_sorted::%{_list::%loop-index%}%.%loop-index%} to loop-value return (reversed {_sorted::*}) command /killstop: trigger: set metadata tag "killstop" of player to chest inventory with 3 rows named "&eTop Kills" set {_sorted::*} to sorted({kills::*}, indices of {kills::*}) loop 9 times: set {_uuid} to {_sorted::%loop-number%} set {_player} to {_uuid} parsed as offlineplayer set {_kills} to {kills::%{_uuid}%} set slot (8 + loop-number) of metadata tag "killstop" of player to {_player}'s skull named "&e&l##%loop-number% &a%{_player}% &7- &e%{_kills}% kills" open metadata tag "killstop" of player to player This is what it would look like 2 minutes ago, 100_ said: Hi, you can actually do this with just skript, by using vanilla guis and a smart sorting function. Let's assume your kills variable is {kills::%player's uuid%} function sorted(list: numbers, indices: strings) :: strings: loop {_indices::*}: set {_sorted::%{_list::%loop-index%}%.%loop-index%} to loop-value return (reversed {_sorted::*}) command /killstop: trigger: set metadata tag "killstop" of player to chest inventory with 3 rows named "&eTop Kills" set {_sorted::*} to sorted({kills::*}, indices of {kills::*}) loop 9 times: set {_uuid} to {_sorted::%loop-number%} set {_player} to {_uuid} parsed as offlineplayer set {_kills} to {kills::%{_uuid}%} set slot (8 + loop-number) of metadata tag "killstop" of player to {_player}'s skull named "&e&l##%loop-number% &a%{_player}% &7- &e%{_kills}% kills" open metadata tag "killstop" of player to player This is what it would look like You can change the code as you wish to make it however many rows and players you want to show. Just increase the number of times you're looping (e.g do loop 20 times instead of 9). If you want to organise the heads in a specific pattern you could make a list which has a list of slots were you want each head to go and then place the head there, instead of just basing it off loop-number. Edited July 20 by 100_ Link to comment Share on other sites More sharing options...
Birdy_Bot Posted July 25 Author Share Posted July 25 @100_ sorry i did't update this ty but i wanted to use ajleaderboards if u check my thing in skript help in discord you'll see my only problem Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now