# Config Preview

## Config

```lua
Config = {}

-- Framework Detection
Config.Framework = 'auto' -- 'esx', 'qbcore', 'qbox', 'auto'
Config.Notify = 'none' -- 'esx', 'qbcore', 'qbox', 'custom',

Config.AdminPermissions = {
    'admin',
    'god',
    'superadmin',
    'mod'
}
-- Job Center Configuration
Config.JobCenterLocation = vector4(-265.15, -965.65, 31.22, 200.47)

Config.Interaction = '3dtext' -- '3dtext', 'oxtarget', 'qbtarget', 'oxlib', 'custom'

Config.JobCenterBlip = {
    enable = true,
    sprite = 407, 
    color = 2,   
    scale = 0.7,  
    name = "Job Center",
    shortRange = true, 
}
-- NPC Configuration
Config.NPC = {
    model = 'a_m_m_business_01',
    scenario = 'WORLD_HUMAN_CLIPBOARD'
}


-- Phone System Configuration
Config.SendPhoneMail = false -- Enable sending job application updates via phone mail
Config.PhoneSystem = 'none' -- 'qbcore', 'qbox', 'codem', 'qs-smartphone-pro', 'gks', 'lb-phone' , 'none'

-- Cooldown Configuration (in minutes)
Config.EnableCooldown = true -- Enable/disable job change cooldown
Config.JobChangeCooldown = 60 -- 1 hour cooldown

-- commands will only work if EnableCooldown is true
Config.Commands = {
    checkcooldown = 'checkcooldown', -- Admin Command to check remaining cooldown time
    resetjobcooldown = 'resetjobcooldown' -- Admin command to reset a player's job change cooldown
}

Config.Jobs = {
    ['police'] = {
        jobtitle = 'Police Officer',
        jobdesc = 'Keep the city safe and enforce laws. Patrol the streets and respond to emergency calls.',
        job = 'police',
        payout = 250,
        joblocation = 'Mission Row Police Department',
        jobcoords = vector3(428.23, -981.07, 30.71),
        jobrequirements = {'Clean criminal record', 'Passed police academy', 'Age 21+'},
        jobbenefits = {'Health insurance', 'Pension plan', 'Access to police vehicles'},
        whitelist = true,
        jobicon = 'fa-solid fa-shield-halved'
    },
    ['taxi'] = {
        jobtitle = 'Taxi Driver',
        jobdesc = 'Drive citizens around the city and earn money from fares.',
        job = 'taxi',
        payout = 150,
        joblocation = 'Downtown Cab Company',
        jobcoords = vector3(903.32, -170.55, 74.08),
        jobrequirements = {'Valid driver license', 'Clean driving record'},
        jobbenefits = {'Flexible working hours', 'Company vehicle provided'},
        whitelist = false,
        jobicon = 'fa-solid fa-taxi'
    },
    ['mechanic'] = {
        jobtitle = 'Mechanic',
        jobdesc = 'Repair and maintain vehicles for customers across the city.',
        job = 'mechanic',
        payout = 200,
        joblocation = 'LS Customs Garage',
        jobcoords = vector3(-342.29, -133.97, 39.01),
        jobrequirements = {'Basic mechanical knowledge', 'Tool handling experience'},
        jobbenefits = {'Tool allowance', 'Training provided', 'Career progression'},
        whitelist = true,
        jobicon = 'fa-solid fa-wrench'
    },
    ['garbage'] = {
        jobtitle = 'Garbage Collector',
        jobdesc = 'Help keep the city clean and earn cash while doing it!',
        job = 'garbage',
        payout = 120,
        joblocation = 'Waste Processing Plant',
        jobcoords = vector3(-322.24, -1545.87, 31.02), 
        jobrequirements = {'Valid driver license'},
        jobbenefits = {'Steady pay', 'Make a difference'},
        whitelist = false,
        jobicon = 'fa-solid fa-trash'
    },
    ['electrician'] = {
        jobtitle = 'Electrician',
        jobdesc = 'Work with electrical systems and power distribution.',
        job = 'electrician',
        payout = 180,
        joblocation = 'Power Plant',
        jobcoords = vector3(2831.69, 1468.38, 24.59),
        jobrequirements = {'Electrical knowledge', 'Safety training'},
        jobbenefits = {'Good pay', 'Steady work'},
        whitelist = false,
        jobicon = 'fa-solid fa-bolt'
    },
    ['lumberjack'] = {
        jobtitle = 'Lumberjack',
        jobdesc = 'Harvest timber and process wood products.',
        job = 'lumberjack',
        payout = 160,
        joblocation = 'Sawmill',
        jobcoords = vector3(-517.34, 5371.19, 74.61),
        jobrequirements = {'Physical fitness', 'Equipment training'},
        jobbenefits = {'Outdoor work', 'Physical activity'},
        whitelist = false,
        jobicon = 'fa-solid fa-tree'
    },
}

-- Application Managers (for whitelist jobs)
Config.ApplicationManagers = {
    ['police'] = {
        coords = vec4(-268.61, -959.77, 31.22, 205.79),
        model = 'a_m_m_business_01',
        minGrade = 2,
        scenario = 'WORLD_HUMAN_CLIPBOARD'
    },
    ['mechanic'] = {
        coords = vector4(0.0, 0.0, 0.0, 0.0),
        model = 'a_m_m_business_01',
        minGrade = 1,
        scenario = 'WORLD_HUMAN_CLIPBOARD'
    }
}

-- Notification Function
Config.Notification = function(message, type, isServer, src)
    if isServer then
        if Config.Notify == "esx" then
            TriggerClientEvent("esx:showNotification", src, message)
        elseif Config.Notify == "qbcore" then
            TriggerClientEvent('QBCore:Notify', src, message, type, 1500)
        elseif Config.Notify == "qbox" then
            TriggerClientEvent('QBCore:Notify', src, message, type, 1500)
        elseif Config.Notify == "custom" then
            TriggerClientEvent('your-custom-notify-event', src, message, type)
        else
            TriggerClientEvent('chat:addMessage', src, { args = { message } })
        end
    else
        if Config.Notify == "esx" then
            TriggerEvent("esx:showNotification", message)
        elseif Config.Notify == "qbcore" then
            TriggerEvent('QBCore:Notify', message, type, 1500)
        elseif Config.Notify == "qbox" then
            TriggerEvent('QBCore:Notify', message, type, 1500)
        elseif Config.Notify == "custom" then
            TriggerEvent('your-custom-notify-event', message, type)
        else
            TriggerEvent('chat:addMessage', { args = { message } })
        end
    end
end

-- Localization
Config.Locales = {
    jobChanged = 'Your job has been changed to %s.',
    cooldownActive = 'You must wait %s minutes before changing jobs again.',
    applicationSubmitted = 'Your application has been submitted successfully.',
    applicationExists = 'You already have a pending application for this job.',
    applicationAccepted = 'Your application for %s has been accepted!',
    applicationRejected = 'Your application for %s has been rejected.',
    invalidJob = 'Invalid job specified.',
    interactText = 'Press [E] to access Job Center',
    managerInteractText = 'Press [E] to manage applications'
}

-- Misc
Config.debug = false -- Enable or disable debug prints (recommended to keep false in production server)
Config.Backgroundblur = true -- Enable or disable background blur when the UI is open
```

## ServerConfig

```lua
ServerConfig = {
    Webhooks = {
        name = "Volt Job Center",
        avatar = "https://r2.fivemanage.com/C6upyI9vnjG6hOARxThIx/vs.png",
        title = "Volt Job Center Logs",

        -- Player Applications (separate for each job)
        sendApplicationPlayer = {
            police = "",
            ambulance = "", 
            mechanic = "",
            default = "" -- For jobs without a specific webhook
        },
        
        -- Cooldown Actions
        cooldownStart = "",
        removeCooldown = "",
        
        -- Application Decisions
        applicationRejected = "",
        applicationApproved = ""
    },
    
    logSystem = true -- Enable/disable logging
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://voltscripts.gitbook.io/volt-scripts/resources/job-center/config-preview.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
