ConnectMessages

Moved

Total Downloads: 5,241 - First Release: Oct 20, 2016 - Last Update: Nov 10, 2017

5/5, 19 likes
  1. Thanks Wulf, all fixed now, went through all the files and tracked it down to Friends plugin, text probably only visible to "friends"
     
  2. Fix hurtworld v1
    Code:
    Failed to call hook 'OnUserDisconnected' on plugin 'ConnectMessages v1.1.8' (NullReferenceException: Object reference not set to an instance of an object)
     
  3. where do i find connect message ? i cant find it in data or lang....
     
  4. Wulf

    Wulf Community Admin

    oxide/lang/en/ConnectMessages.json by default.
     
  5. How to add color to the message thanks
     
  6. Wulf

    Wulf Community Admin

    For Unity games such as Rust and Hurtworld: Oxide API for Rust
     
  7. Hurtworld V2 error in log, does not seem to cause plugin failure most of the time... although sometimes it does seem to stop working, just not nearly as frequently as this error shows up (every disconnect)

    Code:
    08:01 [Error] Failed to call hook 'OnUserDisconnected' on plugin 'PlaytimeTracker v0.1.6' (NullReferenceException: Object reference not set to an instance of an object)
    08:01 [Stacktrace]   at Oxide.Plugins.PlaytimeTracker.OnUserDisconnected (IPlayer player) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.PlaytimeTracker.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.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 hook, System.Object[] args) [0x00000] in <filename unknown>:0 
     
  8. #Albator 4242
    try this example , change colors to suit your needs
    {
    "ConnectMessage": "<color=lime>{0} has connected.</color>",
    "ConnectMessageCountry": "<color=cyan>{0} has connected from {1}.</color>",
    "DisconnectMessage": "<color=lime>{0} has disconnected.</color>",
    "DisconnectMessageReason": "<color=yellow>{0} has disconnected. ({1})</color>"
    }
     
  9. when i change something in this file nothing happend ingame
    yeah i reload the plugin before :)
    i cant chnage color and text
     
  10. after game update this plugin does not compile
    51 ConnectMessages - Failed to compile: ConnectMessages.cs(30,62): error CS1503: Argument `#2' cannot convert `object[]' expression to type `string'
     
  11. error:
    Code:
    Error while compiling: ConnectMessages.cs(30,62): error CS1503: Argument `#2' cannot convert `object[]' expression to type `string'
     
  12. same here
    Code:
     Error while compiling: ConnectMessages.cs(30,62): error CS1503: Argument `#2' cannot convert `object[]' expression to type `string'
     
  13. This shit Broke
    Code:
      ConnectMessages - Failed to compile: ConnectMessages.cs(30,62): error CS1503: Argument `#2' cannot convert `object[]' expression to type `string'
     
  14. Here is the fix.

    Replace line 29 with this.
    Code:
    player.Message(GetLangValue(key, player.Id), "", args);
    This happened because oxide updated IPlayer.Reply with a prefix variable. This just passes in a blank string for it. Works like before once this change is implemented.
     
  15. thank you bro <3
     
  16. Thanks very much , works again
     
  17. thx man
     
  18. Wulf

    Wulf Community Admin

    The proper fix would be adding string.Format in the plugin's IPlayer.Reply usage; no need to pass an empty string.
     
  19. Wulf

    Wulf Community Admin

    Wulf updated ConnectMessages with a new update entry:

    1.1.9

     
  20. Code:
    22:24 [Error] Failed to call hook 'OnUserConnected' on plugin 'ConnectMessages v1.1.9' (NullReferenceException: Object reference not set to an instance of an object)
    22:24 [Stacktrace]   at BasePlayer.SendConsoleCommand (System.String command, System.Object[] obj) [0x00000] in <filename unknown>:0
      at Oxide.Game.Rust.Libraries.Player.Message (.BasePlayer player, System.String message, System.String prefix, UInt64 userId, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Game.Rust.Libraries.Covalence.RustPlayer.Message (System.String message, System.String prefix, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Game.Rust.Libraries.Covalence.RustPlayer.Message (System.String message) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.ConnectMessages.Broadcast (System.String key, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.ConnectMessages.OnUserConnected (IPlayer player) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.ConnectMessages.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.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 hook, System.Object[] args) [0x00000] in <filename unknown>:0