LFG

LFG 1.1.4

I have just taken over this plugin and currently am looking threw it.
if anyone as a good video on how to use this plugin please message me.

Plugin is its own group system.
In ImageLibrary config set "Avatars - Store player avatars": true,

DEMO VIDEO:

TO USE LFG A PLAYER MUST HAVE PERMISSION: lfg.allow
(grant user STEAMID/name lfg.allow)

To allow all players simply add lfg.allow to default...
(grant group default lfg.allow)
LFG is a plugin designed to give players the ability to create and join groups. Groups can be saved through restarts or player logging on/off or they can be temporary.

At its core, this plugin is designed to be like the LFG function within an MMORPG; where you might group up with a few players to go raiding or just to play together for the session. However, it can also serve as a permanent grouping solution that saves members! LFG shows online members, provides real-time group information such as health, on map locations (LustyMap), and private in group chat.

LFG can be used with Clans, or Friends, or Factions, or standalone; depending on how you configure it.

Groups can be set to Private which hides them from the group selection menu; but leaders can still invite new members via the Invite Player menu.

Groups can have custom Chat Tags, Chat Tag Color, Logo (image), and Group Name.


Optional setting for a Ban List for if a player leaves a group or is kicked and you don't want them to be able to rejoin it.

I added custom chat tags, colors, logos, and group names.

When a player creates a group or becomes the leader they are given instructions for changing the group variables stated above. For the purpose of this post they are as follows:

/lfg name <type name - can include spaces>
/lfg logo <image url>
/lfg tag <chat tag max 5 characters>
/lfg color <color> --> if wrong color is typed it provides a list of acceptable colors

The logo doesn't really have any purpose within LFG but via API can be used in other plugins to render group images within UI and such (attaching a picture to show how that can work).

Optional setting for an Onscreen UI Menu button.. (see image below).

LustyMap Support for showing group members on the map.

BetterChat Support to ensure you don't get double chat messages when talking within private group chat.

Config Options:
C#:
{
  "InfoInterval": 15, // --> If set to 0 disables Chat Info Message. Otherwise, controls message interval in minutes. Default: 15 minutes.
  "MaxGroupSize": 5, // --> Sets max group size allowed on the server. This includes the leader; so 5 is the default and fills the LFG Group Screen. If you go beyond 5 it will provide arrows to scroll through the Group Screen
  "SaveData": false, // --> If Set TRUE will save player groups and group data through disconnects and server restarts. Basically groups become permanent. Players will be able to join groups even if all players are offline (unless the group is Private or full). Once a player comes online that is in your group you will be notified.
  "UseBanList": false, // --> If Set TRUE players kicked or that leave a group will be unable to rejoin that group EVER.
  "UseGroupTags": true, // --> Adds group chat tag and color to messages sent.
  "UseOnScreenUIButton": false // --> Adds Onscreen UI Button for the menu and private group chat toggle. Image attached (it is to the left of the belt slots).
"Use_LustyMap": false, // --> If 'true' group members will be shown on lustymap as a "friend".
"ShareLocks": false, // --> If 'true' group members will be able to open any lock owned by a group member that they are also authorized on the tool cupboard for. So if a group member has TC access they also can open any locked door, box, etc. within that TC radius.
"Disable_PlayTime": false, // --> If 'true' all players will have a PlayTime of 0 in the Menu. This will skip the hours check.
}

API HOOKS:
C#:
[HookMethod("GetGroupInfo")]
        object GetGroupInfo(ushort ID, string request)
        {
            if (ID == 0 || !data.SavedGroups.ContainsKey(ID)) return false;
            switch (request.ToLower())
            {
                case "name":
                    return data.SavedGroups[ID].GroupName;
                case "logo":
                    return data.SavedGroups[ID].logo;
                case "tag":
                    return data.SavedGroups[ID].tag;
                case "color":
                    return data.SavedGroups[ID].color;
                case "members":
                    return data.SavedGroups[ID].Members;
                case "leader":
                    return data.SavedGroups[ID].Leader;
                default:
                    return false;
            }
        }
        [HookMethod("GetPlayerGroup")]
        ushort GetPlayerGroup(ulong id)
        {
            if (data.PlayerGroup.ContainsKey(id))
                return data.PlayerGroup[id].ActiveGroup;
            return 0;
        }

        [HookMethod("GetGroupLeader")]
        BasePlayer GetGroupLeader(ushort groupId)
        {
            if (ActiveGroups.ContainsKey(groupId))
                return ActiveGroups[groupId].OnlineMembers.Where(k=>k.userID == ActiveGroups[groupId].groupData.Leader).Select(k=>k).FirstOrDefault();
            return null;
        }

        [HookMethod("GetLeaderDisplayName")]
        string GetLeaderDisplayName(ushort groupId)
        {
            if (ActiveGroups.ContainsKey(groupId))
                return GetDisplayName(ActiveGroups[groupId].groupData.Leader);
            return "UNKNOWN";
        }

        [HookMethod("isGroup")]
        bool isGroup(ushort groupId)
        {
            if (data.SavedGroups.ContainsKey(groupId)) return true;
            return false;
        }

        [HookMethod("BroadcastGroup")]
        void BroadcastGroup(string msg, ushort groupId)
        {
            if (!ActiveGroups.ContainsKey(groupId)) return;
            foreach (var entry in ActiveGroups[groupId].OnlineMembers)
                OnScreen(entry, msg);
        }
  • Group Join or Create Screen.PNG
    Group Join or Create Screen.PNG
    791.5 KB · Views: 1,287
  • InvitePlayers.PNG
    InvitePlayers.PNG
    514 KB · Views: 1,293
  • LFG Group Screen - Arrows Up and Down.png
    LFG Group Screen - Arrows Up and Down.png
    693.4 KB · Views: 1,442
  • NewActiveView.PNG
    NewActiveView.PNG
    690 KB · Views: 1,275
  • NewActiveView-Off.PNG
    NewActiveView-Off.PNG
    665.5 KB · Views: 1,327
  • UIButtons.png
    UIButtons.png
    207.5 KB · Views: 1,107
  • GroupNameANDLogoExample.png
    GroupNameANDLogoExample.png
    233.6 KB · Views: 1,089

Information

Author
Razor
First release
Last update
Rating
3.67 star(s) 3 ratings

Latest Release v1.1.4

Released
Mar 14, 2021 at 2:20 AM
Rating
1.00 star(s) 1 ratings


More resources from Razor


LFG by Razor
© chaoscode.io Mar 29, 2017

Latest reviews

I don't know how to "chat"
Unknown method of "invite"
Can I join "multiple groups"?
difficult