WesGamer Posted April 30, 2020 Share Posted April 30, 2020 Hello, my goal with this is to create a leaderboard. i know there is a leaderboard skript but that is too complicated and long. I want to know how (if possible) to retrieve the username of a owner. for example i have the variable {bal::%uuid of player%} it is an balance of a player. so its a number. how do i get the username of the owner of the balance? Thank you! for helping I do not have any code so far I'm not allowed to have discord cause of my parents so i can not get contact in discord it would be nice if it was just in this forum topic chat. Link to comment Share on other sites More sharing options...
DeltaRays Posted April 30, 2020 Share Posted April 30, 2020 Hey, when you loop variables you have access to loop-value and loop-index, in this case if you loop {bal::*} loop-value is the balance and loop-index is going to be the uuid of player, I hope this'll help you do it 1 Link to comment Share on other sites More sharing options...
WesGamer Posted April 30, 2020 Author Share Posted April 30, 2020 Yes thx this is very helpfull! Anyway to convert uuid to username? Link to comment Share on other sites More sharing options...
Migins Posted May 1, 2020 Share Posted May 1, 2020 10 hours ago, WesGamer said: Yes thx this is very helpfull! Anyway to convert uuid to username? You get get a player from a uuid using this, be mindful that it requires the skript addon 'TuSke'. 1 ► Support July 29, 2020 → November 3, 2020 ► Helper November 3, 2020 → February 22, 2021 ► Moderator February 22, 2021 → May 17, 2021 ► I might not always respond to forum dms, however I am always contactable on discord (mig#0069) Link to comment Share on other sites More sharing options...
WesGamer Posted May 1, 2020 Author Share Posted May 1, 2020 Thx again this is helpfull could you give me a example? Link to comment Share on other sites More sharing options...
WesGamer Posted May 1, 2020 Author Share Posted May 1, 2020 I found the example but now i have a problem with the code command /baltop: trigger: set {dupebal::*} to {bal::*} loop 3 times: loop {dupebal::*}: if {highest} is not set: set {highest} to loop-value-2 set {hname} to loop-index if {highest} is set: if loop-value-2 > {highest} : set {highest} to loop-value-2 set {hname} to loop-index remove ... from {dupebal::*} set {high.name} to offline player from "%{hname}%" send "&b%loop-number%&7. %{high.name}% %{highest}%" how do i remove the highest outcome of the dupebal loop from the {dupebal::*} list so i dont get duplicates Link to comment Share on other sites More sharing options...
ReportCards Posted May 7, 2020 Share Posted May 7, 2020 You should use local variables first of all, and what do you mean duplicates? If it's done correctly, there shouldn't be a worry. And why go through it like this? Looping through that list 3 times without any sort of pausing will create a bunch of lag when you have more values within the list. Zora » Discord: @reportcards Link to comment Share on other sites More sharing options...
WesGamer Posted May 8, 2020 Author Share Posted May 8, 2020 Could you improve the skript but not make it long and complicated? I dont really understand what you mean. 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