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 !

 

 

1.4m

Downloads

Total number of downloads.

6.9k

Customers

Total customers served.

103.5k

Files Sold

Total number of files sold.

2.1m

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.