# Introduction

InfinityPulse is a small group working to create custom resources for FiveM and RedM, with a focus on quality, security, performance and stability. Here you will find all of the official documentation for our resources.

If you feel like out documentation is missing something, please let us know or suggest improvements by using the links in the sidebar.

## Our Team

We're a small team of programmers who enjoy being able to create and share resources, but it can often require considerable time and investment to maintain and support them.

Our team members try their best to help keep things running smoothly; feel free to check out their work or show your appreciation by supporting them below.

<table data-view="cards"><thead><tr><th align="center"></th><th align="center"></th><th data-hidden data-card-cover data-type="files"></th><th data-hidden data-type="content-ref"></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td align="center">xPhantom</td><td align="center"><strong>☕</strong> Support</td><td><a href="/files/Gx8uI89X46KtNzLYQZTy">/files/Gx8uI89X46KtNzLYQZTy</a></td><td></td><td><a href="https://ko-fi.com/infinitypulse">https://ko-fi.com/infinitypulse</a></td></tr><tr><td align="center">SLNCX</td><td align="center"><strong>☕</strong> Support</td><td><a href="/files/mHo0BoSgd6BntsVtvTSl">/files/mHo0BoSgd6BntsVtvTSl</a></td><td><a href="https://ko-fi.com/slncx">https://ko-fi.com/slncx</a></td><td><a href="https://ko-fi.com/slncx">https://ko-fi.com/slncx</a></td></tr><tr><td align="center">Marko</td><td align="center"><strong>☕</strong> Support</td><td><a href="/files/xhYEJh2ZnaHLzvBMS5GM">/files/xhYEJh2ZnaHLzvBMS5GM</a></td><td></td><td><a href="https://ko-fi.com/markog6">https://ko-fi.com/markog6</a></td></tr><tr><td align="center">DiabolicAngeL</td><td align="center">☕Support</td><td><a href="/files/j7AJFECdujrTFm3yXRMW">/files/j7AJFECdujrTFm3yXRMW</a></td><td></td><td><a href="https://ko-fi.com/diabolicangel">https://ko-fi.com/diabolicangel</a></td></tr></tbody></table>


# Herbalist System

A Skill based herbalist system with leveling and realistic reactions to the herbs

<figure><img src="/files/goxKPLxQRZ4KHL6PDBfx" alt=""><figcaption></figcaption></figure>

{% embed url="<https://www.youtube.com/watch?v=7nYeIrgs2TQ>" %}

## Buy Herbalist System Now

{% embed url="<https://infinity-pulse.tebex.io/package/6669834>" %}


# Installation

Simple explanation on how to install this resource.

{% stepper %}
{% step %}

### Download resource from your CFX key

