Jump to content

I would like to know exactly how to add custom items

Not a Bug 1.0.20

RickSousTaz
RickSousTaz

Posted

 

Hello, where I have to put the line of code
"(void) AddCustomItem(Plugin plugin, int itemId, ulong skinId) (void) AddCustomItem(Plugin plugin, int itemId, ulong skinId, string customName)" Because I don't know and I would like to add items that I have with other plugins

The_Kiiiing

Posted

This api is only intended for developers of other plugins to register custom items, if you want a certain plugin to add custom items, you can ask the developer to implement the custom item api of this plugin. I would not recommend you to change anything inside a plugin unless you have some coding experience. If you want to do it anyways, put the api calls in the Init or OnServerInitialized mehod, and delay them using a timer.

private void Init()
{
  timer.In(1f, () =>
  {
    Loottable?.Call("AddCustomItem", this, <item id goes here>, <skin id goes here>, "<custom name goes here>");
  });
}

 

The_Kiiiing

Posted

Changed Status from Pending to Not a Bug

RickSousTaz

Posted

hey can you explain me in ganja 2.0 have put the code 
private void Init() { timer.In(1f, () => { Loottable?.Call("AddCustomItem", this, <item id goes here>, <skin id goes here>, "<custom name goes here>"); }); }

for is look in loottable please !

 

 

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.4m
Total downloads
Customers
10.8k
Customers served
Files Sold
155.8k
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.