Page cover

Accessible files

Here you can find all the files which can be edite to make the asset compatible with your server.​

config.lua
----------------------------------------------------------------------------------------------
----------------------------------| BRUTAL GANG ACTIONS :) |----------------------------------
----------------------------------------------------------------------------------------------

--[[
Hi, thank you for buying our script, We are very grateful!

For help join our Discord server:     https://discord.gg/85u2u5c8q9
More informations about the script:   https://docs.brutalscripts.com
--]]

Config = {
    Core = 'ESX',  -- 'ESX' / 'QBCORE' | Other core setting on the 'core' folder.
    Target = 'oxtarget', -- 'false' / 'oxtarget' / 'qb-target' 
    Inventory = 'ox_inventory', -- 'ox_inventory' / 'qb_inventory' / 'quasar_inventory' / 'advanced_quasar_inventory' / 'chezza_inventory' / 'codem_inventory' / 'core_inventory' / 'origen_inventory' / 'ps-inventory' // Custom can be add in the cl_utils.lua!!!
    ProgressBar = '', -- 'progressBars' / 'pogressBar' / 'mythic_progbar' // Custom can be add in the cl_utils.lua!!!
    BrutalNotify = true, -- Buy here: (4€+VAT) https://store.brutalscripts.com | Or set up your own notify >> cl_utils.lua
    PanelControlMode = 'scroll', -- scroll, key
    AllowedJobs = {'ballas', 'triads', 'vagos', 'lostmc', 'families', 'angels'}, -- Set to 'false' to allow it to anybody. | Can only be used if 'BlacklistedJobs' is also set to 'false'.
    BlacklistedJobs = false, -- Set to 'false' to allow it to anybody.
    HandUpAnimation = {'missminuteman_1ig_2', 'handsup_base'},  -- If you use a different hands up animation on your server change these | Anim Dict, Anim Name
    AllowWhileDead = true, -- Allow the menu to be used while dead | true / false

    HeadBag = {
        Use = true,
        AppearInMenu = true,
        BlackFade = true,
        HandsUpRequirement = false,
    },
    
    Hostage = {
        Use = true,
        AppearInMenu = true,
        HandsUpRequirement = true,
        AllowedWeapons = {
            `WEAPON_PISTOL`,
            `WEAPON_COMBATPISTOL`,
        },
        DisableControls = {24,257,25,263,32,34,31,30,45,22,44,37,23,288,289,170,167,73,199,59,71,72,36,47,264,257,140,141,142,143,75},
    },

    PutPlayerInVehicle = {
        Use = true,
        AppearInMenu = true,
        HandsUpRequirement = false,
        CustomVehicleTrunkPos = {
            ["elegy"] = {x = 0.0, y = -2.0, z = 0.5}, -- You can add as many as you wish
        },
    },

    TyreSlash = {
        Use = true,
        AppearInMenu = true,
        AllowedWeapons = {
            `WEAPON_KNIFE`,
            `WEAPON_BOTTLE`,
            `WEAPON_DAGGER`,
            `WEAPON_HATCHET`,
            `WEAPON_MACHETE`,
            `WEAPON_SWITCHBLADE`
        },
    },

    Knockout = {
        Use = true,
        AppearInMenu = true,
        KnockEffect = 'ragdoll', --'animation' or 'ragdoll'
        Cooldown = {use = true, time = 60}, -- time in sec 
        Time = 5, -- time in sec, how much time should be the player passed out
    },

    PullPlayer = {
        Use = true,
        AppearInMenu = true,
    },

    HandCuff = {
        Use = true,
        AppearInMenu = true,
        Freeze = false, -- Do you want to freeze the player while he is cuffed? true / false
        CuffObject = true, -- Do you want to use Cuff Object on the player's hand? true / false
        -- More controls: https://docs.fivem.net/docs/game-references/controls/
        DisableControls = {24,257,25,263,32,34,31,30,45,22,44,37,23,288,289,170,167,73,199,59,71,72,36,47,264,257,140,141,142,143,75}, -- Disabled controls while the player is cuffed.
        Trigger = 'brutal_gang_actions:cuff',
    },

    Rob = {
        Use = true,
        AppearInMenu = true,
        HandsUpRequirement = true,
        AllowedWeapons = {
            `WEAPON_PISTOL`,
            `WEAPON_COMBATPISTOL`,
        },
    },

    Commands = {  -- to turn off a command just simply leave empty the command line, like this: Command = '',
        JobMenu = {
            Command = 'gjobmenu',
            Control = '',  -- Controls list:  https://docs.fivem.net/docs/game-references/input-mapper-parameter-ids/keyboard/
            Suggestion = 'Open Job Menu'
        },

        PutBagOnMyself = {
            Command = 'mebag', 
            Control = '',  -- Controls list:  https://docs.fivem.net/docs/game-references/input-mapper-parameter-ids/keyboard/
            Suggestion = 'Put Bag on your head',
            Item = {'', true, true} -- item name | leave it empty to not use any item, like this: '', remove it when put on head or not, give it when removed from head or not
        },

        PutBagOnOtherPeople = {
            Command = 'bag',
            Control = '',  -- Controls list:  https://docs.fivem.net/docs/game-references/input-mapper-parameter-ids/keyboard/
            Suggestion = 'Put Bag on others head',
            Item = {'', true, true} -- item name | leave it empty to not use any item, like this: '', remove it when put on head or not, give it when removed from head or not
        },

        Hostage = {
            Command = 'hostage',
            Control = '',  -- Controls list:  https://docs.fivem.net/docs/game-references/input-mapper-parameter-ids/keyboard/
            Suggestion = 'Hostage an other people'
        },

        PutPlayerInVehicle = {
            Command = 'putplayerinvehicle',
            Control = '',  -- Controls list:  https://docs.fivem.net/docs/game-references/input-mapper-parameter-ids/keyboard/
            Suggestion = 'Put player in vehicle',
            BlacklistedVehicles = {'bf400'}, -- false =  not in use
        },

        PierceTyre = {
            Command = 'piercetyre',
            Control = '',  -- Controls list:  https://docs.fivem.net/docs/game-references/input-mapper-parameter-ids/keyboard/
            Suggestion = 'Pierce the tyre'
        },

        Knockout = {
            Command = 'knockout',
            Control = '',  -- Controls list:  https://docs.fivem.net/docs/game-references/input-mapper-parameter-ids/keyboard/
            Suggestion = 'Knockout player'
        },

        PullPlayer = {
            Command = 'pull',
            Control = '',  -- Controls list:  https://docs.fivem.net/docs/game-references/input-mapper-parameter-ids/keyboard/
            Suggestion = 'Pull player',
            Item = {'', true, true} -- item name | leave it empty to not use any item, like this: '', remove it when put on head or not, give it when removed from head or not
        },

        HandCuff = {
            Command = 'cuff',
            Control = '',  -- Controls list:  https://docs.fivem.net/docs/game-references/input-mapper-parameter-ids/keyboard/
            Suggestion = 'To cuff a player faster',
            Item = {'', true, true} -- item name | leave it empty to not use any item, like this: '', remove it when put on head or not, give it when removed from head or not
        },

        Rob = {
            Command = 'rob',
            Control = '',  -- Controls list:  https://docs.fivem.net/docs/game-references/input-mapper-parameter-ids/keyboard/
            Suggestion = 'Rob out the player'
        },
    },

    -----------------------------------------------------------
    -----------------------| TRANSLATE |-----------------------
    -----------------------------------------------------------

    Locales = {
        Bag = 'Bag',
        BagDescription = 'Quickly subdue players by placing a bag over their head.',
        Hostage = 'Hostage',
        HostageDescription = 'Take control of the situation by holding a player hostage.',
        PutInVehicle = 'Pick up',
        PutInVehicleDescription = 'Securely place the player in the trunk to transport them.',
        Tyre = 'Slash tyre',
        TyreDescription = 'Disable vehicles by slashing the tire, leaving them stranded.',
        Knockout = 'Knockout',
        KnockoutDescription = 'Knock out players with a swift hit, rendering them unconscious.',
        Pull = 'Pull',
        PullDescription = 'Drag players by a rope tied to their leg, immobilizing them.',
        Cuff = 'Cuff',
        CuffDescription = 'Restrict player movement by cuffing their hands behind their back.',
        Rob = 'Rob',
        RobDescription = 'Rob out a player with a gun or with a knife.',

        Search = 'Searching player'
    },
    
    -- Notify function EDITABLE >> cl_utils.lua
    Notify = { 
        [1] = {"Gang Actions", "There is no player nearby", 5000, "error"},
        [2] = {"Gang Actions", "You need the right weapon", 5000, "error"},
        [3] = {"Gang Actions", "There is no vehicle nearby", 5000, "error"},
        [4] = {"Gang Actions", "The tyre is already slashed", 5000, "error"},
        [5] = {"Gang Actions", "Your hands are not free", 5000, "error"},
        [6] = {"Gang Actions", "This is not a right vehicle for this", 5000, "error"},
        [7] = {"Gang Actions", "Your job is not allove this", 5000, "error"},
        [8] = {"Gang Actions", "You don't have the right item", 5000, "error"},
        [9] = {"Gang Actions", "You have to wait a little", 5000, "error"},
        [10] = {"Gang Actions", "Hands up is needed for this action", 5000, "error"},
        [11] = {"Gang Actions", "You don't have any of the required weapons", 5000, "error"},
        [12] = {"Gang Actions", "None of your weapons have any ammo in them", 5000, "error"},
        [13] = {"Gang Actions", "Your job is on the blacklist.", 5000, "error"},
        [14] = {"Gang Actions", "Your job is not on the allowed list.", 5000, "error"},
    },
    
}
client-utils.lua
ESX = Core
QBCore = Core

