General Configuration

This guide will help you configure the script to suit your needs, covering all available options in the config.lua file. Each setting is explained step by step.


1. General Configuration

Language

Set the language used by the script.

Config.Language = 'en' -- Available options: 'en' (English), 'fr' (French)

Use Outdated Version

Enable this option to suppress alert messages when using an older version of the script.

Config.UseOutdatedVersion = false -- Set to true if using an outdated script version.

Command System

Activate or deactivate commands for grabbing, putting, and removing players from vehicles.

Config.CommandSystem.Enabled = false -- Enable/disable the command-based interaction system. (WARNING! If you are using a system in the Target System, disable the command system)tions.
Config.CommandSystem.Grab = 'grab' -- Command to grab the person by the arm.
Config.CommandSystem.PutPlayer = 'putplayer' -- Command to put the person in a vehicle.
Config.CommandSystem.RemovePlayer = 'removeplayer' -- Command to take the person out of a vehicle.

Commands can also be customized in the cl_utils.lua file.


2. Target System Compatibility

ox_target Compatibility

Enables compatibility with ox_target to allow interaction with players.

Config.TargetSystem.UseOXTarget = false -- Set to true to enable ox_target compatibility.

qb-target Compatibility

Enables compatibility with qb-target to allow interaction with players.

Config.TargetSystem.UseQBTarget = false -- Set to true to enable qb-target compatibility.

Custom Target System

If you are using a custom targeting system, enable this option and follow the structure of the client/ox_target.lua or client/qb_target.lua files.

Config.TargetSystem.UseCustomTarget = false -- Set to true to enable a custom targeting system.

3. Compatibility with Frameworks

ESX Compatibility

Enable ESX compatibility and restrict functionality to specific jobs.

Config.Framework.ESX = {
    enabled = false, -- Set to true to enable ESX compatibility.
    jobs = { 'police', 'fbi' }, -- Jobs allowed to use the grab feature.
    exceptionJobs = false -- If true, players with the listed jobs cannot be grabbed.
}

QB Compatibility

Enable QB compatibility and restrict functionality to specific jobs.

Config.Framework.QB = {
    enabled = false, -- Set to true to enable QB compatibility.
    jobs = { 'police', 'fbi' } -- Jobs allowed to use the grab feature.
}

4. Player Movement and Interactions

Controls Disabled

DisableControls = {
    disableSprint = true, -- Disable sprinting while carrying a player (recommended: true).
    getOutVehicle = true, -- Prevents grabbed players from exiting the vehicle on their own.
},

Collision Range

Adjust the collision distance between the grabbed player and the carrier.

Config.CollisionRange = 0.5 -- Value range: 0.0 (disable collision) to desired distance.

Grabbing Radius

Define the distance required to grab a player.

Config.GrabbingRadius = 1.0 -- Recommended value: 1.0

Attachment Position

Set the position of the grabbed player relative to the carrier.

Config.AttachPosition = vector3(0.20, 0.45, 0.0) -- Modify as needed for positioning.

5. Animations

Control animations for both the person grabbing and the person being grabbed.

Config.Animations = {
    policeAnimation = {
        enabled = true, -- Set to true to enable animations for the carrier.
        animDict = 'amb@world_human_drinking@coffee@male@base',
        anim = 'base'
    },
    citizenAnimation = {
        enabled = false, -- Set to true to enable animations for the grabbed person.
        animDict = 'amb@world_human_drinking@coffee@male@base',
        anim = 'base'
    }
}

6. Key Bindings

Keys for Interactions

Set the keys used for actions when CommandEnabled is set to false.

Config.Keys = {
    GrabAndDropKey = 289, -- Key to grab and release a person.
    GrabAndDropKeyString = '~INPUT_REPLAY_START_STOP_RECORDING_SECONDARY~', -- Key name for display.

    TaskEnterKey = 305, -- Key to put a person in the vehicle.
    TaskEnterKeyString = '~INPUT_REPLAY_STARTPOINT~' -- Key name for display.
}

Refer to the FiveM Control Reference for a list of control codes.


7. Language Library

Edit the text displayed for different actions in multiple languages.

Last updated