Head to [CFX Portal](https://portal.cfx.re) and download the resource.
{% endstep %}

{% step %}

### Run the SQL query in your DB Server

You will find the query file in the`[SQL]` folder, or if you lost it you can copy it from here:

{% code title="player\_skills.sql" fullWidth="false" %}

```sql
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

DROP TABLE IF EXISTS `player_skills`;
CREATE TABLE `player_skills`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `identifier` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL,
  `job` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL,
  `skills` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL,
  `skill_points` int(11) NULL DEFAULT 0,
  `level` int(4) NOT NULL DEFAULT 0,
  `xp` int(16) NOT NULL DEFAULT 0,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `citizen_id`(`identifier`, `job`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 619 CHARACTER SET = utf8mb3 COLLATE = utf8mb3_general_ci ROW_FORMAT = Dynamic;

SET FOREIGN_KEY_CHECKS = 1;
```

{% endcode %}

{% endstep %}

{% step %}

### Add all required items and images found in `[requirements]` folder&#x20;

You can either use the included images , or your own , but the names have to match the ones given in the included images.
{% endstep %}

{% step %}

### Install Dependencies

> This script requires `ox_lib` & `oxmysql`

{% hint style="info" %}
You have to ensure this script AFTER both dependencies !
{% endhint %}
{% endstep %}

{% step %}

### Add the resource in your server.cfg file

```lua
ensure ip_herb
```

{% endstep %}

{% step %}

### That's it , you can now join your server and make sure everything works!

{% hint style="info" %}
If you have any issues, you can contact us on our [discord](https://discord.gg/KBdcsc3Ep3) !
{% endhint %}
{% endstep %}
{% endstepper %}


# Commands

<table data-header-hidden><thead><tr><th width="180"></th><th></th><th></th></tr></thead><tbody><tr><td><strong>addherbxp</strong></td><td><code>/addherbxp &#x3C;playerId> &#x3C;amount></code></td><td>Adds a specified amount of XP to the player’s herbalism skill.</td></tr></tbody></table>

<table data-header-hidden><thead><tr><th width="181"></th><th></th><th></th></tr></thead><tbody><tr><td><strong>removeherbxp</strong></td><td><code>/removeherbxp &#x3C;playerId> &#x3C;amount></code></td><td>Removes a specified amount of XP from the player’s herbalism skill.</td></tr></tbody></table>

<table data-header-hidden><thead><tr><th width="183"></th><th></th><th></th></tr></thead><tbody><tr><td><strong>addherbpoints</strong></td><td><code>/addherbpoints &#x3C;playerId> &#x3C;points></code></td><td>Grants skill points to a player for herbalism upgrades.</td></tr></tbody></table>

<table data-header-hidden><thead><tr><th width="189"></th><th></th><th></th></tr></thead><tbody><tr><td><strong>removeherbpoints</strong></td><td><code>/removeherbpoints &#x3C;playerId> &#x3C;points></code></td><td>Removes skill points from a player’s herbalism skill.</td></tr></tbody></table>

<table data-header-hidden><thead><tr><th width="189"></th><th></th><th></th></tr></thead><tbody><tr><td><strong>resetherbskills</strong></td><td><code>/resetherbskills &#x3C;playerId></code></td><td>Resets the player's herbalism skills and refunds their skill points.</td></tr></tbody></table>

<table data-header-hidden><thead><tr><th width="187"></th><th></th><th></th></tr></thead><tbody><tr><td><strong>viewherb</strong></td><td><code>/viewherb &#x3C;playerId></code></td><td>Displays the player’s current herbalism skills and upgrades.</td></tr></tbody></table>

#### **Export Example (Client-Side)**

You can trigger the **herbalism book menu** on the client-side with:

```lua
exports.ip_herb:useHerbBook() -- Opens the herb book for the client
```

{% embed url="<https://www.youtube.com/watch?v=7nYeIrgs2TQ>" %}

## Buy Herbalist System Now!

{% embed url="<https://infinity-pulse.tebex.io/package/6669834>" %}


# Herbalist Skills

<figure><img src="/files/45JfcdZA6H3FaHJZMIRO" alt=""><figcaption><p>Preview of Skill Points and Skills from the In-game Herbalism Book</p></figcaption></figure>

### 1. Pickup Time

**Description:** Reduces the time required to harvest herbs.\
**Skill Levels:**

* **Level 1:** Harvest time reduced by 10 seconds (10000ms).
* **Level 2:** Harvest time reduced by 8 seconds (8000ms).
* **Level 3:** Harvest time reduced by 6 seconds (6000ms).
* **Level 4:** Harvest time reduced by 4 seconds (4000ms).
* **Level 5:** Harvest time reduced by 2 seconds (2000ms).

***

### 2. Reduce Damage

**Description:** Reduces the damage taken while harvesting herbs.\
**Skill Levels:**

* **Level 1:** 17% damage reduction.
* **Level 2:** 15% damage reduction.
* **Level 3:** 13% damage reduction.
* **Level 4:** 10% damage reduction.
* **Level 5:** 5% damage reduction.

***

### 3. Double Loot

**Description:** Increases the chance of receiving more loot from herbs.\
**Skill Levels:**

* **Level 1:** 5% chance for double loot.
* **Level 2:** 10% chance for double loot.
* **Level 3:** 15% chance for double loot.
* **Level 4:** 20% chance for double loot.
* **Level 5:** 25% chance for double loot.

***

### 4. Double XP

**Description:** Increases the amount of experience gained from harvesting herbs.\
**Skill Levels:**

* **Level 1:** 5% chance for double XP.
* **Level 2:** 10% chance for double XP.
* **Level 3:** 15% chance for double XP.
* **Level 4:** 20% chance for double XP.
* **Level 5:** 25% chance for double XP.

***

### 5. Boost Food

**Description:** Increases the amount of food received from herbs.\
**Skill Levels:**

* **Level 1:** 2 food bonus.
* **Level 2:** 4 food bonus.
* **Level 3:** 6 food bonus.
* **Level 4:** 8 food bonus.
* **Level 5:** 12 food bonus.

***

### 6. Avoid Poison

**Description:** Reduces the chance of being poisoned while eating herbs.\
**Skill Levels:**

* **Level 1:** 12% chance to avoid poison.
* **Level 2:** 10% chance to avoid poison.
* **Level 3:** 8% chance to avoid poison.
* **Level 4:** 6% chance to avoid poison.
* **Level 5:** 4% chance to avoid poison.

***

### How to Upgrade Skills

You can upgrade each of these skills as you progress in herbalism. Each level will provide incremental benefits, such as faster harvest times, higher loot chances, or increased XP and food bonuses. Focus on upgrading specific skills based on your playstyle and needs in the game!

{% embed url="<https://www.youtube.com/watch?v=7nYeIrgs2TQ>" %}

## Buy Herbalist System Now!

{% embed url="<https://infinity-pulse.tebex.io/package/6669834>" %}


# Company Blips

A versatile Blip system that lets you configure all jobs through a simple config. Players can toggle their job status using commands, with real-time synchronization across all players in the game. Add

## Buy Company Blips Now

{% embed url="<https://www.youtube.com/watch?v=HS4CbcS1Zbc>" %}

{% embed url="<https://infinity-pulse.tebex.io/package/5942759>" %}


# Installation

Simple explanation on how to install this resource.

{% stepper %}
{% step %}

### Download resource from your CFX key

Head to [CFX Portal](https://portal.cfx.re) and download the resource.
{% endstep %}

{% step %}

### Install Dependencies

> This script requires `ox_lib`

{% hint style="info" %}
You have to ensure this script AFTER both dependencies !
{% endhint %}
{% endstep %}

{% step %}

### Add the resource in your server.cfg file

```lua
ensure phantom_companyblips
```

{% endstep %}

{% step %}

### That's it , you can now join your server and make sure everything works!

{% hint style="info" %}
If you have any issues, you can contact us on our [discord](https://discord.gg/KBdcsc3Ep3) !
{% endhint %}
{% endstep %}
{% endstepper %}


# Config

Simple explanation on how to install this resource.

{% stepper %}
{% step %}

### Notify config

{% code fullWidth="true" %}

```lua
Config.Notify = 'bl_notify' -- [ bl-notify | vorp | ox_lib ]

Config.NotifyDetails = {
    bl_notify = {
        event = 'bln_notify:send',
        types = {
            cooldown = {
                title = '~#ffcc00~Cooldown Alert~e~',
                description = "Wait %d seconds before changing your job status!",
                icon = "awards_set_l_010",
                placement = "middle-right"
            },
            success = {
                title = '~#00ff00~Success~e~',
                description = "Your job status has been updated!",
                icon = "tick",
                placement = "middle-right"
            },
            no_job = {
                title = '~#ff0000~No Job!~e~',
                description = "You don't belong to any job!",
                icon = "cross",
                placement = "middle-right"
            }
        }
    },
    ox_lib = {
        event = 'lib.notify',
        types = {
            cooldown = {
                id = 'cooldown_notify',
                title = 'Cooldown Warning',
                description = 'Wait %d seconds before you can proceed.',
                duration = 3000,
                showDuration = false,
                position = 'top',
                type = 'warning',
                style = {
                    backgroundColor = '#141517',
                    color = '#C1C2C5'
                },
                icon = 'clock',
                iconColor = '#FFA500',
                iconAnimation = 'pulse'
            },
            success = {
                id = 'success_notify',
                title = 'Success!',
                description = 'Your action was completed successfully.',
                duration = 3000,
                showDuration = false,
                position = 'top',
                type = 'success',
                style = {
                    backgroundColor = '#141517',
                    color = '#00FF00'
                },
                icon = 'check',
                iconColor = '#00FF00',
                iconAnimation = 'beat'
            },
			no_job = {
                id = 'no_job_notify',
                title = 'No Job!',
                description = "You don't belong to any job!",
                duration = 3000,
                showDuration = false,
                position = 'top',
                type = 'error',
                icon = 'times',
                iconColor = '#FF0000'
            }
        }
    },
    vorp = {
        event = 'vorp:TipRight',
        types = {
            cooldown = {
                description = 'Wait %d seconds before you can proceed.',
                duration = 5000
            },
			success = {
				description = 'Your action was completed successfully.',
                duration = 5000			
			},
			no_job = {
                description = "You don't belong to any job!",
                duration = 5000
            }
        }
    }
}

```

{% endcode %}

{% endstep %}

{% step %}

### Blip company config

```lua
Config.CompanyBlips = {
	{
		blipName 	= 'Rhodes Gun store',

		modifierOn	= 'BLIP_MODIFIER_DEBUG_GREEN',

		modifierOff	= 'BLIP_MODIFIER_DEBUG_RED',

		textureHash	= -145868367,

		job_name	= 'rhodgunsmith',

		job_image   = 'https://media.discordapp.net/attachments/859618317858111494/1164875174336794624/gunstores-removebg-preview.png', width = '26', height = '26',

		pos			= vector3(1323.1091, -1323.3464, 77.9392),
	},
	
	{
		blipName 	= 'Saint Denis Gun store',

		modifierOn	= 'BLIP_MODIFIER_DEBUG_GREEN',

		modifierOff	= 'BLIP_MODIFIER_DEBUG_RED',

		textureHash	= -145868367,

		job_name	= 'saintgunsmith',

		job_image   = 'https://media.discordapp.net/attachments/859618317858111494/1164875174336794624/gunstores-removebg-preview.png', width = '26', height = '26',

		pos			= vector3(2716.8938, -1285.3364, 53.8603),
	},

	{
		blipName 	= 'Valentine Gun store',

		modifierOn	= 'BLIP_MODIFIER_DEBUG_GREEN',

		modifierOff	= 'BLIP_MODIFIER_DEBUG_RED',

		textureHash	= -145868367,

		job_name	= 'valgunsmith',

		job_image   = 'https://media.discordapp.net/attachments/859618317858111494/1164875174336794624/gunstores-removebg-preview.png', width = '26', height = '26',

		pos			= vector3(-281.6438, 778.7984, 120.9147),
	},

	{
		blipName 	= 'Valentine Saloon',

		modifierOn	= 'BLIP_MODIFIER_DEBUG_GREEN',

		modifierOff	= 'BLIP_MODIFIER_DEBUG_RED',

		textureHash	= 1879260108,

		job_name	= 'valentinesaloon',

		job_image   = 'https://media.discordapp.net/attachments/859618317858111494/1164875174336794624/gunstores-removebg-preview.png', width = '26', height = '26',

		pos			= vector3(-313.3148, 805.4577, 118.9805),
	},	

	--
}
```

{% endstep %}

{% step %}

### Other things in config

```lua
Config.MinutesCooldown = 10 -- Seconds

Config.CommandName = 'dutyJob'

Config.Texts = {
	open_job_message = 'is now open!',

	command_help_text = 'Change job status | ON - OFF',
	
	close_job_message = 'is closed!',
		
	chat_message = 'The company'
}

Config.ChatEnable = true
```

{% endstep %}
{% endstepper %}


# Bandits Ambush

This script is a challenger for your server players to face the bandits, there are 2 options, surrender or duel with different scenarios for each option.

## Buy Company Blips Now

{% embed url="<https://www.youtube.com/watch?v=dYjQaQk7_6s>" %}

{% embed url="<https://store.infinitypulse.dev/package/6735411>" %}


# Installation

Simple explanation on how to install this resource.

{% stepper %}
{% step %}

### Download resource from your CFX key

Head to [CFX Portal](https://portal.cfx.re) and download the resource.
{% endstep %}

{% step %}

### Install Dependencies

> This script requires `ox_lib`

{% hint style="info" %}
You have to ensure this script AFTER both dependencies !
{% endhint %}
{% endstep %}

{% step %}

### Add the resource in your server.cfg file

```lua
ensure ip_bandits
```

{% endstep %}

{% step %}

### That's it , you can now join your server and make sure everything works!

{% hint style="info" %}
If you have any issues, you can contact us on our [discord](https://discord.gg/KBdcsc3Ep3) !
{% endhint %}
{% endstep %}
{% endstepper %}


# Config

Simple explanation on how to install this resource.

{% stepper %}
{% step %}

### Main config

{% code fullWidth="true" %}

```lua
Config = {}

Config.DuelGun = 'WEAPON_REVOLVER_CATTLEMAN'

Config.Cooldown = 60 -- seconds

Config.Rewards = {
	typeReward = 'cash', -- cash || bank || items
	money = 5000,
	item = 'bread'
}

Config.Locations = {
	
	{
		Position = vec3(2528.26, -591.83, 41.87),

		DistanceStart = 20,
		
		SpawnRadius = 10.0,
		
		enablePedHorseRide = true,

		horseModels = {"a_c_horse_andalusian_darkbay","a_c_horse_arabian_grey","a_c_horse_belgian_blondchestnut","a_c_horse_breton_sealbrown"},

		weaponList = {"WEAPON_REVOLVER_CATTLEMAN"},

		pedModel = "g_m_m_unibanditos_01",

		amountPeds = 2
	},
}

```

{% endcode %}

{% endstep %}

{% step %}

### Alert Config

```lua
Config_Text = {}

Config_Text.Alert = {
	header = "Bandits",
	content = "Reach your gun cowboy...",
	duration = 7000,
	surrenderText = "Surrender",
	duelText = "Duel"
}

Config_Text.DuelTimer = {
	timer = 5,
	textTimer = "Duel Starts in:",
	duelStartText = "Duel Started!",
	targetDrawText = "TARGET"
}
```

{% endstep %}
{% endstepper %}


# XP System

This system provides a dynamic XP structure based on different XP types. Each type is identified by a unique key.


# Installation

Change the framework in your `sconfig.lua` 'vorp'/'rsg'/'custom'

***

Import SQL:

```sql
CREATE TABLE IF NOT EXISTS `xpsystem` (
  `name` varchar(50) NOT NULL,
  `type` varchar(50) NOT NULL,
  `xp` int(11) NOT NULL DEFAULT 0,
  `level` int(11) NOT NULL DEFAULT 1,
  PRIMARY KEY (`name`,`type`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC;

INSERT IGNORE INTO `xpsystem` (`name`, `type`, `xp`, `level`) VALUES
	('init', 'initialize', 0, 1);
```

***

### Usable Item:

### RSG

You will also need to add the XP book in your **RSG-Core/shared/items.lua** file:

```lua
xpbook = { 
    name = 'xpbook', 
    label = 'Experience Book', 
    weight = 100, 
    type = 'item',  
    image = 'book.png', 
    unique = true,  
    useable = true, 
    shouldClose = true, 
    description = 'An Experience log book'
}
```

### VORP

You can find this in `vorpitem.sql`&#x20;

```sql
INSERT INTO items
(`item`, `label`, `limit`, `can_remove`, `type`, `usable`, `groupId`, `metadata`, `desc`, `degradation`, `weight`)
VALUES 
('xpbook', 'Experience Book', '10', '1', 'item_standard', '1', '1', '{}', 'A jack of all trades is a master of none, but often times better than a master of one..', '0', '0.25');
```


# Types

Understanding the different types of Experience

#### \[<mark style="color:green;">Personal</mark>] Types

* These types can only be leveled by the individual themselves, and no one else can see them.
* **Identifier**: `CITIZENID` / `IDENTIFIER` / `CHARACTERID`{KEY}

#### \[<mark style="color:yellow;">Job</mark>] Types

* These types can be leveled by all members of a job, as long as the player currently has that job active.
* **Identifier**: `JOBNAME` (`PlayerData.job.name`)

#### \[<mark style="color:red;">Criminal</mark>] Types !! UNDER DEVELOPMENT !!

* These follow the same principle as \[Job] types, but instead of job names, they use gang identifiers.
* **Identifier**: `GANGNAME` (`PlayerData.gang.name`)

***

#### \[<mark style="color:blue;">INFO</mark>]

* The system includes an automated mechanism to add or remove XP. Instead of using an integer value, the word `'auto'` is used to calculate XP based on the current level and the difficulty of the type being edited.


# Exports

For the people that actually have to set up the script with the rest of the server

### Exports

#### MAP:

* <mark style="background-color:blue;">**NAME**</mark>: `citizenId` / `job.name` / `gang.name`
* <mark style="background-color:purple;">**XPTYPE**</mark>: The name of the type you are using, defined in the `shared/sconfig.lua` file.
* <mark style="background-color:orange;">**AMOUNT**</mark>: An integer amount or the string `'auto'`.
* <mark style="background-color:green;">**typeMult**</mark>: The multiplier that will be applied.

**Note**: All exports work based on the specified `name` & `type`.

#### To use an export, use this format:

```lua
exports['ip_xpsystem']:AddXP(src, xpType, 'auto', 1)
```

#### Available Exported Functions:

**\[**<mark style="color:purple;">**CL**</mark>**]/\[**<mark style="color:red;">**SV**</mark>**]&#x20;**<mark style="color:orange;">**GetLevel**</mark>**(**<mark style="background-color:blue;">**name**</mark>**,&#x20;**<mark style="background-color:purple;">**xpType**</mark>**)**

* Returns the integer value of the level.

**\[**<mark style="color:purple;">**CL**</mark>**]/\[**<mark style="color:red;">**SV**</mark>**]&#x20;**<mark style="color:orange;">**GetXP**</mark>**(**<mark style="background-color:blue;">**name**</mark>**,&#x20;**<mark style="background-color:purple;">**xpType**</mark>**)**

* Returns the integer value of experience.

**\[**<mark style="color:red;">**SV**</mark>**]&#x20;**<mark style="color:orange;">**GetLimit**</mark>**(**<mark style="background-color:blue;">**name**</mark>**,&#x20;**<mark style="background-color:purple;">**xpType**</mark>**)**

* Returns the total required XP to reach the next level (not the remaining amount).

**\[**<mark style="color:red;">**SV**</mark>**]&#x20;**<mark style="color:orange;">**AddXP**</mark>**(**<mark style="background-color:yellow;">**src**</mark>**,&#x20;**<mark style="background-color:purple;">**xpType**</mark>**,&#x20;**<mark style="background-color:orange;">**amount**</mark>**,&#x20;**<mark style="background-color:green;">**typeMult**</mark>**)**

* Adds XP to the person with the source specified for the given `xpType`.
* `amount` can be an <mark style="color:yellow;">integer</mark> or `'auto'`.
* If `typeMult` is skipped, the multiplier defaults to <mark style="color:blue;">1</mark>.

**\[**<mark style="color:red;">**SV**</mark>**]&#x20;**<mark style="color:orange;">**RemoveXP**</mark>**(**<mark style="background-color:yellow;">**src**</mark>**,&#x20;**<mark style="background-color:purple;">**xpType**</mark>**,&#x20;**<mark style="background-color:orange;">**amount**</mark>**)**

* Removes XP from the person with the source specified for the given `xpType`.
* `amount` can be an integer or `'auto'`.


# UI Additions

Opening other UIs through the book !

You can add interactions for a specific type to open a different menu or UI when the top corner button is clicked.

For example:

#### `sconfig.lua`

```lua
Config.linkList = {
    ['job'] = 'http://rsg-multijob/openuifromxpbook',
    --http://SCRIPTNAME/NUICALLBACKSTRING
}
```

{% hint style="warning" %}
The string in the NUI Callback has to be unique, or copy the one that your script is using and use that !
{% endhint %}

For this to work, you need to create a callback in the script you want to interact with or use the provided NUI callback from your own scripts. For instance, to make the above example work, add the following to `rsg-multijob` :

```lua
RegisterNUICallback("openThisFromXpBook", function (cb)
    TriggerEvent('rsg-multijob:client:openmenu')
    cb('ok')
end)
```

***


# Alert Dialogue


# Installation

Simple explanation on how to install this resource.

{% stepper %}
{% step %}

### Download resource from your CFX key

Head to [CFX Portal](https://portal.cfx.re) and download the resource.
{% endstep %}

{% step %}

### Install Dependencies

> This script is standalone
> {% endstep %}

{% step %}

### Add the resource in your server.cfg file

```lua
ensure ip_alert
```

{% endstep %}

{% step %}

### That's it , you can now join your server and make sure everything works!

{% hint style="info" %}
If you have any issues, you can contact us on our [discord](https://discord.gg/KBdcsc3Ep3) !
{% endhint %}
{% endstep %}
{% endstepper %}


# Exort

This export can import in any client side script you want!

```lua
   exports['ip_alert']:alert({
        header = 'Header',
        image = 'bandits_bg',
        content = 'Content',
        duration = 5000,
        showButtons = true,
        progress = true,
        confirmText = 'Confirm',
        cancelText = 'Cancel',
    }, function(response)
        print(Config.TestAlertCommand.. " command received response:", response)
    end)
```


# VIP System

This is a complete documentation for the resource ip\_vip so you can know exactly how to install the resource into your server !

{% embed url="<https://www.youtube.com/watch?v=t06uEwGEbo0>" %}

## Buy VIP System Now

{% embed url="<https://infinity-pulse.tebex.io/package/5689421>" %}


# Installation

Simple explanation on how to install this resource.

{% stepper %}
{% step %}

### Download resource from your CFX key

Head to [CFX Portal](https://portal.cfx.re) and download the resource.
{% endstep %}

{% step %}

### Run the SQL query in your DB Server

You will find the query file in the`[SQL]` folder, or if you lost it you can copy it from here:

{% code title="ZPVIPSystem.sql" fullWidth="false" %}

```sql
CREATE TABLE `zpvipsystem` (
	`identifier` VARCHAR(255) NOT NULL DEFAULT '' COLLATE 'utf8mb4_general_ci',
   `name` VARCHAR(255) NOT NULL COLLATE 'utf8mb4_general_ci',	
	`adderidentifier` VARCHAR(255) NOT NULL DEFAULT '' COLLATE 'utf8mb4_general_ci',
	`addername` VARCHAR(255) NOT NULL COLLATE 'utf8mb4_general_ci',
	`level` INT(3) NOT NULL,
	`dateadded` DATETIME NOT NULL DEFAULT current_timestamp(),
	`expiredate` VARCHAR(255) NOT NULL DEFAULT '0' COLLATE 'utf8mb4_general_ci',
	PRIMARY KEY (`identifier`) USING BTREE
)
COLLATE='utf8mb4_general_ci'
ENGINE=InnoDB
;
```

{% endcode %}

{% endstep %}

{% step %}

### Add all required items and images found in `[requirements]` folder&#x20;

You can either use the included images , or your own , but the names have to match the ones given in the included images.
{% endstep %}

{% step %}

### Add the resource in your server.cfg file

```lua
ensure zp_vip
```

{% endstep %}

{% step %}

### Make sure to update shared.lua with the correct framework

<pre><code><strong>1) (ZP_Vip_System_Shared_Config.Framework)
</strong>2) (ZP_Vip_System_Shared_Config.FrameworkResourceName)
</code></pre>

{% endstep %}

{% step %}

## Dependencies

```
1) mysql-async
2) oxmysql
```

{% endstep %}

{% step %}

### That's it , you can now join your server and make sure everything works!

{% hint style="info" %}
If you have any issues, you can contact us on our [discord](https://discord.gg/KBdcsc3Ep3) !
{% endhint %}
{% endstep %}
{% endstepper %}


# Exports

There are two exports, 1 client side & 1 server side exports which are both called hasVIP and can be found in the fxmanifest.lua.

#### **Export Example (Client-Side)**

```lua
if exports['zp_vip']:hasVIP() > 0 then or if exports['zp_vip']:hasVIP() == 1 then
    print('You have vip level 1')
else
    print("You don't have vip subscription")
end
```

#### **Export Example (Server-Side)**

```lua
if exports['zp_vip']:hasVIP(source) > 0 then or if exports['zp_vip']:hasVIP(source) == 1 then
    print('You have vip level 1')
else
    print("You don't have vip subscription")
end
```


# Herbalism Skills

<figure><img src="/files/45JfcdZA6H3FaHJZMIRO" alt=""><figcaption><p>Preview of Skill Points and Skills from the In-game Herbalism Book</p></figcaption></figure>

### 1. Pickup Time

**Description:** Reduces the time required to harvest herbs.\
**Skill Levels:**

* **Level 1:** Harvest time reduced by 10 seconds (10000ms).
* **Level 2:** Harvest time reduced by 8 seconds (8000ms).
* **Level 3:** Harvest time reduced by 6 seconds (6000ms).
* **Level 4:** Harvest time reduced by 4 seconds (4000ms).
* **Level 5:** Harvest time reduced by 2 seconds (2000ms).

***

### 2. Reduce Damage

**Description:** Reduces the damage taken while harvesting herbs.\
**Skill Levels:**

* **Level 1:** 17% damage reduction.
* **Level 2:** 15% damage reduction.
* **Level 3:** 13% damage reduction.
* **Level 4:** 10% damage reduction.
* **Level 5:** 5% damage reduction.

***

### 3. Double Loot

**Description:** Increases the chance of receiving more loot from herbs.\
**Skill Levels:**

* **Level 1:** 5% chance for double loot.
* **Level 2:** 10% chance for double loot.
* **Level 3:** 15% chance for double loot.
* **Level 4:** 20% chance for double loot.
* **Level 5:** 25% chance for double loot.

***

### 4. Double XP

**Description:** Increases the amount of experience gained from harvesting herbs.\
**Skill Levels:**

* **Level 1:** 5% chance for double XP.
* **Level 2:** 10% chance for double XP.
* **Level 3:** 15% chance for double XP.
* **Level 4:** 20% chance for double XP.
* **Level 5:** 25% chance for double XP.

***

### 5. Boost Food

**Description:** Increases the amount of food received from herbs.\
**Skill Levels:**

* **Level 1:** 2 food bonus.
* **Level 2:** 4 food bonus.
* **Level 3:** 6 food bonus.
* **Level 4:** 8 food bonus.
* **Level 5:** 12 food bonus.

***

### 6. Avoid Poison

**Description:** Reduces the chance of being poisoned while eating herbs.\
**Skill Levels:**

* **Level 1:** 12% chance to avoid poison.
* **Level 2:** 10% chance to avoid poison.
* **Level 3:** 8% chance to avoid poison.
* **Level 4:** 6% chance to avoid poison.
* **Level 5:** 4% chance to avoid poison.

***

### How to Upgrade Skills

You can upgrade each of these skills as you progress in herbalism. Each level will provide incremental benefits, such as faster harvest times, higher loot chances, or increased XP and food bonuses. Focus on upgrading specific skills based on your playstyle and needs in the game!

{% embed url="<https://www.youtube.com/watch?v=7nYeIrgs2TQ>" %}

## Buy Herbalist System Now!

{% embed url="<https://infinity-pulse.tebex.io/package/6669834>" %}


# Money Laundering

Multi framework compatible money laundering

{% embed url="<https://www.youtube.com/watch?v=FmjxDaYWTfg>" %}


# Configuration

{% hint style="warning" %}
Dependencies: ox\_lib, ox\_target
{% endhint %}

{% hint style="success" %}
Supports any Framework/inventory
{% endhint %}

```lua
--Default config file:

Config = {}
---@class Config
---@field CustomInventory boolean: Set this to true if you are using the inventory function in the open.lua file in server side
---@field rate integer: this changes the rate of exchange [3 = 3 black economy will be converted to 1 white economy]
---@field timer integer: the time in minutes the user has to wait , for them to claim their money
---@field jobRate integer: This changes the rate of exchange for the commision of the store society , this means that if the parameter is set to a default of 5 , the store account will get the one fifth (1/5) of the amount that is being washed !
---@field blackEconomy string: the name of the item that you want the user to give in to be laudered
---@field whiteEconomy string: the name of the item you want to reward the player when the laudering is finished
---@field InputType string: wether the ox_lib input should be a numerical input or a slider with steps divided based on the prices.step value

Config.CustomInventory = false

Config.Model = {
    model = "bkr_prop_prtmachine_dryer",
    modelActive = "bkr_prop_prtmachine_dryer_spin",
    locations = { 
        {coords = vec4(-576.62, 286.94, 79.18, 258.60), job = 'club1'},
        {coords = vec4(-825.58, -690.0, 127.39, 270.0), job = 'club2' },
        {coords = vec4(-2956.69, 30.04, 11.61, 154.05), job = 'club3'},  
    }
}


Config.rate = 3
Config.timer = 1 -- in minutes
Config.jobRate = 5
Config.blackEconomy = 'black_money'
Config.whiteEconomy = 'money'
Config.InputType = 'number' -- [ number / slider ]

Config.prices = {
    min = 100000,
    step = 200000,
    max = 500000
}

Config.IsItemLaunderEnabled = true --> If disabled the item launder option will not exist!!

Config.ItemLaunderWaitTime = 1000 * 5 --> The Base time that the player has to wait for the items to be done!!

Config.ItemsLaunder = {
    ["water"] = { Label = "Water", Price = { Min = 100, Max = 500 }, WaitTimeMulti = 1.2 },
    ["bread"] = { Label = "Bread", Price = { Min = 100, Max = 500 }, WaitTimeMulti = 1.2 }
}
```


# Server/Framework support

This is an in depth explanation on how to setup our open functions to make this script compatible with any other script that you might be using!

## SERVER SIDE:

```lua
-- The reason of these functions is to elliminate Framework dependency
-- and allow for adaptability on any kind of accounts/society/inventory scripts
-- for the script to work , you would have to fill the functions here !
ESX = nil
QBCore = nil
QBX = nil
function AddLaunderedMoney(playerId,whiteEconomy,amount)
    exports.ox_inventory:AddItem(playerId,whiteEconomy,amount)
end

function AddJobMoney(job,amount)
    -- You can add your own logic on how the job will recive the money , 
    -- the amount on top has alredy beed divided by the rate you set in the config
    -- an example with our unreleased society script
    -- !!! THIS EXAMPLE WILL NOT WORK ON YOUR SERVER !!!

    -- local _, func = exports.ip_society:GetSocietyAccount(job)
    -- func.add(amount)
end

function LogLaunder(data)
    -- You can add your logs here, this is called whenever somebody starts laundering
    --DATA:
    --source
    --name
    --message
    --amount
    --location (jobName)
    --amount_to_job
end

function LogFinishLaunder(data)
    -- You can add your logs here, this is called whenever somebody recives money from laundering
    -- DATA:
    -- source
    -- message
    -- amount
end

function SearchPlayerMoney(playerId)
--this must return an amount i.e 50000
-- an example using ox_inventory
    return exports.ox_inventory:Search(playerId, 'count', Config.blackEconomy)
end

function RemovePlayerMoney(playerId, amount)
    --example using ox_inventory
    exports.ox_inventory:RemoveItem(playerId, Config.blackEconomy, amount)
end

function RemovePlayerItem(playerId, item, amount)
    --example using ox_inventory
    exports.ox_inventory:RemoveItem(playerId, item, amount)
end
```

## CLIENT SIDE:

```lua
function HasItem(item)
    return exports.ox_inventory:Search("count", item)
end
```


# DATA TABLE

Large-Scale data tables made easy!

{% embed url="<https://www.youtube.com/watch?v=Md4L2ApuPtA>" %}

{% embed url="<https://store.infinitypulse.dev/package/6750416>" %}


# Export

## IP Table Documentation

### Overview

This script opens an `ip_table` with a given set of data, actions, and an event handler for closing.

### Table Configuration

#### Properties:

* `id`: **(string)** The title identifier for the table.
* `head`: **(table)** The headers of the table columns.
* `list`: **(table)** A list of data entries.
* `onClose`: **(function)** A function that executes when the table is closed.
* `actions`: **(table)** A set of named actions that execute functions when a row is selected.

### Example Usage

```lua
  exports.ip_table:open({
        id = "Title",
        head = { "Name", "VipLevel" },
        list = {
         {"RoyleWind","5"},
         {"SLNC","2"},
         {"XPHANTOP","1"},
        },
        onClose = function()
            print("Closed 🚪")
        end,
        actions = {
            ["Print"] = function(index, data) 
                print("Name: " .. data[1])
            end,
            ["Action 2"] = function(index, data) 
                print("Name: " .. data[1])
            end,
        }
    })
```

### Actions

* **Print**: Prints the `Name` field of the selected row.
* **Action 2**: Prints the `Name` field of the selected row (duplicate function for customization).

### Closing Behavior

When the table is closed, it prints `Closed 🚪` in the console.

### Notes

* This script is designed for integration within an existing system using `exports.ip_table`.
* Modify the `actions` section to add additional functionalities.


# Crate Drop

Multi framework compatible advanced crate drop

{% embed url="<https://www.youtube.com/watch?v=Fsiebjkprow>" %}

{% embed url="<https://store.infinitypulse.dev/package/6756390>" %}


# Installation

Simple explanation on how to install this resource.

{% stepper %}
{% step %}

### Download resource from your CFX key

Head to [CFX Portal](https://portal.cfx.re) and download the resource.
{% endstep %}

{% step %}

### Add the resource in your server.cfg file

```lua
ensure ip_crate
```

{% endstep %}

{% step %}

### Make sure to update server/open.lua with the correct functions of your framework

{% endstep %}

{% step %}

## Dependencies

```
1) ox_lib
```

{% endstep %}

{% step %}

### That's it , you can now join your server and make sure everything works!

{% hint style="info" %}
If you have any issues, you can contact us on our [discord](https://discord.gg/KBdcsc3Ep3) !
{% endhint %}
{% endstep %}
{% endstepper %}


# Configuration

Import things for crate drop

## Open server file - server/open.lua

### In this file you can add your own functions and framework!

```lua
-- in case you are using ESX inventory , you can use xPlayer to give item, 
-- this stands the same for qbx/qbcore , for any other case that you might need source , you can use that as well !
function AddItem(xPlayer,source,itemName, itemCount)
    exports.ox_inventory:AddItem(source, itemName, itemCount)
end

-- in case you are using ESX Framework , you can use xPlayer to add black money,
-- in case you are using qbx/qbcore, you can add black money via addItem
function AddBlackMoney(xPlayer,source, money, amount)
    exports.ox_inventory:AddItem(source, money, amount)
    -- xPlayer.addAccountMoney('black_money', blackMoney)
end

function AddWeapon(xPlayer, source, weaponName, ammo)
    -- [Ox Inventory]
    exports.ox_inventory:AddItem(source, weaponName, 1,{ammo = ammo})

    --[ESX Framework]
	-- xPlayer.addWeapon(weaponName, weaponAmmo)
end

function GetPlayer(source)
    return exports.qbx_core:GetPlayer(source)
end
```

## Open server file - server/notify/open\_notify.lua

### In this file you can add your own notify - SERVER EVENT OF NOTIFY

```lua
function OpenNotify(source,notifyConfig, description)

    TriggerClientEvent('ox_lib:notify', source, {
        title = notifyConfig.title,
        description = description,
        type = notifyConfig.typeMessage,
        duration = notifyConfig.duration        
    })

end 
```

## Config Files

### Config  Client - config/client/config.lua

```lua
Config					= { Circle = {}, Blip = {} }

-- Circle Blip
Config.Circle.Color			= 1

Config.Circle.Alpha			= 150
--

-- Crate Blip
Config.Blip.Name			= 'Crate Drop'

Config.Blip.Sprite			= 478

Config.Blip.Size			= 0.8
--

-- Props 
Config.Props = {
    chuteModel = 'p_parachute1_s',
    crateModel = 'ex_prop_crate_closed_bc'
}
--

Config.ClientNotify = {
    nothing_loot = {
        title = 'Crate Drop', 
        isFormatted = false, 
        description = "It doesn't have anything you can collect.", 
        typeMessage = "error", 
        duration = 4000
    },
    forbidden_job = {
        title = 'Crate Drop', 
        isFormatted = false, 
        description = "Your job is blacklisted so you can't take the crate", 
        typeMessage = "error", 
        duration = 4000
    },
    chance_lost = {
        title = 'Crate Drop', 
        isFormatted = false, 
        description = "You cannot open the box again. You miss your chance.", 
        typeMessage = "error", duration = 4000
    },
}

-- Data
Config.crateData	        = { crateBlip = nil, circleBlip = nil, crateCircleRadius = nil, canOpenCrate = false }
--

-- Crate Circle Radius
Config.crateCircleRadius	= 150.0
--

-- Collecting Delay
Config.collectingDelay		= 20 * 1000 -- 20 Seconds.
--
```

### Config Server - config/server/config.lua

```lua
Config = {}

Config.Notify = {
	already_fall = {
		title = 'Crate Drop',
		isFormatted = false,
		description = 'Crate Drop is already fall',
		typeMessage = "error", duration = 4000
	},

	reward_item = {
		title = 'Crate Drop',
		isFormatted = true,
		description = 'You got x%d %s in your inventory',
		typeMessage = "success", duration = 4000
	},
	reward_black_money = {
		title = 'Crate Drop', 
		isFormatted = true, 
		description = 'You got %s Black Money', 
		typeMessage = "success", 
		duration = 4000
	},
	reward_weapons = {
		title = 'Crate Drop', 
		isFormatted = true, 
		description = 'You got %s Black Money', 
		typeMessage = "success", 
		duration = 4000
	},
}

Config.ChatMessages = {
	message_before_fall = 'The Crate Drop will drop in 10 minutes in a random area. Prepare!',
	crate_drop_fall = 'Crate Drop has fallen! Look at the map to locate the area.',
	crate_drop_has_collected = 'Crate Drop was collected!',
	crate_drop_has_not_collected = 'Crate Drop was not collected by anyone',
	chat_image = "https://media.discordapp.net/attachments/859618317858111494/1352768635575337070/crate_drop_img.png?ex=67df3777&is=67dde5f7&hm=02002854c547689d94a25f3d856a710f74cfa88daf27b454b7c99675d9450ac2&=&format=webp&quality=lossless"
}

Config.DiscordWebhook = 'https://discord.com/api/webhooks/1352775436425236550/8OkQrUVKjprk2UMyd0_NJfiKJ23gKCWVYbK6e-c8k2cpQl_QtZwzztEFHb048Is1yL4F'

Config.Locations = {
	{ name = 'Crate Drop', pos = vec3(2949.61, 2787.93, 41.0),	r = 300.0 },

	{ name = 'Crate Drop', pos = vec(2338.01, 2546.48, 47.71),	r = 300.0 },

	{ name = 'Crate Drop', pos = vec(1076.44, -3062.35, 5.91),	r = 300.0 },

	{ name = 'Crate Drop', pos = vec(71.0, 3709.03, 39.75),	    r = 300.0 },

	{ name = 'Crate Drop', pos = vec(1074.83, 2359.88, 44.18),	r = 300.0 }
}

Config.CommandCrateDropInfo = {
	commandName = 'drop_crate',
	help = 'Start crate drop event',
	restricted = 'group.admin'
}

Config.BlacklistJobs = {'police', 'fbi', 'ambulance', 'sheriff'}

Config.NotifyTime = {
	['08:50'] = true, ['12:20'] = true, ['14:20'] = true, 
	['16:20'] = true, ['18:20'] = true, ['20:20'] = true,
}

Config.Time = {
	['09:00'] = true, ['12:30'] = true, ['14:30'] = true,
	['16:30'] = true, ['18:30'] = true, ['20:30'] = true,
}

Config.BlackMoney = 24000 -- This is splitting this / 2 for minimum and maximum random amount.

Config.Items = {
	{ name = 'sandwich', 	count = math.random(10, 12)	},
	
	{ name = 'bulletproof', count = math.random(5, 8)	},
}

Config.Loadout = {
	{ name = 'WEAPON_PISTOL',	ammo = math.random(100, 200) },

	{ name = 'WEAPON_MICROSMG',	ammo = math.random(200, 350) },
}

Config.DROP_ALWAYS_WEAPONS = true

Config.DROP_MAX_WEAPONS = 1

```


# 3D Text UI

This provides an in-game interaction menu that floats in space and can have many option and styles


# Installation

Simple explanation on how to install this resource.

{% stepper %}
{% step %}

### Download resource from your CFX key

Head to [CFX Portal](https://portal.cfx.re) and download the resource.
{% endstep %}

{% step %}

### Add the resource in your server.cfg file

```lua
ensure ip_interact
```

{% endstep %}

{% step %}

### Make sure to update config.lua with the correct framework and framework script name!

{% endstep %}

{% step %}

### That's it , you can now join your server and make sure everything works!

{% hint style="info" %}
If you have any issues, you can contact us on our [discord](https://discord.gg/KBdcsc3Ep3) !
{% endhint %}
{% endstep %}
{% endstepper %}


# Configuration

## config.lua

### Framework

```lua
Config.Framework = "qb" --> Your Framework | esx or qb
Config.FrameworkScriptName = "qb-core" --> The name of the framework script
```

### Style Options

```lua
Config.Style = "default" --> The Style folder name

Config.StyleOptions = { --> The names of the images that you will use
    Point = 'point',
    Key = 'key',
    Selected = 'label',
    Unselected = 'label_no',
    SelectedOpt = 'circle_selected',
    UnselectedOpt = 'circle'
}
```

### Checks Options

```
Config.ResourceChecks = true --> If set to true, only the resource witch added the interact can remote it or edit it

Config.CuffDisable = true --> If set to true people who are cuffed cant see or interact with the menu

Config.VehicleDisable = true --> If set to true people who are inside a car cant see or interact with the menu

Config.DeadDisable = true --> If set to true people who are dead cant see or interact with the menu
```

### Options

You can only have 1 out of  these : `Action, ClientEvent, ServerEvent` options, if there are more than 1, then one of them will be triggered.

{% hint style="danger" %}
IN THE CASE OF MULTIPLE MECHANISMS (`Action, ClientEvent, ServerEvent`) The selection of which will run , goes as follows: (Action -> ServerEvent -> ClientEvent),\
although using more than one option is bad practice.
{% endhint %}

```lua
Config.Options = { --> Table | The Interacts
    {
        Coords = vec3(0.0, 0.0, 0.0), --> Vector3 | The coords of the interact
        Job = nil, --> String | The job that can access the interact
        SeeDist = 10.0, --> Number | The Distance that a player can see the interact
        InteractDist = 1.0, --> Number | The Distance that the player can interact with the menu
        Options = { --> Table | The Options of the Interact
            {
                Label = "I want to Buy", --> String | The Label of the interact
                Action = function() --> Function | The Function that will be triggered when the player presses "E"
                    print("Hello from ip_interact!! 1")
                end,
                ServerEvent = "ip_interact:server:something", --> String | The Name of the Server event that will be triggered when the player presses "E"
                ClientEvent = "ip_interact:client:something" --> String | The Name of the Client event that will be triggered when the player presses "E"
            }
        }
    }
}
```


# Exports

## The exports of the script

### 1. AddInteract

Options:

```lua
exports["ip_interact"]:AddInteract({ 
    Coords = vec3(0.0, 0.0, 0.0), --> Vector3 | The coords of the Interact
    Job = nil, --> String | The job that can access the interact
    SeeDist = 10.0, --> Number | The Distance that the player can see the interact
    InteractDist = 1.0, --> Number | The Distance that the player can interact with the menu
    Options = {} --> Table | The Options of the interact
})
```

Returns: The Unique code of the Interact

### 2. RemoveInteract

Options: The Unique code of the interact

```lua
exports["ip_interact"]:RemoveInteract("XXXX-XXXX")
```

## 3. EditInteract

Options:&#x20;

```lua
exports["ip_interact"]:EditInteract("XXXX-XXXX", {
    Coords = vec3(0.0, 0.0, 0.0), --> Vector3 | The coords of the Interact
    Job = nil, --> String | The job that can access the interact
    SeeDist = 10.0, --> Number | The Distance that the player can see the interact
    InteractDist = 1.0, --> Number | The Distance that the player can interact with the menu
    Options = {} --> Table | The Options of the interact
})
```


# City Hall


# Installation

{% stepper %}
{% step %}

### Download resource from your CFX key

Head to [CFX Portal](https://portal.cfx.re) and download the resource.
{% endstep %}

{% step %}

### Add the resource in your server.cfg file

```lua
ensure ip_cityhall
```

{% endstep %}

{% step %}

### Make sure to update data/cfg.lua[^1] with the correct framework&#x20;

{% endstep %}

{% step %}

### That's it , you can now join your server and make sure everything works!

{% hint style="info" %}
If you have any issues, you can contact us on our [discord](https://discord.gg/KBdcsc3Ep3) !
{% endhint %}
{% endstep %}
{% endstepper %}

[^1]:


# Configuration

```lua
Get The Pos For The Tablet With The Command 'cityhall'
```

### 🧠 Overview

The configuration table (`CFG`) is used to manage job listings, positions, and general framework compatibility for the job application system.

***

### ⚙️ Base Configuration

```lua
{
    CORE = "QBX", -- Options: "ESX", "QBX", "QB", "CUSTOM"
    jobs = { ... },
    pos = { ... }
}
```

#### `CORE`

* Defines which framework is used for job handling.
* Supports: `ESX`, `QBX`, `QB`, and `CUSTOM`.

***

### 📌 Job Entry Structure

Each job entry inside `CFG.jobs` follows a defined schema:

```lua
{
    job = "unemployed",
    grade = 1,
    pos = vector2(-270.0, -952.0),
    title = "City Planner",
    department = "Urban Development",
    type = "Full-Time",
    salary = "65,000 - 85,000",
    location = "City Hall - Main Building",
    postedDays = 2,
    description = "Job description here...",
    requirements = {
        "Requirement 1",
        "Requirement 2",
    },
    benefits = {
        "Benefit 1",
        "Benefit 2",
    },
    gps = true,     -- Enables map GPS pin
    apply = true,   -- Enables application button

    -- Optional: Overwrite application logic
    -- apply_action = function(src, job, grade)
    --     -- Custom server-side logic
    -- end,
}
```

#### 🔧 Field Descriptions

| Field          | Type       | Description                                                                  |
| -------------- | ---------- | ---------------------------------------------------------------------------- |
| `job`          | `string`   | Internal job name used by the framework                                      |
| `grade`        | `number`   | Grade level within the job                                                   |
| `pos`          | `vector2`  | 2D Position where the job is listed or applied                               |
| `title`        | `string`   | Display title for the job                                                    |
| `department`   | `string`   | Department the job belongs to                                                |
| `type`         | `string`   | Job type (e.g., Full-Time, Part-Time)                                        |
| `salary`       | `string`   | Salary range or details                                                      |
| `location`     | `string`   | Physical or in-world location                                                |
| `postedDays`   | `number`   | How many days ago the job was posted                                         |
| `description`  | `string`   | Description of job duties and responsibilities                               |
| `requirements` | `table`    | List of requirements                                                         |
| `benefits`     | `table`    | List of benefits                                                             |
| `gps`          | `boolean`  | Whether GPS routing is available                                             |
| `apply`        | `boolean`  | Whether users can apply for this job                                         |
| `apply_action` | `function` | (Optional) Override method for custom job application behavior (server-side) |

***

### 🗺️ Interaction Positions

These are the world positions where players can interact with the job system.

```lua
pos = {
    vector4(-271.8789, -954.8341, 31.6770, 31.5),
    vector4(-269.9323, -953.8364, 31.6485, 30.5),
    vector4(-268.4203, -953.1323, 31.6770, 31.5),
}
```

Each `vector4` contains:

* **x, y, z** coordinates
* **heading** (rotation angle)

These positions can be used for rendering interaction zones (e.g., text prompts, 3D markers).

***

### ➕ Adding More Jobs

To add another job, simply append a new table to the `CFG.jobs` array:

```lua
{
    job = "mechanic",
    grade = 0,
    pos = vector2(-100.0, -200.0),
    title = "Auto Mechanic",
    department = "Public Works",
    type = "Part-Time",
    salary = "45,000 - 60,000",
    location = "Los Santos Auto Shop",
    postedDays = 1,
    description = "Repair and maintain city vehicles.",
    requirements = { "Basic mechanical knowledge" },
    benefits = { "Tool allowance" },
    gps = true,
    apply = true,
}
```

***

### 🧩 Extending Logic (Server-Side)

If a job needs **custom apply logic**, you can override the default by using `apply_action`.

by using the apply\_action how can hadle yourself the action of the player for example aplication system

Example:

```lua
apply_action = function(src, job, grade)
    -- Trigger custom server event or logic
    print(("Player %s applied to %s at grade %d"):format(src, job, grade))
end,
```


# Underwater Treasure Hunt

Ready to explore the deep sea? This unique Treasure Hunt Script brings risk and reward beneath the surface!

{% embed url="<https://www.youtube.com/watch?v=dthY8IyJpvU>" %}

## Buy Underwater Treasure Hunt Now

{% embed url="<https://infinity-pulse.tebex.io/package/5909271>" %}


# Installation

Simple explanation on how to install this resource.

{% stepper %}
{% step %}

### Download resource from your CFX key

Head to [CFX Portal](https://portal.cfx.re) and download the resource.
{% endstep %}

{% step %}

### Add all required images found in `[images]` folder&#x20;

You can either use the included images , or your own , but the names have to match the ones given in the included images.
{% endstep %}

{% step %}

### Open Files

In client and server folder you can see open.lua file that you can put your own things inside to work the script
{% endstep %}

{% step %}

### Add the resource in your server.cfg file

```lua
ensure ip_treasure
```

{% endstep %}

{% step %}

## Dependencies

```
1) ox_lib
```

{% endstep %}

{% step %}

### That's it , you can now join your server and make sure everything works!

{% hint style="info" %}
If you have any issues, you can contact us on our [discord](https://discord.gg/KBdcsc3Ep3) !
{% endhint %}
{% endstep %}
{% endstepper %}


