> For the complete documentation index, see [llms.txt](https://needforscript.gitbook.io/needforscripts/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://needforscript.gitbook.io/needforscripts/our-scripts/jobs/configuration.md).

# Configuration

Here’s everything you can customize in the NFS Jobs script. Most settings are in `data/config.lua`, and location settings are in `data/locations.lua`.

### 📝Main Settings (`config.lua`)

#### 🔁 Interaction Mode

Choose how players access the jobs menu:

```lua
interactionMode = "ped" -- Options: "marker", "keybind", "ped", "command"
```

* `marker`: Uses 3D marker with E key
* `keybind`: Uses a key (default: G)
* `ped`: Spawns an NPC with target system
* `command`: Players use `/jobs` in chat

***

#### ⌨️ Keybind (if using `keybind`)

```lua
keybind = {
  name = 'jobs',
  description = 'Press G to open jobs menu',
  defaultKey = 'G',
}
```

***

#### 💬 Command (if using `command`)

```lua
command = {
  name = 'jobs',
  description = 'Open the jobs menu',
}
```

***

#### 📱 Phone System

Supports: `lb-phone`, `qb-phone`, `qs-smartphone-pro`, `gksphone,okokPhone`  &#x20;

```lua
phone.system = "lb-phone"
```

#### 📱 Custom Phone Call Function

Located inside `config.lua > phone.startCall`

```lua
phone = {
        system = "lb-phone", -- Change to your phone system
        
        startCall = function(phoneNumber, phoneConfig)
            local phoneSystem = phoneConfig.system

            if GetResourceState(phoneSystem) ~= 'started' then
                print(('^3[nfs-jobs] %s is not started. Unable to make call.^0'):format(phoneSystem))
                return false
            end

            if phoneSystem == 'qb-phone' then
                exports['qb-phone']:StartCall(phoneNumber, false)
                return true
            elseif phoneSystem == 'qs-smartphone-pro' then
                exports['qs-smartphone-pro']:createCall('Contact', phoneNumber, '', false)
                return true
            elseif phoneSystem == 'lb-phone' then
                exports["lb-phone"]:CreateCall({
                    number = phoneNumber,
                    hideNumber = false
                })
                return true
            elseif phoneSystem == 'gksphone' then
                exports["gksphone"]:StartingCall(phoneNumber)
                return true
            elseif phoneSystem == 'okokPhone' then
                exports['okokPhone']:createCall(phoneNumber)
                return true
            else
                print(('^1[nfs-jobs] Unsupported phone system: %s. Supported: qb-phone, qs-smartphone, lb-phone, gksphone, okokPhone^0'):format(phoneSystem))
                return false
            end
        end
    },
```

#### **📞Supported Phone Systems**

* GKS Phone
* LB Phone
* okokPhone
* QS-Smartphone
* qb-phone

> You can add support for other phone systems or customize behaviors by editing this function directly.

***

#### 🎯 Target System (for ped mode)

Supports: `ox_target`, `qb-target`, `qtarget`

```lua
target.system = "qb-target"
target.icon = "fa-solid fa-briefcase"
target.label = "Open Jobs Menu"
target.distance = 2.5
```

#### 🎯 Custom Target System Function

Located inside `config.lua > target.addTarget`

```lua
addTarget = function(ped, openMenuCallback, targetConfig)
    local targetSystem = targetConfig.system

    if GetResourceState(targetSystem) ~= 'started' then
        print(('^3[nfs-jobs] %s is not started. Ped interaction will not work.^0'):format(targetSystem))
        return
    end

    if targetSystem == 'ox_target' then
        exports.ox_target:addLocalEntity(ped, {
            {
                name = 'jobs_menu',
                icon = targetConfig.icon,
                label = targetConfig.label,
                onSelect = function()
                    openMenuCallback()
                end,
                distance = targetConfig.distance
            }
        })
    elseif targetSystem == 'qb-target' then
        exports['qb-target']:AddTargetEntity(ped, {
            options = {
                {
                    icon = targetConfig.icon,
                    label = targetConfig.label,
                    action = function()
                        openMenuCallback()
                    end,
                }
            },
            distance = targetConfig.distance
        })
    elseif targetSystem == 'qtarget' then
        exports.qtarget:AddTargetEntity(ped, {
            options = {
                {
                    icon = targetConfig.icon,
                    label = targetConfig.label,
                    action = function()
                        openMenuCallback()
                    end,
                }
            },
            distance = targetConfig.distance
        })
    end
end
```

> Want to use a custom target system or extend functionality? Just add a new `elseif` block inside this function.

***

#### 🛠️ Job Creation Access

Control who can post public jobs:

```lua
jobCreation = {
  allowEveryone = true, -- Set false to restrict
  allowedGrades = {
    -- ["police"] = 3,
    -- ["mechanic"] = 2,
  }
}
```

***

#### 👮 Public Job Management

Allows specific jobs to manage all public jobs:

```lua
publicJobsManagement = {
  ["police"] = 3,
}
```

***

#### 📂 Job Categories / Types / Yellow Pages

You can fully customize job categories, job types, and yellow page services. Example:

```lua
jobCategories = {
  { value = "technology", label = "Technology", color = "#6366f1" },
}
jobTypes = {
  { value = "full-time", label = "Full Time", color = "#3b82f6" },
}
yellowJobCategories = {
  { value = "delivery", label = "Delivery", color = "#0ea5e9" },
}
```

***

### 🗺️ Location Setup (`locations.lua`)

Set where players can access the jobs menu.

Example:

```lua
{
  coords = vector3(-543.38, -206.87, 37.69),
  blip = {
    sprite = 408,
    color = 21,
    scale = 0.8,
    label = "Jobs Center"
  },
  ped = {
    model = 'a_m_m_business_01',
    coords = vector3(-543.38, -206.87, 36.65),
    heading = 209.48,
    scenario = 'WORLD_HUMAN_CLIPBOARD'
  }
}
```

You can duplicate this entry to add more job center locations.