-- Buy here: (4€+VAT) https://store.brutalscripts.com
function notification(title, text, time, type)
    if Config.BrutalNotify then
        exports['brutal_notify']:SendAlert(title, text, time, type)
    else
        -- Put here your own notify and set the Config.BrutalNotify to false

        -- Default ESX Notify:
        --TriggerEvent('esx:showNotification', text)

        -- Default QB Notify:
        --TriggerEvent('QBCore:Notify', text, 'info', 5000)

        -- OKOK Notify:
        -- exports['okokNotify']:Alert('GANG ACTIONS', text, time, type, false)

    end
end

function InventoryOpenFunction(type, data)
    if type == 'search_player' then
        local target = data
        if Config.Inventory:lower() == 'ox_inventory' then
            exports.ox_inventory:openInventory('player', target)
        elseif Config.Inventory:lower() == 'qb_inventory' then
            if GetResourceState('qb-inventory') == "started" then
                TriggerServerEvent("brutal_gang_actions:qb-inventory:server:OpenPlayerInventory", target)
            else
                TriggerServerEvent("inventory:server:OpenInventory", "otherplayer", target)
            end  
        elseif Config.Inventory:lower() == 'quasar_inventory' then
            TriggerServerEvent("inventory:server:OpenInventory", "otherplayer", target)
        elseif Config.Inventory:lower() == 'advanced_quasar_inventory' then
            TriggerServerEvent('inventory:server:OpenInventory', 'otherplayer', target, {type = 'all'})
        elseif Config.Inventory:lower() == 'chezza_inventory' then
            TriggerEvent("inventory:openPlayerInventory", target, true)
        elseif Config.Inventory:lower() == 'core_inventory' then
            TriggerServerEvent('core_inventory:server:openInventory', target, 'otherplayer', nil, nil, false)
        elseif Config.Inventory:lower() == 'codem_inventory' then
            TriggerServerEvent("inventory:server:OpenInventory", "otherplayer", target)
        elseif Config.Inventory:lower() == 'origen_inventory' then
            exports.origen_inventory:openInventory('player', target)
        elseif Config.Inventory:lower() == 'ps-inventory' then
            if GetResourceState('ps-inventory') == "started" then
                TriggerServerEvent('ps-inventory:server:OpenInventory', 'otherplayer', target)
            else
                TriggerServerEvent('inventory:server:OpenInventory', 'otherplayer', target)
            end
        end
    end
