Select object

B

Brālis Tezenis

Guest
Good day, please help with an example - you need to understand how to make any object - a fire,a chest,stove unique - that is, that the correct code is processed only when interacting with the right thing
 

gintaras

Plugin Developer
Plugin Developer
Jan 10, 2017
68
138
8
He wants to add new loot boxes that spawns items like weapon loot box end etc. I think he need rustbuster plugin and server side plugin
 
B

Brālis Tezenis

Guest
He wants to add new loot boxes that spawns items like weapon loot box end etc. I think he need rustbuster plugin and server side plugin
I don't want nothing new to add - just want to make one Large Wood Storage and it was the only one working code from the plugin and not on all chests
 

DreTaX

Probably knows the answer...
Administrator
Jun 29, 2014
4,093
4,784
113
At your house.
github.com
Python:
import Fougerite
from Fougerite import Entity

...

ent = Entity(World.Spawn(';deploy_wood_storage_large, location.x, location.y, location.z, spawnRot))
??
 
B

Brālis Tezenis

Guest
Python:
import Fougerite
from Fougerite import Entity

...

ent = Entity(World.Spawn(';deploy_wood_storage_large, location.x, location.y, location.z, spawnRot))
??
no no no :)

I need a box in OnItemRemoved and OnItemAdded want to do store it in a single chest
 
B

Brālis Tezenis

Guest
Then you use those hooks, You can get the inventory of the chest using the 2 hooks
need to he was only in one of the chest - if done like so

C#:
private void Hooks_OnLootUse(LootStartEvent lootStartEvent)
{
      if(shop)
      {
          Hooks.OnItemRemoved += Hooks_OnItemRemoved;
      }
}

private void Hooks_OnItemRemoved(InventoryModEvent e)
{
    e.Cancel();
}
you can catch dupe item