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:
-
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
-
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
-
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)
-
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:
- ESX (1.1 / 1.2 / legacy)
Optional Requirements:
- mythic_notify - GitHub - JayMontana36/mythic_notify: A simple FiveM notification resource
- pnotify - GitHub - Nick78111/pNotify: In-game notifications for the FiveM GTA V mod
- 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:
-
Please make sure in any other resources to stop using
SetCanAttackFriendly(PlayerPedId(), true, true)
andNetworkSetFriendlyFireOption(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
-
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.
-
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 |