[PAID] [ESX] Team System_V2

Team System_V2: Rewritten version - No need to use MySQL, better performance
The first version : [PAID] [ESX] Team System

About:

Team System : Players can create teams and invite team members to join. Team members can see each other’s blips on the map. Additionally, all members of the same team cannot shoot each other and the names and health bars can be seen above the teammate’s head. In the configuration, you can set whether only members of the same team can ride in the same vehicle and whether to enable the feature that allows team members to teleport to each other.

Team System - Admin Panel : The powerful team management system (Admin Only) allows admins to efficiently manage all teams.

Features:

  1. Team System

    • Any player can create their own team (with a custom team name which can be any characters, such as emoji).
    • The team leader can invite four players to join the team.
    • Once players have joined the same team, they can see each other’s blips on the map.
    • The team leader can transfer leader role to another team member.
    • The team leader can kick a player out of the team, and the player’s blips will disappear from the map when they leave the team.
    • The team leader can disband the team.
    • Players can leave the team on their own (when a player leaves the team, their blip on the map associated with the team will disappear).
    • Players on the same team can’t shoot each other.
    • Team members can teleport to each other.
    • Players can request to join a team, and the team leader can accept the request to add the player to the team.
    • When players are on the same team, the names and health bars can be seen above the teammate’s head
    • Team HUD (the default position is on the left middle side of the screen*). After joining the same team, the team members can see each other’s name, health and armour information on the Team HUD

  2. Team System - Admin Panel (Admin Only, can set in Config)

    • Force the player to join a specified team
    • Force kick the player out of the team
    • Force transfer the leader role to team member
    • Force disband a specified team
    • Force disband all teams
  3. Common features

    • Editable Config
    • Simple but user-friendly UI (you can edit the UI yourself if you want)
    • Draggable UI
    • Players can also use the commands to use the function of the team system
    • Keybinds can be configured either by config.lua or in game by pressing Esc > Settings > Key Bindings > FiveM
    • 2 translation locales (en/zh). It allows you to translate it yourself to any language you want (You can add it in fxmanifest.lua or overwrite the original text)
  4. The Merge Team Function

    • The team leader is allowed to merge their team with two other teams. After the merger, the team will not change, and only the leader of that team can invite players to join or kick team members out of the team.
    • All members of the team that have merged with your team can see each other’s blips on the map (The color of the blips will be green for your own teammates and purple for the merged team members) and they cannot shoot each other.
    • All members of the team that have merged with your team can also teleport to each other.
    • The color of the merged team on the team list will change to purple, and the “Show My Team Only” option will also show the merged team.
    • A total of 3 teams can merge with each other, allowing up to 15 players (5 players x 3 teams) to merge into the same team.
    • The team leader can cancel the merger with other teams by pressing the name of their team on the team list and then pressing the “Cancel Merge Team” button to cancel the merger with all teams.

Available Commands:

Commands for everyone
Commands Description
/createteam [teamname] Create a team (custom team name)
/invite [id] Invite a team member (Only leader can invite)
/pass [id] Transfer the leader role to team member (Only leader can transfer)
/drop [id] Kick the teammate out of the team (Only leader can kick)
/disband Disband the team (Only leader can disband)
/y Accept the invitation to join the team
/n Reject the invitation to join the team
/q Quit the team
Commands for Admin Only
Commands Description
/forcejoin [id] [team] Force the player to join a specified team
/forcedrop [id] Force kick the player out of the team
/forcepass [id] Force transfer the leader role to team member
/forcedisband [team] Force disband a specified team
/forcedisbandall Force disband all teams

Config:

config.lua
Config = {}

-- Available Locales: 'en', 'zh'
Config.Locale = 'en'

-- Versions supported (1.1 / 1.2 / legacy)
Config.ESXversion = 'legacy' -- **Mainly different in the command part**

Config.Mysql = "mysql-async" -- (mysql-async / oxmysql)  -- If using oxmysql, remember to comment "@mysql-async/lib/MySQL.lua" and uncomment '@oxmysql/lib/MySQL.lua' in fxmanifest.lua  *Only used for if "Config.UseSteamName" set to false
-----------------------------------------------------------------------------

