Jump to content

Number Formatted Price?

Closed 1.2.26 1.3.2

Nomad3211
  • in Shop

Hi there! 
I love the plugin soo far, but I have had a number of players complain that the numbers are hard to read. 
I went into the Shop.cs and was able to change the player balance title to a number formatted string, so the balance displays as:
$1,000,000 rather than $1000000.

Here was my update on player balance:

public string GetBalanceTitle(BasePlayer player)
            {

                var playerBalance = ShowBalance(player);
                var formattedPlayerBalance = playerBalance.ToString("N0");
                return _instance.Msg(player, BalanceLangKey, formattedPlayerBalance);
            }

I can't seem to figure out how to do this for individual item prices though.
went into the item class but that's where I get stuck.  
Do you have any plans on adding number formatting in the future? 
Or is it possible to perhaps point me in the right direction, so I can tackle it? 

Any help with this is greatly appreciated!!! 
😄

Share this comment


Link to comment

Awesome! 

If its possible, that would be amazing!
The ui is amazing to begin with, but those little commas would make the world of difference.  
I have tried all the shop plugins, and this one takes the cake!

Yeah it was the item prices themselves that I also wanted to try and add string formatting to, I just couldnt find the right way to make that happen. 

Share this comment


Link to comment
1.1m

Downloads

Total number of downloads.

5.6k

Customers

Total customers served.

81.6k

Files Sold

Total number of files sold.

1.6m

Payments Processed

Total payments processed.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.