๐Ÿง‘โ€๐Ÿคโ€๐Ÿง‘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

  1. Ensure you have all required dependencies installed

  2. Import squad.sql to your database

  3. Add the resource to your server resources folder

  4. Add ensure hate-squad to your server.cfg

  5. Configure 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

  1. Creating a Squad: Use F6 to open management menu and create a new squad

  2. Joining a Squad: Accept invitations sent by squad leaders

  3. Viewing Squad: Use F5 to toggle the squad UI showing member status and locations

  4. Leaving Squad: Use the management menu (F6) to leave your current squad

For Squad Leaders

  1. Invite Players: Use /squadmanage or F6, then invite by player ID

  2. Kick Members: Remove members through the management interface

  3. Promote/Demote: Change member ranks (1-4, with 4 being leader)

  4. Transfer Leadership: Assign a new leader and step down

  5. Delete Squad: Completely disband the squad

Commands

  • F5 or /squadui: Toggle squad UI displaying member information

  • F6 or /squadmanage: Open squad management interface

  • Chat commands for basic operations (create, leave, etc.)

Available Exports

Server Exports

  • isInSameSquad(identifier1, identifier2): Check if two players are in the same squad

    local 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

  1. Blips not showing: Ensure all squad members are online and in the same server

  2. UI not opening: Check key bindings in config.lua and ensure no conflicts

  3. Database errors: Verify squad.sql was imported correctly

  4. 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.