Friends API for Rust

An API to manage a friend list

Total Downloads: 17,961 - First Release: Oct 26, 2014 - Last Update: Mar 24, 2017

5/5, 33 likes
  1. Nogrod
    Configuration File:
    This plugin doesnt do anything itself besides managing a friendlist.
    It offers functions to use by other plugins to do things based on players friends.

    Usage for players
    /friend <add|+/remove|-> <name/steamID> to add or remove someone
    /friend list to list your friends

    Usage for plugin devs
    To call the functions from this API your plugin needs to get the plugin instance.
    Code (C#):

    private Plugin Friends;

    Friends?.CallHook("HasFriend", playerId, targetId)
    Available functions
    Code (C#):
    bool AddFriend(ulong playerId, ulong friendId)
    bool RemoveFriend(ulong playerId, ulong friendId)
    bool HasFriend(ulong playerId, ulong friendId)
    bool AreFriends(ulong playerId, ulong friendId)
    bool IsFriend(ulong playerId, ulong friendId)
    string[] GetFriendList(ulong playerId)
    ulong[] IsFriendOf(ulong playerId)
    bool HadFriend(ulong playerId, ulong friendId)
    bool WereFriends(ulong playerId, ulong friendId)
    bool WasFriend(ulong playerId, ulong friendId)
    ulong[] GetFriends(ulong playerId)
    Code (Lua):
    bool AddFriendS(string playerS, string friendS)
    bool RemoveFriendS(string playerS, string friendS)
    bool HasFriendS(string playerS, string friendS)
    bool AreFriendsS(string playerS, string friendS)
    bool IsFriendS(string playerS, string friendS)
    string[] GetFriendListS(string playerS)
    string[] IsFriendOfS(string playerS)
    bool HadFriendS(string playerS, string friendS)
    bool WereFriendsS(string playerS, string friendS)
    bool WasFriendS(string playerS, string friendS)
    string[] GetFriendsS(string playerS)
    shturval, varcolac, Creepstar and 3 others like this.