HEX
HexscriptsVersion 3.0Moneywash

Configurations

Here you will get all configurations & open source files that are included within this script.

Config Files

Config = {}

Config.Debug = false -- Set to true to enable debug messages in the console
Config.Locale = 'automatic' -- automatic, en, de, es, fr, it, nl, pl, pt, tr, ar
Config.Framework = 'automatic' -- automatic, esx, qbcore, standalone

Config.ServerName = 'HEXSCRIPTS'

Config.Positions = {
    {
        coords = vector3(556.1789, 2664.1492, 42.1916),
        percent = 0.90,
        minAmount = 100,
        blackMoneyName = 'black_money',
        moneyName = 'money',
        item = {
            need = true,
            name = 'phone',
            amount = 1
        },
        marker = {
            type = 0,
            drawDistance = 50.0,
            scale = vector3(0.5, 0.5, 0.5),
            color = {
                red = 255,
                green = 46,
                blue = 58,
                alpha = 100
            },
            moveUpAndDown = false,
            rotate = true
        },
        wash = {
            instant = false, -- If true, money washing will be instant. If false, a progress bar will be shown

            -- only if instant is false
            time = 60, -- Time in seconds for the progress bar
            timePerAmount = 1000, -- per amount of money to wash will be added the time additionally
            
            sphere = { -- important colors are only in the distance between 0 and 1.0
                red = 0,
                green = 0,
                blue = 0,
                alpha = 0.5
            }
        }
    }
}

Client Open Source Files

if Config.Framework == 'automatic' then
    if GetResourceState('es_extended') == 'started' then
        Config.Framework = 'esx'
    elseif GetResourceState('qb-core') == 'started' then
        Config.Framework = 'qbcore'
    else
        Config.Framework = 'standalone'
    end
end

function DrawHelpNotify(message)
    if GetResourceState('hex_final_hud') == 'started' then
        exports['hex_final_hud']:HelpNotify(message)
    elseif GetResourceState('hex_2_hud') == 'started' then
        exports['hex_2_hud']:HelpNotify(message)
    elseif GetResourceState('hex_future_hud') == 'started' then
        exports['hex_future_hud']:HelpNotify(message)
    elseif GetResourceState('hex_1_hud') == 'started' then
        exports['hex_1_hud']:HelpNotify(message)
    elseif GetResourceState('hex_hud_prem') == 'started' then
        exports['hex_hud_prem']:HelpNotify(message)
    elseif GetResourceState('hex_4_hud') == 'started' then
        exports['hex_4_hud']:HelpNotify(message)
    else
        SetTextComponentFormat('STRING')
        AddTextComponentString(message)
        DisplayHelpTextFromStringLabel(0, 0, 1, -1)
    end
end

function Notify(title, message, notifyType, timeout)
    if timeout == nil then timeout = 5000 end
    if notifyType == nil then notifyType = 'info' end
    
    if GetResourceState('hex_final_hud') == 'started' then
        exports['hex_final_hud']:Notify(title, message, notifyType, timeout)
    elseif GetResourceState('hex_2_hud') == 'started' then
        exports['hex_2_hud']:Notify(title, message, notifyType, timeout)
    elseif GetResourceState('hex_future_hud') == 'started' then
        exports['hex_future_hud']:Notify(title, message, notifyType, timeout)
    elseif GetResourceState('hex_1_hud') == 'started' then
        exports['hex_1_hud']:Notify(title, message, notifyType, timeout)
    elseif GetResourceState('hex_hud_prem') == 'started' then
        exports['hex_hud_prem']:Notify(title, message, notifyType, timeout)
    elseif GetResourceState('hex_hud') == 'started' then
        exports['hex_hud']:Notify(title, message, notifyType, timeout)
    elseif GetResourceState('hex_4_hud') == 'started' then
        exports['hex_4_hud']:Notify(title, message, notifyType, timeout)
    else
        print(('Notify: %s, %s, %s, %s'):format(title, message, notifyType, timeout))
    end
end

function DrawText(txt)
    SetTextFont(4)
    SetTextScale(0.0, 0.5)
    SetTextColour(255, 255, 255, 255)
    SetTextOutline()
    SetTextCentre(true)
    BeginTextCommandDisplayText('STRING')
    AddTextComponentSubstringPlayerName(txt)
    EndTextCommandDisplayText(0.5, 0.95)
end

Server Open Source Files

if Config.Framework == 'automatic' then
    if GetResourceState('es_extended') == 'started' then
        Config.Framework = 'esx'
    elseif GetResourceState('qb-core') == 'started' then
        Config.Framework = 'qbcore'
    else
        Config.Framework = 'standalone'
    end
end