Jump to content

I would like to know exactly how to add custom items

Not a Bug 1.0.20

 

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

Share this comment


Link to comment

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>");
  });
}

 

Share this comment


Link to comment

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 !

 

 

Share this comment


Link to comment
1.1m

Downloads

Total number of downloads.

5.6k

Customers

Total customers served.

80.8k

Files Sold

Total number of files sold.

1.6m

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.