Config

All configuration files are located in config/*.lua

Framework (config/framework.lua)

ESX Configuration

Config.Framework.ESX = {
    resourceName = 'es_extended',
    export = 'getSharedObject',
    
    jobTypeMapping = {
        job = 'job',
        secondjob = 'hiddenjob',
    },
    
    events = {
        jobChanged = 'esx:setJob',
        secondJobChanged = 'esx:setHiddenJob',
    },
    
    database = {
        playerTable = 'users',
        identifierColumn = 'identifier',
        accountsColumn = 'accounts',
        firstNameColumn = 'firstname',
        lastNameColumn = 'lastname',
        jobColumn = 'job',
        jobGradeColumn = 'job_grade',
        secondJobColumn = 'hiddenjob',
        secondJobGradeColumn = 'hiddenjob_grade',
    },
    
    -- Banking provider configuration
    banking = {
        system = 'esx_addonaccount', -- Options: 'esx_addonaccount', 'database', 'custom'
        
        esx_addonaccount = {
            resourceName = 'esx_addonaccount',
            getAccountEvent = 'esx_addonaccount:getSharedAccount'
        },
        
        database = {
            tableName = 'society_accounts',
            accountColumn = 'account_name',
            balanceColumn = 'balance',
            labelColumn = 'label'
        },
        
        custom = {
            resourceName = 'your_custom_banking',
            getMoneyExport = 'getSocietyMoney',
            addMoneyExport = 'addSocietyMoney',
            removeMoneyExport = 'removeSocietyMoney',
            createAccountExport = 'createSocietyAccount'
        }
    }
}

QBCore Configuration

Config.Framework.QBCore = {
    resourceName = "qb-core",
    export = "GetCoreObject",
    
    jobTypeMapping = {
        job = 'job',
        secondjob = 'gang'
    },
    
    events = {
        jobChanged = 'QBCore:Server:OnJobUpdate',
        secondJobChanged = 'QBCore:Server:OnSecondJobUpdate',
    },
    
    database = {
        playerTable = 'players',
        identifierColumn = 'citizenid',
        accountsColumn = 'accounts',
        firstNameColumn = 'firstname',
        lastNameColumn = 'lastname',
        jobColumn = 'job',
        jobGradeColumn = 'job_grade',
        secondJobColumn = 'gang',
        secondJobGradeColumn = 'gang_grade',
    },
    
    banking = {
        system = 'qb_management', -- Options: 'qb_management', 'qb_bossmenu', 'database', 'custom'
        
        qb_management = {
            resourceName = 'qb-management',
            tableName = 'management_funds',
            jobColumn = 'job_name',
            amountColumn = 'amount',
            typeColumn = 'type',
            typeValue = 'boss'
        },
        
        qb_bossmenu = {
            resourceName = 'qb-bossmenu',
            tableName = 'bossmenu',
            jobColumn = 'job_name',
            amountColumn = 'amount'
        }
    }
}

Permissions (config/permissions.lua)

Default Permissions

Configure defualt permissions for each grade level:

Config.Permissions.Default = {
    [0] = {}, -- No permissions for grade 0
    [1] = {'view_balance'},
    [2] = {'view_balance', 'view_transactions'},
    [3] = {'view_balance', 'view_transactions', 'manage_employees'},
    [4] = {'view_balance', 'view_transactions', 'manage_employees', 'withdraw_money', 'view_banking_stats'},
    [5] = {'view_balance', 'view_transactions', 'manage_employees', 'withdraw_money', 'view_banking_stats', 'set_bonus', 'buy_upgrade', 'manage_missions', 'manage_notes', 'view_logs'}
}

Society-Specific Permissions

Override default permissions for specific societies:

Config.Permissions.Societies = {
    ['police'] = {
        [0] = {},
        [1] = {'view_balance'},
        [2] = {'view_balance', 'view_transactions'},
        [3] = {'view_balance', 'view_transactions', 'manage_employees', 'manage_missions'},
        [4] = {'view_balance', 'view_transactions', 'manage_employees', 'withdraw_money', 'view_banking_stats', 'manage_missions', 'manage_notes'}
    },
    ['ambulance'] = {
        [1] = {'view_balance', 'manage_notes'},
        [2] = {'view_balance', 'view_transactions', 'manage_notes'},
        [3] = {'view_balance', 'view_transactions', 'manage_employees', 'manage_notes', 'manage_missions'}
    }
}

Available Permission Types

Config.Permissions.Types = {
    ['view_balance'] = {
        label = 'View Balance',
        icon = 'eye',
        description = 'View account balance'
    },
    ['manage_employees'] = {
        label = 'Manage Employees',
        icon = 'users',
        description = 'Hire, fire, and manage employees'
    },
    ['withdraw_money'] = {
        label = 'Withdraw Money',
        icon = 'circle-dollar-sign',
        description = 'Withdraw money from account'
    },
    ['set_bonus'] = {
        label = 'Set Bonus',
        icon = 'gift',
        description = 'Set bonuses for employees'
    },
    ['view_transactions'] = {
        label = 'View Transactions',
        icon = 'history',
        description = 'View transaction history'
    },
    ['view_banking_stats'] = {
        label = 'Banking Statistics',
        icon = 'chart-bar',
        description = 'View financial statistics'
    },
    ['buy_upgrade'] = {
        label = 'Buy Upgrades',
        icon = 'cogs',
        description = 'Purchase organization upgrades'
    },
    ['manage_missions'] = {
        label = 'Manage Missions',
        icon = 'crosshair',
        description = 'Create and manage missions'
    },
    ['manage_notes'] = {
        label = 'Manage Notes',
        icon = 'sticky-note',
        description = 'Create, edit and delete notes'
    },
    ['view_logs'] = {
        label = 'View History',
        icon = 'file-alt',
        description = 'View action history'
    }
}

Boss Grades

Define which grade names are considered boss ranks:

Config.Permissions.BossGrades = {
    ['boss'] = true,
    ['chief'] = true,
    ['captain'] = true
}

Configure the tablet navigation menu:

Config.Navigation = {
    {
        id = 'dashboard',
        label = 'Dashboard',
        path = '/dashboard',
        icon = 'home'
    },
    {
        id = 'employees',
        label = 'Employees',
        path = '/employees',
        icon = 'users'
    },
    {
        id = 'banking',
        label = 'Banking',
        path = '/banking',
        icon = 'dollar-sign'
    },
    {
        id = 'upgrades',
        label = 'Upgrades',
        path = '/upgrades',
        icon = 'circle-fading-arrow-up'
    },
    {
        id = 'missions',
        label = 'Missions',
        path = '/missions',
        icon = 'crosshair'
    },
    {
        id = 'notes',
        label = 'Notes',
        path = '/notes',
        icon = 'database'
    },
    {
        id = 'history',
        label = 'History',
        path = '/history',
        icon = 'history',
        disabled = { 'mafia', 'cartel' } -- Disable for specific jobs
    }
}

Upgrades (config/upgrades.lua)

Configure available upgrades for organizations:

Config.Upgrades = {
    armory = {
        label = 'Armory',
        description = 'Increases weapon storage capacity',
        icon = "shield",
        category = "security",
        levels = {
            [1] = { cost = 550000, slots = 50 },
            [2] = { cost = 900000, slots = 65 },
            [3] = { cost = 1500000, slots = 80 },
            [4] = { cost = 2800000, slots = 100 },
            [5] = { cost = 7200000, slots = 500 }
        },
        baseSlots = 25,
        unlockLevel = 1 -- Society level required to unlock
    },
    
    storage = {
        label = 'Storage',
        description = 'Increases item storage capacity',
        icon = "package",
        category = "storage",
        levels = {
            [1] = { cost = 1000000, slots = 50 },
            [2] = { cost = 2000000, slots = 65 },
            [3] = { cost = 3000000, slots = 80 },
            [4] = { cost = 7000000, slots = 110 },
            [5] = { cost = 10000000, slots = 200 }
        },
        baseSlots = 30,
        unlockLevel = 1
    },
    
    garage = {
        label = 'Garage',
        description = 'Increases number of parking spaces',
        icon = "car",
        category = "transport",
        levels = {
            [1] = { cost = 4000000, slots = 1 },
            [2] = { cost = 2000000, slots = 2 },
            [3] = { cost = 2000000, slots = 3 },
            [4] = { cost = 2000000, slots = 4 },
            [5] = { cost = 2000000, slots = 5 }
        },
        baseSlots = 0,
        unlockLevel = 2
    }
}

Upgrade Categories

Config.UpgradeCategories = {
    security = {
        label = 'Security',
        icon = "shield",
        color = "error"
    },
    storage = {
        label = 'Storage',
        icon = "package",
        color = "primary"
    },
    business = {
        label = 'Business',
        icon = "briefcase",
        color = "success"
    },
    management = {
        label = 'Management',
        icon = "settings",
        color = "warning"
    },
    comfort = {
        label = 'Comfort',
        icon = "home",
        color = "info"
    },
    transport = {
        label = 'Transport',
        icon = "truck",
        color = "secondary"
    }
}

Zones (config/zones.lua)

Configure physical zones where players can access the society menu:

Config.MarkerSettings = {
    type = 1,
    width = 1.0,
    height = 0.5,
    color = { r = 0, g = 255, b = 0, a = 100 }
}

Config.Zones = {
    {
        coords = vec3(440.967, -978.290, 29.758), -- LSPD
        job = 'police',
        requiredGrade = 0,
        type = 'job', -- 'job' or 'secondjob'
    },
    {
        coords = vec3(298.745, -584.012, 43.291), -- Pillbox Hospital
        job = 'ambulance',
        requiredGrade = 0,
        type = 'job',
    },
    {
        coords = vec3(-1096.827, -833.065, 37.680), -- Gang HQ
        job = 'ballas',
        requiredGrade = 0,
        type = 'secondjob',
    }
}

NUI (config/nui.lua)

Configure the tablet appearance and animations:

Config.Nui = {
    tablet = {
        model = 'prop_cs_tablet',
        bone = 28422,
        offset = {
            pos = vector3(0.0, 0.0, 0.03),
            rot = vector3(0.0, 0.0, 0.0)
        },
        animation = {
            dict = 'amb@world_human_seat_wall_tablet@female@base',
            name = 'base',
            flag = 49
        }
    }
}

Last updated