Information Announcer

Join/leave messages, rules, broadcasts & custom commands

Total Downloads: 2,610 - First Release: May 5, 2015 - Last Update: May 23, 2015

4.73333/5, 15 likes
  1. im trying to change the color code of the server prefix name where would i put the hex code?
     
  2. I haven't added a config value for that yet, as I was unaware at the time on how to change the color of the text. I'll probably add it in the next value. For now you can just set the chatname to "[hexcolor]chatname[FFFFFF]"
     
  3. If you're talking about changing the color of "Server" as it shows up for broadcasts and such, try this:

    "Settings": {
    "ChatPrefix": "Server"
    Insert there -- ^

    Example: "Settings": {
    "ChatPrefix": "[FF0000]Server"
    That will show Red
     
  4. I need help ahaha
    [DOUBLEPOST=1431235389][/DOUBLEPOST]it keeps going to default
     
  5. Wulf

    Wulf Community Admin

    Make sure you are properly formating the json file. You can validate is using www.jsonlint.com.
     
  6. Parse error on line 10:
    ...FFF]/rules" }, "Connecti
    ----------------------^
    Expecting ',', ']'
    [DOUBLEPOST=1431235771][/DOUBLEPOST]"[FFCC66]Type [FFFFFF]/rules"

    for that line apparantly
     
  7. Wulf

    Wulf Community Admin

    Please post your full config.
     
  8. Code:
    {
        "BroadcasterSettings": {
            "Enabled": false,
            "Interval": 300,
            "ShowChatPrefix": true
        },
        "BroadCasterSettings": {
            "BroadcastMessages": [
                "[FFCC66]Don't forget to vote us! [FFFFFF][URL]http://reign-of-kings.net/server/650/[/URL] [FF0000]And receive 2k stone or Wood",
                "[FFCC66]Type [FFCC66]/rules [0EB0FF]to view our Basic Ruleset"
             
        },
        "ConnectionSettings": {
            "Enabled": true,
            "Log": true,
            "ShowChatPrefix": true
        },
        "Messages": {
            "PlayerJoined": "[FFCC66]{0} [FF0066]has joined the server",
            "PlayerLeft": "[FFCC66]{0} [FF0066]has left the server"
        },
        "RulesSettings": {
            "Rules": [
                "[FFFFFF]Basic Ruleset",
                "[FF0000]1. [FF0000]Hacking will be punished with a lifetime ban!.",
                "[FF9933]2. [FF9933]Its a Roleplay Server.",
                "[66FF33]3. [66FF33]Executing is allowed.",
                "[3399FF]4. [3399FF]Raiding is allowed but only if the Housekeeper is online!.",
                "[9966FF]5. [9966FF]No flying bases or bases in the drinkable water! Only build bases on the ocean or on land",
                "[6600FF]6. [6600FF]You can roleplay as bandit = Tell people to drop there stuff or you will engage.",
                "[FF0000]7. [FF0000]Dont kill Newspans (Unless yourself is a new spawn and they agree)",
                "[FF9933]8. [FF9933]Must use Microphone for close quarters negative RP, i.e. Robbery.",
                "[66FF33]Not complying with any these rules may result in a ban as seen fit by the attending Admin/Mod."
            ],
            "Enabled": false,
            "ShowChatPrefix": true
        },
        "Settings": {
            "ChatPrefix": "[FF0000]Server"
        }
    }
     
  9. Wulf

    Wulf Community Admin

    Remove the blank line after line 10, and that should be it.
     
  10. ahhh it still comes up in red :( i really have no idea how this works aha so sorry
    [DOUBLEPOST=1431236483][/DOUBLEPOST]Parse error on line 10:
    ...ic Ruleset" }, "Connecti
    ----------------------^
    Expecting ',', ']'
     
    Last edited by a moderator: May 10, 2015
  11. Wulf

    Wulf Community Admin

    Ah! You are missing the closing bracket after the /rules line. You can see the starting bracket at the front of the BroadcastMessages part.
     
  12. Says valid json but everytime i restart server it sets it to default
     
  13. Wulf is correct. Try pasting in the following. If that doesn't work we can go from there to figure out it. God knows I spent some time figuring my own .json out.

    Code:
    {
        "BroadcasterSettings": {
            "Enabled": false,
            "Interval": 300,
            "ShowChatPrefix": true
        },
        "BroadCasterSettings": {
            "BroadcastMessages": [
                "[FFCC66]Don't forget to vote us! [FFFFFF][URL]http://reign-of-kings.net/server/650/[/URL] [FF0000]And receive 2k stone or Wood",
                "[FFCC66]Type [FFCC66]/rules [0EB0FF]to view our Basic Ruleset"
            ]
        },
        "ConnectionSettings": {
            "Enabled": true,
            "Log": true,
            "ShowChatPrefix": true
        },
        "Messages": {
            "PlayerJoined": "[FFCC66]{0} [FF0066]has joined the server",
            "PlayerLeft": "[FFCC66]{0} [FF0066]has left the server"
        },
        "RulesSettings": {
            "Rules": [
                "[FFFFFF]Basic Ruleset",
                "[FF0000]1. [FF0000]Hacking will be punished with a lifetime ban!.",
                "[FF9933]2. [FF9933]Its a Roleplay Server.",
                "[66FF33]3. [66FF33]Executing is allowed.",
                "[3399FF]4. [3399FF]Raiding is allowed but only if the Housekeeper is online!.",
                "[9966FF]5. [9966FF]No flying bases or bases in the drinkable water! Only build bases on the ocean or on land",
                "[6600FF]6. [6600FF]You can roleplay as bandit = Tell people to drop there stuff or you will engage.",
                "[FF0000]7. [FF0000]Dont kill Newspans (Unless yourself is a new spawn and they agree)",
                "[FF9933]8. [FF9933]Must use Microphone for close quarters negative RP, i.e. Robbery.",
                "[66FF33]Not complying with any these rules may result in a ban as seen fit by the attending Admin/Mod."
            ],
            "Enabled": false,
            "ShowChatPrefix": true
        },
        "Settings": {
            "ChatPrefix": "[FF0000]Server"
        }
    }
     
  14. to reload the plugin u have to restart the server? cant use a command to reload in-game ?
     
  15. Wulf

    Wulf Community Admin

    Just put it in the Saves/oxide/plugins folder, it'll load automatically. This applies to all plugins.
     
  16. sorry i meant the Announcer.json
     
  17. Wulf

    Wulf Community Admin

    That's the config, which you can edit using a text editor, then I think you'd need to restart your server since you don't have access to run console commands yet.
     
  18. Well I cant seem to add my custom text anymore. I shouldnt touch the .cs file should I? All the custom text etc should be added to the .json files. Is this correct???
     
  19. Yep, all modifications should be done to the .json file, keep in mind if there is an invalid character or a missing " or } the plugin won't be able to read it and it will revert the config file to the default settings.
     
  20. got it working but Im not really sure how lol. Is there a way to have /rules for my rules and /info or something for more content mate????