end

function ProgressBarFunction(time, text)
    if Config.ProgressBar:lower() == 'progressbars' then --LINK: https://github.com/EthanPeacock/progressBars/releases/tag/1.0
        exports['progressBars']:startUI(time, text)
    elseif Config.ProgressBar:lower() == 'mythic_progbar' then -- LINK: https://github.com/HarryElSuzio/mythic_progbar
        TriggerEvent("mythic_progbar:client:progress", {name = "policejobduty", duration = time, label = text, useWhileDead = false, canCancel = false})
    elseif Config.ProgressBar:lower() == 'pogressbar' then -- LINK: https://github.com/SWRP-PUBLIC/pogressBar
        exports['pogressBar']:drawBar(time, text)
    end
end

function OpenMenuUtil()
    -- Here you can add a trigger to hide your HUD system

    Citizen.CreateThread(function()
        while InMenu do
            N_0xf4f2c0d4ee209e20() -- it's disable the AFK camera zoom
            Citizen.Wait(15000)
        end 
    end)

    DisplayRadar(false)
end

function CloseMenuUtil()
    -- Here you can add a trigger to enable your HUD system

    DisplayRadar(true)
end

function HandCuffedEvent(cuffed)
    if cuffed then
        --exports['qs-smartphone']:canUsePhone(false)
        --exports["lb-phone"]:ToggleDisabled(true)
    else
        --exports['qs-smartphone']:canUsePhone(true)
        --exports["lb-phone"]:ToggleDisabled(false)
    end
