> For the complete documentation index, see [llms.txt](https://docs.okokscripts.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.okokscripts.io/scripts/okokpolicejob.md).

# okokPoliceJob

[**YouTube Video**](https://www.youtube.com/watch?v=B6PtiHMyYlk)

## Installation Guide

### Requirements:

ox\_lib **v3.16.2+** (<https://github.com/overextended/ox_lib/releases/latest/download/ox_lib.zip>).

### Execute the following SQL code in your database:

{% tabs %}
{% tab title="ESX" %}

```sql
CREATE TABLE IF NOT EXISTS `okokpolicejob_reports` (
    `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
    `reporter` VARCHAR(255) NOT NULL,
    `phone` VARCHAR(255) NOT NULL,
    `date` VARCHAR(255) NOT NULL,
    `description` TEXT NOT NULL,
    `status` INT NOT NULL DEFAULT '0'
);

ALTER TABLE `users` 
DROP COLUMN IF EXISTS `ankleMonitor`,
ADD COLUMN `ankleMonitor` BOOLEAN NOT NULL DEFAULT '0',
DROP COLUMN IF EXISTS `isHandcuffed`,
ADD COLUMN `isHandcuffed` BOOLEAN NOT NULL DEFAULT '0',
DROP COLUMN IF EXISTS `jailTime`,
ADD COLUMN `jailTime` INT NOT NULL DEFAULT '0',
DROP COLUMN IF EXISTS `communityService`,
ADD COLUMN `communityService` INT NOT NULL DEFAULT '0';

INSERT INTO `items` (`name`, `label`, `weight`, `rare`, `can_remove`) VALUES ('handcuffs', 'Handcuffs', 1, 1, 1);
```

{% endtab %}

{% tab title="QBCore" %}

```sql
CREATE TABLE IF NOT EXISTS `okokpolicejob_reports` (
    `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
    `reporter` VARCHAR(255) NOT NULL,
    `phone` VARCHAR(255) NOT NULL,
    `date` VARCHAR(255) NOT NULL,
    `description` TEXT NOT NULL,
    `status` INT NOT NULL DEFAULT '0'
);

ALTER TABLE `players` 
DROP COLUMN IF EXISTS `ankleMonitor`,
ADD COLUMN `ankleMonitor` BOOLEAN NOT NULL DEFAULT '0',
DROP COLUMN IF EXISTS `isHandcuffed`,
ADD COLUMN `isHandcuffed` BOOLEAN NOT NULL DEFAULT '0',
DROP COLUMN IF EXISTS `jailTime`,
ADD COLUMN `jailTime` INT NOT NULL DEFAULT '0',
DROP COLUMN IF EXISTS `communityService`,
ADD COLUMN `communityService` INT NOT NULL DEFAULT '0';
```

{% endtab %}
{% endtabs %}

### QBCORE ONLY

Add Item:

```lua
handcuffs = { name = 'handcuffs', label = 'Handcuffs', weight = 100, type = 'item', image = 'handcuffs.png', unique = false, useable = true, shouldClose = true, combinable = nil, description = 'Handcuffs' },
```

If using **qb-clothing**, add the following code on client/main.lua, after `exports('getOutfits',getOutfits)`:

```lua
local function getJobOutfits(gradeLevel, requiredJob)
    local data = Config.Outfits[requiredJob]
    local gender = "male"
    if QBCore.Functions.GetPlayerData().charinfo.gender == 1 then gender = "female" end
    QBCore.Functions.TriggerCallback('qb-clothing:server:getOutfits', function(result)
        openMenu({
            {menu = "roomOutfits", label = Lang:t("outfits.roomOutfits"), selected = true, outfits = data[gender][gradeLevel]},
            {menu = "myOutfits", label = Lang:t("outfits.myOutfits"), selected = false, outfits = result},
            {menu = "character", label = Lang:t("outfits.character"), selected = false},
            {menu = "accessoires", label = Lang:t("outfits.accessoires"), selected = false}
        })
    end)
end
exports('getJobOutfits', getJobOutfits)
```

### Server artifacts

Make sure your server artifacts version is up to date.

* Windows: <https://runtime.fivem.net/artifacts/fivem/build_server_windows/master/>
* Linux: <https://runtime.fivem.net/artifacts/fivem/build_proot_linux/master/>
