Welcome Messages

Sends players welcome messages once they connect to the server

Total Downloads: 1,167 - First Release: Nov 19, 2016 - Last Update: Dec 19, 2016

5/5, 2 likes
  1. Speedy2M

    Speedy2M Wood Hoarder

    Ahh Gotcha well then its oxide :p since its not working ;)
     
  2. Wulf

    Wulf Community Admin Community Admin Oxide Developer

    Yup, and already fixed and soon to be in the next snapshot.
     
    Speedy2M likes this.
  3. › Genocide

    › Genocide Wood Hoarder

    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 (Text):
    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. Ankawi

    Ankawi Shack Builder Plugin Developer

    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: Dec 18, 2016
  5. › Genocide

    › Genocide Wood Hoarder

    Pretty sure Wulf has a fix..
     
  6. Wulf

    Wulf Community Admin Community Admin Oxide Developer

    You can fix it in the plugin by adding .Sanitize() to the name in the string.Format.
     
    Ankawi and › Genocide like this.
  7. Ankawi

    Ankawi Shack Builder Plugin Developer

  8. BK_S1

    BK_S1 Naked Wanderer

    I added Russian language

    Code (Text):

                lang.RegisterMessages(new Dictionary<string, string>
                {
                    ["Welcome"] = "[#cyan]Добро пожаловать на сервер {0}![/#]"
                }, this, "ru");
     
  9. q1LLa

    q1LLa Wood Hoarder

    I for some reason didn't work the plugin, no errors.
     
  10. Wulf

    Wulf Community Admin Community Admin Oxide Developer

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

    q1LLa Wood Hoarder

    hurtworld

    Code (Text):
    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 Community Admin Oxide Developer

    That isn't this plugin, that's an old one by SkinN.
     
  13. pookins

    pookins Wood Hoarder

    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. Ankawi

    Ankawi Shack Builder Plugin Developer

    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 (Javascript):

    {
      "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. pookins

    pookins Wood Hoarder

    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. Ankawi

    Ankawi Shack Builder Plugin Developer

    You have a "Welcome": and a "Messages": [, look at the example above and make sure it is only 1 entry.
     
  17. Kort

    Kort Naked Wanderer

    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. Ankawi

    Ankawi Shack Builder Plugin Developer

    Checkout the Overview, gave a good example on proper usage and good spacing.
     
    kamikazeedriver likes this.
  19. pookins

    pookins Wood Hoarder

    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 Community Admin Oxide Developer

    It should all be on a single line.