#Numbers like 1k instead of 1000 with variables
1 messages · Page 1 of 1 (latest)
hey
im curious how do u make it so it shows the code in grey
because i dont know
yes
Right click + Copy text
this
backticks are on the top left corner on a keyboard where ~ is
if {money::%player's uuid%} is not set:
set {money::%player's uuid%} to 0
if {money::%player's uuid%} is set:
send "&aYou currently have &2%{money::%player's uuid%}%&a Money!"
command /balance [<player>]:
usage: &a/Balance [<player name>]
trigger:
if arg-1 is set:
send "&a%arg-1% currently has &2%{money::%arg-1's uuid %}%&a Amount of money!"
else:
send "&aYou currently have &2%{money::%player's uuid%}%&a Amount of money!"
command /setbalance <string> [<player>]:
aliases: /setbal
usage: &a/setbalance <amount of mone> [<player name>]
trigger:
if arg-1 is not set:
if arg-2 is not set:
send "&4Incorrect Argument(s)" to player
send "&4Please try &a/setbalance <amount of mone> [<player name>]" to player
if arg-1 is set:
set {money::%player's uuid%} to arg-1
send "&aSuccesfully Set your money to %{money::%player's uuid%}%!"
if arg-1 is set:
if arg-2 is set:
set {money::%arg-2's uuid%} to arg-1
send "&aSuccesfully set %arg-2%'s Money to %{money::%arg-2's uuid%}%!"```
this is the code
i want to make a economy skript and the problem is when i for example set my balance to 1000 or more like 1'000'000 then it will show the full number e.x "1000" instead of "1k" how do i fix that?
theres many number formatting scripts in #skript-snippets
i dont rlly understand all of that stuff
if you understand CTRL C CTRL V you can use it
just call the function with a number in it, and tada
wdym
Calling a function means using it
Basically just stick a number in it and it’ll output the abbreviation
hi
This isn't #general 🤨
i didnt really write any code with functions yet, so i dont know how to stick a number in it or whatever
you just put it in the ()
like this: broadcast "1000 -> %formatNumber(1000)%"
will broadcast "1000 -> 1k"
theres a functions pin in #skript-help-2