Spraycan hook

Hi,
Just trying to track down the hooks for the spraycan. Could you please let me know what they are?

In particular, trying to target the action when the player right clicks the spray can on an object to re-skin it

It's important to note that most of the recently added hooks may not be documented yet. In this case, I recommend using a decompiler like dnSpy to look for Interface.Oxide.Call usages within the .dll files of the server rather than relying solely on the documentation. This can provide a more comprehensive understanding of the available hooks and their usage.

In your case, you're probably looking for the following hooks:

  • object OnEntityReskin(BaseEntity entity, ItemSkinDirectory.Skin skin, BasePlayer player)
  • void OnEntityReskined(BaseEntity entity, ItemSkinDirectory.Skin skin, BasePlayer player)

Thank you. I tried those two but the first one only works after you skin an item, the second does not appear to work at all

Does anyone know the spray can hooks? I've tried the DLL's, can't find anything that activates when right clicking the spray can on an object to skin.

Sorry didn't see your reply. Do you mean listen to the user right clicking? Would that be resource intensive?
Yes, something similar to that plugin. By the looks, you made that plugin! Nice work. Don't suppose you could point me closer to the answer?

chuckyau
What other methods?
What ya trying to acomplish?
zwlTCsPs5ojffqC.png Razor
What ya trying to acomplish?

Looking to alter the GUI that comes up when right clicking the spraycan to reskin items

The gui that comes up is client sided and there for skins on it can not be added.

GmDixwdoOsr7pNV.png Razor

The gui that comes up is client sided and there for skins on it can not be added.

Yeah but how do you detect the player has right clicked with the spray can in their hand? There are other plugins doing it?