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

  • Real-time squad member locations

  • Squad member health tracking

  • Squad photo system

  • Squad invites

  • Squad member kicks

  • Squad leadership transfer

  • Squad blips on map

  • Squad UI with F5 key

  • Squad Management UI with F6 key

Dependencies

  • QBCore or ESX Framework

  • MugShotBase64

  • oxmysql

  • HRS Base Building (optional)

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

HRS Base Building Integration

If you're using HRS Base Building, update the hasPermission function in hrs_base_building/server/main_unlocked.lua:

function hasPermission(identifier,id)
    -- Check original crew system
    if identifier == props[id].identifier then
        return true
    end

    if crewByIdentifier[identifier] and crews[crewByIdentifier[identifier]] and crews[crewByIdentifier[identifier]].data[props[id].identifier] then
        return true      
    end

    -- Check hate-squad system via export
    if GetResourceState('hate-squad') ~= 'missing' then
        local isInSquad = exports['hate-squad']:isInSameSquad(identifier, props[id].identifier)
        if isInSquad then
            return true
        end
    end

    return false
end

Configuration

The script can be configured through the config.lua file:

  • Framework selection (QB/ESX)

  • Language settings

  • Squad size limits

  • Rank configurations

  • UI key bindings

  • Health update intervals

Available Exports

Server Exports

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

    local areInSameSquad = exports['hate-squad']:isInSameSquad(player1Identifier, player2Identifier)

Commands

  • /squadui (F5): Toggle squad UI

  • /squadmanage (F6): Open squad management UI (for leaders)

  • /squad create [name]: Create a new squad

  • /squad leave: Leave current squad

Security Notice

This script is protected by FiveM's escrow system. The client and server-side code is encrypted and cannot be modified.