๐งโ๐คโ๐งSquad System
A comprehensive squad management system for FiveM servers, supporting both QBCore and ESX frameworks.
Features
Squad creation and management
Member management with ranks and permissions
Real-time squad member locations with map blips
Squad member health tracking
Squad photo system (with MugShotBase64)
Squad invitation system
Squad member kick system
Squad leadership transfer
Friendly fire protection
Multi-language support (English, German, Turkish)
Modern and responsive UI
Squad UI with F5 key
Squad Management UI with F6 key
Dependencies
QBCore or ESX Framework
oxmysql
MugShotBase64 (optional, for member photos)
Installation
Ensure you have all required dependencies installed
Import
squad.sql
to your databaseAdd the resource to your server resources folder
Add
ensure hate-squad
to your server.cfgConfigure the
config.lua
file according to your needs
Rank System
The squad system includes a hierarchical rank system:
Rank 1: Basic Member (default for new members)
Rank 2: Senior Member
Rank 3: Officer
Rank 4: Leader (can manage all squad functions)
Higher rank members can manage lower rank members, and leaders have full control over the squad.
Configuration
The script can be configured through the config.lua
file:
Framework selection: Choose between QBCore ('QB') or ESX
Language settings: Support for English ('en'), German ('de'), Turkish ('tr')
Squad size limits: Configure maximum squad size (default: 6 members)
Rank configurations: Set default ranks and leader permissions
UI key bindings: Customize key mappings for UI access
Health update intervals: Configure how often member data updates
Friendly fire: Enable/disable friendly fire protection between squad members
Usage
For Players
Creating a Squad: Use F6 to open management menu and create a new squad
Joining a Squad: Accept invitations sent by squad leaders
Viewing Squad: Use F5 to toggle the squad UI showing member status and locations
Leaving Squad: Use the management menu (F6) to leave your current squad
For Squad Leaders
Invite Players: Use
/squadmanage
or F6, then invite by player IDKick Members: Remove members through the management interface
Promote/Demote: Change member ranks (1-4, with 4 being leader)
Transfer Leadership: Assign a new leader and step down
Delete Squad: Completely disband the squad
Commands
F5
or/squadui
: Toggle squad UI displaying member informationF6
or/squadmanage
: Open squad management interfaceChat commands for basic operations (create, leave, etc.)
Available Exports
Server Exports
isInSameSquad(identifier1, identifier2)
: Check if two players are in the same squadlocal areInSameSquad = exports['hate-squad']:isInSameSquad(player1Identifier, player2Identifier)
Features in Detail
Real-time Map Blips
Squad members appear as green blips on the map
Blips update automatically as members move
Blips are automatically cleaned up when members go offline or leave
Friendly Fire Protection
Squad members cannot damage each other when friendly fire is disabled
Visual indicator shows when aiming at squad members
Configurable through the config file
Multi-language Support
Currently supports English, German, and Turkish
Easy to add new languages through locale files
All UI elements are translatable
Photo System
Automatic member photo capture using MugShotBase64
Photos are stored and displayed in the squad UI
Cooldown system prevents spam
Troubleshooting
Common Issues
Blips not showing: Ensure all squad members are online and in the same server
UI not opening: Check key bindings in config.lua and ensure no conflicts
Database errors: Verify squad.sql was imported correctly
Framework errors: Ensure correct framework is set in config.lua
Debug Mode
Enable debug mode in config.lua to get detailed console output for troubleshooting:
Config.Debug = true
Security Notice
This script includes proper validation and security measures to prevent exploitation. All server-side operations are protected and validated.