Jump to content

Number Formatted Price?

Closed 1.2.26 1.3.2

Nomad3211
  • in Shop
Nomad3211

Posted

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!!! 
😄

Mevent

Posted

Hi! Yes, I will add the ability to change the formatting in the config

  • Like 1
  • Love 1
Mevent

Posted

Do you want to change the formatting of items for sale?

Nomad3211

Posted

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. 

Mevent

Posted

Changed Status from Pending to Closed

Changed Fixed In to 1.3.2

  • Love 1
1.4m

Downloads

Total number of downloads.

6.9k

Customers

Total customers served.

102.1k

Files Sold

Total number of files sold.

2m

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.