Universal Hide admin connections

Discussion in 'Plugin Requests' started by caiio.cos, Jan 5, 2016.

  1. somehow to hide the chat when a group admin User enters the server?
     
  2. Wulf

    Wulf Community Admin

    What are you using that announces it?
     
  3. I do not use anything,is the game do this announce that players connect and disconnect, would like to remove this ad when someone from the group admin login.

    Sorry my english
     
  4. Wulf

    Wulf Community Admin

    Ah, you'd need to write a plugin that hooks into OnConnectionNotice and disables it for the people you'd like. You may also have to disable it in any other plugins that have connection notices. For Hurtworld admin, a simple player.IsAdmin check would do.
     
  5. Unfortunately I do not understand programming. If it is not uncomfortable could move this topic to area requests?
    [DOUBLEPOST=1452024733,1452017446][/DOUBLEPOST]
    could you give me the structure that? Or advise me where can the basic information for it, I try to do.
     
  6. It's really simple really.
    Code:
    object OnConnectionNotice(string name)
    {
        if (GetSession(name).IsAdmin)
            return false;
        else
            return true;
       
    }
     
  7. is just that the plugin?
     
  8. I can provide full plugin code for you. Do you want it to filter the Disconnected message as well?
     
  9. Yes, to hide the connect and desconnect admin group only .
     
  10. Hmm not sure how to go about doing the DC one as you disconnect there's technically no session to check if it's an admin or not.
    Here's the code for the connection notice though

    Moderator edit: Please use the Plugins page for plugin submissions.
     
    Last edited by a moderator: Jan 20, 2016
  11. It works, thank you!
    [DOUBLEPOST=1452096267,1452049117][/DOUBLEPOST]
    Noviets , sorry to bother you, but there is some way to hide when an admin group member dies ? It would be a way to get the adm " invisible " allowing us to move some players check ( with the plugin portall gun) and if we fall a stone , do not appear to other players .
     
    Last edited by a moderator: Jan 20, 2016
  12. Here you go. Replace all of the code with this.

    Moderator edit: Please use the Plugins page for plugin submissions.
     
    Last edited by a moderator: Jan 20, 2016
  13. not work,
    I suffered death by falling and was seen by all.
    [DOUBLEPOST=1452129829][/DOUBLEPOST][Oxide] 11:17 PM [Error] Falide to call hook 'OnDeathNotice' on plugin 'Confilter v1.0.1' <NullReferenceException: Object reference not set to an instance of an onbject>
     
  14. I updated the code above. Try that mate :)
     
  15. shows the same error
     
  16. Are you using another script like Custom Death Message?
     
  17. Do not use any script that changes the death messages.
    [DOUBLEPOST=1452133704][/DOUBLEPOST][​IMG]
     
  18. Just tested and it works fine.
     
  19. I tested again here and unfortunately nothing. They do not receive the message when logging, but when I suffer falling damage (and die so) they see. Does for falling damage is a different hook?
     
  20. Moderator edit: Please use the Plugins page for plugin submissions.
     
    Last edited by a moderator: Jan 20, 2016