end

function isPlayerDead(ClosesPlayerId)
    if GetResourceState("brutal_ambulancejob") == "started" then
        return exports.brutal_ambulancejob:IsDead(ClosesPlayerId)
    elseif GetResourceState("wasabi_ambulance") == "started" then
        return exports.wasabi_ambulance:isPlayerDead(ClosesPlayerId)
    else
        if IsEntityDead(ClosesPlayerId) then
            return true
        else
            return false
        end
    end
end
client-core.lua
 Core = nil

if Config['Core']:upper() == 'ESX' then
    local _esx_ = 'new' -- 'new' / 'old'

    if _esx_ then
        Core = exports['es_extended']:getSharedObject()
    else
        while Core == nil do
            TriggerEvent('esx:getSharedObject', function(obj) Core = obj end)
            Citizen.Wait(0)
        end
    end

    LoadedEvent = 'esx:playerLoaded'
    onPlayerDeath = 'esx:onPlayerDeath'
    JobUpdateEvent = 'esx:setJob'
    TSCB = Core.TriggerServerCallback

    function GetPlayerJobDatas()
        return Core.GetPlayerData().job
    end

    function GetClosestPlayerFunction()
        return Core.Game.GetClosestPlayer()
    end

    function GetClosestVehicleFunction(coords, modelFilter)
        return Core.Game.GetClosestVehicle(coords, modelFilter)
    end

elseif Config['Core']:upper() == 'QBCORE' then
    Core = exports['qb-core']:GetCoreObject()

    LoadedEvent = 'QBCore:Client:OnPlayerLoaded'
    JobUpdateEvent = 'QBCore:Client:OnGangUpdate'
    TSCB = Core.Functions.TriggerCallback

    function GetPlayerJobDatas()
        return Core.Functions.GetPlayerData().gang
    end

    function GetClosestPlayerFunction()
        return Core.Functions.GetClosestPlayer()
    end

    function GetClosestVehicleFunction(coords, modelFilter)
        return Core.Functions.GetClosestVehicle(coords, modelFilter)
    end
    
end
server-core.lua
Core = nil

