AdvertMessages

Moved

Total Downloads: 5,741 - First Release: Dec 11, 2015 - Last Update: Nov 2, 2016

5/5, 22 likes
  1. One of the biggest features missing from this plugin that Notifier had was the ability to substitute some variables in your messages with dynamic information.

    So you could do something like this:

    Code:
    There are <orange>{players.active}<silver>/<end>{server.maxplayers} <silver>players playing in the server, and<end> {players.sleepers}<end> sleepers.
    See below for the ones I found in the original Notifier code:

    Code:
    Dictionary<string, object> Dict = new Dictionary<string, object> {
                    { "{server.ip}", (String.IsNullOrEmpty(ConVar.Server.ip)) ? "localhost" : ConVar.Server.ip },
                    { "{server.port}", ConVar.Server.port },
                    { "{server.hostname}", ConVar.Server.hostname },
                    { "{server.description}", ConVar.Server.description},
                    { "{server.maxplayers}", ConVar.Server.maxplayers },
                    { "{server.worldsize}", ConVar.Server.worldsize },
                    { "{server.seed}", ConVar.Server.seed },
                    { "{server.level}", ConVar.Server.level },
                    { "{localtime.now}", time},
                    { "{localtime.date}", date},
                    { "{players.active}", Active },
                    { "{players.sleepers}", Sleepers },
                    { "{players.total}", Active + Sleepers }
                };
    Having these types of variables in this plugin would make it 1000% more useful.
     
  2. Code:
    {
      "Messages": [
        "Welcome to our server, have fun!",
        "<red>Need help?<end> Try calling for an <cyan>Admin<end> in the chat.",
        "Some <cyan>Commands<end> you can use.",
        "/ad, /bgrade, /remove, /clan, /ff, /kit, /tpr, /pm, /skin, /trade."
      ],
      "Settings": {
        "Adverts Interval (In Minutes)": 10.0,
        "Broadcast To Console": true
      }
    }
    My issue though is that the 3th line displays, nothing else. I wan't to have a message displays all of those lines every 10 minutes, anything I do wrong?
     
    Last edited by a moderator: Jun 13, 2017
  3. Hi is there a way to change the time between the messages?
     
    Last edited by a moderator: Jun 13, 2017
  4. Hello , i cant change the language to russian , than it wrotes with some ieroglifs
     
  5. I have changed the config file that's under the config folder using the clanforge server site. I have validated the file with the JSONCompare - The Advanced JSON Linting & Comparison Tool and shows no issues. Yet when I load into the server on rust it shows the default 2 messages and not any that I have added. I have gone and read the previous comments above, but I'm not sure what is wrong. I have tried removing the mod and re adding it. Although one weird thing is the file in the config folder is called "filehere.json". Is that the reason it is not pulling my edited file? how do i change the name of that file? do i have to upload my .json file to the server?
     
  6. The default name of the json file should be AdvertMessages.json
    While opeing that you can edit it on your own what you want into it,
    afther that just save it and write inside of the console or the server self,
    /oxide.reload AdvertMessages

    that should be enough
    and ofcourse every line needs to be perfect or working before the plugins can reed your changes about it, and If it doesn't work just give me or just post it here what you wanted to have mabye you just most missing something about it
     
  7. I think there's an issue where the last message in the list isn't sent, and I think it has to do with the random.Next implementation already doing a "-1" internally.

    According to MSDN:

    So with line 35:

    Code:
    do advert = random.Next(0, Configuration.Messages.Count - 1);
    Should be

    Code:
    do advert = random.Next(0, Configuration.Messages.Count);
     
  8. This plugin broke my server and caused me 7 hours of stress and downtime trying to find the issue.... after the update this plugin will crash a server as soon as it tries to advert a message.
     
  9. I'm using this plugin on my server self and I don't have any issues with it so maybe you did something wrong with the json file if so then upload your json file in here so that we can help you with it
     
  10. Wulf

    Wulf Community Admin

    Extremely unlikely to be the cause, as this is simple timers and messages. Every other plugin would also be “crashing” your server if it was. I’d recommend using your other thread for discussing your server issue.
     
  11. Actually I believe it is possible, looking at Advert().
    However @HooniganGaming, the oxide/rust update would not have any effect on that.
     
  12. I do stand corrected as I removed the plugin and started my server everything worked fine for an hour which made me think I found the issue (even though it made no sense). Then I restarted my server and everything went to shit again... I'm going to spend the night going through every plugin one by one to find the issue... And I apologize for reporting this plugin in the method I did I was just aggravated and had no sleep.
     
  13. Wulf

    Wulf Community Admin

    You may want to just remove all of the plugins to see if the issue is resolved. I'd also suggest making sure something isn't selecting text on the server console as that will freeze the server.
     
  14. It's not anything like that, the entire console freezes where I can't even type. I have accidentally selected the console plenty of times and it's not like that. I am currently loading 4 plugins at a time and letting the server run for 15min each time. a will be doing this all night but hopefully, I can find the issue...