# 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/>


---

# 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://docs.okokscripts.io/scripts/okokpolicejob.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.