if Config['Core']:upper() == 'ESX' then
    local _esx_ = 'new' -- 'new' / 'old'
    
    if _esx_ == 'new' then
        Core = exports['es_extended']:getSharedObject()
    else
        Core = nil
        TriggerEvent('esx:getSharedObject', function(obj) Core = obj end)
        while Core == nil do
            Citizen.Wait(0)
        end
    end

    RESCB = Core.RegisterServerCallback
    GETPFI = Core.GetPlayerFromId
    RUI = Core.RegisterUsableItem
    UsersDataTable = 'users'
    UserIdentifierValue = 'identifier'

    function GetIdentifier(source)
        local xPlayer = GETPFI(source)
        while xPlayer == nil do
            Citizen.Wait(1000)
            xPlayer = GETPFI(source) 
        end
        return xPlayer.identifier
    end

    function GetPlayerByIdentifier(identifier)
        return Core.GetPlayerFromIdentifier(identifier)
    end

    function RemoveItem(source, item, amount)
        local xPlayer = GETPFI(source)
        if item ~= '' then 
            if _esx_ == 'new' then
                xPlayer.removeInventoryItem(item, amount)
            else
                if string.sub(item, 0, 6):lower() == 'weapon' then
                    xPlayer.removeWeapon(item)
                else
                    xPlayer.removeInventoryItem(item, amount)
                end
            end
        end    
    end

    function AddItem(source, item, count)
        local xPlayer = GETPFI(source)
        if item ~= '' then 
            if _esx_ == 'new' then
                xPlayer.addInventoryItem(item, count)
            else
                if string.sub(item, 0, 6):lower() == 'weapon' then
                    xPlayer.addWeapon(item, 90)
                else
                    xPlayer.addInventoryItem(item, count)
                end
            end
        end    
    end

    function GetItemCount(source, item)
        local xPlayer = GETPFI(source)

        if xPlayer.getInventoryItem(item) == nil then
            print("^1PROBLEM!^7 The ^3" ..item.. "^7 item is not created.")
            return 0
        end

        if _esx_ == 'new' then
            return xPlayer.getInventoryItem(item).count
        else
            if string.sub(item, 0, 6):lower() == 'weapon' then
                local loadoutNum, weapon = xPlayer.getWeapon(item:upper())

                if weapon then
                    return true
                else
                    return false
                end
            else
                return xPlayer.getInventoryItem(item).count
            end
        end
    end

    function GetAccountMoney(source,account)
        local xPlayer = GETPFI(source)
        if account == 'bank' then
            return xPlayer.getAccount(account).money
        elseif account == 'money' then
            return xPlayer.getMoney()
        end
    end

    function AddMoneyFunction(source, account, amount)
        local xPlayer = GETPFI(source)
        if account == 'bank' then
            xPlayer.addAccountMoney('bank', amount)
        elseif account == 'money' then
            xPlayer.addMoney(amount)
        end
    end

    function RemoveAccountMoney(source, account, amount)
        local xPlayer = GETPFI(source)
        if account == 'bank' then
            xPlayer.removeAccountMoney('bank', amount)
        elseif account == 'money' then
            xPlayer.removeMoney(amount)
        end
    end

elseif Config['Core']:upper() == 'QBCORE' then

    Core = exports['qb-core']:GetCoreObject()
    
    RESCB = Core.Functions.CreateCallback
    GETPFI = Core.Functions.GetPlayer
    RUI = Core.Functions.CreateUseableItem
    UsersDataTable = 'players'
    UserIdentifierValue = 'citizenid'

    function GetIdentifier(source)
        local xPlayer = GETPFI(source)
        while xPlayer == nil do
            Citizen.Wait(1000)
            xPlayer = GETPFI(source) 
        end
        return xPlayer.PlayerData.citizenid
    end

    function GetPlayerByIdentifier(identifier)
        return Core.Functions.GetPlayerByCitizenId(identifier)
    end

    function RemoveItem(source, item, amount)
        local xPlayer = GETPFI(source)
        if item ~= '' then 
            xPlayer.Functions.RemoveItem(item, amount)
        end    
    end

    function AddItem(source, item, count)
        local xPlayer = GETPFI(source)
        if item ~= '' then 
            xPlayer.Functions.AddItem(item, count)
        end    
    end

    function GetItemCount(source, item)
        local xPlayer = GETPFI(source)
        local items = xPlayer.Functions.GetItemByName(item)
        local item_count = 0
        if items ~= nil then
            item_count = items.amount
        else
            item_count = 0
        end
        return item_count
    end

    function SetHandCuffMetadata(source, isHandcuffed)
        local xPlayer = GETPFI(source)
        xPlayer.Functions.SetMetaData('ishandcuffed', isHandcuffed)
    end

    
    function GetPlayerDeathMetaData(source)
        local xPlayer = GETPFI(source)
        return xPlayer.PlayerData.metadata['isdead']
    end

    function GetAccountMoney(source, account)
        local xPlayer = GETPFI(source)
        if account == 'bank' then
            return xPlayer.PlayerData.money.bank
        elseif account == 'money' then
            return xPlayer.PlayerData.money.cash
        end
    end

    function AddMoneyFunction(source, account, amount)
        local xPlayer = GETPFI(source)
        if account == 'bank' then
            xPlayer.Functions.AddMoney('bank', amount)
        elseif account == 'money' then
            xPlayer.Functions.AddMoney('cash', amount)
        end
    end

    function RemoveAccountMoney(source, account, amount)
        local xPlayer = GETPFI(source)
        if account == 'bank' then
            xPlayer.Functions.RemoveMoney('bank', amount)
        elseif account == 'money' then
            xPlayer.Functions.RemoveMoney('cash', amount)
        end
    end

end

Last updated

Was this helpful?