Config.EnableMergeTeamFunction = true -- If false, Players cannot use the merge team function

-----------------------------------------------------------------------------

-- Command for opening the TeamSystemMuen UI
Config.OpenTeamSystemMuenCommand = 'teammenu'

-- Key for opening the TeamSystemMuen UI
Config.OpenTeamSystemMuenKeybind = 'F4'

-----------------------------------------------------------------------------
-- Groups that can use Keybind to open TeamSystemMuen_AdminPanel
Config.admin_groups_AdminPanelKeybind = {"admin", "superadmin"}

-- Command for opening the TeamSystemMuen_AdminPanel UI
Config.OpenTeamSystemMuen_AdminPanelCommand = 'teammenu_admin'  -- Only in Config.admin_groups_AdminPanelKeybind can use this command to open the TeamSystemMuen_AdminPanel UI

-- Key for opening the TeamSystemMuen_AdminPanel UI
Config.OpenTeamSystemMuen_AdminPanelKeybind = 'F5'  -- Only in Config.admin_groups_AdminPanelKeybind can use this Keybind to open the TeamSystemMuen_AdminPanel UI

-----------------------------------------------------------------------------

Config.UseSteamName = true -- If false, it will use the first name + last name to display the player name on the UI (*this must use sql)

------------------------------------------------------------------------------

Config.ShowTeamInfoBar_Name = true  -- If false, it will not show health bar above the teammate's head after player joined the same team and players cannot set in the UI setting

Config.ShowTeamInfoBar_healthBar = true  -- If false, it will not show health bar above the teammate's head after player joined the same team and players cannot set in the UI setting

--------------------------------------------------------------------------------

Config.ShowNotification = true  -- If false, it will only have chat room message

-- Scripts supported (mythic_notify / pnotify / 413x-notify / default)
Config.NotificationScript = "default"  -- default = ESX.ShowNotification()

---------------------------------------------------------------------------------

Config.EnableTeamKill = false  -- If set to true: team members can attack each other even if joined the same team ; If set to false: team members cannot attack each other (but not including vehicle damage)

-----------------------------------------------------------------------------

Config.admin_groups = "admin" -- Groups that can use admin commands

Config.enableCmd = true    -- Enable/Disable all player use command (/createteam [teamname], /invite [id], /pass [id], /drop [id], /disband, /y, /n, /q)

Config.enableAdminCmd = true  -- Enable/Disable Admin use Admin command (/forcejoin [id] [team], /forcedrop [id], /forcepass [id], /forcedisband [id], /forcedisbanall)

-----------------------------------------------------------------------------

-- Key for Accept/Reject the Team Invitation
-- **If change to other key, remember to change the text of _U("accept_or_reject_invite") & _U("accept_or_reject_invite2") for the correct description
-- **Players can also use the command /y or /n to accept or reject the team invitation
Config.AcceptTeamInvitationKeybind = 188  -- ARROW UP
Config.RejectTeamInvitationKeybind = 187  -- ARROW DOWN

-- Key for Accept/Reject the Player requests to join the team's application
-- **If change to other key, remember to change the text of _U("accept_or_reject_request") & _U("accept_or_reject_request2") for the correct description
Config.AcceptRequestToJoinTeamKeybind = 188  -- ARROW UP
Config.RejectRequestToJoinTeamInvitationKeybind = 187  -- ARROW DOWN

-- Key for Accept/Reject the Player requests to Merger the team's application
-- **If change to other key, remember to change the text of _U("accept_or_reject_merge") & _U("accept_or_reject_merge2") for the correct description
Config.AcceptRequestToMergeTeamKeybind = 188  -- ARROW UP
Config.RejectRequestToMergeTeamKeybind = 187  -- ARROW DOWN

-----------------------------------------------------------------------------

-- Only Team Member Can Ride In Same Vehicle
Config.OnlyTeamMemberCanRideInSameVehicle = false -- If set to true: Only team members can ride together in the same vehicle. **That means player from other teams or without a team cannot ride in the same vehicle with player who are not on the same team or without a team.


Config.TeamTP = true  -- Enable/Disable the teammate use the TP function

