AutoBroadcast

Moved

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

5/5, 20 likes
  1. Wulf

    Wulf Community Admin

    Just add the color in the messages.
    Code:
    <color=red>This is a broadcast message</color>
     
  2. sweet ty:)
     
  3. So, I don't kniw - will this plugin works on the new version of oxide... But I need only it! :D

    Because this plugin only broadcasting messages and no more. Can someone look onto it? Thanks!
    [DOUBLEPOST=1423428494][/DOUBLEPOST]Oh, c'mon! Does it works on new version, Wulf?
     

    Attached Files:

  4. Why not test it and find out yourself?
     
  5. Cuz I have no new oxide. I making new plugib list for new server build and new oxide, so I can't test it
     
  6. OK well I've just tested it and it works with the latest oxide
     
  7. Thank you dude! You are the best!
     
  8. Error since Update (20.02.2015)
    Code:
    12:42 AM [Error] Failed to run a timer.
    File: autobroadcast.lua Line: 49 Object reference not set to an instance of an object:
      at ConsoleSystem.Broadcast (System.String strCommand, System.Object[] args) [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 
     
  9. Wulf

    Wulf Community Admin

    This is because of the networking changes to Rust. Messages and such should be moved to OnServerInitialized instead of Init.
     

    Attached Files:

  10. Code:
    [Oxide] 11:21 AM [Info] Message5
    [Oxide] 11:21 AM [Error] Failed to run a 500.00 timer File: autobroadcast.lua Line: 49 attempt to concatenate field '?' (a nil value): at NLua.Lua.ThrowExceptionFromError (Int32 oldTop) [0x00000] in <filename unknown>:0 at NLua.Lua.CallFunction (System.Object function, System.Object[] args, System.Type[] returnTypes) [0x00000] in <filename unknown>:0 at NLua.LuaFunction.Call (System.Object[] args, System.Type[] returnTypes) [0x00000] in <filename unknown>:0 at NLua.Method.LuaDelegate.CallFunction (System.Object[] args, System.Object[] inArgs, System.Int32[] outArgs) [0x00000] in <filename unknown>:0 at LuaGeneratedClass1.CallFunction () [0x00000] in <filename unknown>:0 at Oxide.Core.Libraries.Timer+TimerInstance.Update () [0x00000] in <filename unknown>:0
    
     
  11. What part of the config file do I edit to change how often the broadcasts go out?
     
  12. 'BroadCastInterval' should be the time in seconds between each message.
     
  13. That's not the config file though, that's the plugin ;) Once the plugin has been placed in the plugins folder and the server is running a json file will be generated with the name of the plugin in the configs folder, it's that file that you need to edit.
     
  14. Oh ok hold on
     
  15. No, you need to open a different file, you're not supposed to make any changes to the plugin files (lua, py, cs or js). If a plugin uses a datafile or a config file these will be automatically created when the plugin runs for the first time. Datafiles will be created in the folder <drive>:\path\to\rustserver\server_identity\oxide\data and config files will be saved in ......\oxide\config.
    It's in that config folder a file named auto-broadcast.json will appear and it is that file that you need to make the changes in.

    upload_2015-5-7_0-9-21.png
     
  16. Ok I believe it is working now :) Thanks
    [DOUBLEPOST=1430950619][/DOUBLEPOST]Unfortunatly it still is working. I edited the json file instead and not a single broadcast comes up in our chat :(
    [DOUBLEPOST=1430951116][/DOUBLEPOST]This is what my json file looks like http://gyazo.com/63a6a427f074de4e20dfeef0168ec107
     
  17. Try to remove "," from end of Message 10
     
  18. Tried re-installing and still nothing. See my above post for a screenshot of my .json file
    [DOUBLEPOST=1430955005][/DOUBLEPOST]
    Just tried that, will update you in a second on the result
    [DOUBLEPOST=1430955264][/DOUBLEPOST]
    Unfortunatly that didn't work :(
     
  19. Ah, I see. You have "=" in your config files instead of ":". See this default config file for correct syntax

    Code:
    {
      "BroadCastInterval": 600,
      "ChatName": "Info",
      "Messages": {
        "Message1": "Please do not grief other players",
        "Message2": "New plugins are added all the time. type /help for info",
        "Message3": "This is an example global broadcast"
      }
    }