Solved Question about HookMethod

Discussion in 'Rust Development' started by System32, Aug 21, 2016.

  1. Hello everybody,
    what is the difference between these two (OnLootItem is only a hook exemple) :

    Code:
    void OnLootItem(BasePlayer player, Item item)
    {
        ... do something
    }
    
    and

    Code:
    [HookMethod("OnLootItem")]
    void OnLootItem(BasePlayer player, Item item)
    {
        ... do something
    }
    
    I sometimes see this [HookMethod("")] but i don't understand it's purpose
     
  2. Wulf

    Wulf Community Admin

    HookMethod isn't really used by plugins anymore and was only required back when Oxide 2.0 first came out. The only things that need to use it right now are generally extensions.