Config.TpWaitingtime = 5  -- Seconds as unit, the waiting time to teleport to teammate
config.js
var Config = new Object();

// Available Locales: "en", "zh"
Config.Locale = "en";

Requirements:

  1. ESX (1.1 / 1.2 / legacy)

Optional Requirements:

  1. mythic_notify - GitHub - JayMontana36/mythic_notify: A simple FiveM notification resource
  2. pnotify - GitHub - Nick78111/pNotify: In-game notifications for the FiveM GTA V mod
  3. 413x-notify - GitHub - sharplybond4/NotificationSystem: A simple and easy to use notification system built for FiveM Roleplay

Exports:

1. exports["teamsystem"]:OpenTeamSystemUI()  -- Open the TeamSystemMuen UI
2. exports["teamsystem"]:OpenTeamSystemAdminPanelUI()  -- Open the TeamSystemMuen_AdminPanel UI

Warning:

  1. Please make sure in any other resources to stop using SetCanAttackFriendly(PlayerPedId(), true, true) and NetworkSetFriendlyFireOption(true) , otherwise the “team members cannot attack each other” function in the team will not work.

    Example: es_extended > config.lua > Config.EnablePVP 
    Set it to "false"  ==> Config.EnablePVP = false
    
  2. If your server has a safe zone script, you can open a ticket on Discord after purchasing to obtain the code for the compatible safe zone script.

  3. This script is using the Asset Escrow system

Purchase:

Tebex: https://captainavenger.tebex.io/package/5561465

Code is accessible No, but we have customization files (config.lua, config.js, locales, and all HTML files)
Subscription-based No
Lines (approximately) 6500+
Requirements ESX (1.1 / 1.2 / legacy)
Support Yes

We now provide a one-week free trial version (Team System_V2). If you are interested, please find our Discord in the purchase link and join it to understand how to get it.

The deadline is 23:59 on March 31, 2023 (UTC +8 2023-03-31 23:59), and before the deadline, as long as you meet the requirements, you can get a one-week free trial version.

Regarding TeamSystem_V2, as this is the final version, we have lowered the price. If you are interested, don’t miss out! :heart:

Also, we can offer you a one-week free trial with full functionality. If you’re interested, feel free to join our Discord and register for the trial.

请给我一个联系方式可以么 我购买了你的第一个版本 当时有验证

我私訊回覆了,請查看,謝謝

Change-log:

version ‘2.0.1’

  1. bug fixes and improvements (If the merge team function of your team system is enabled, it is recommended to update this version as soon as possible)
    • Change content: server.lua (Other files have not changed)

Change-log:

version ‘2.1.0’

Add “Vehicle Friendly Relations” (Can only be enabled on vehicles): This feature is primarily used for players to share waypoints when they are on the same vehicle, even if they are not in the same team.

Notes:

  1. This feature can only be enabled on vehicles.
  2. This feature automatically deactivates when leaving the vehicle.
  3. “Vehicle Friendly Relations” are disabled by default (players can enable it in the TeamSystem settings if needed).
  4. Only players in the same relationship group can share waypoints while on a vehicle.
  5. Enabling “Vehicle Friendly Relations” will temporarily overrides existing relationship groups, such as the team’s relationship group.

Function Description:
If both players have enabled the feature on the vehicle, it means they are in the same friendly relationship*, and therefore cannot attack each other. However, if one player is part of a team and has the feature enabled while another team member does not, it indicates that they are not in the same relationship and can attack each other (including when the teammate is not on the vehicle).

*Whenever a player enables the feature on a vehicle, their current relationship group is set as “Vehicle Friendly Relations”. Therefore, other players (whether or not they have joined a team) who have enabled the feature on the vehicle, it means they belong to the same relationship group so that they cannot attack each other and are not restricted from sharing waypoints.

Change-log:

version ‘2.1.1’

Recently, I discovered several errors in the previous versions of V2.1.0, including issues such as players leaving the team, the leader kicking players, and forcefully kicking players out of the team. However, these issues have already been fixed. It is recommended to update this version as soon as possible.

  1. bug fixes and improvements
    Change content: server.lua (Other files have not changed)