FriendsAPI

Moved

Total Downloads: 24,015 - First Release: Oct 26, 2014 - Last Update: Nov 10, 2017

5/5, 39 likes
  1. ^ +1 .exe
     
  2. Code:
    40 Friends - Failed to compile: Friends.cs(410,141): error CS1503: Argument `#2' cannot convert `object[]' expression to type `string'
    same
     
  3. here 2
     
  4. +1 and ConnectMessages.cs this same error :)
     
  5. Error fix is this.

    On line 414. Replace it with this.
    Code:
    private void Reply(IPlayer player, string langKey, params object[] args) => player.Reply(lang.GetMessage(langKey, this, 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.
     
  6. it works ! thank you :) (and ConnectMessages to ;) )
     
  7. ya pls connectMessages too xD
     
  8. Thanks Mirajorino
     
  9. Wulf

    Wulf Community Admin

    Wulf updated Friends API with a new update entry:

    2.2.5

     
  10. hey @Wulf im getting this error on the plugin update

    Code:
    (12:01:01) | Failed to call hook 'FriendCommand' on plugin 'Friends v2.2.5' (FormatException: Input string was not in a correct format.)
    (12:01:01) | 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.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.Reply (System.String message) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.Friends.Reply (IPlayer player, System.String langKey, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.Friends.FriendCommand (IPlayer player, System.String command, System.String[] args) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.Friends.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
     
  11. Wulf

    Wulf Community Admin

    Did the player have { or } in their name?
     
  12. Seeing this in the oxide console Not sure what it is but figured you'd have a better idea
    Code:
    18:15 [Error] Failed to call hook 'IOnServerCommand' on plugin 'RustCore v2.0.3728' (FormatException: Index (zero based) must be greater than or equal to zero and less than the size of the argument list.)
    18:15 [Stacktrace]   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.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.Reply (System.String message, System.String prefix, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.Friends.cmdFriendChat (IPlayer player, System.String command, System.String[] args) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.Friends+<registerCommand>c__AnonStorey0.<>m__0 (IPlayer caller, System.String cmd_, System.String[] args) [0x00000] in <filename unknown>:0
      at Oxide.Game.Rust.Libraries.Covalence.RustCommandSystem.CommandCallback (IPlayer caller, System.String cmd, System.String[] args) [0x00000] in <filename unknown>:0
      at Oxide.Core.Libraries.Covalence.CommandHandler.HandleCommand (IPlayer player, System.String command, System.String[] args) [0x00000] in <filename unknown>:0
      at Oxide.Core.Libraries.Covalence.CommandHandler.HandleChatMessage (IPlayer player, System.String message) [0x00000] in <filename unknown>:0
      at Oxide.Game.Rust.Libraries.Covalence.RustCommandSystem.HandleChatMessage (IPlayer player, System.String message) [0x00000] in <filename unknown>:0
      at Oxide.Game.Rust.RustCore.IOnServerCommand (.Arg arg) [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 
     
  13. Could you improve the plugin are automatically added friends to the list without the permission of the other player, so long as the player is not confirmed in friends does not add character, without the knowledge of the player character is added to friends
     
  14. Wulf

    Wulf Community Admin

    So you just want it to be able to not hurt others and generally be friends, even if the other player doesn't add you as a friend?

    Will look into it, looks like a message is off.
     
  15. I just tested it already, automatically, without permission to add friends of people added to the friends and you can safely remove house
    [DOUBLEPOST=1512071989][/DOUBLEPOST]I want to pass the test, while the second player does not confirm the first player who has requested friendship, while the second has not confirmed they will not be friends
     
  16. I need to return the list of only those friends I have friends with, how to do it? I use the function Friends?.Call("GetFriends", playerId)
     
  17. The plugin NoRaid is not detecting friendsAPI. Is this an issue with NoRaid or with my friendsAPI, and what might fix it? Its kind of a big issue that friends cannot damage other friends structures. If someone could walk me through it and get FriendsAPI working with this NoRaid plugin I will compensate you.

    upload_2017-12-29_12-0-0.png
    upload_2017-12-29_12-2-43.png

    *DynamicCupShare is working with Friends just fine
    *RemoverTool is working with Friends just fine
     
  18. Wulf

    Wulf Community Admin

    Detection would be with the plugin using it.
     
  19. Wulf pls Add command /friend accept for check who add you are friend. PLS :}