Accessible files

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

config.lua
Config = {
    Core = 'ESX',  -- 'ESX' / 'QBCORE' | Other core setting on the 'core' folder.
    TextUI = 'ox_lib', -- 'ox_lib' / 'okokTextUI' / 'ESXTextUI' / 'QBDrawText' // 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
    SteamName = true, -- true = Steam name | false = character name

    Marker = {use = true, marker = 20, bobUpAndDown = false, rotate = false, size = {0.3, 0.2, 0.2}, rgb = {15, 100, 210}},
    DisableControls = {22}, -- These controls will blocked during the boxing match. (Except: Key Bindings)
    EnableSounds = false, --Enable additional sounds while players play bowling

    Blips = {
        {label = 'Glory Bowls', coords = vector3(-1668.3221, -1064.3582, 13.1500), color = 26, sprite = 103, size = 0.8},
        {label = 'BAGZ Bowls', coords = vector3(-144.3393, -251.9991, 44.0516), color = 26, sprite = 103, size = 0.8},
        -- more can be added
    },

    BowlingPlaces = {                                                           
       -- █▀▄▀█ ▄▀█ █▀█ █ █ ▄▀█ █   █   ▄▄ █▀█ ▄▀█ █ █▀▄
        --█ ▀ █ █▀█ █▀▀ ▀▀█ █▀█ █▄▄ █▄▄    █▀▀ █▀█ █ █▄▀
        -- PAID MLO, buy from there: https://fivem.map4all-shop.com/package/5294850
                                                                   
        {
            Menu = vector3(-1662.1301, -1066.4021, 13.0575),
            Throw = vector4(-1661.4106, -1067.0078, 13.0575, 230.00),
            BowlingPins = vector4(-1649.944, -1076.613, 13.07, 250.0),
        },

        {
            Menu = vector3(-1663.8274, -1068.3940, 13.0575),
            Throw = vector4(-1663.0830, -1068.9514, 13.0575, 230.00),
            BowlingPins = vector4(-1651.612, -1078.571, 13.07, 250.0),
        },

        {
            Menu = vector3(-1665.2092, -1070.0406, 13.0574),
            Throw = vector4(-1664.4270, -1070.5774, 13.0574, 230.00),
            BowlingPins = vector4(-1652.978, -1080.2278, 13.07, 250.0),
        },

        {
            Menu = vector3(-1666.8661, -1072.0658, 13.0574),
            Throw = vector4(-1666.2365, -1072.5785, 13.0575, 230.00),
            BowlingPins = vector4(-1654.646, -1082.20, 13.07, 250.0),
        },
             
                                  
        --█▀▀ ▄▀█ █▄▄ ▀█ ▄▄ █▀▀ █▀█ █▀▀ █▀▀
        --█▄█ █▀█ █▄█ █▄    █▀  █▀▄ ██▄ ██▄
        -- FREE MLO, download from there: https://forum.cfx.re//uploads/short-url/yFoBzICYQRZsNHaVlFYTDKdiKf3.rar

        {
            Menu = vector3(-145.9858, -260.1666, 44.1441),
            Throw = vector4(-146.5048, -261.6450, 44.1441, 160.00),
            BowlingPins = vector4(-152.588, -278.86, 44.164, 180.0),
        },

        {
            Menu = vector3(-149.0443, -259.1628, 44.1441),
            Throw = vector4(-149.4865, -260.5309, 44.1441, 160.00),
            BowlingPins = vector4(-155.567, -277.789, 44.164, 180.0),
        },

        {
            Menu = vector3(-151.5322, -258.2912, 44.1441),
            Throw = vector4(-152.1418, -259.6562, 44.1441, 160.00),
            BowlingPins = vector4(-158.152, -276.909, 44.164, 180.0),
        },

        {
            Menu = vector3(-154.6945, -257.1477, 44.1441),
            Throw = vector4(-155.1330, -258.5301, 44.1441, 160.00),
            BowlingPins = vector4(-161.179, -275.844, 44.164, 180.0),
        },

        {
            Menu = vector3(-158.3694, -255.9084, 44.1441),
            Throw = vector4(-158.9667, -257.2711, 44.1441, 160.00),
            BowlingPins = vector4(-164.988, -274.506, 44.164, 180.0),
        },

        {
            Menu = vector3(-161.5182, -254.8898, 44.1441),
            Throw = vector4(-161.9705, -256.2455, 44.1441, 160.00),
            BowlingPins = vector4(-167.93, -273.431, 44.164, 180.0),
        },

        {
            Menu = vector3(-164.0538, -253.9752, 44.1441),
            Throw = vector4(-164.6469, -255.2912, 44.1441, 160.00),
            BowlingPins = vector4(-170.578, -272.434, 44.164, 180.0),
        },

        {
            Menu = vector3(-167.1449, -252.9530, 44.1441),
            Throw = vector4(-167.5867, -254.1502, 44.1441, 160.00),
            BowlingPins = vector4(-173.614, -271.477, 44.164, 180.0),
        },
    },
   
    -----------------------------------------------------------
    -----------------------| TRANSLATE |-----------------------
    -----------------------------------------------------------

    MoneyForm = '$', -- Money form

    MenuOpen = {'[E] - Bowling Menu', 38}, -- Label, control
    
    -- Notify function EDITABLE >> cl_utils.lua
    Notify = { 
        [1] = {"Bowling", "The Party is full!", 5000, "error"},
        [2] = {"Bowling", "You have been kicked! (Not enough money)", 5000, "error"},
        [3] = {"Bowling", "You are already in an another game.", 5000, "error"},
        [4] = {"Bowling", "You got:", 5000, "info"},
        [5] = {"Bowling", "You paid:", 5000, "info"},
        [6] = {"Bowling", "You have been kicked out from the game!", 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
        SetNotificationTextEntry("STRING")
        AddTextComponentString(text)
        DrawNotification(0,1)

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

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

        -- OKOK Notify:
        -- exports['okokNotify']:Alert('POLICE JOB',title, text, time, type, false)

    end
end

function TextUIFunction(type, text)
    if type == 'open' then
        if Config.TextUI:lower() == 'ox_lib' then
            lib.showTextUI(text)
        elseif Config.TextUI:lower() == 'okoktextui' then
            exports['okokTextUI']:Open(text, 'darkblue', 'right')
        elseif Config.TextUI:lower() == 'esxtextui' then
            ESX.TextUI(text)
        elseif Config.TextUI:lower() == 'qbdrawtext' then
            exports['qb-core']:DrawText(text,'left')
        end
    elseif type == 'hide' then
        if Config.TextUI:lower() == 'ox_lib' then
            lib.hideTextUI()
        elseif Config.TextUI:lower() == 'okoktextui' then
            exports['okokTextUI']:Close()
        elseif Config.TextUI:lower() == 'esxtextui' then
            ESX.HideUI()
        elseif Config.TextUI:lower() == 'qbdrawtext' then
            exports['qb-core']:HideText()
        end
    end
end

function DisableMinimap()
    DisplayRadar(false)
    -- Here you can add a trigger to hide your HUD system
end

function EnableMinimap()
    DisplayRadar(true)
    -- Here you can add a trigger to enable your HUD system
end

function isEntityDeadCheck()
    local isDead = false
    if GetResourceState('brutal_ambulancejob') == "started" then
        isDead = exports.brutal_ambulancejob:IsDead()
    elseif (GetEntityHealth(PlayerPedId()) <= PlayerDiedHealth) then
        isDead = true
    end
    return isDead
end
server-utils.lua
Does not exist.
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'
    JobUpdateEvent = 'esx:setJob'
    PlayerDiedHealth = 0
    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:OnJobUpdate'
    PlayerDiedHealth = 100
    TSCB = Core.Functions.TriggerCallback

    function GetPlayerJobDatas()
        return Core.Functions.GetPlayerData().job
    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

    function GetIdentifier(source)
        local xPlayer = GETPFI(source)
        return xPlayer.identifier
    end

    function GetPlayerByIdentifier(identifier)
        return Core.GetPlayerFromIdentifier(identifier)
    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

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

        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 RemoveItem(source, item, amount)
        local xPlayer = GETPFI(source)
        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

    function AddItem(source, item, count)
        local xPlayer = GETPFI(source)
        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

    function GetPlayerNameFunction(source)
        local name
        if Config.SteamName then
            name = GetPlayerName(source)
        else
            local xPlayer = GETPFI(source)
            name = xPlayer.getName() or 'No Data'
        end
        return name
    end

    function GetPlayerSex(source)
        local xPlayer = GETPFI(source)
        return xPlayer.get("sex")
    end

    function GetPlayerJob(source)
        local xPlayer = GETPFI(source)
        return xPlayer.job.name
    end

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

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

    function GetIdentifier(source)
        local xPlayer = GETPFI(source)
        return xPlayer.PlayerData.citizenid
    end

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

    function GetPlayersFunction()
        return Core.Functions.GetPlayers()
    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 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 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

    function RemoveItem(source, item, amount)
        local xPlayer = GETPFI(source)
        xPlayer.Functions.RemoveItem(item, amount)
    end

    function AddItem(source, item, count)
        local xPlayer = GETPFI(source)
        xPlayer.Functions.AddItem(item, count)
    end

    function GetPlayerNameFunction(source)
        local name
        if Config.SteamName then
            name = GetPlayerName(source)
        else
            local xPlayer = GETPFI(source)
            name = xPlayer.PlayerData.charinfo.firstname..' '..xPlayer.PlayerData.charinfo.lastname
        end
        return name
    end

    function GetPlayerSex(source)
        local xPlayer = GETPFI(source)
        local sex = xPlayer.PlayerData.charinfo.gender

        if sex == 0 then
            sex = 'm'
        else
            sex = 'f'
        end

        return sex
    end

    function GetPlayerJob(source)
        local xPlayer = GETPFI(source)
        return xPlayer.PlayerData.job.name
    end

end

Last updated