Solved Chat mute

Discussion in 'Plugin Requests' started by Titanium 2, Aug 7, 2015.

  1. Hello, I have the currently problem that I can't mute someone with the plugin I use for Oxide 2.
    It says in chat "<Name has been muted for X min" but they are still able to talk. I looked into the .lua but everything seems fine for me. So idk why it still does not work. Help would be nice =D.
     
  2. You probably use another plugin that edits the chat and thats the one that sends the message ;)
     
  3. So what I have to do then? I can't get you really.
    [DOUBLEPOST=1438961873][/DOUBLEPOST]That's all plugins I have! http://prntscr.com/81y4lg
     
  4. 1Simple step.
    Just show me all your plugins.

    And.. i said that: If you have two or more plugins that are editing the chat they will send a double message until the two authors will try to fix that together. So for example lets say that you have a plugin that mutes other players it will work ofc BUT if you have another plugin like PaiN Prefix it will send the message unless i will add the check "if isMuted(player) then return end" so it wont send the message. Simple.
     
  5. See you got p-prefixes which i made and adds prefixes to the names + sends the message. Since i'm not making plugins for legacy.. i will just give u the plugin which will have the Mute Check give me a sec.
     
  6. Alright, thanks.
     
  7. Try this
     

    Attached Files:

  8. I just know that if I change configs, I just can use "oxide.reload" that it works for plugins too?
    or restart needed?
     
  9. Once you replace it ... it will auto load. You dont have to remove your config.
     
  10. I just replaced the file, without restart but with oxide.reload. People still able to talk even if I mute them.
     
  11. Did u get any errors after loading the plugin ?
     
  12. Code:
    Failed to call hook 'isMuted' on plugin 'Simple Mute'
    File: simplemute.lua Line: 157 Object reference not set to an instance of an object:
      at Oxide.Game.RustLegacy.Libraries.RustLegacy.UserIDFromPlayer (.NetUser netuser) [0x00000] in <filename unknown>:0
      at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (object,object[],System.Exception&)
      at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0
    11:54 PM [Info] Barret Wallace: remove
     
    Last edited by a moderator: Aug 7, 2015
  13. Try this file then.
     

    Attached Files:

  14. Code:
    Failed to call hook 'isMuted' on plugin 'Simple Mute'
    File: simplemute.lua Line: 157 Object reference not set to an instance of an object:
      at Oxide.Game.RustLegacy.Libraries.RustLegacy.UserIDFromPlayer (.NetUser netuser) [0x00000] in <filename unknown>:0
      at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (object,object[],System.Exception&)
      at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInf
     
  15. I will give u one last version.... if it wont work then i have no ideas.
     

    Attached Files:

  16. Fixed, thanks :)
     
  17. Yeah... i forgot that its "netuser" in Legacy and not "player" xD So everything works now right :p ?
     
  18. Yes, everything seems to work. Expect this appears in logs
    Code:
    Failed to call hook 'OnPlayerChat' on plugin 'PaiN Prefix'
    File: p-prefixes.lua Line: 47 Object reference not set to an instance of an object:
      at Oxide.Game.RustLegacy.Libraries.RustLegacy.SendChatMessage (.NetUser netUser, System.String name, System.String message) [0x00000] in <filename unknown>:0
      at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (object,object[],System.Exception&)
      at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0
    

    But work everything, do not know what error it is but all works.
     
  19. YEAH probably too much C# at line 47 remove the ";" at the end of the line LOL