AutoBroadcast

Moved

Total Downloads: 8,943 - First Release: Oct 26, 2014 - Last Update: Feb 27, 2017

5/5, 20 likes
  1. {
    "ExampleMessage": "One Week Wipe Cycle!",
    "ExampleMessage1": "/help to get command list!",
    "ExampleMessage2": "/vote to get free signals!",
    "ExampleMessage3": "/kit to see avaible kits!",
    "AnotherExample": "Have a suggestion? Talk to an admin,we're always looking to improve!"
    }


    thats my lang/en
     
  2. Wulf

    Wulf Community Admin

    Try making the ExampleMessage and ExampleMessage1 more different.
     
  3. nope that doesnt work same error message.
     
  4. Wulf.

    I have put the cs in the plugin directory and I made a try :

    Here are my 2 files : ( config json ) and language json (under en directory). Can you tell me what is wrong ? Because in game I got the messages :

    This is another example, notice the comma at the end od the line above
    This is an example. Change it, remove it, translate it, Whatevers !

    Each time I make a change, and re upload on the FTP, I make a reload of the plugin : no error.

    Thx
     

    Attached Files:

    Last edited by a moderator: May 12, 2017
  5. this is how mine would look if i used your writing... Hope that helps... if not Wulf is your man... dont froget to reload plugin once done..
     

    Attached Files:

  6. Wulf

    Wulf Community Admin

    I don't see anything wrong there, should be fine. Just make sure to reload the plugin as suggested.
     
  7. Plugin Not working after latest update oxide atleast i dont see my setted broadcast msg anymore

    Code:
    (04:06:26) | Loaded plugin AutoBroadcast v1.0.8 by Wulf/lukespragg
    (04:06:26) | Failed to call hook 'OnServerInitialized' on plugin 'AutoBroadcast v1.0.8' (JsonReaderException: After parsing a value an unexpected character was encountered: ". Path 'Server15', line 18, position 2.)
    (04:06:26) | at Newtonsoft.Json.JsonTextReader.ParsePostValue () [0x00000] in <filename unknown>:0
      at Newtonsoft.Json.JsonTextReader.Read () [0x00000] in <filename unknown>:0
      at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateDictionary (IDictionary dictionary, Newtonsoft.Json.JsonReader reader, Newtonsoft.Json.Serialization.JsonDictionaryContract contract, Newtonsoft.Json.Serialization.JsonProperty containerProperty, System.String id) [0x00000] in <filename unknown>:0
      at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject (Newtonsoft.Json.JsonReader reader, System.Type objectType, Newtonsoft.Json.Serialization.JsonContract contract, Newtonsoft.Json.Serialization.JsonProperty member, Newtonsoft.Json.Serialization.JsonContainerContract containerContract, Newtonsoft.Json.Serialization.JsonProperty containerMember, System.Object existingValue) [0x00000] in <filename unknown>:0
      at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal (Newtonsoft.Json.JsonReader reader, System.Type objectType, Newtonsoft.Json.Serialization.JsonContract contract, Newtonsoft.Json.Serialization.JsonProperty member, Newtonsoft.Json.Serialization.JsonContainerContract containerContract, Newtonsoft.Json.Serialization.JsonProperty containerMember, System.Object existingValue) [0x00000] in <filename unknown>:0
      at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize (Newtonsoft.Json.JsonReader reader, System.Type objectType, Boolean checkAdditionalContent) [0x00000] in <filename unknown>:0
     
  8. Wulf

    Wulf Community Admin

    That is a JSON error from an invalid .json file. Validate it with a site such as www.jsonlint.com.
     
  9. Strange then it did not display the messages I created. Anyway I decided to use TimedExecute instead to avoid adding an additional plugin.

    Thanks for the answer as usual Wulf.
     
  10. Hi,

    I cant work this out what is wrong with my JSON?
    Code:
    {
        "[BROADCAST]: Welcome to <color=cyan>Rusty Apple</color>, we hope you enjoy your stay!":
        "[BROADCAST]: Please take a moment to check out our forums at. <color=cyan>'[URL='http://www.RustyApple.x10.mx/forums'</color>']www.RustyApple.x10.mx/forums'</color>[/URL] <color=red>(In-Developement.)</color>",
        "[BROADCAST]: If you experience any issues in game be sure to let us know, either IG or on the Forums.":
        "[BROADCAST]: Our Administration Team will be more than happy to help you where possible, call in chat or use our discord channel.",
        "[BROADCAST]: Join us on Discord by navigating to. <color=cyan>https.//discordapp.com/invite/JRQDdbD</color>":
        "[BROADCAST]: Please ensure your stay here is a long and plesant one, by abiding by our rules.",
        "[BROADCAST]: Remember, you can place contacts (hits) on anyone of your choosing using <color=cyan>'/bounty.'</color>":
        "[BROADCAST]: Remeber to check out our clan related commands using <color=cyan>'/clan.'</color>",
        "[BROADCAST]: Kits are available on a cooldown for all players, check them out using <color=cyan>'/kit.'</color>":
        "[BROADCAST]: We have a safe trade system installed, check it out using <color=cyan>'/trade.'</color>",
        "[BROADCAST]: Please remember that we do have an anti-water log out system.":
        "[BROADCAST]: Be sure to modify your friends using <color=cyan>'/friend add / remove name'.</color>",
        "[BROADCAST]: We learnt from others, and have <color=red>not</color> got decay enabled!":
        "[BROADCAST]: Be sure to check out or live map by heading to <color=cyan>'Rust.IO'</color> and then searching for <color=cyan>'Rusty Apple'.</color>",
        "[BROADCAST]: We have a custom loot drop and spawn system!":
        "[BROADCAST]: You can earn some extra cash by farming, and killing animals <color=orange>(possibly some humans too!)</color>",
        "[BROADCAST]: Your cash can be converted, and spent on items and kits in our store. <color=cyan>(/s)</color>":
        "[BROADCAST]: Have you got a cooldown enabled for a kit? But you want it again, buy it in our store! <color=cyan>(/s)</color>",
        "[BROADCAST]: View your <color=green>kill</color> / <color=red>death</color> ratio, using <color=cyan>'/kdr'.</color>":
        "[BROADCAST]: Check your playtime, by using the <color=cyan>'/playtime'</color> command, or check the top other players by using <color=cyan>'/playtime top'.</color>",
        "[BROADCAST]: Did you refer your friend here? If so, you can both gain some extra cash by letting us know. <color=cyan>(/refer)</color>":
        "[BROADCAST]: Have you spotted a suspect <color=red>hacker</color> or <color=red>glitcher?</color> Report them using the <color=cyan>'/report'</color> command!",
        "[BROADCAST]: When using the <color=cyan>'/report'</color> command, all admins recieve a Steam PM with the report details.":
        "[BROADCAST]: Be sure to respect everyone on the server, not just the Administration Team!",
        "[BROADCAST]: If you have a complaint about a member of our Administration Team, or a Player be sure to let us know on our forums!":
        "[BROADCAST]: Did you know your levels increase faster during night time?",
        "[BROADCAST]: Have you invited someone here? Be sure to claim your reward using <color=cyan>(/refer)</color>":
        "[BROADCAST]: We have Sign Artist installed, be sure to check it out <color=cyan>(/sil)</color>",
        "[BROADCAST]: Be sure to check out our brand new store using <color=cyan>(/s)</color>":
         }
     
    Last edited by a moderator: Jun 10, 2017
  11. Wulf

    Wulf Community Admin

    You're missing a " after each key name, you have a : at the end of some when it should be a comma, and you aren't using unique key names (they can't all be [BROADCAST].)
     
  12. Code:
    {
        "[Rusty Apple]": Welcome to <color=cyan>Rusty Apple</color>, we hope you enjoy your stay!",
        "[Forums]": Please take a moment to check out our forums at. <color=cyan>'[URL='http://www.RustyApple.x10.mx/forums'</color>']www.RustyApple.x10.mx/forums'</color>[/URL] <color=red>(In-Developement.)</color>",
        "[Feedback]": If you experience any issues in game be sure to let us know, either IG or on the Forums.",
        "[Administration]": Our Administration Team will be more than happy to help you where possible, call in chat or use our discord channel.",
        "[Discord]": Join us on Discord by navigating to. <color=cyan>https.//discordapp.com/invite/JRQDdbD</color>",
        "[Rules]": Please ensure your stay here is a long and plesant one, by abiding by our rules.",
        "[Bounty]": Remember, you can place contacts (hits) on anyone of your choosing using <color=cyan>'/bounty.'</color>",
        "[Clans]": Remeber to check out our clan related commands using <color=cyan>'/clan.'</color>",
        "[Kits]": Kits are available on a cooldown for all players, check them out using <color=cyan>'/kit.'</color>",
        "[Trade]": We have a safe trade system installed, check it out using <color=cyan>'/trade.'</color>",
        "[Anti-Water Log]": Please remember that we do have an anti-water log out system.",
        "[Friends]": Be sure to modify your friends using <color=cyan>'/friend add / remove name'.</color>",
        "[Decay]": We learnt from others, and have <color=red>not</color> got decay enabled!",
        "[Live Map]": Be sure to check out or live map by heading to <color=cyan>'Rust.IO'</color> and then searching for <color=cyan>'Rusty Apple'.</color>",
        "[Loot]": We have a custom loot drop and spawn system!",
        "[Cash]": You can earn some extra cash by farming, and killing animals <color=orange>(possibly some humans too!)</color>",
        "[Store]": Your cash can be converted, and spent on items and kits in our store. <color=cyan>(/s)</color>",
        "[Kit /Store]": Have you got a cooldown enabled for a kit? But you want it again, buy it in our store! <color=cyan>(/s)</color>",
        "[KDR]": View your <color=green>kill</color> / <color=red>death</color> ratio, using <color=cyan>'/kdr'.</color>",
        "[Playtime]": Check your playtime, by using the <color=cyan>'/playtime'</color> command, or check the top other players by using <color=cyan>'/playtime top'.</color>",
        "[Refer]": Did you refer your friend here? If so, you can both gain some extra cash by letting us know. <color=cyan>(/refer)</color>",
        "[Reporting]": Have you spotted a suspect <color=red>hacker</color> or <color=red>glitcher?</color> Report them using the <color=cyan>'/report'</color> command!",
        "[Report]": When using the <color=cyan>'/report'</color> command, all admins recieve a Steam PM with the report details.",
        "[Respect]": Be sure to respect everyone on the server, not just the Administration Team!",
        "[Complaints]": If you have a complaint about a member of our Administration Team, or a Player be sure to let us know on our forums!",
        "[Levels]": Did you know your levels increase faster during night time?,
        "[Store]": Be sure to check out our brand new store using. <color=cyan>(/s)</color>"}

    Should this now be okay?
     
  13. Wulf

    Wulf Community Admin

    You're missing a " in the first line still, check using www.jsonlint.com.
     
  14. I don't see where I am missing one, sorry im new to these JSON files.

    I also have another urgent issue here.
     
  15. Wulf

    Wulf Community Admin

    First line, right before Welcome. You're actually missing it at the start of each from the looks of it. The 2nd from last line also is missing a " before the comma at the end.
     
  16. Thanks alot Wulf, the issue has been resolved.
     
    Last edited by a moderator: Jun 10, 2017
  17. when i put this on my server it only plays 1 message it wont cycle through any idea?
     
  18. Wulf

    Wulf Community Admin

    What does your oxide/lang file look like?
     
  19. Last edited by a moderator: Jun 14, 2017
  20. Wulf

    Wulf Community Admin

    I'd recommend naming the keys something more unique, not 1, 2, 3, etc. Also, make sure to reload the plugin after your changes.