Jump to content

Problem with FREE

Closed 1.2.15

Billionaire
  • in Shop
Billionaire

Posted

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.

Billionaire

Posted (edited)

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
Mevent

Posted

@GbutomeHi! In version 1.2.16 you now have the ability to disable the buy/sell option for an item 🙂

  • Like 1
Mevent

Posted

Changed Status from Pending to Closed

1.4m

Downloads

Total number of downloads.

6.9k

Customers

Total customers served.

102.3k

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.