Jump to content

How to find player position in baltop


YTHmr_Abood

Recommended Posts

Hello there! Can someone help me figure out how to find a player position in baltop so they know when they will reach the top 50?

current code

 

command /baltop:
	trigger:
		set {_top::*} to sorted indices of {coin::*} in descending order
		set {_slot} to sum({coin::*})
		set {_top} to chest inventory with 6 rows named "<##bce780>&lʙ<##c1e984>&lᴀ<##c5ec88>&lʟ<##caee8c>&lᴀ<##cff190>&lɴ<##d3f393>&lᴄ<##d8f697>&lᴇ <##ddf89b>&lᴛ<##e1fb9f>&lᴏ<##e6fda3>&lᴘ"
		set {_slot} to 0
		loop 55 times:
			add {_top::%loop-value-1%} to {_top_10::*}
		loop {_top_10::*}:
			add 1 to {_n}
			set slot {_slot} of {_top} to {_top_10::%{_n}%} parsed as offlineplayer's skull named "<##BCE780>%{_n}%-%{_top_10::%{_n}%} parsed as offlineplayer%" with lore "&aBalance:&6%formatNumber({coin::%{_top_10::%{_n}%}%})%"
			add 1 to {_slot}
		open {_top} to player

 

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...