1. [​IMG]

    i just have 1 problem with this the only way to get the source of the attacker is by accessing private GameObject sourceEntity

    and theres also (which is triggered with different weapons):
    [​IMG]
     
  2. Wulf

    Wulf Community Admin

    Are you asking a question or showing an example? You already have the thread marked as Solved, so it isn't exactly clear.
     
  3. oh im asking, and also showing you maybe a good place for hooks for player damage check them out if you can,

    is there any way i can pass a private parameter through the hook within the class that this function is in because there is sourceEntity that i need to hook a private GameObject in the class that FireServer void is in but im not quite sure how to use the custom arguments in the hook settings just wondering if you have a basic example so i can complete my hook because i can currently only locate the victim due to not being able to pass a variable from the class through the hook im making
     
    Last edited by a moderator: Dec 12, 2015
  4. Is this method actually and wrong? I made an hook OnFireServer, and how can i call it in hurtworld oxide plugin?
     
  5. Wulf

    Wulf Community Admin

    It's a bit outdated here, so it may have changed. You'd hook into however you added it via a plugin.
     
  6. So.. I added a hook with help of OxidePatcher, how can i now call him in my plugin?
     
  7. Wulf

    Wulf Community Admin

    Just add the hook to it.
     
  8. So... Is it wrong?
    Code:
    object OnFireServer(EquippedHandlerServer handler, SpearItemEquippedState state)
            {
                return true;
            }
     
  9. Wulf

    Wulf Community Admin

    I don't know how you added it.
     
  10. So.. If i have EquippedHandlerServer, how can i send a message to player? Can you help me? Can i get session from EquippedHandlerServer or SpearItemEquippedState?
     
  11. Wulf

    Wulf Community Admin

    Not directly that I know of, you'd need to wrap it under HurtworldCore or use GetSession or similar function to get their actual player info.
     
  12. For example handler.GetSession() would be wrong?
     
  13. Wulf

    Wulf Community Admin

    Yes, that wouldn't work.
     
  14. So.. How would be correct?))