Jump to content

Problem with FREE

Closed 1.2.15

Billionaire
  • in Shop

Good morning

Since the last update of the plugin, how do we deal with items that we don't want to put up for sale?

Currently it puts FREE

Before, the SELL box was not put when we did not want it by putting 0.0

But now it sets FREE.

Share this comment


Link to comment

It works fine with this modifications:

1-

#region Sell

if (shopItem.SellPrice > 0.0) SellButtonUi(player, ref container, shopItem);

#endregion

 

2-

In:

private void SellButtonUi(BasePlayer player, ref CuiElementContainer container, ShopItem shopItem)

change like this:

container. Add(new CuiLabel
{
RectTransform =
{
AnchorMin = "0 0", AnchorMax = "1 1",
OffsetMin = "0 0", OffsetMax = "-10 0"
},
Text =
{
Text = Msg(player, ItemPrice, shopItem.SellPrice), // HERE WHAT NEEDS TO BE CHANGED
Align = TextAnchor.MiddleRight,
Font="robotocondensed-bold.ttf",
FontSize = 14,
Color="1 1 1 1"
}
}, Layer + $".Item.{shopItem.ID}.Sell");


To sum up, if you put 0.0 in the sell in config files, then you might as well make the SELL button disappear in Game.

Players will not sell an item if it does not earn them anything. So they'll throw it on the ground instead of bothering to sell it for 0.
So you might as well make the SELL button disappear if in the config file, Sell=0.0

😉 🙂 😉

Edited by Gbutome

Share this comment


Link to comment
1.1m

Downloads

Total number of downloads.

5.6k

Customers

Total customers served.

80.5k

Files Sold

Total number of files sold.

1.5m

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.