Lapzzo Posted August 14, 2021 Share Posted August 14, 2021 (edited) I have a scoreboard skript that displays kills and coins, but the numbers are a bit messy, I was wondering if anyone can make it so if a player has like 2,000,000 it will say 2M and if someone has 1,000 it will say 1K and other stuff like 2,500 = 2.5K and 1,200 is 1.2K. Im sure you know what I mean, but I want it for all the numbers obv. If this doesnt make sense, reply, and I will try simplify it. Code on next page: on join: while player is online: wipe player's sidebar set {players.online} to number of all players set name of sidebar of player to "&4u&cDemolish" set score "&c&m+----------------------------+&l" in sidebar of player to 6 set score "&f" in sidebar of player to 5 set score "➣ Coins: &6⛃ %{Coins::%player's uuid%} ? 0%" in sidebar of player to 4 set score "➣ Kills: &f☠ %{Kills::%player's uuid%} ? 0%" in sidebar of player to 3 set score "&l" in sidebar of player to 2 set score "&c&m+----------------------------+" in sidebar of player to 1 wait 5 seconds Edited August 14, 2021 by Lapzzo Code is on next page Link to comment Share on other sites More sharing options...
Lapzzo Posted August 14, 2021 Author Share Posted August 14, 2021 This would be so helpful! Link to comment Share on other sites More sharing options...
pnguin Posted August 14, 2021 Share Posted August 14, 2021 Use this to format numbers/currency function formatNumber(n: number) :: text: set {_data} to "QT,18|Q,15|T,12|B,9|M,6|k,3" loop split {_data} at "|": set {_s::*} to split loop-value at "," {_n} >= 10 ^ {_s::2} parsed as number return "%{_n} / 10 ^ {_s::2} parsed as number%%{_s::1}%" return "%{_n}%" Check this post aswell for more info c; 1 I used to play Minehut I guess? Yeah, I still watch the forums for some reason. (15/5/2023) Link to comment Share on other sites More sharing options...
Lapzzo Posted August 14, 2021 Author Share Posted August 14, 2021 16 minutes ago, pizzaschut said: Use this to format numbers/currency Thanks so much! Link to comment Share on other sites More sharing options...
Lapzzo Posted August 14, 2021 Author Share Posted August 14, 2021 17 minutes ago, pizzaschut said: Check this post aswell for more info c; How do i use this tho? Can you post a full skript using my scoreboard? Link to comment Share on other sites More sharing options...
pnguin Posted August 15, 2021 Share Posted August 15, 2021 19 hours ago, Lapzzo said: How do i use this tho? Can you post a full skript using my scoreboard? Well you can basically do %formatNumber({coins::%loop-player's uuid%})% for example I used to play Minehut I guess? Yeah, I still watch the forums for some reason. (15/5/2023) Link to comment Share on other sites More sharing options...
Lapzzo Posted August 15, 2021 Author Share Posted August 15, 2021 2 hours ago, pizzaschut said: Well you can basically do %formatNumber({coins::%loop-player's uuid%})% for example Thanks, Ill try it out! Link to comment Share on other sites More sharing options...
Lapzzo Posted August 15, 2021 Author Share Posted August 15, 2021 4 hours ago, pizzaschut said: Well you can basically do %formatNumber({coins::%loop-player's uuid%})% for example OMG TYSM!! IT WORKS!!!!!! Link to comment Share on other sites More sharing options...
pnguin Posted August 15, 2021 Share Posted August 15, 2021 np lol I used to play Minehut I guess? Yeah, I still watch the forums for some reason. (15/5/2023) 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