Jump to content
Maintenance Notice: Certain sections of the site will be unavailable off and on but vital services will remain online and no downtime is expected. ×

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
  • Curator
Mevent

Posted

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

  • Curator
Mevent

Posted

Changed Status from Pending to Closed

About Us

Codefling is the largest marketplace for plugins, maps, tools, and more, making it easy for customers to discover new content and for creators to monetize their work.

Downloads
2.3m
Total downloads
Customers
10.7k
Customers served
Files Sold
154.9k
Marketplace sales
Payments
3.3m
Processed total
×
×
  • 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.