WelcomeMessages

Moved

Total Downloads: 3,769 - First Release: Nov 19, 2016 - Last Update: Dec 25, 2017

5/5, 12 likes
  1. Ahh Gotcha well then its oxide :p since its not working ;)
     
  2. Wulf

    Wulf Community Admin

    Yup, and already fixed and soon to be in the next snapshot.
     
  3. Got what appears to be a similar problem I had with the Slap plugin, with that guys name..
    [NOOT] -={NK}=-Seanking59

    SteamID: 76561198104959364

    Console debug when he joins:
    Code:
    22:13 [Error] Failed to call hook 'OnUserConnected' on plugin 'WelcomeMessages v1.0.0' (FormatException: Input string was not in a correct format.)
    22:13 [Debug]  at System.String.ParseFormatSpecifier (System.String str, System.Int32& ptr, System.Int32& n, System.Int32& width, System.Boolean& left_align, System.String& format) [0x00000] in <filename unknown>:0
      at System.String.FormatHelper (System.Text.StringBuilder result, IFormatProvider provider, System.String format, System.Object[] args) [0x00000] in <filename unknown>:0
      at System.String.Format (IFormatProvider provider, System.String format, System.Object[] args) [0x00000] in <filename unknown>:0
      at System.String.Format (System.String format, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Game.Rust.Libraries.Covalence.RustPlayer.Message (System.String message, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Game.Rust.Libraries.Covalence.RustPlayer.Reply (System.String message, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.WelcomeMessages.OnUserConnected (IPlayer player) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.WelcomeMessages.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.CSharpPlugin.InvokeMethod (HookMethod method, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Core.Plugins.Plugin.CallHook (System.String name, System.Object[] args) [0x00000] in <filename unknown>:0
     
    Last edited by a moderator: Dec 18, 2016
  4. That's most likely coming from the { } in his name as it sometimes may conflict with C#. I'm not one hundred percent sure about it, but you can use my Name Manager | Oxide plugin to disallow players with that character to join and then you should no longer receive that error.
     
    Last edited by a moderator: Dec 18, 2016
  5. Pretty sure Wulf has a fix..
     
  6. Wulf

    Wulf Community Admin

    You can fix it in the plugin by adding .Sanitize() to the name in the string.Format.
     
  7. Ankawi updated Welcome Messages with a new update entry:

    1.0.1

     
  8. I added Russian language

    Code:
                lang.RegisterMessages(new Dictionary<string, string>
                {
                    ["Welcome"] = "[#cyan]Добро пожаловать на сервер {0}![/#]"
                }, this, "ru");
     
  9. I for some reason didn't work the plugin, no errors.
     
  10. Wulf

    Wulf Community Admin

    Which game? Anything referencing the plugin in the logs?
     
  11. hurtworld

    Code:
    17:20 [Info] WelcomeMessage was compiled successfully in 1645ms
    17:20 [Info] Unloaded plugin Welcome Message v2.0.3 by SkinN
    17:20 [Info] Loaded plugin Welcome Message v2.0.3 by SkinN
    no errors
     
  12. Wulf

    Wulf Community Admin

    That isn't this plugin, that's an old one by SkinN.
     
  13. could you give a tip on entering these lines in the welcome message,
    I was using notifier by SkiNn but now it is slowly breaking down,
    the lines are the ones below


    " To get a KIT type /kit kit You only get 20 ",
    "STEAM PRIVATE PROFILE PLAYERS WILL BE KICKED/BANNED ",
    "The MORE you Gather/Craft = Higher/Faster rates ",
    " Type /help for all available commands",
    "Please respect the Server Rules ",
    I removed the colour and size formatting used in Notifier
    ("<lime><size=25>•</size><end><lime>The MORE you Gather/Craft = Higher/Faster rates <end> ", )

    I tried just adding the lines after the default welcome message after adding a comma to the first line and checking with json,validator
    but was "told" that it was expecting a ":" instead of a ', at the end of each line
    but if put it there it just changes the text into one continuous line ?

    any help would be appreciated, Since leaving Multiplay i am finding that i can usually edit most of the plugins with no problem, but this one has me baffled (maybe its the 43+ heat) :)
     
  14. For example. Look at the previous thread posts. Also, since this plugin is covalence, you'd have to use the proper API such as [+25] ...[/+] for size and etc.
    Code:
    {
      "Messages": [
        "[#silver]To get a KIT type  /kit kit  You only get 20[/#]",
        "[#silver]STEAM PRIVATE PROFILE PLAYERS WILL BE KICKED/BANNED [/#]",
        "[#silver]The MORE you Gather/Craft = Higher/Faster rates [/#]"
      ]
    }
    
     
  15. Thank you for your reply, I followed your advice and edited the config, but for some reason it does not load, I get the following error message
    Loaded plugin WelcomeMessages v1.0.1 by Ankawi
    Failed to initialize plugin 'WelcomeMessages v1.0.1' (JsonReaderException: Unexpected character encountered while parsing value: [. Path 'Messages', line 3, position 16.)
    at Newtonsoft.Json.JsonTextReader.ReadStringValue (ReadType readType) [0x00000] in <filename unknown>:0 at Newtonsoft.Json.JsonTextReader.ReadAsString () [0x00000] in <filename unknown>:0 at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.ReadForType (Newtonsoft.Json.JsonReader reader, Newtonsoft.Json.Serialization.JsonContract contract, Boolean hasConverter) [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
    Unloaded plugin WelcomeMessages v1.0.1 by Ankawi
    Previous version of plugin failed to load: WelcomeMessages


    But when checked with Json.validator it checks ok

    {
    "Welcome": "[#cyan]Welcome to Pal-Ul-Don Can YOU Survive {0}![/#]",
    "Messages": [
    "[#yellow]To get a KIT type /kit kit You only get 20[/#]",
    "[#yellow]STEAM PRIVATE PROFILE PLAYERS WILL BE KICKED/BANNED [/#]",
    "[#yellow]Rules and hints will scroll Top Right of screen [/#]",
    "[#lime]The MORE you Gather/Craft = Higher/Faster rates [/#]"
    ]
    }

    any hints as to what is wrong ?
     
  16. You have a "Welcome": and a "Messages": [, look at the example above and make sure it is only 1 entry.
     
  17. I have also been trying to get this plugin to accept carriage return also but no matter what through all the previous post by others. Here is the latest attempt:
    {
    "Welcome": [
    "[#yellow]Welcome to the server {0}![/#]",
    "[#yellow]Team Speak Server x.x.x.x:10333[/#]",
    "[#yellow]In game shop available. Use /shophelp[/#]",
    "[#yellow]You earn shop cash by killing zombies and animals[/#]"
    ]
    }


    I have also tried...

    {
    "Welcome": "[#yellow]Welcome to the server {0}![/#]\nThis is a new line"
    }


    Can I please ask for an actual working example of simple multi-line output please instead of informing me that its wrong. I have tested EVERY syntax posted in this thread so far without success. Thank you.
     
  18. Checkout the Overview, gave a good example on proper usage and good spacing.
     
  19. i dont get it, if it checks out as a valid json. file why doesnt it work ! and i want to add the other lines after the welcome line so i copied the format in the overview and got a "parse error in line 2" ?

    {
    "Welcome": "[#cyan]Welcome to Pal-Ul-Don Can YOU Survive {0}![/#]
    \n[#yellow] To get a KIT type / kit kit You only get 20[/#]
    \n[#yellow] STEAM PRIVATE PROFILE PLAYERS WILL BE KICKED / BANNED[/#]
    \n[#yellow] Rules and hints will scroll Top Right of screen[/#]
    \n[#lime] The MORE you Gather / Craft = Higher / Faster rates[/#]"
    }

    So out of curiosity i checked the example on the overview page and got the same result ?
    {
    "Welcome": "[#cyan]Welcome to the server {0}![/#]
    \n[#cyan]Type /help to view in-game commands[/#]
    \n[#cyan]Please abide the server's rules[/#]"
    }

    Error: Parse error on line 2:
    { "Welcome": "[#cyan]Welcome to t
    -------------^
    Expecting 'STRING', 'NUMBER', 'NULL', 'TRUE', 'FALSE', '{', '[', got 'undefined'
     
  20. Wulf

    Wulf Community Admin

    It should all be on a single line.