> This is part 1 of 3 of the full documentation (pages 1–100 of 250).
> The content is paginated: fetch every part to see all of it.
> Next part: https://docs.cdev.shop/llms-full.txt/1
> Page index: https://docs.cdev.shop/llms.txt

> Agents can also search and read this documentation through its [MCP server](https://docs.cdev.shop/~gitbook/mcp).

# Intro

Welcome to the official documentations page, made for cDev resources.

[**Community Development/CDev**](https://discord.gg/cdev) is a collaborative of skilled developers, we have the in house experience in running community's, we understand running a community may be challenging at given times. Our primary focus has been creating the best useful resources such as our cDev bot, our vehicleshop & many other resources that are going to be coming for all of you.

## cDev VIP's 💎

* [**Gabz - The most popular maps on your FiveM server.**](https://discord.gg/gabz)
* [**OTF Gaming**](https://discord.gg/lildurk)
* [**Trenches**](https://discord.gg/otf)

## Our Partners

* [GKSPhone](https://discord.gg/XUck63E)
* [Lionh34rt](https://discord.gg/AWyTUEnGeN)
* [1SKGAMING](https://www.1skgaming.com/discord)
* [Illenium Studios](https://discord.illenium.dev/)
* [Renewed Scripts](https://discord.gg/AS2Y8TWejt)
* [PataMods | Pata & Sarish](https://discord.gg/84musHr9mn)
* [Theebu](https://discord.gg/SvxZj2h)

<figure><img src="https://cdn.discordapp.com/attachments/955140577203208253/1095462395159269500/durty-cloth-tool-logo.png" alt=""><figcaption></figcaption></figure>

Interested in joining the above list? Contact us today!


# Locales

cDev locales

{% hint style="info" %}
**LANGUAGE/LOCALES FILES**

This page is contributed to providing language files for all cDev resources, you are able to see the progress here.

Our team & community members have pre-configured various languages to use straight out of the box. Want to make a contribution? You can provide one by heading to our dedicated [GitHub](https://github.com/cdevshop/locales/tree/main/cdev_vehicleshop).
{% endhint %}

<table><thead><tr><th>Languages</th><th width="83" data-type="checkbox">cLib</th><th width="136" data-type="checkbox">Vehicle Shop</th><th width="86" data-type="checkbox">Pets</th><th data-type="checkbox">Soccer</th></tr></thead><tbody><tr><td><strong>English</strong></td><td>true</td><td>true</td><td>true</td><td>true</td></tr><tr><td><strong>Dutch</strong></td><td>true</td><td>true</td><td>true</td><td>true</td></tr><tr><td><strong>German</strong></td><td>true</td><td>true</td><td>true</td><td>true</td></tr><tr><td><strong>Spanish</strong></td><td>true</td><td>true</td><td>true</td><td>true</td></tr><tr><td><strong>Portuguese</strong></td><td>true</td><td>true</td><td>true</td><td>true</td></tr><tr><td><strong>French</strong></td><td>true</td><td>true</td><td>true</td><td>true</td></tr><tr><td><strong>Greek</strong></td><td>true</td><td>true</td><td>true</td><td>true</td></tr><tr><td><strong>Russian</strong></td><td>true</td><td>true</td><td>true</td><td>true</td></tr><tr><td><strong>Polish</strong></td><td>true</td><td>true</td><td>true</td><td>true</td></tr><tr><td><strong>Finnish</strong></td><td>true</td><td>true</td><td>true</td><td>true</td></tr><tr><td><strong>Italian</strong></td><td>true</td><td>true</td><td>true</td><td>true</td></tr><tr><td><strong>Czech</strong></td><td>true</td><td>true</td><td>true</td><td>true</td></tr><tr><td><strong>Turkish</strong></td><td>true</td><td>true</td><td>true</td><td>true</td></tr></tbody></table>


# Chairs & Beds

Standalone chair & bed system to work with all of Gabz interiors out of the box.

### START HERE

1. Unzip the `cdev-chairs.zip` folder and place this folder in your servers resource folder.
2. Add the resource to your server start config: `ensure cdev-chairs` (if you are using a framework it must be placed anywhere below your framework resource eg., es\_extended, not above).
3. **WARNING** Do not edit the encrypted files in any way.

{% hint style="info" %}
**What is this resource?**

This resource is designed specifically for [Gabz Maps](https://www.gabzv.com/). Chairs and beds for every Gabz interior come pre-configured. The priority when creating this resource was to be as user friendly as possible.
{% endhint %}

## INSTALLATION GUIDE

### Step 1 - Configure the resource

{% hint style="danger" %}
You **MUST** read all of the configurable options inside the **`config.lua`** and configure them to suit your server's needs. Please read the ”commented out help text” at the end of each line so you can understand what each config option does.

**The most important section is the options under the Important section at the top of the `config.lua`. Everything else is optional.**
{% endhint %}

### Step 2 - Configure your keybinds

{% hint style="danger" %}
Before starting this resource on your main/live server we highly advise you to configure your keybinds because this resource uses [Fivem's Key Mapping](https://docs.fivem.net/docs/game-references/controls/).
{% endhint %}

### Default Key Binds

<table><thead><tr><th width="290">Key</th><th>Description</th></tr></thead><tbody><tr><td><code>E</code></td><td>Sit/lie down and to stand up.</td></tr><tr><td><code>RIGHT ARROW</code></td><td>Change animations while you are sat/laying.</td></tr><tr><td><code>LEFT ARROW</code></td><td>Change animations while you are sat/laying.</td></tr><tr><td><code>X</code></td><td>Cancel emotes.</td></tr></tbody></table>


# Configuration

```lua
Config = {}
function L(cd) if Locales[Config.Language][cd] then return Locales[Config.Language][cd] else print('Locale is nil ('..cd..')') end end


--██╗███╗   ███╗██████╗  ██████╗ ██████╗ ████████╗ █████╗ ███╗   ██╗████████╗
--██║████╗ ████║██╔══██╗██╔═══██╗██╔══██╗╚══██╔══╝██╔══██╗████╗  ██║╚══██╔══╝
--██║██╔████╔██║██████╔╝██║   ██║██████╔╝   ██║   ███████║██╔██╗ ██║   ██║   
--██║██║╚██╔╝██║██╔═══╝ ██║   ██║██╔══██╗   ██║   ██╔══██║██║╚██╗██║   ██║   
--██║██║ ╚═╝ ██║██║     ╚██████╔╝██║  ██║   ██║   ██║  ██║██║ ╚████║   ██║   
--╚═╝╚═╝     ╚═╝╚═╝      ╚═════╝ ╚═╝  ╚═╝   ╚═╝   ╚═╝  ╚═╝╚═╝  ╚═══╝   ╚═╝

-- To enable debug prints
Config.DebugPrints = false

-- Keybind to sit/lie down and to stand up
Config.Control = 'e'
-- Are you using an emote resource like dpemotes? If so, add in the keybind you have set to cancel emotes here
Config.EmoteCancel = "x"
-- Keybind to change anim while sat/laying (defaulted to right arrow)
Config.ControlRight = 'RIGHT'
-- Keybind to change anim while sat/laying (defaulted to left arrow)
Config.ControlLeft = 'LEFT'

-- Do you want the prop to highlight with a coloured outline when the player is looking at it? true = yes/false = no
Config.HighlightProp = true
-- If the above is true, what color do you want the highlight to be, defaulted to black
Config.HighlightColour = {R=0, G=0, B=0,A=255}


--███╗   ███╗ █████╗ ██╗███╗   ██╗
--████╗ ████║██╔══██╗██║████╗  ██║
--██╔████╔██║███████║██║██╔██╗ ██║
--██║╚██╔╝██║██╔══██║██║██║╚██╗██║
--██║ ╚═╝ ██║██║  ██║██║██║ ╚████║
--╚═╝     ╚═╝╚═╝  ╚═╝╚═╝╚═╝  ╚═══╝

-- Animations to use when sitting down
Config.SitTasks = {
    'PROP_HUMAN_SEAT_CHAIR_MP_PLAYER', -- mandatory for position to be set
    {dict='timetable@ron@ig_5_p3', anim='ig_5_p3_base'},
    {dict='timetable@reunited@ig_10', anim='base_amanda'},
    {dict='timetable@ron@ig_3_couch', anim='base'},
    {dict='timetable@jimmy@mics3_ig_15@', anim='mics3_15_base_tracy'},
}

-- Animations to use when lying down
Config.LayAnim = {
    {dict='anim@gangops@morgue@table@', anim='ko_front'},
    {dict='switch@trevor@annoys_sunbathers', anim='trev_annoys_sunbathers_loop_girl'},
}

-- All chairs that can be used to sit down
Config.Chairs = {
    [`prop_bench_01a`] = {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=-0.5, direction=180.0, model = "prop_bench_01a"},
    [`prop_table_04_chr`] = {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=-0.5, direction=180.0, model = "prop_table_04_chr"},
    [`prop_table_01_chr_a`] = {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=-0.0, direction=180.0, model = "prop_table_01_chr_a"},
    [`prop_bench_01b`] = {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=-0.5, direction=180.0, model = "prop_bench_01b"},
    [`prop_bench_01c`] = {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=-0.5, direction=180.0, model = "prop_bench_01c"},
    [`prop_bench_02`] = {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=-0.5, direction=180.0, model = "prop_bench_02"},
    [`prop_bench_03`] = {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=-0.5, direction=180.0, model = "prop_bench_03"},
    [`prop_bench_04`] = {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=-0.5, direction=180.0, model = "prop_bench_04"},
    [`prop_bench_05`] = {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=-0.5, direction=180.0, model = "prop_bench_05"},
    [`prop_bench_06`] = {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=-0.5, direction=180.0, model = "prop_bench_06"},
    [`prop_bench_07`] = {vOffsetX=0.0, vOffsetY=0.2, vOffsetZ=-0.5, direction=180.0, model = "prop_bench_07"},
    [`prop_bench_08`] = {vOffsetX=0.5, vOffsetY=0.2, vOffsetZ=-0.5, direction=180.0, model = "prop_bench_08"},
    [`prop_bench_09`] = {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=-0.3, direction=180.0, model = "prop_bench_09"},
    [`prop_bench_10`] = {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=-0.3, direction=180.0, model = "prop_bench_10"},
    [`prop_off_chair_01`] = {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=-0.5, direction=180.0, model = "prop_off_chair_01"},
    [`prop_off_chair_03`] = {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=-0.5, direction=180.0, model = "prop_off_chair_03"},
    [`prop_off_chair_04`] = {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=-0.4, direction=180.0, model = "prop_off_chair_04"},
    [`prop_off_chair_05`] = {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=-0.4, direction=180.0, model = "prop_off_chair_05"},
    [`prop_chair_01`] = {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=-0.5, direction=180.0, model = "prop_chair_01"},
    [`prop_chair_02`] = {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=-0.5, direction=180.0, model = "prop_chair_02"},
    [`prop_chair_03`] = {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=-0.5, direction=180.0, model = "prop_chair_03"},
    [`prop_chair_04a`] = {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=-0.5, direction=180.0, model = "prop_chair_04a"},
    [`prop_chair_05`] = {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=-0.5, direction=180.0, model = "prop_chair_05"},
    [`prop_chair_06`] = {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=-0.5, direction=180.0, model = "prop_chair_06"},
    [`prop_chair_07`] = {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=-0.5, direction=180.0, model = "prop_chair_07"},
    [`prop_chair_08`] = {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=0.0, direction=180.0, model = "prop_chair_08"},
    [`prop_skid_chair_01`] = {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=-0.1, direction=180.0, model = "prop_skid_chair_01"},
    [`prop_skid_chair_02`] = {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=-0.1, direction=180.0, model = "prop_skid_chair_02"},
    [`prop_cs_office_chair`] = {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=-0.5, direction=180.0, model = "prop_cs_office_chair"},
    [`ba_prop_battle_club_chair_01`] = {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=0.1, direction=180.0, model = "ba_prop_battle_club_chair_01"},
    [`v_med_cor_medstool`] = {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=-0.65, direction=180.0, model = "v_med_cor_medstool"},
    [`v_corp_offchair`] = {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=-0.5, direction=180.0, model = "v_corp_offchair"},
    [`apa_mp_h_din_chair_04`] = {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=-0.5, direction=180.0, model = "apa_mp_h_din_chair_04"},
    [`p_clb_officechair_s`] = {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=-0.5, direction=180.0, model = "p_clb_officechair_s"},
    [`v_res_fa_chair01`] = {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=-0.3, direction=180.0, model = "v_res_fa_chair01"},
    [`v_club_officechair`] = {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=-0.5, direction=180.0, model = "v_club_officechair"},
    [`bkr_prop_clubhouse_chair_03`] = {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=-0.5, direction=180.0, model = "bkr_prop_clubhouse_chair_03"},
    [`v_corp_bk_chair3`] = {vOffsetX=0.1, vOffsetY=0.0, vOffsetZ=-0.5, direction=180.0, model = "v_corp_bk_chair3"}, -- scuffed
    [`v_ilev_leath_chr`] = {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=-0.5, direction=180.0, model = "v_ilev_leath_chr"},
    [`ba_prop_int_glam_stool`] = {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=-0.7, direction=180.0, model = "ba_prop_int_glam_stool"},
    [`prop_sol_chair`] = {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=-0.5, direction=180.0, model = "prop_sol_chair"},
    [`prop_off_chair_04b`] = {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=-0.5, direction=180.0, model = "prop_off_chair_04b"},
    [`v_res_fa_chair02`] = {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=0.5, direction=180.0, model = "v_res_fa_chair02"},
    [`p_ilev_p_easychair_s`] = {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=-0.5, direction=180.0, model = "p_ilev_p_easychair_s"},
    [`v_res_m_dinechair`] =  {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=-0.0, direction=180.0, model = "v_res_m_dinechair"}, --scuffed
    [`v_res_m_l_chair1`] =  {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=-0.5, direction=180.0, model = "v_res_m_l_chair1"},
    [`bkr_prop_clubhouse_armchair_01a`] =  {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=-0.5, direction=180.0, model = "bkr_prop_clubhouse_armchair_01a"},
    [`prop_old_wood_chair`] =  {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=-0.15, direction=180.0, model = "prop_old_wood_chair"},
    [`prop_bar_stool_01`] =  {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=-0.8, direction=180.0, model = "prop_bar_stool_01"},
    [`sm_pizzeria_chair_01`] =  {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=-0.5, direction=180.0, model = "sm_pizzeria_chair_01"},
    [`sm_pizzeria_chesterfield_chair`] =  {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=-0.5, direction=180.0, model = "sm_pizzeria_chesterfield_chair"},
    [`sm_pizzeria_office_chair01`] =  {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=-0.5, direction=180.0, model = "sm_pizzeria_office_chair01"},
    [`sm_pizzeria_office_chair02`] =  {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=-0.5, direction=180.0, model = "sm_pizzeria_office_chair02"},
    [`v_ilev_m_dinechair`] =  {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=-0.5, direction=180.0, model = "v_ilev_m_dinechair"},
    [`prop_table_02_chr`] =  {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=-0.5, direction=180.0, model = "prop_table_02_chr"},
    [`prop_chair_01a`] =  {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=-0.5, direction=180.0, model = "prop_chair_01a"},
    [`ex_prop_offchair_exec_04`] =  {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=-0.5, direction=180.0, model = "ex_prop_offchair_exec_04"},
    [`hei_prop_hei_skid_chair`] =  {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=-0.5, direction=180.0, model = "hei_prop_hei_skid_chair"},
    [`hei_prop_heist_off_chair`] =  {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=-0.5, direction=180.0, model = "hei_prop_heist_off_chair"},
    [`hei_prop_yah_seat_01`] =  {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=-0.5, direction=180.0, model = "hei_prop_yah_seat_01"},
    [`hei_prop_yah_seat_02`] =  {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=-0.5, direction=180.0, model = "hei_prop_yah_seat_02"},
    [`hei_prop_yah_seat_03`] =  {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=-0.5, direction=180.0, model = "hei_prop_yah_seat_03"},
    [`miss_rub_couch_01`] =  {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=-0.5, direction=180.0, model = "miss_rub_couch_01"},
    [`p_armchair_01_s`] =  {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=-0.5, direction=180.0, model = "p_armchair_01_s"},
    [`p_dinechair_01_s`] =  {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=-0.5, direction=180.0, model = "p_dinechair_01_s"},
    [`p_lev_sofa_s`] =  {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=-0.5, direction=180.0, model = "p_lev_sofa_s"},
    [`p_res_sofa_l_s`] =  {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=-0.5, direction=180.0, model = "p_res_sofa_l_s"},
    [`p_soloffchair_s`] =  {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=-0.5, direction=180.0, model = "p_soloffchair_s"},
    [`p_v_med_p_sofa_s`] =  {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=-0.5, direction=180.0, model = "p_v_med_p_sofa_s"},
    [`p_yacht_chair_01_s`] =  {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=-0.5, direction=180.0, model = "p_yacht_chair_01_s"},
    [`p_yacht_sofa_01_s`] =  {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=-0.5, direction=180.0, model = "p_yacht_sofa_01_s"},
    [`prop_bench_11`] =  {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=-0.5, direction=180.0, model = "prop_bench_11"},
    [`prop_chair_01b`] =  {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=-0.5, direction=180.0, model = "prop_chair_01b"},
    [`prop_chair_04b`] =  {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=-0.5, direction=180.0, model = "prop_chair_04b"},
    [`prop_chair_09`] =  {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=-0.5, direction=180.0, model = "prop_chair_09"},
    [`prop_chair_10`] =  {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=-0.5, direction=180.0, model = "prop_chair_10"},
    [`prop_chateau_chair_01`] =  {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=-0.5, direction=180.0, model = "prop_chateau_chair_01"},
    [`prop_clown_chair`] =  {vOffsetX=-0.225, vOffsetY=0.30, vOffsetZ=-0.5, direction=180.0, model = "prop_clown_chair"},
    [`prop_direct_chair_01`] =  {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=-0.5, direction=180.0, model = "prop_direct_chair_01"},
    [`prop_direct_chair_02`] =  {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=-0.5, direction=180.0, model = "prop_direct_chair_02"},
    [`prop_fib_3b_bench`] =  {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=-0.5, direction=180.0, model = "prop_fib_3b_bench"},
    [`prop_gc_chair02`] =  {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=-0.5, direction=180.0, model = "prop_gc_chair02"},
    [`prop_hobo_seat_01`] =  {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=-0.5, direction=180.0, model = "prop_hobo_seat_01"},
    [`prop_ld_bench01`] =  {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=-0.5, direction=180.0, model = "prop_ld_bench01"},
    [`prop_ld_farm_chair01`] =  {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=-0.5, direction=180.0, model = "prop_ld_farm_chair01"},
    [`prop_ld_farm_couch01`] =  {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=-0.5, direction=180.0, model = "prop_ld_farm_couch01"},
    [`prop_ld_farm_couch02`] =  {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=-0.5, direction=180.0, model = "prop_ld_farm_couch02"},
    [`prop_off_chair_04_s`] =  {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=-0.5, direction=180.0, model = "prop_off_chair_04_s"},
    [`prop_old_deck_chair`] =  {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=-0.5, direction=180.0, model = "prop_old_deck_chair"},
    [`prop_picnictable_01`] =  {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=-0.5, direction=180.0, model = "prop_picnictable_01"},
    [`prop_picnictable_02`] =  {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=-0.5, direction=180.0, model = "prop_picnictable_02"},
    [`prop_rock_chair_01`] =  {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=-0.5, direction=180.0, model = "prop_rock_chair_01"},
    [`prop_roller_car_01`] =  {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=-0.5, direction=180.0, model = "prop_roller_car_01"},
    [`prop_roller_car_02`] =  {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=-0.5, direction=180.0, model = "prop_roller_car_02"},
    [`prop_rub_couch01`] =  {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=-0.5, direction=180.0, model = "prop_rub_couch01"},
    [`prop_rub_couch02`] =  {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=-0.5, direction=180.0, model = "prop_rub_couch02"},
    [`prop_rub_couch03`] =  {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=-0.5, direction=180.0, model = "prop_rub_couch03"},
    [`prop_rub_couch04`] =  {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=-0.5, direction=180.0, model = "prop_rub_couch04"},
    [`prop_skid_chair_03`] =  {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=-0.5, direction=180.0, model = "prop_rub_couch04"},
    [`prop_table_01_chr_b`] =  {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=-0.5, direction=180.0, model = "prop_table_01_chr_b"},
    [`prop_table_03_chr`] =  {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=-0.5, direction=180.0, model = "prop_table_03_chr"},
    [`prop_table_03b_chr`] =  {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=-0.5, direction=180.0, model = "prop_table_03_chr"},
    [`prop_table_05_chr`] =  {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=-0.5, direction=180.0, model = "prop_table_05_chr"},
    [`prop_table_06_chr`] =  {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=-0.5, direction=180.0, model = "prop_table_06_chr"},
    [`prop_torture_ch_01`] =  {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=-0.15, direction=180.0, model = "prop_torture_ch_01"},
    [`prop_wait_bench_01`] =  {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=-0.5, direction=180.0, model = "prop_wait_bench_01"},
    [`prop_waiting_seat_01`] =  {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=-0.5, direction=180.0, model = "prop_waiting_seat_01"},
    [`prop_yacht_seat_01`] =  {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=-0.5, direction=180.0, model = "prop_yacht_seat_01"},
    [`prop_yacht_seat_02`] =  {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=-0.5, direction=180.0, model = "prop_yacht_seat_02"},
    [`prop_yacht_seat_03`] =  {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=-0.5, direction=180.0, model = "prop_yacht_seat_03"},
    [`v_club_bahbarstool`] =  {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=-0.5, direction=180.0, model = "v_club_bahbarstool"},
    [`v_club_stagechair`] =  {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=-0.5, direction=180.0, model = "v_club_stagechair"},
    [`v_corp_cd_chair`] =  {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=-0.5, direction=180.0, model = "v_corp_cd_chair"},
    [`v_ilev_chair02_ped`] =  {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=-0.5, direction=180.0, model = "v_ilev_chair02_ped"},
    [`v_ilev_fh_dineeamesa`] =  {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=-0.5, direction=180.0, model = "v_ilev_fh_dineeamesa"},
    [`v_ilev_fh_kitchenstool`] =  {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=-0.5, direction=180.0, model = "v_ilev_fh_kitchenstool"},
    [`v_ilev_hd_chair`] =  {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=-0.5, direction=180.0, model = "v_ilev_hd_chair"},
    [`v_ilev_m_sofa`] =  {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=-0.5, direction=180.0, model = "v_ilev_m_sofa"},
    [`v_ilev_p_easychair`] =  {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=-0.5, direction=180.0, model = "v_ilev_p_easychair"},
    [`v_ilev_tort_stool`] =  {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=-0.5, direction=180.0, model = "v_ilev_tort_stool"},
    [`v_res_tre_sofa_s`] =  {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=-0.5, direction=180.0, model = "v_res_tre_sofa_s"},
    [`v_ret_gc_chair03`] =  {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=-0.5, direction=180.0, model = "v_ret_gc_chair03"},
    [`v_serv_ct_chair02`] =  {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=-0.5, direction=180.0, model = "v_serv_ct_chair02"},
    [`v_tre_sofa_mess_a_s`] =  {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=-0.5, direction=180.0, model = "v_tre_sofa_mess_a_s"},
    [`v_tre_sofa_mess_b_s`] =  {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=-0.5, direction=180.0, model = "v_tre_sofa_mess_b_s"},
    [`v_tre_sofa_mess_c_s`] =  {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=-0.5, direction=180.0, model = "v_tre_sofa_mess_c_s"},
    [`vw_prop_casino_chair_01a`] =  {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=-0.5, direction=180.0, model = "vw_prop_casino_chair_01a"},
    [`vw_prop_vw_offchair_02`] =  {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=-0.5, direction=180.0, model = "vw_prop_vw_offchair_02"},
    [`bkr_prop_biker_boardchair01`] =  {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=0.1, direction=180.0, model = "bkr_prop_biker_boardchair01"},
    [`v_corp_lazychair`] =  {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=-0.5, direction=180.0, model = "v_corp_lazychair"},
    [`imp_prop_impexp_offchair_01a`] =  {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=0.1, direction=180.0, model = "imp_prop_impexp_offchair_01a"},
    [`gabz_pdprops_chair04`] =  {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=-0.5, direction=180.0, model = "gabz_pdprops_chair04"},
    [`gabz_davispd_chair01`] =  {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=-0.5, direction=180.0, model = "gabz_davispd_chair01"},
    [`gabz_davispd_bench01`] =  {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=-0.5, direction=180.0, model = "gabz_davispd_bench01"},
}

-- All beds that can be used to lie down
Config.Beds = {
    [`p_lestersbed_s`] = {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=0.0, direction=180.0, model = "p_lestersbed_s"},
    [`p_mbbed_s`] = {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=0.75, direction=180.0, model = "p_mbbed_s"},
    [`v_res_msonbed_s`] = {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=0.5, direction=180.0, model = "v_res_msonbed_s"},
    [`v_res_d_bed`] = {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=-0.61, direction=180.0, model = "v_res_d_bed"},
    [`v_res_lestersbed`] = {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=0.325, direction=180.0, model = "v_res_lestersbed"},
    [`v_res_mbbed`] = {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=0.35, direction=180.0, model = "v_res_mbbed"},
    [`v_res_mbbed_mess`] = {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=0.35, direction=180.0, model = "v_res_mbbed_mess"},
    [`v_res_mdbed`] = {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=0.4, direction=180.0, model = "v_res_mdbed"},
    [`v_res_msonbed`] = {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=0.5, direction=180.0, model = "v_res_msonbed"},
    [`v_res_tre_bed1`] = {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=0.6, direction=180.0, model = "v_res_tre_bed1"},
    [`v_res_tre_bed1_messy`] = {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=0.6, direction=180.0, model = "v_res_tre_bed1_messy"},
    [`v_res_tre_bed2`] = {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=0.5, direction=180.0, model = "v_res_tre_bed2"},
    [`v_res_tt_bed`] = {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=0.5, direction=180.0, model = "v_res_tt_bed"},
    [`v_med_bed1`] = {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=0.4, direction=180.0, model = "v_med_bed1"},
    [`v_med_bed2`] = {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=0.4, direction=180.0, model = "v_med_bed2"},
    [`v_med_emptybed`] = {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=0.1, direction=180.0, model = "v_med_emptybed"},
    [`apa_mp_h_bed_double_08`] = {vOffsetX=0.0, vOffsetY=-1.25, vOffsetZ=0.6, direction=180.0, model = "apa_mp_h_bed_double_08"},
    [`apa_mp_h_bed_double_09`] = {vOffsetX=0.0, vOffsetY=-1.25, vOffsetZ=0.6, direction=180.0, model = "apa_mp_h_bed_double_09"},
    [`apa_mp_h_bed_wide_05`] = {vOffsetX=0.0, vOffsetY=-1.25, vOffsetZ=0.6, direction=180.0, model = "apa_mp_h_bed_wide_05"},
    [`apa_mp_h_bed_with_table_02`] = {vOffsetX=0.0, vOffsetY=-1.25, vOffsetZ=1.0, direction=180.0, model = "apa_mp_h_bed_with_table_02"},
    [`apa_mp_h_yacht_bed_01`] = {vOffsetX=0.0, vOffsetY=-1.25, vOffsetZ=1.0, direction=180.0, model = "apa_mp_h_yacht_bed_01"},
    [`apa_mp_h_yacht_bed_02`] = {vOffsetX=0.0, vOffsetY=-1.25, vOffsetZ=1.0, direction=180.0, model = "apa_mp_h_yacht_bed_02"},
    [`h4_mp_h_yacht_bed_01`] = {vOffsetX=0.0, vOffsetY=-1.25, vOffsetZ=1.0, direction=180.0, model = "h4_mp_h_yacht_bed_01"},
    [`h4_mp_h_yacht_bed_02`] = {vOffsetX=0.0, vOffsetY=-1.25, vOffsetZ=1.0, direction=180.0, model = "h4_mp_h_yacht_bed_02"},
    [`sm_hanger_bedroom_tradbed`] =  {vOffsetX=0.0, vOffsetY=-1.25, vOffsetZ=1.0, direction=180.0, model = "sm_hanger_bedroom_tradbed"},
    [`imp_prop_impexp_campbed_01`] =  {vOffsetX=0.0, vOffsetY=0.0, vOffsetZ=0.75, direction=90.0, model = "imp_prop_impexp_campbed_01"},
}
```


# Known Errors

Right now only QBCore framework has a known conflict with this script.

{% hint style="danger" %}
**QBCore**

[qb-smallresources](https://github.com/qbcore-framework/qb-smallresources/blob/main/client/handsup.lua) Please remove the following exports

1. `exports['qb-smallresources']:addDisableControls(disableHandsupControls)`
2. `exports['qb-smallresources']:removeDisableControls(disableHandsupControls)`
   {% endhint %}


# cDev Library

{% hint style="info" %}
**What is this resource?**

This resource serves as a library that provides support for other resources that require smart code integrations, such as our vehicle shop and other planned resources for the FiveM platform.
{% endhint %}

## INSTALLATION GUIDE

### Step 1: Verify that you have the required dependencies installed

Before you can use this resource, you'll need to make sure that you have the following resources installed:

1. [oxmysql](https://github.com/overextended/oxmysql) or mysql-async

Double-check that these resources are installed and available on your server. If you're not sure whether you have them installed, you can check your server's resource list to confirm.

{% hint style="warning" %}
While mysql-async may be an option for connecting to a MySQL database, it is not recommended due to its outdated code and poor performance. It is generally better to use a more maintained and efficient resource, such as oxmysql, for database connections. We will not provide support for mysql-async.
{% endhint %}

{% hint style="danger" %}
Before using this resource, ensure that your server's artifacts are updated to version 5904 or higher.
{% endhint %}

### Step 2: Extract the files

1. Extract the contents of the `cdev-lib.zip` folder and place the resulting folder in your server's resource directory.
2. Add the resource to your server start configuration: `ensure cdev_lib` (if you are using a framework, it must be placed below the framework resource, such as es\_extended)

{% hint style="danger" %}
Do not modify the encrypted files in any way, as this may cause issues with the resource's functionality.
{% endhint %}

Next, you will perform basic configuration on the resource.


# Configuration

This page provides information and guidance on how to configure cDev Library

In order to edit the basic configuration of this resource you simply have to edit the following file:

```
cdev_lib/public/config/config.lua
```

{% hint style="info" %}
You can modify all config properties inside the PublicSharedConfig table.

Each property has its own description so you can understand what it does.
{% endhint %}

For additional framework-specific configuration please visit:

{% content-ref url="/pages/PkCCFDz1sdRi0ZwCg0nY" %}
[QBCore/QBox Configuration](https://docs.cdev.shop/fivem/cdev-library/qbcore-qbox-configuration)
{% endcontent-ref %}

{% content-ref url="/pages/Yi1MUNc2bDxhthgwzwsL" %}
[ESX Configuration](https://docs.cdev.shop/fivem/cdev-library/esx-configuration)
{% endcontent-ref %}


# QBCore/QBox Configuration

This page provides information and guidance on how to configure cDev Library for QBCore and QBOX

⚠ <mark style="color:yellow;">**Remember that since**</mark> <mark style="color:red;">**QBox**</mark> <mark style="color:yellow;">**is a customized**</mark> <mark style="color:red;">**QBCore**</mark><mark style="color:yellow;">**, you just need to keep the settings using**</mark><mark style="color:yellow;">**&#x20;**</mark><mark style="color:yellow;">**`qbcore`**</mark><mark style="color:yellow;">**&#x20;**</mark><mark style="color:yellow;">**and it will work correctly. Make any necessary changes in the**</mark> <mark style="color:red;">**QBCore**</mark> <mark style="color:yellow;">**files if needed.**</mark>

In order to edit optional configuration for QBCore you simply have to edit the following file:

```
cdev_lib/public/config/qbcore/qbcore_config.lua
```

{% hint style="info" %}
You can modify all config properties inside the PublicQBCoreConfig table.

Each property has its own description so you can understand what it does.
{% endhint %}

{% hint style="info" %}
Unless you have modified core aspects of your framework you don't have to worry about most of the configuration in this file.
{% endhint %}

<mark style="color:orange;">(Optional)</mark> Read more about permissions:

* [Permissions](https://docs.cdev.shop/fivem/cdev-library/permissions)

## Example of how the `config.lua` file will look for the <mark style="color:yellow;">QBCore</mark> framework

<figure><img src="https://1004862655-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPhIA9eCA4bwgx77hxx4i%2Fuploads%2F2qdmkLrBL1COYkZdhqcW%2FlibConfig.png?alt=media&amp;token=6d983467-d6fa-4f15-9ff6-880f316b5d70" alt=""><figcaption></figcaption></figure>

## Example of how the `config.lua` file will look for the <mark style="color:yellow;">QBOX</mark> framework

<figure><img src="https://1004862655-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPhIA9eCA4bwgx77hxx4i%2Fuploads%2FlGSqvF2vbsQbiNZeB0mc%2Fimage.png?alt=media&amp;token=6a4d7fe2-b55c-4839-a01d-754fa2b00c75" alt=""><figcaption></figcaption></figure>


# ESX Configuration

This page provides information and guidance on how to configure cDev Library for ESX

In order to edit optional configuration for ESX you simply have to edit the following file:

```
cdev_lib/public/config/esx/esx_config.lua
```

{% hint style="info" %}
You can modify all config properties inside the PublicESXConfig table.

Each property has its own description so you can understand what it does.
{% endhint %}

{% hint style="info" %}
Unless you have modified core aspects of your framework you don't have to worry about most of the configuration in this file.
{% endhint %}

<mark style="color:orange;">(Optional)</mark> Read more about permissions:

* [Permissions](https://docs.cdev.shop/fivem/cdev-library/permissions)

## Example of how the `config.lua` file will look for the <mark style="color:yellow;">ESX</mark> framework

<figure><img src="https://1004862655-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPhIA9eCA4bwgx77hxx4i%2Fuploads%2F25yUYaFDdIy1i6pflKbQ%2FLib%20Config.png?alt=media&amp;token=8132916c-75ab-4f99-8b20-a98c21613b48" alt=""><figcaption></figcaption></figure>


# Advanced Customization

The cDev Library offers a wide range of customization options, including the ability to customize nearly all aspects of it. This is possible even if you are using a custom framework

If you are using a custom framework make sure to set your **Framework** to `custom` in

```
cdev_lib/public/config/config.lua
```

Regardless of the framework you are using (such as ESX or QBCore), you can customize all aspects of the resource by modifying the client and server folders located in

```
cdev_lib/public/client/
cdev_lib/public/server/
```

These folders contain all the necessary functions in the `api.lua` file, which are commented to provide information on their purpose and allow you to tailor them to your specific needs.


# Permissions

To set the permission levels for each group within your framework, you can refer to this QBCore configuration file example

```
-- 👮 Determine permission levels for each QBCore group
-- 📣 PERMISSION_LOW = Lowest permission level
-- 📣 PERMISSION_MEDIUM = Medium permission level
-- 📣 PERMISSION_HIGH = Highest permission level
-- 📣 Permission level requirements are defined in the config for each resource
PermissionLevel = {
    god = PERMISSION_HIGH,
    admin = PERMISSION_HIGH,
    mod = PERMISSION_MEDIUM,
},
```

Here "god", "admin", and "mod" represent specific permission groups within the QBCore framework. Each of these groups is assigned a particular permission level, which determines the actions that users within these groups are able to perform.

{% hint style="info" %}
`PERMISSION_HIGH` represents the highest permission level.

`PERMISSION_MEDIUM` represents the medium permission level.

`PERMISSION_LOW` represents the lowest permission level.

`PERMISSION_NONE` represents no permission level.
{% endhint %}

{% hint style="info" %}
On individual cDev resources, you may find configuration parameters that specify the permission levels required for certain actions.

For example, the `ShopCreatorPermissionLevel` parameter in the Vehicle Shop resource typically requires the `PERMISSION_HIGH` level. This means that only users in the "god" and "admin" permission groups would be able to access the shop creator.
{% endhint %}


# VIP Integration

In order to configure VIP integration for your server, you can add all relevant code that checks if your player is VIP in:

```
cdev_lib/public/server/api.lua
```

In the function "isVIP" you are able to integrate code of your own liking below

```lua
    IsVIP = function(source)
        return true // integrate your code here
    end
```

## Ace Permission Example

```lua
    IsVIP = function(source)
        return IsPlayerAceAllowed(source, "vip")
    end
```

## Automating the VIP process using zDiscord

For server owners using [zDiscord](https://github.com/zfbx/zdiscord/blob/djs/config.js#L58) you can head to the `config.js` file on Line 59 include the following;

{% code title="zdiscord/config.js" %}

```javascript
const AutoAcePermissions = {
    "group.vip": "discordroleidhere", // You can create a VIP role and insert the role ID number here
};

```

{% endcode %}

Lastly you would add to your `server.cfg`

```tsconfig
add_ace group.vip vip allow
```

Congratz! Now your VIP feature is based off whether a user has a role or not!


# Vehicle Shop

Our multi-functional vehicle shop supports all GTA vehicles and provides an immersive experience for your players.

## SHOWCASE VIDEO

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

You can franchise vehicle shops across the map in any custom interior, giving your players the ability to purchase and customize their own vehicles. Offer this unique and engaging experience to your players today.

{% hint style="info" %}
**What is this resource?**

This resource is a comprehensive vehicle shop management system that allows you to create and manage multiple franchises, including:

* Car dealership
* Motorcycle dealership
* Plane dealership
* Helicopter dealership
* Boat dealership
* Utility dealership
* Bicycle dealership
* Emergency vehicle dealership

You can choose to run one or more of these franchises, or have all of them at once if you wish. The system provides the functionality you need to manage your shop effectively, regardless of the type of vehicles you sell.
{% endhint %}

### Showcase Video below (coming soon)


# Installation

{% hint style="warning" %}
**DISCLAIMER:** Please follow the setup guide of [cDev Library](https://docs.cdev.shop/fivem/cdev-library) first.
{% endhint %}

## INSTALLATION GUIDE

### Step 1: Verify that you have the required dependencies installed

Before you can use this resource, you'll need to make sure that you have the following resources installed:

1. cdev\_lib <mark style="color:green;">(included with this resource)</mark>
2. screenshot-basic <mark style="color:orange;">(optional)</mark>

Double-check that these resources are installed and available on your server. If you're not sure whether you have them installed, you can check your server's resource list to confirm.

{% hint style="info" %}
While screenshot-basic is optional it is required if you want to use our built-in vehicle thumbnail generator
{% endhint %}

{% hint style="danger" %}
Before using this resource, ensure that your server's artifacts are updated to version 5904 or higher.
{% endhint %}

### Step 2: Extract the files

1. Extract the contents of the `cdev-vehicleshop.zip` folder and place the resulting folder in your server's resource directory.
2. Add the resource to your server start configuration: `ensure cdev_lib` (if you are using a framework, it must be placed below the framework resource, such as es\_extended)

{% hint style="warning" %}
Make sure that cdev\_lib is started before cdev\_vehicleshop
{% endhint %}

{% hint style="danger" %}
Do not modify the encrypted files in any way, as this may cause issues with the resource's functionality.
{% endhint %}

Next, you will perform basic configuration on the resource.


# Configuration

Info page for general configuration of Vehicle Shop

{% hint style="warning" %}
**DISCLAIMER:** Please follow the setup guide of [cDev Library](https://docs.cdev.shop/fivem/cdev-library) first.
{% endhint %}

In order to edit the basic configuration of this resource you simply have to edit the following file:

```
cdev_vehicleshop/public/config/config.lua
```

{% hint style="info" %}
You can modify all config properties inside the PublicSharedResourceConfig table.

Each property has its own description so you can understand what it does.
{% endhint %}

<mark style="color:orange;">(Optional)</mark> Read more about permissions:

* [Permissions](https://docs.cdev.shop/fivem/cdev-library/permissions)


# Setting up a Dealership

Setting up a dealership is a simple and straightforward process that can be done in-game with ease.

{% hint style="warning" %}
You will need to have at least **admin** permission in QBCore/ESX to open the creator menu
{% endhint %}

## Creating a shop

1. Go where you want to set up your shop
2. Run the command `/cvshop` to open the creator menu
3. Press "**New Shop**" and start filling out the shop details
4. Press "**Set Blip Location**" to set the shop's blip location to where you are at
5. By pressing "**Setup Tablets**", "**Setup Spawns**", "**Setup Showroom**" and "**Setup Management**" you will open our in-game car placers and prop selectors. Follow the on-screen instructions to proceed.
6. Once finishing the setup press "**Create**"

{% hint style="info" %}
Click [here](https://docs.fivem.net/docs/game-references/blips/#blips) for a list of valid blip IDs and [here](https://docs.fivem.net/docs/game-references/blips/#blip-colors) for blip color IDs.
{% endhint %}

## Managing Employees

Once the shop is created, you can add employees using the creator menu by navigating to "Manage Shops" selecting your desired shop, and selecting "Employees". You can input their server id or use our in-game picker.

To use the native `/setjob` command in your framework, you can use the name of the shop in lowercase with no spaces, and add "shop" in front of it. For example:

* If your shop is called "Volkswagen", the job handle would be "shopvolkswagen".
* If your shop is called "Premium Motors", the job handle would be "shoppremiummotors".

Keep in mind that the job handle should not include any spaces.

The job grades are:

| Job Label  | Grade Level |
| ---------- | ----------- |
| Boss/Owner | 100         |
| Employee   | 0           |

{% hint style="info" %}
If you are trying out the shop, make sure to add yourself as the owner to have access to all management features.
{% endhint %}

{% hint style="warning" %}
Always make sure to press **Update** when doing any changes to an existing shop, as those changes will not be saved until you do so
{% endhint %}

## Shop Settings

As an owner, you can modify a few settings unique to that dealership. You can do that by interacting with any **Management** prop you've set and choosing the option "Shop Settings".

* **Resale Margin**\
  To maintain a balanced economy and fair profit margin, all vehicles in the dealership stock will be priced at a certain percentage higher than their purchase price. This setting allows you to adjust that percentage as needed.
* **Sale Employee Bonus**\
  For every sale an employee makes they will get paid this percentage out of the vehicle's total cost, while the remaining amount goes to the company vault.

## Miscellaneous Information

### Test Drives

In order to return a test drive vehicle, the employee must run the command `/returnvehicle` near the vehicle, or if it's a free shop the customer can do it themselves.

Next, you should start adding stock to the shop in order to see the showroom fill with vehicles.


# Stock Management

A dealership's stock is initially empty, but can be populated with new vehicles as you buy them.

{% hint style="info" %}
Only the dealership owner(s) are allowed to add stock to the dealership.
{% endhint %}

## Deposit money

You will need to deposit money into the company's vault before you can start buying vehicles, you can do that by interacting with any **Management** prop you've set and choosing the option "**Company Vault**"

## Buy Vehicles

You can buy vehicles in the stock browser by interacting with any **Management** prop you've set and choosing the option "**Manage Stock**".

Vehicles are available to buy in the **ORDER** tab from the stock browser.

{% hint style="warning" %}
All initial vehicles are obtained from your framework's configuration (Currently supported ESX and QBCore)

If you use a custom framework you will need to add those vehicles yourself through the creator menu. [Read More](https://docs.cdev.shop/fivem/vehicle-shop/vehicle-supply).
{% endhint %}


# Vehicle Supply

The vehicle supply is a pool of vehicles available for all shops to buy from and add to their own stock

{% hint style="info" %}
All initial vehicles are obtained from your framework's configuration (Currently supported ESX and QBCore)
{% endhint %}

{% hint style="info" %}
If you are using a custom framework, you will need to add your own supply of vehicles following the instructions below
{% endhint %}

{% hint style="warning" %}
You will need to have at least **admin** permission in QBCore/ESX to open the creator menu
{% endhint %}

## Managing Supply

1. Run the command `/cvshop` to open the creator menu
2. Press "**Manage Vehicle Supply**"
3. Press "Add Vehicle" or any of the existing vehicles if you wish to change them
4. Fill out the vehicle information such as Model (spawn code), Price, Thumbnail URL, or take a screenshot using our built-in tool.

## Screenshot Tool

Making thumbnails was made easier with a click of a button.

When adding/editing vehicle supply, press the "**Take Screenshot**" button after typing in the vehicle model, you will be transported to a clean room and all the necessary adjustments will be made in your camera for the perfect screenshot, after 3 seconds that task will be done and you can simply add your new vehicle to the supply without any extra work.

This tool may not be suitable for larger vehicles as the dimensions may not be compatible with our setup. However, you can modify the offsets in the exposed API code to customize it for your specific needs.

{% hint style="info" %}
This tool works by uploading a screenshot of the vehicle to your FiveM server. To ensure security, the thumbnail is requested from our secure proxy server, which then routes the request to your server and returns the thumbnail to the client over HTTPS. Despite being served from within your server, the request is made to our proxy server due to Cross-Origin rules.
{% endhint %}

{% hint style="danger" %}
If you are not seeing any thumbnails, make sure to open your server port (usually 30120). This is necessary even when running a local development server, as it allows the thumbnails to be routed through our proxy.
{% endhint %}

## Extra Settings

To quickly adjust the prices of all the vehicles in your stock at once, you can use the "Vehicle Supply Price Multiplier" setting in the "Settings" menu of the creator.

The default value for this setting is 1, which means that the prices of the vehicles will not be changed. If you increase the value to 1.5, for example, the prices of all the vehicles will be increased by 50%. Similarly, if you set the value to 2, the prices of all the vehicles will be doubled.

## Miscellaneous Information

### Updating Initial Supply

We recommend using our in-game menu for making any adjustments for vehicle supply, but if it suits you more to use your framework vehicles file, you will need to manually run the `/refreshsupply` command in order to update the database with the latest data from the file. This process takes a few seconds and you should see the live progress on your server's console.


# Troubleshooting

common issues that customers may experience & why

{% hint style="danger" %}

## I can't target any "tablet" or "management" prop after creating a shop

If you are using qb-target please make sure to update it to the latest version in their [GitHub](https://github.com/qbcore-framework/qb-target). You need to click on the green button "Code" and then click on "Download ZIP" since their latest release tag doesn't seem to be updated as of now. The minimum recommended version is `5.4.0`
{% endhint %}

{% hint style="danger" %}

## When I try /cvshop the menu doesn't open.

This is in most cases when **not getting any errors**;

Permission related (ACE\_PERMS)
{% endhint %}


# Chat System

Standalone chat system with customizeable chat channels!

## SHOWCASE VIDEO

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

## What is this resource?

cDev Chat is an excellent way to create custom chat channels with read/write permissions that are supported for jobs, permission groups & ace permissions.

<figure><img src="https://1004862655-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPhIA9eCA4bwgx77hxx4i%2Fuploads%2Fu4YHPjpKaMXsVMjtL6JC%2F6aJB9nS%5B1%5D.gif?alt=media&amp;token=013fb812-f2d6-4619-8651-7ce3d71dd5bc" alt=""><figcaption><p>Chat system showing various available channels</p></figcaption></figure>

## INSTALLATION GUIDE

{% content-ref url="/pages/HkTV2WNwdPMGu4wcS3vc" %}
[Installation Guide ESX Server](https://docs.cdev.shop/fivem/chat-system/installation-guide-esx-server)
{% endcontent-ref %}

{% content-ref url="/pages/RC2Yz2BJSSXAfKd4C5Cm" %}
[Installation Guide QBOX Server](https://docs.cdev.shop/fivem/chat-system/installation-guide-qbox-server)
{% endcontent-ref %}

{% content-ref url="/pages/TWXahpX1cPg6gUj2Bmkq" %}
[Installation Guide QBCore Server](https://docs.cdev.shop/fivem/chat-system/installation-guide-qbcore-server)
{% endcontent-ref %}

{% hint style="danger" %}
**Do not modify the encrypted files in any way, as this may cause issues with the resource's functionality.**
{% endhint %}

{% hint style="info" %}
**ACE PERMISSIONS**

`cdev_chat.manager`
{% endhint %}


# Installation Guide ESX Server

{% hint style="danger" %} <mark style="color:yellow;">Important:</mark> **Before you start the installation, if you have previously installed cdev\_chat, follow the steps below before proceeding with the installation steps.**
{% endhint %}

**➤ Step 1:** Completely delete the database table named **cdev\_chat\_channels**.

<div align="left" data-full-width="false"><figure><img src="https://1004862655-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPhIA9eCA4bwgx77hxx4i%2Fuploads%2FMrozXXv8GC5TubM48XOS%2Fheidisql_WYG2f4tPqf.gif?alt=media&amp;token=99020dd7-ca0a-4ebf-bcfb-2c0683e24b8f" alt="" width="536"><figcaption></figcaption></figure></div>

**➤ Step 2:** Delete the <mark style="color:yellow;">cdev\_lib</mark> and <mark style="color:yellow;">cdev\_chat</mark> resources from your **resources** folder.

{% hint style="success" %}
**All set! You can now start the installation guide below without any issues.**
{% endhint %}

{% stepper %}
{% step %}

### Install resource from [Portal](https://portal.cfx.re/assets/granted-assets)

**After installing, you should get a zip file with the name shown below.**

* <mark style="color:yellow;">cdev\_lib.pack.zip</mark>
* <mark style="color:yellow;">cdev\_chat.pack.zip</mark>
  {% endstep %}

{% step %}

### Extract and Organizing Your Resource Folders

🚩<mark style="color:red;">**Correct folder organization is essential for everything to work properly.**</mark>

➤ Step 1: Create the `[cdev]` folder. Inside your server's `resources` folder and Place **only** the following resource inside:

* <mark style="color:yellow;">cdev\_chat</mark>

➤ Step 2: Add `cdev_lib` to the Resources Root

**Below is an example screenshot showing the correct folder structure:**

![](https://1004862655-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPhIA9eCA4bwgx77hxx4i%2Fuploads%2FaHTAd2BTQTeDVhNN9A6O%2Fimage.png?alt=media\&token=0360899d-0784-49a5-b529-ad773d18b291)
{% endstep %}

{% step %}

### Server.cfg Configuration

This resource must always be started **after your&#x20;**<mark style="color:yellow;">**framework**</mark>**&#x20;and any&#x20;**<mark style="color:yellow;">**other**</mark>**&#x20;required resources**.

It is essential to follow the correct startup order to ensure proper functionality and avoid conflicts.

**➤ Step 1:** Inside the **server.cfg** file, look for the line `set resources_useSystemChat = true` and change **true** to **false**.

![](https://1004862655-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPhIA9eCA4bwgx77hxx4i%2Fuploads%2FdKqU0SOyov5VDepuzR0I%2FSem%20t%C3%ADtulo.png?alt=media\&token=ac5e98c3-d3dc-4f21-a9df-8268c098024b)

**➤ Step 2:** Add the ACE permission `add_ace group.admin cdev_chat.manager allow` so that you can control the chat as an admin, placing it <mark style="color:yellow;">bellow</mark> the `add_ace group.admin command.quit deny` line, just like shown in the picture below.![](https://1004862655-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPhIA9eCA4bwgx77hxx4i%2Fuploads%2F5a2NnXO9y6H9YcNXQKBx%2FSem%20t%C3%ADtulo.png?alt=media\&token=7475416c-738c-4230-9c5c-4faacd28084a)

**➤ Step 3:** Remove the line `ensure chat`, and if you have it, also remove the line `ensure chat-theme-gtao`.

**➤ Step 4:** Start the resources <mark style="color:yellow;">cdev\_lib</mark> and <mark style="color:yellow;">\[cdev]</mark> after all the other <mark style="color:red;">resources</mark> — it’s very important that it’s done exactly as shown in the picture below.

<figure><img src="https://1004862655-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPhIA9eCA4bwgx77hxx4i%2Fuploads%2FBVkYo7P4dnUHPMS8rsdk%2Fimage.png?alt=media&amp;token=8dfa2731-3475-4c68-8d91-0cb1ad17ca2f" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Deleting default chat resources

{% hint style="danger" %}
Inside your server’s **resources** folder, use the Windows search bar to look for **chat** and delete all of them except **cdev\_chat**, as showbelow.
{% endhint %}

```lua
cdev_chat (Not Delete)
esx_chat_theme (Delete) #resources\[core]
chat-theme-gtao (Delete) #resources\[cfx-default]\[gameplay]
esx_rpchat (Delete) #resources\[esx_addons]
#If have another folder with chat delete too
```

{% endstep %}

{% step %}

### Cdev\_lib Configuration

For the cdev\_chat and the connection between your <mark style="color:yellow;">framework</mark> and the resources to work correctly, you need to configure the `cdev_lib` resource properly according to your <mark style="color:yellow;">framework</mark>. For more details, click the link below to follow the instructions.

{% tabs %}
{% tab title="ESX" %}
{% content-ref url="/pages/Yi1MUNc2bDxhthgwzwsL" %}
[ESX Configuration](https://docs.cdev.shop/fivem/cdev-library/esx-configuration)
{% endcontent-ref %}
{% endtab %}
{% endtabs %}
{% endstep %}

{% step %}

### Cdev\_chat Configuration

**➤ Step 1:** Open the <mark style="color:yellow;">config.lua</mark> file located in the folder **`[cdev] > cdev_chat > public > config > config.lua`**

**➤ Step 2:** On line <mark style="color:yellow;">58</mark>, you’ll see a setting called `UseFallbackIcons = false`. Change **false** to **true**, so it becomes `UseFallbackIcons = true`.

**➤ Step 3:** If you want to add more icons, follow the step-by-step instructions below.

<mark style="color:red;">To add new icons:</mark>\ <mark style="color:red;">-</mark> Drop your .svg files in `cdev_chat/data/icons`\ <mark style="color:red;">-</mark> Open the file: `cdev_chat/public/config/config.lua`

**On line 59, add new icon example:**

```lua
FallbackIcons = {
    "alert.svg",
    "megaphone.svg",
    "message.svg",
    "person.svg",
    "newIcon.svg", -- New Icon Add
}
```

{% endstep %}

{% step %}

### How create new Chat Group

{% hint style="info" %}
**To have access to the** <mark style="color:$success;">chat</mark> **command, you need to have added the** <mark style="color:yellow;">ACE permission</mark> **for the** <mark style="color:yellow;">admin</mark> <mark style="color:red;">group</mark>**, and your account must belong to the** <mark style="color:yellow;">admin</mark> <mark style="color:red;">group</mark>**.**\
\
⚠ The **Input Icon** field refers to the icons defined in the **FallbackIcons** configuration, with an example above showing how to add them.
{% endhint %}

<figure><img src="https://1004862655-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPhIA9eCA4bwgx77hxx4i%2Fuploads%2FRfjRHqk0IXykM3fupQSG%2FFiveM_GTAProcess_LnPmIEUSl0-_online-video-cutter.com_.gif?alt=media&amp;token=48cb15da-4dc0-4a86-9bd5-d17492a58480" alt=""><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}


# Installation Guide QBOX Server

{% hint style="danger" %} <mark style="color:yellow;">Important:</mark> **Before you start the installation, if you have previously installed cdev\_chat, follow the steps below before proceeding with the installation steps.**
{% endhint %}

**➤ Step 1:** Completely delete the database table named **cdev\_chat\_channels**.

<div align="left" data-full-width="false"><figure><img src="https://1004862655-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPhIA9eCA4bwgx77hxx4i%2Fuploads%2FMrozXXv8GC5TubM48XOS%2Fheidisql_WYG2f4tPqf.gif?alt=media&amp;token=99020dd7-ca0a-4ebf-bcfb-2c0683e24b8f" alt="" width="536"><figcaption></figcaption></figure></div>

**➤ Step 2:** Delete the <mark style="color:yellow;">cdev\_lib</mark> and <mark style="color:yellow;">cdev\_chat</mark> resources from your **resources** folder.

{% hint style="success" %}
**All set! You can now start the installation guide below without any issues.**
{% endhint %}

{% stepper %}
{% step %}

### Install resource from [Portal](https://portal.cfx.re/assets/granted-assets)

**After installing, you should get a zip file with the name shown below.**

* <mark style="color:yellow;">cdev\_lib.pack.zip</mark>
* <mark style="color:yellow;">cdev\_chat.pack.zip</mark>
  {% endstep %}

{% step %}

### Extract and Organizing Your Resource Folders

🚩<mark style="color:red;">**Correct folder organization is essential for everything to work properly.**</mark>

➤ Step 1: Create the `[cdev]` folder. Inside your server's `resources` folder and Place **only** the following resource inside:

* <mark style="color:yellow;">cdev\_chat</mark>

➤ Step 2: Add `cdev_lib` to the Resources Root

**Below is an example screenshot showing the correct folder structure:**

<div align="left"><figure><img src="https://1004862655-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPhIA9eCA4bwgx77hxx4i%2Fuploads%2FhPSySX7gHe4PfWAqYmkH%2Fimage.png?alt=media&amp;token=241564f1-dc28-46da-9834-8232b56abcb3" alt=""><figcaption></figcaption></figure></div>
{% endstep %}

{% step %}

### Server.cfg Configuration

This resource must always be started **after your&#x20;**<mark style="color:yellow;">**framework**</mark>**&#x20;and any&#x20;**<mark style="color:yellow;">**other**</mark>**&#x20;required resources**.

It is essential to follow the correct startup order to ensure proper functionality and avoid conflicts.

**➤ Step 1:** Inside the **server.cfg** file, look for the line `set resources_useSystemChat = true` and change **true** to **false and** also set false for the others options chat `chat_showJoins false` and `chat_showQuits false` .

<div align="left"><figure><img src="https://1004862655-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPhIA9eCA4bwgx77hxx4i%2Fuploads%2FUEUezAUc5qXQkKN2tkp3%2Fimage.png?alt=media&amp;token=ec7ac6e6-6b18-4241-b060-0a6f7dcf5ea1" alt=""><figcaption></figcaption></figure></div>

**➤ Step 2:** Add the ACE permission `add_ace group.admin cdev_chat.manager allow` so that you can control the chat as an admin, placing it insdie <mark style="color:yellow;">permissions.cfg</mark> file. After you open the file bellow the permissions from Ox Lib add new Permission for Cdev Chat like the image <mark style="color:yellow;">bellow</mark>

<figure><img src="https://1004862655-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPhIA9eCA4bwgx77hxx4i%2Fuploads%2FmtuHNisOwJm86DmIC8E5%2Fimage.png?alt=media&amp;token=8ab2c18e-a185-4030-b993-94b0c41acce4" alt=""><figcaption></figcaption></figure>

**➤ Step 3: Inside the server.cfg file r**emove the line `ensure chat`, and if you have it, also remove the line `ensure chat-theme-gtao`

**➤ Step 4:** Start the resources <mark style="color:yellow;">cdev\_lib</mark> and <mark style="color:yellow;">\[cdev]</mark> after all the other <mark style="color:red;">resources</mark> — it’s very important that it’s done exactly as shown in the picture below.

<div align="left"><figure><img src="https://1004862655-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPhIA9eCA4bwgx77hxx4i%2Fuploads%2F9wpRR41dd7G5K6TDrpxa%2Fimage.png?alt=media&amp;token=6c61a3cc-9f75-49c5-877d-405a6d186096" alt=""><figcaption></figcaption></figure></div>
{% endstep %}

{% step %}

### Deleting default chat resources

{% hint style="danger" %}
Inside your server’s **resources** folder, use the Windows search bar to look for **chat** and delete all of them except **cdev\_chat**, as showbelow.
{% endhint %}

```lua
cdev_chat (Not Delete)
qbx_chat_theme (Delete) [qbx] > qbx_chat_theme
chat-theme-gtao (Delete) [cfx-default] > [gameplay]
#If have another folder with chat delete too
```

{% endstep %}

{% step %}

### Cdev\_lib Configuration

For the cdev\_chat and the connection between your <mark style="color:yellow;">framework</mark> and the resources to work correctly, you need to configure the `cdev_lib` resource properly according to your <mark style="color:yellow;">framework</mark>. For more details, click the link below to follow the instructions.

{% tabs %}
{% tab title="QBOX" %}
{% content-ref url="/pages/PkCCFDz1sdRi0ZwCg0nY" %}
[QBCore/QBox Configuration](https://docs.cdev.shop/fivem/cdev-library/qbcore-qbox-configuration)
{% endcontent-ref %}
{% endtab %}
{% endtabs %}
{% endstep %}

{% step %}

### Cdev\_chat Configuration

**➤ Step 1:** Open the <mark style="color:yellow;">config.lua</mark> file located in the folder **`[cdev] > cdev_chat > public > config > config.lua`**

**➤ Step 2:** On line <mark style="color:yellow;">58</mark>, you’ll see a setting called `UseFallbackIcons = false`. Change **false** to **true**, so it becomes `UseFallbackIcons = true`.

**➤ Step 3:** If you want to add more icons, follow the step-by-step instructions below.

<mark style="color:red;">To add new icons:</mark>\ <mark style="color:red;">-</mark> Drop your .svg files in `cdev_chat/data/icons`\ <mark style="color:red;">-</mark> Open the file: `cdev_chat/public/config/config.lua`

**On line 59, add new icon example:**

```lua
FallbackIcons = {
    "alert.svg",
    "megaphone.svg",
    "message.svg",
    "person.svg",
    "newIcon.svg", -- New Icon Add
}
```

{% endstep %}

{% step %}

### How create new Chat Group

{% hint style="info" %}
**To have access to the** <mark style="color:$success;">chat</mark> **command, you need to have added the** <mark style="color:yellow;">ACE permission</mark> **for the** <mark style="color:yellow;">admin</mark> <mark style="color:red;">group</mark>**, and your account must belong to the** <mark style="color:yellow;">admin</mark> <mark style="color:red;">group</mark>**.**\ <br>
{% endhint %}

<figure><img src="https://1004862655-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPhIA9eCA4bwgx77hxx4i%2Fuploads%2FRfjRHqk0IXykM3fupQSG%2FFiveM_GTAProcess_LnPmIEUSl0-_online-video-cutter.com_.gif?alt=media&amp;token=48cb15da-4dc0-4a86-9bd5-d17492a58480" alt=""><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}


# Installation Guide QBCore Server

{% hint style="danger" %} <mark style="color:yellow;">Important:</mark> **Before you start the installation, if you have previously installed cdev\_chat, follow the steps below before proceeding with the installation steps.**
{% endhint %}

**➤ Step 1:** Completely delete the database table named **cdev\_chat\_channels**.

<div align="left" data-full-width="false"><figure><img src="https://1004862655-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPhIA9eCA4bwgx77hxx4i%2Fuploads%2FMrozXXv8GC5TubM48XOS%2Fheidisql_WYG2f4tPqf.gif?alt=media&amp;token=99020dd7-ca0a-4ebf-bcfb-2c0683e24b8f" alt="" width="536"><figcaption></figcaption></figure></div>

**➤ Step 2:** Delete the <mark style="color:yellow;">cdev\_lib</mark> and <mark style="color:yellow;">cdev\_chat</mark> resources from your **resources** folder.

{% hint style="success" %}
**All set! You can now start the installation guide below without any issues.**
{% endhint %}

{% stepper %}
{% step %}

### Install resource from [Portal](https://portal.cfx.re/assets/granted-assets)

**After installing, you should get a zip file with the name shown below.**

* <mark style="color:yellow;">cdev\_lib.pack.zip</mark>
* <mark style="color:yellow;">cdev\_chat.pack.zip</mark>
  {% endstep %}

{% step %}

### Extract and Organizing Your Resource Folders

🚩<mark style="color:red;">**Correct folder organization is essential for everything to work properly.**</mark>

➤ Step 1: Create the `[cdev]` folder. Inside your server's `resources` folder and Place **only** the following resource inside:

* <mark style="color:yellow;">cdev\_chat</mark>

➤ Step 2: Add `cdev_lib` to the Resources Root

**Below is an example screenshot showing the correct folder structure:**

<figure><img src="https://1004862655-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPhIA9eCA4bwgx77hxx4i%2Fuploads%2Ff18JKgORpOu08alayrmx%2Fimage.png?alt=media&amp;token=7aa80cac-6014-4713-a546-48782c7cccb5" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Server.cfg Configuration

This resource must always be started **after your&#x20;**<mark style="color:yellow;">**framework**</mark>**&#x20;and any&#x20;**<mark style="color:yellow;">**other**</mark>**&#x20;required resources**.

It is essential to follow the correct startup order to ensure proper functionality and avoid conflicts.

**➤ Step 1:** Inside the **server.cfg** file, look for the line `set resources_useSystemChat = true` and change **true** to **false and** also set false for the others options chat `chat_showJoins false` and `chat_showQuits false` .

<div align="left"><figure><img src="https://1004862655-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPhIA9eCA4bwgx77hxx4i%2Fuploads%2FUEUezAUc5qXQkKN2tkp3%2Fimage.png?alt=media&amp;token=ec7ac6e6-6b18-4241-b060-0a6f7dcf5ea1" alt=""><figcaption></figcaption></figure></div>

**➤ Step 2:** Add the ACE permission `add_ace group.admin cdev_chat.manager allow` so that you can control the chat as an admin, placing it bellow the line <kbd>add\_ace resourece.qb-core command allow</kbd> .

**➤ Step 3: Inside the server.cfg file r**emove the line `ensure chat`, and if you have it, also remove the line `ensure chat-theme-gtao`

**➤ Step 4:** Start the resources <mark style="color:yellow;">cdev\_lib</mark> and <mark style="color:yellow;">\[cdev]</mark> after all the other <mark style="color:red;">resources</mark> — it’s very important that it’s done exactly as shown in the picture below.

<div align="left"><figure><img src="https://1004862655-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPhIA9eCA4bwgx77hxx4i%2Fuploads%2FwFYp4aQCJQDQRHdvWpbz%2Fimage.png?alt=media&amp;token=02c1e1d3-9925-4676-bd2e-0d8f0fee2140" alt=""><figcaption></figcaption></figure></div>
{% endstep %}

{% step %}

### Deleting default chat resources

{% hint style="danger" %}
Inside your server’s **resources** folder, use the Windows search bar to look for **chat** and delete all of them except **cdev\_chat**, as showbelow.
{% endhint %}

```lua
cdev_chat (Not Delete)
chat-theme-gtao (Delete) [cfx-default] > [gameplay]
#If have another folder with chat delete too
```

{% endstep %}

{% step %}

### Cdev\_lib Configuration

For the cdev\_chat and the connection between your <mark style="color:yellow;">framework</mark> and the resources to work correctly, you need to configure the `cdev_lib` resource properly according to your <mark style="color:yellow;">framework</mark>. For more details, click the link below to follow the instructions.

{% tabs %}
{% tab title="QBOX" %}
{% content-ref url="/pages/PkCCFDz1sdRi0ZwCg0nY" %}
[QBCore/QBox Configuration](https://docs.cdev.shop/fivem/cdev-library/qbcore-qbox-configuration)
{% endcontent-ref %}
{% endtab %}
{% endtabs %}
{% endstep %}

{% step %}

### Cdev\_chat Configuration

**➤ Step 1:** Open the <mark style="color:yellow;">config.lua</mark> file located in the folder **`[cdev] > cdev_chat > public > config > config.lua`**

**➤ Step 2:** On line <mark style="color:yellow;">58</mark>, you’ll see a setting called `UseFallbackIcons = false`. Change **false** to **true**, so it becomes `UseFallbackIcons = true`.

**➤ Step 3:** If you want to add more icons, follow the step-by-step instructions below.

<mark style="color:red;">To add new icons:</mark>\ <mark style="color:red;">-</mark> Drop your .svg files in `cdev_chat/data/icons`\ <mark style="color:red;">-</mark> Open the file: `cdev_chat/public/config/config.lua`

**On line 59, add new icon example:**

```lua
FallbackIcons = {
    "alert.svg",
    "megaphone.svg",
    "message.svg",
    "person.svg",
    "newIcon.svg", -- New Icon Add
}
```

{% endstep %}

{% step %}

### How create new Chat Group

{% hint style="info" %}
**To have access to the** <mark style="color:$success;">chat</mark> **command, you need to have added the** <mark style="color:yellow;">ACE permission</mark> **for the** <mark style="color:yellow;">admin</mark> <mark style="color:red;">group</mark>**, and your account must belong to the** <mark style="color:yellow;">admin</mark> <mark style="color:red;">group</mark>**.**\ <br>
{% endhint %}

<figure><img src="https://1004862655-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPhIA9eCA4bwgx77hxx4i%2Fuploads%2FRfjRHqk0IXykM3fupQSG%2FFiveM_GTAProcess_LnPmIEUSl0-_online-video-cutter.com_.gif?alt=media&amp;token=48cb15da-4dc0-4a86-9bd5-d17492a58480" alt=""><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}


# Premium Notify & Text UI

Standalone chat notification & text ui system

## SHOWCASE VIDEO

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

## What is this resource?

This resource provides you a more styled & premium look to your default notifications for your players, this also includes custom text UI for game specific actions.

<figure><img src="https://cdn.discordapp.com/attachments/1005846549680631908/1098350282355781813/NOTIFY_PREMIUM_BANNER.png" alt=""><figcaption></figcaption></figure>

## INSTALLATION GUIDE

### Step 1: Verify that you have the required dependencies installed

Before you can use this resource, you'll need to make sure that you have the following resources installed:

1. cdev\_lib <mark style="color:green;">(included with this resource)</mark>

### Step 2: Extract the files

1. Extract the contents of the `cdev-notify.zip` folder and place the resulting folder in your server's resource directory.

{% hint style="warning" %}
Make sure that cdev\_lib is started before cdev\_notify
{% endhint %}

{% hint style="danger" %}
**Do not modify the encrypted files in any way, as this may cause issues with the resource's functionality.**
{% endhint %}


# Configuration

{% hint style="danger" %}
**WARNING**

Before installing the cdev\_notify resource please ensure you have properly configured [cdev\_lib](https://docs.cdev.shop/fivem/cdev-library) first!
{% endhint %}

{% hint style="warning" %}
**Using a notification system already?**

We provide hooks within our configuration files for ease of compatibility with existing resources such as OKOKNotify
{% endhint %}


# Notify Exports

* Notify
* Success
* Info
* Warning
* Error
* Phone

## **Example export**

```lua
exports["cdev_notify"]:Success("You did it!", "You sent a notification!", 3000)
```

## **Example server event**

```lua
TriggerClientEvent("cdev_notify:success", source, "You did it!", "You sent a notification!", 3000)
```

## Server Events

* cdev\_notify:notify
* cdev\_notify:success
* cdev\_notify:info
* cdev\_notify:warning
* cdev\_notify:error
* cdev\_notify:phone

{% hint style="warning" %}
**Parameters of either exports and events are:**

title, message, duration, playSfx (optional, default from configuration)

Alternatively, you can use export Notify and event cdev\_notify:notify providing the first parameter type which can be "warning", "success" etc.
{% endhint %}


# Text UI Exports

* OpenTextUI
* CloseTextUI

**Server events**

* cdev\_notify:openTextUI
* cdev\_notify:closeTextUI

## Example export

```lua
exports["cdev_notify"]:OpenTextUI("Open Door", "E")
--
exports["cdev_notify"]:CloseTextUI("E")
```

## Example server event

```lua
TriggerClientEvent("cdev_notify:openTextUI", source, "Open Door", "E")
--
TriggerClientEvent("cdev_notify:closeTextUI", source, "E")
```

{% hint style="warning" %}
**Parameters of either exports and events are:**

title, key, color (optional, default from configuration)

You can open multiple text UI for different keys, and close them providing the same key as in the example
{% endhint %}


# Pet System

Standalone advanced Pet System

## SHOWCASE VIDEO

{% embed url="<https://youtu.be/9perfvfwDF0>" %}

## What is this resource?

This resource is a companionship script that provides entertainment, customization of appearance and other refined details ([features listed here](https://fivem.cdev.shop/category/scripts)) that makes this the best pet script for your **FiveM** server.

## Instructional Video: Setting up Shops

📝 **Creating Shop Command:** `/pscreator`

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

### Installation Guide

***

{% stepper %}
{% step %}

## Install all resource dependencies

Make sure you have all of the following resources installed:

* cdev\_lib <mark style="color:green;">(Include with cdev\_pets)</mark>
* cdev\_pets
* cdev\_pets\_assets <mark style="color:green;">(Include with cdev\_pets)</mark>
* cdev\_pets\_assets2 <mark style="color:green;">(Include with cdev\_pets)</mark>
  {% endstep %}

{% step %}

## Organizing Your Resource Folders

🚩 <mark style="color:red;">**Correct folder organization is essential for everything to work properly.**</mark>

➤ Step 1: Create the `[cdev]` folder. Inside your server's `resources` folder and Place **only** the following resource inside:

* cdev\_pets

➤ Step 2: Create the `[cdev_assets]` folder till inside your server’s `resources` folder, Inside `[cdev_assets]`, place the following assets:

⚠ <mark style="color:yellow;">**If you have the**</mark> [<mark style="color:blue;">**Pet Subscription DLC Package**</mark>](https://fivem.cdev.shop/package/5756559)<mark style="color:yellow;">**, you must place inside the**</mark> **`[cdev_assets]`** <mark style="color:yellow;">**folder**</mark> <mark style="color:red;">**only**</mark> <mark style="color:yellow;">**the resources folders that are under the**</mark> <mark style="color:red;">**(Have Pets Subscription)**</mark> <mark style="color:yellow;">**tab bellow.**</mark>

{% tabs %}
{% tab title="Don't have Pets Subscription" %}

| CFX Portal Name                       | Folder Name (after download) |
| ------------------------------------- | ---------------------------- |
| cDev - Cat American                   | cdev\_cat\_amer              |
| cDev Pets Assets Premium - Dobbermann | cdev\_dog\_dobb              |
| cDev Pets Assets Premium - Rottweiler | cdev\_dog\_rott              |
| cDev Pets Assets                      | cdev\_pets\_assets           |
| cDev Pets Assets 2                    | cdev\_pets\_assets2          |
| {% endtab %}                          |                              |

{% tab title="Have Pets Subscription" %}

| CFX Portal Name                  | Folder Name (after download) |
| -------------------------------- | ---------------------------- |
| cDev Pets Assets Compiled Dogs   | cdev\_dog\_pets              |
| cDev Pets Assets Compiled Dogs 2 | cdev\_dog\_pets2             |
| cDev Pets Assets Compiled Cats   | cdev\_cat\_pets              |
| cDev Pets Assets                 | cdev\_pets\_assets           |
| cDev Pets Assets 2               | cdev\_pets\_assets2          |
| cDev PetShop                     | cdev\_petshop                |
| {% endtab %}                     |                              |
| {% endtabs %}                    |                              |

➤ Step 3: Add `cdev_lib` to the Resources Root

**Below is an example screenshot showing the correct folder structure:**

<div align="left"><figure><img src="https://1004862655-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPhIA9eCA4bwgx77hxx4i%2Fuploads%2FRex2jkra71M7A3tAYoYQ%2Ffolcders.png?alt=media&amp;token=b0749998-1d1b-45d7-89ae-ed362b39e376" alt=""><figcaption></figcaption></figure></div>
{% endstep %}

{% step %}

## Server.cfg Configuration

This resource must always be started **after your&#x20;**<mark style="color:yellow;">**framework**</mark>**&#x20;and any&#x20;**<mark style="color:yellow;">**other**</mark>**&#x20;required resources**.

It is essential to follow the correct startup order to ensure proper functionality and avoid conflicts.

**Below is an example screenshot showing the recommended startup order:**

<div align="left"><figure><img src="https://1004862655-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPhIA9eCA4bwgx77hxx4i%2Fuploads%2FyAmYnqawQNKWjUmp7R0J%2Fcfg.png?alt=media&amp;token=b1023c83-776f-4422-aeeb-9a6f558f9883" alt=""><figcaption></figcaption></figure></div>
{% endstep %}

{% step %}

### Cdev\_lib Configuration

For the pet system and the connection between your <mark style="color:yellow;">framework</mark> and the resources to work correctly, you need to configure the `cdev_lib` resource properly according to your <mark style="color:yellow;">framework</mark>. For more details, click the link below to follow the instructions.

{% tabs %}
{% tab title="ESX" %}
{% content-ref url="/pages/Yi1MUNc2bDxhthgwzwsL" %}
[ESX Configuration](https://docs.cdev.shop/fivem/cdev-library/esx-configuration)
{% endcontent-ref %}
{% endtab %}

{% tab title="QBCore/QBOX" %}
{% content-ref url="/pages/PkCCFDz1sdRi0ZwCg0nY" %}
[QBCore/QBox Configuration](https://docs.cdev.shop/fivem/cdev-library/qbcore-qbox-configuration)
{% endcontent-ref %}
{% endtab %}

{% tab title="Custom Framework" %}
{% content-ref url="/pages/t35JeKJHIe4wFFf66V5G" %}
[Advanced Customization](https://docs.cdev.shop/fivem/cdev-library/advanced-customization)
{% endcontent-ref %}
{% endtab %}
{% endtabs %}
{% endstep %}

{% step %}

### (Optional) If you use any multijob or want full integration

{% tabs %}
{% tab title="Qbcore" %}
{% content-ref url="/pages/b8mP9d0rdvzcqTHrLLkL" %}
[How integrate Jobs with Pets QBCore](https://docs.cdev.shop/fivem/pet-system/how-integrate-jobs-with-pets-qbcore)
{% endcontent-ref %}
{% endtab %}

{% tab title="Qbox" %}
{% content-ref url="/pages/JGyUFGw8ihu0kUt2mfZB" %}
[How integrate Jobs with Pets QBox](https://docs.cdev.shop/fivem/pet-system/how-integrate-jobs-with-pets-qbox)
{% endcontent-ref %}
{% endtab %}
{% endtabs %}

{% hint style="danger" %}
**It is necessary to follow the steps exactly as shown for the names to work.**
{% endhint %}
{% endstep %}
{% endstepper %}

***

{% hint style="danger" %}
To be able to stream the pets and clothing in game, you must have an active CFX Element Club Subscription!\
\
You can check [HERE](https://portal.cfx.re/subscriptions) to see any active subscriptions
{% endhint %}

{% hint style="danger" %}
**Do not modify the encrypted files in any way, as this may cause issues with the resource's functionality.**
{% endhint %}

{% hint style="warning" %}
cDev Pets Version 2.5.0 requires users that already have this script running to run a query to add new columns to a table;

\
`ALTER TABLE cdev_pets ADD sniff INT(11) NOT NULL, ADD resistance INT(11) NOT NULL, ADD agility INT(11) NOT NULL, ADD attack INT(11) NOT NULL;`
{% endhint %}


# Configuration

{% hint style="warning" %}
**DISCLAIMER:** Please follow the setup guide of [cDev Library](https://docs.cdev.shop/fivem/cdev-library) first.
{% endhint %}

In order to edit the basic configuration of this resource you simply have to edit the following file:

```
cdev_pets/public/config/config.lua
```


# (NEW) Features

{% hint style="danger" %}
For the new features to work correctly, the resources listed below must be updated to the versions indicated.

**cdev\_lib** <mark style="color:yellow;">^2.6.3</mark>\
**cdev\_pets** <mark style="color:yellow;">^3.2.2</mark>\
\
You can update your resources inside [Portal CFX](https://portal.cfx.re/)
{% endhint %}

{% content-ref url="/pages/PD3wcvvMhkaAfSj42VrC" %}
[Veterinary System](https://docs.cdev.shop/fivem/pet-system/new-features/veterinary-system)
{% endcontent-ref %}

{% content-ref url="/pages/ADijMlD9MoGdpuaYEsSF" %}
[Pet Manager (Admin Tool)](https://docs.cdev.shop/fivem/pet-system/new-features/pet-manager-admin-tool)
{% endcontent-ref %}

{% content-ref url="/pages/MFSnHodMHigIjw4O9s8q" %}
[Routing Bucket System](https://docs.cdev.shop/fivem/pet-system/new-features/routing-bucket-system)
{% endcontent-ref %}

{% hint style="danger" %}
For the new features to work correctly, the resources listed below must be updated to the versions indicated.

**cdev\_lib** <mark style="color:yellow;">^2.6.6</mark>\
**cdev\_pets** <mark style="color:yellow;">^3.2.7</mark>\
\
You can update your resources inside [Portal CFX](https://portal.cfx.re/)
{% endhint %}

{% content-ref url="/pages/GaxJfeg8eW5UO8VDio01" %}
[Pet Transfer System](https://docs.cdev.shop/fivem/pet-system/new-features/pet-transfer-system)
{% endcontent-ref %}

{% hint style="danger" %}
For the new features to work correctly, the resources listed below must be updated to the versions indicated.\
**cdev\_pets** <mark style="color:yellow;">^3.2.8</mark>\
\
You can update your resources inside [Portal CFX](https://portal.cfx.re/)
{% endhint %}

{% content-ref url="/pages/Asd0MkddJgIQxY0qbz8a" %}
[Show Blip on Map](https://docs.cdev.shop/fivem/pet-system/new-features/show-blip-on-map)
{% endcontent-ref %}

{% hint style="danger" %}
For the new features to work correctly, the resources listed below must be updated to the versions indicated.\
**cdev\_pets** <mark style="color:yellow;">^3.3.1</mark>\
\
You can update your resources inside [Portal CFX](https://portal.cfx.re/)
{% endhint %}

{% content-ref url="/pages/zA0pnbLaL7DdGGWqFLZ2" %}
[Pet Movement & Follow System](https://docs.cdev.shop/fivem/pet-system/new-features/pet-movement-and-follow-system)
{% endcontent-ref %}

{% hint style="danger" %}
For the new features to work correctly, the resources listed below must be updated to the versions indicated.\
**cdev\_pets** <mark style="color:yellow;">^3.3.2</mark>\
\
You can update your resources inside [Portal CFX](https://portal.cfx.re/)
{% endhint %}

{% content-ref url="/pages/KrOlJtUGC7fx7Ae2oXmk" %}
[Pet Place Preview](https://docs.cdev.shop/fivem/pet-system/new-features/pet-place-preview)
{% endcontent-ref %}

{% hint style="danger" %}
For the new features to work correctly, the resources listed below must be updated to the versions indicated.\
**cdev\_pets** <mark style="color:yellow;">^3.4.5</mark>

**cdev\_lib** <mark style="color:yellow;">^2.7.3</mark>\
\
You can update your resources inside [Portal CFX](https://portal.cfx.re/)
{% endhint %}

{% content-ref url="/pages/q57oMGATJ4mR2fVwUdwU" %}
[Custom Currency in Pet Shop](https://docs.cdev.shop/fivem/pet-system/new-features/custom-currency-in-pet-shop)
{% endcontent-ref %}

{% hint style="danger" %}
For the new features to work correctly, the resources listed below must be updated to the versions indicated.\
**cdev\_pets** <mark style="color:yellow;">^3.4.7</mark>

**xsound** <mark style="color:yellow;">^1.1.0 (Optional)</mark>\
\
You can update your resources inside [Portal CFX](https://portal.cfx.re/)
{% endhint %}

{% content-ref url="/pages/JdoqXN3Hro5HPehRjjBp" %}
[Custom Sounds for Pets (Vocalization)](https://docs.cdev.shop/fivem/pet-system/new-features/custom-sounds-for-pets-vocalization)
{% endcontent-ref %}


# Veterinary System

## 🩺 Veterinary System

{% hint style="success" %}
**NEW FEATURE!** Full veterinary roleplay with emergency revival and treatment tables!
{% endhint %}

### 📋 Overview

The **Veterinary System** introduces complete pet healthcare to your server. Veterinarians can revive dead pets on-the-spot with Quick Heal or provide comprehensive treatment using Treatment Tables that restore health, hunger, and thirst.

**Perfect for:**

* 🏥 Medical roleplay opportunities
* 🐕 Pet owner immersion
* 💼 Veterinarian job content
* 🎭 Emergency pet rescue scenarios

***

### ✨ Key Features

<table data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-cover data-type="files"></th></tr></thead><tbody><tr><td><strong>💉 Quick Heal</strong></td><td>Emergency revival for dead pets with partial HP recovery</td><td></td></tr><tr><td><strong>🛏️ Treatment Tables</strong></td><td>Full medical care restoring HP, hunger, and thirst to 100%</td><td></td></tr><tr><td><strong>🎮 Dual Interaction</strong></td><td>Choose between DrawText or Target/Raycast systems</td><td></td></tr><tr><td><strong>🏗️ In-Game Setup</strong></td><td>Place treatment tables directly with /pscreator command</td><td></td></tr></tbody></table>

#### Complete Feature List

* ✅ **Quick Heal** - Revive dead pets instantly with configurable HP recovery
* ✅ **Treatment Tables** - Full medical care with hunger/thirst restoration with configurable configs
* ✅ **DrawText Support** - Press E/K/L prompts for interactions with configurable keybinds
* ✅ **Target Support** - ox\_target/qb-target or custom target from lib
* ✅ **Custom Animations** - Configure treatment animations and durations
* ✅ **Permission System** - Job-based veterinarian access control
* ✅ **Owner Notifications** - Inform pet owners when their pet is treated
* ✅ **Anti-Spam Protection** - Prevents treatment spam and conflicts
* ✅ **In-Game Creator** - Place tables without database editing
* ✅ **Fully Localized** - All text customizable in language files

***

### 🎮 How to Use

{% tabs %}
{% tab title="For Admins" %}

#### Setting Up Treatment Tables

<figure><img src="https://1004862655-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPhIA9eCA4bwgx77hxx4i%2Fuploads%2FkUzJzNPnwNFEIW280awA%2FFiveM_GTAProcess_VfVM3EJtIi-_online-video-cutter.com_.gif?alt=media&amp;token=76b7371c-136b-4c00-a081-1a711a653a76" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
**Permission: `/pscreator` command need admin permission inside `server.cfg` or `permissions.cfg` file example image bellow**
{% endhint %}

<div align="left"><figure><img src="https://1004862655-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPhIA9eCA4bwgx77hxx4i%2Fuploads%2FGGFylMzAN1sHTTaY9HrM%2Fimage.png?alt=media&amp;token=18172336-de14-4e36-9cbc-438e05c67e8f" alt=""><figcaption></figcaption></figure></div>

***

#### Managing Veterinarian Permissions

#### First Add or doublecheck if exist new Shop Job inside your jobs files:

{% hint style="danger" %}
**It is necessary to follow the steps exactly as shown for the names to work.**
{% endhint %}

{% tabs %}
{% tab title="Qbcore" %}
{% content-ref url="/pages/b8mP9d0rdvzcqTHrLLkL" %}
[How integrate Jobs with Pets QBCore](https://docs.cdev.shop/fivem/pet-system/how-integrate-jobs-with-pets-qbcore)
{% endcontent-ref %}
{% endtab %}

{% tab title="Qbox" %}
{% content-ref url="/pages/JGyUFGw8ihu0kUt2mfZB" %}
[How integrate Jobs with Pets QBox](https://docs.cdev.shop/fivem/pet-system/how-integrate-jobs-with-pets-qbox)
{% endcontent-ref %}
{% endtab %}
{% endtabs %}

#### Second, hire a member with the **Veterinarian** role to be able to use the functions of the new veterinary system:

{% hint style="danger" %}
**Attention: Only members with the&#x20;**<mark style="color:red;">**Veterinarian**</mark>**&#x20;role will be able to use these functions — not even the&#x20;**<mark style="color:yellow;">**Boss**</mark>**&#x20;or&#x20;**<mark style="color:yellow;">**Manager**</mark>**&#x20;will have access.**
{% endhint %}

<figure><img src="https://1004862655-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPhIA9eCA4bwgx77hxx4i%2Fuploads%2FXXTR7uSuFsv778TZzTfB%2FFiveM_GTAProcess_6ipuzblSGS-_online-video-cutter.com_.gif?alt=media&amp;token=894bcc48-88ef-4fc0-a8c4-48b5b8daa48f" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="For Pet Owners" %}

#### Bringing Your Pet to the Vet

<figure><img src="https://1004862655-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPhIA9eCA4bwgx77hxx4i%2Fuploads%2FA41S5bXNPCna4qxwqqId%2FFiveM_GTAProcess_2Ud2QggkNV-_online-video-cutter.com_.gif?alt=media&amp;token=c1c4044d-66d3-4af1-b3a6-da27725de795" alt=""><figcaption></figcaption></figure>

**Step-by-Step:**

1. **Locate Veterinary Clinic**
   * Find a pet shop with treatment tables
   * Look for 🏥 icon on map (configured by admin)
2. **Spawn Your Pet**
   * Open pet bag: `/petbag` or `TAB`
   * Select your pet
   * Spawn it near the clinic
3. **Place Pet on Table**
   * **DrawText Mode**: Stand near table, press `K` (default)
   * **Target Mode**: Look at table, select "Place Pet on Table"
   * Pet must be within 5 meters of table
   * Pet must be alive (dead pets can't be placed)
4. **Wait for Treatment**
   * Veterinarian will approach table
   * Treatment takes \~5 seconds
   * Notification appears when complete
5. **Remove Pet from Table**
   * **DrawText Mode**: Press `L` (default)
   * **Target Mode**: Select "Remove Pet from Table"
   * Pet appears next to you, fully healed!

{% hint style="warning" %}
**Can't place pet?**\
• Make sure pet is spawned (not in bag)\
• Pet must be alive\
• Table must not be occupied\
• You must be within 5m of table with pet nearby
{% endhint %}

#### What Gets Restored?

**Treatment Table (Full Treatment):**

* ❤️ **Health**: Restored to 100% (configurable)
* 🍖 **Hunger**: Restored to 100% (configurable)
* 💧 **Thirst**: Restored to 100% (configurable)

**Quick Heal (Emergency Only)** <mark style="color:yellow;">Only for dead pets found on the streets or in public places</mark>**:**

* ❤️ **Health**: Restored by 25% (configurable)
* 🍖 **Hunger**: Not restored
* 💧 **Thirst**: Not restored
  {% endtab %}

{% tab title="For Veterinarians" %}

#### Quick Heal (Emergency Revival)

<figure><img src="https://1004862655-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPhIA9eCA4bwgx77hxx4i%2Fuploads%2FxgaODNf6DjSxCFYfq3Gl%2FFiveM_cl2_GTAProcess_xFifHgPnxF-_online-video-cutter.com_.gif?alt=media&amp;token=4210f8ea-6035-46c3-8d75-f245ff081603" alt=""><figcaption></figcaption></figure>

**When to use:**

* Pet is dead on the ground
* Owner needs immediate help
* No treatment table available

**How it works:**

1. **Find Dead Pet**
   * Look for unconscious pet on ground
   * Pet owner may call for help
2. **Approach Pet**
   * Get within 3 meters (configurable)
   * System detects you're a veterinarian
3. **Revive Pet**
   * **DrawText Mode**: Press `E` when prompt appears
   * **Target Mode**: Look at pet, select "Revive Pet"
4. **Healing Animation**
   * Veterinarian plays kneeling animation
   * Takes \~3 seconds (configurable)
5. **Pet Revived!**
   * Pet stands up with 25 HP (configurable)
   * Owner receives notification
   * You receive confirmation message

{% hint style="success" %}
**Quick Heal is perfect for:** Emergency roadside assistance, accident responses, field work
{% endhint %}

***

#### Treatment Table (Full Medical Care)

<figure><img src="https://1004862655-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPhIA9eCA4bwgx77hxx4i%2Fuploads%2FOajXv8H7yOQkIFYvAcUn%2FFiveM_cl2_GTAProcess_mUu6BZLDNI-_online-video-cutter.com_.gif?alt=media&amp;token=15357111-fbe3-446b-b2b7-fde2cd6436b3" alt=""><figcaption></figcaption></figure>

**When to use:**

* Pet needs full restoration
* Owner brought pet to clinic
* Scheduled appointments

**How it works:**

1. **Locate Treatment Table**
   * Find table with pet placed by owner
   * Look for pet sitting on table
2. **Approach Table**
   * Get within 2 meters (configurable)
   * System detects veterinarian status
3. **Start Treatment**
   * **DrawText Mode**: Press `E` when prompt appears
   * **Target Mode**: Select "Treat Pet on Table"
4. **Treatment Animation**
   * Veterinarian plays repair/examination animation
   * Takes \~5 seconds (configurable)
   * Pet remains sitting on table
5. **Treatment Complete!**
   * Pet fully restored (100 HP, hunger, thirst)
   * Owner receives detailed notification
   * Pet can now be removed by owner

{% hint style="info" %}
**Professional Tip:** Roleplay the examination! Describe what you're checking while the animation plays.
{% endhint %}

#### Permission Requirements

**To access veterinary features:**

* Grade:

  ```lua
  VETERINARY = 25,
  ```

{% hint style="warning" %}
**Not a veterinarian?** Features won't appear and you'll receive a "No permission" message if attempted.
{% endhint %}
{% endtab %}
{% endtabs %}

***

### ⚙️ Configuration

{% hint style="warning" %}
**File Location:** `public/config/config.lua`\
**Section:** `PlayerShop.Veterinary`<br>

**Debug Modes Enable:** Yes (`cdev_lib > public > config > config.lua` and `cdev_pets > public > config > config.lua`)\
**Restart Required:** Yes both resources first > (`restart cdev_lib`) and after ( `ensure cdev_pets)`
{% endhint %}

#### Complete Configuration Structure

```lua
-- ==========================================
        -- 🩺 VETERINARY SYSTEM CONFIGURATION
        -- ==========================================
        --
        -- 🐕 OVERVIEW:
        -- The veterinary system allows veterinarians to heal pets in two ways:
        -- 1. Quick Heal: Revive dead pets on the ground (fast, partial recovery)
        -- 2. Table Treatment: Full treatment on veterinary tables (slow, full recovery)

        Veterinary = {

            -- 🏥 Quick Heal (Revive Dead Pets)
            -- Used when veterinarian revives a dead pet on the ground
            -- This is a FAST emergency treatment
            QuickHeal = {
                HealthRecover = 25, -- HP recovered (0-100) | Recommended: 25-50
                HungerRecover = 0,  -- Hunger recovered (0-100) | Recommended: 0
                ThirstRecover = 0,  -- Thirst recovered (0-100) | Recommended: 0
            },

            -- 🏥 Table Treatment (Full Treatment)
            -- Used when veterinarian treats a pet on a treatment table
            -- This is a FULL treatment that restores everything
            TableTreatment = {
                HealthRecover = 100, -- HP recovered (0-100) | Recommended: 100
                HungerRecover = 100, -- Hunger recovered (0-100) | Recommended: 100
                ThirstRecover = 100, -- Thirst recovered (0-100) | Recommended: 100
            },

            -- ==========================================
            -- 🎬 ANIMATION SETTINGS
            -- ==========================================

            -- 💉 Quick Treatment Animation
            -- Played when veterinarian revives a dead pet
            QuickTreatmentAnim = {
                dict = "amb@medic@standing@kneel@idle_a", -- Animation dictionary
                anim = "idle_a",                          -- Animation name
                flag = 1,                                 -- Animation flag (1 = normal)
                duration = 3000,                          -- Animation duration in ms (3 seconds)
            },

            -- 🔧 Table Treatment Animation
            -- Played when veterinarian treats a pet on a table
            TableTreatmentAnim = {
                dict = "mini@repair",  -- Animation dictionary
                anim = "fixing_a_ped", -- Animation name
                flag = 1,              -- Animation flag (1 = normal)
                duration = 5000,       -- Animation duration in ms (5 seconds)
            },

            -- ==========================================
            -- 📏 DISTANCE SETTINGS
            -- ==========================================

            -- Maximum distance for quick heal (revive dead pet)
            -- Veterinarian must be within this distance to revive a dead pet
            MaxHealDistance = 3.0, -- In meters | Recommended: 2.0-4.0

            -- Maximum distance for table interactions
            -- Player must be within this distance to interact with treatment tables
            TableInteractionDistance = 2.0, -- In meters | Recommended: 1.5-2.5

            -- Detection distance for dead pets (only for DrawText mode)
            -- How far away the system detects dead pets for quick heal
            DetectionDistance = 5.0, -- In meters | Recommended: 5.0-10.0

            -- ==========================================
            -- 🎮 INTERACTION METHOD CONFIGURATION
            -- ==========================================

            -- 💀 Quick Heal (Revive Dead Pets)
            -- When a pet dies, veterinarian can revive it
            UseDrawTextForQuickHeal = false, -- true = DrawText | false = Target/Raycast
            -- If true: Shows "Press [E] to revive pet" text
            -- If false: Shows target icon when looking at dead pet

            -- 🛏️ Treatment Tables
            -- Pet owners place pets on tables, veterinarians treat them
            UseDrawTextForTables = false, -- true = DrawText | false = Target
            -- If true: Shows "Press [K] to place pet" / "Press [E] to treat" / "Press [L] to remove" texts
            -- If false: Shows target options when near table

            -- ==========================================
            -- 🔔 NOTIFICATION CONFIGURATION
            -- ==========================================
            --
            -- 💡 CUSTOMIZE WHAT NOTIFICATIONS APPEAR:
            -- Set to 'false' to disable specific notifications
            -- Set to 'true' to enable specific notifications
            --
            -- ==========================================

            Notifications = {
                -- Quick Heal Notifications
                ShowQuickHealStart = true,   -- "Reviving pet..." (to veterinarian)
                ShowQuickHealSuccess = true, -- "Pet revived! +25 HP" (to veterinarian)
                ShowQuickHealToOwner = true, -- "Your pet was healed by Dr. Smith (+25 HP)" (to owner)

                -- Table Treatment Notifications
                ShowTableTreatStart = true,   -- "Treating pet..." (to veterinarian)
                ShowTableTreatSuccess = true, -- "Pet fully treated! +100 HP, +100 Hunger, +100 Thirst" (to veterinarian)
                ShowTableTreatToOwner = true, -- "Your pet was fully treated by Dr. Smith" (to owner)

                -- Table Interaction Notifications
                ShowPlacePetSuccess = true,  -- "Pet placed on treatment table" (to owner)
                ShowRemovePetSuccess = true, -- "Pet removed from table" (to owner)
            },

            -- ==========================================
            -- ⌨️ DRAWTEXT KEYS CONFIGURATION
            -- ==========================================
            --
            -- 🔑 KEY CODES:
            -- These keys are used ONLY when DrawText mode is enabled
            -- If you use Target mode, these keys are IGNORED

            -- 🔗 FULL LIST:
            -- See: https://docs.fivem.net/docs/game-references/controls/

            Keys = {
                -- 💀 Quick Heal Key (Revive Dead Pet)
                -- Veterinarian uses this key when near a dead pet
                DrawTextQuickHeal = 38, -- E key | Shows: "Press [E] to revive pet"

                -- 💉 Table Heal Key (Treat Pet on Table)
                -- Veterinarian uses this key to treat a pet on a table
                DrawTextTableHeal = 38, -- E key | Shows: "Press [E] to treat pet"

                -- 🛏️ Place Pet Key (Owner Action)
                -- Pet owner uses this key to place their pet on a treatment table
                DrawTextPlaceOnTable = 311, -- K key | Shows: "Press [K] to place pet on table"

                -- 🐕 Remove Pet Key (Owner Action)
                -- Pet owner uses this key to remove their pet from a treatment table
                DrawTextRemoveFromTable = 182, -- L key | Shows: "Press [L] to remove pet from table"
            },
        },
```

***

#### Configuration Options Explained

{% tabs %}
{% tab title="Health Recovery" %}
**Quick Heal Recovery**

**When Used:** Emergency revival of dead pets

```lua
QuickHeal = { 
    HealthRecover = 25, -- Recommended: 25-50 
},
```

**Purpose:** Quick Heal is meant for emergencies, not full restoration.

{% hint style="info" %}
**Best Practice:** Keep Quick Heal partial (25-35%) to encourage full treatment visits
{% endhint %}

***

**Table Treatment Recovery**

**When Used:** Full medical treatment on treatment tables

```lua
 TableTreatment = {
 HealthRecover = 100, -- HP recovered (0-100) | Recommended: 100
 HungerRecover = 100, -- Hunger recovered (0-100) | Recommended: 100
 ThirstRecover = 100, -- Thirst recovered (0-100) | Recommended: 100
},
```

**Purpose:** Complete medical care that fully restores the pet.

{% hint style="success" %}
**Recommended:** Keep all at 100% for full restoration experience
{% endhint %}

{% hint style="warning" %}
Setting table treatment below 100% may confuse players who expect full recovery
{% endhint %}
{% endtab %}

{% tab title="Animations" %}
**Quick Treatment Animation**

**Played when:** Veterinarian revives a dead pet

```lua
QuickTreatmentAnim = {
dict = "amb@medic@standing@kneel@idle_a", -- Animation dictionary
anim = "idle_a",                          -- Animation name
flag = 1,                                 -- Animation flag (1 = normal)
duration = 3000,                          -- Animation duration in ms (3 seconds)
},
```

**Options:**

| Setting    | Description          | Recommended                 |
| ---------- | -------------------- | --------------------------- |
| `dict`     | Animation dictionary | Medical/kneeling animations |
| `anim`     | Animation name       | Examination/treatment anims |
| `flag`     | Animation flag       | `1` = normal                |
| `duration` | Animation length     | 2000-5000ms                 |

**Alternative Animations:**

**Sitting Medic:**

```lua
QuickTreatmentAnim = {
dict = "amb@world_human_sit_ups@male@idle_a", -- Animation dictionary
anim = "idle_a",                          -- Animation name
flag = 1,                                 -- Animation flag (1 = normal)
duration = 4000,                          -- Animation duration in ms (3 seconds)
},
```

***

**Table Treatment Animation**

**Played when:** Veterinarian treats pet on table

```lua
 TableTreatmentAnim = {
dict = "mini@repair",  -- Animation dictionary
anim = "fixing_a_ped", -- Animation name
flag = 1,              -- Animation flag (1 = normal)
duration = 5000,       -- Animation duration in ms (5 seconds)
},
```

**Recommended Duration:** 4000-7000ms (4-7 seconds)

**Alternative Animations:**

**Clipboard Examination:**

```lua
TableTreatmentAnim = {
dict = "missfam4",  -- Animation dictionary
anim = "base", -- Animation name
flag = 1,              -- Animation flag (1 = normal)
duration = 5000,       -- Animation duration in ms (5 seconds)
},
```

{% hint style="success" %}
**Pro Tip:** Longer animations (5-7s) feel more professional and realistic
{% endhint %}
{% endtab %}

{% tab title="Distances" %}
**Maximum Heal Distance**

**What it controls:** How close veterinarian must be to revive dead pet

```lua
MaxHealDistance = 3.0, -- In meters | Recommended: 2.0-4.0
```

**Examples:**

| Distance | Experience                  | Recommended For        |
| -------- | --------------------------- | ---------------------- |
| `1.5`    | Very close, realistic       | Roleplay-heavy servers |
| `3.0`    | Comfortable range (default) | Most servers           |
| `5.0`    | Generous range              | Busy/casual servers    |

{% hint style="warning" %}
**Too far (7.0+):** Players can heal pets from unrealistic distances
{% endhint %}

***

**Table Interaction Distance**

**What it controls:** How close player must be to interact with treatment table

```lua
TableInteractionDistance = 2.0, -- In meters | Recommended: 1.5-2.5
```

**Examples:**

| Distance     | Experience                     |
| ------------ | ------------------------------ |
| `1.5`        | Must be very close to table    |
| `2.0`        | Comfortable range (default)    |
| `3.0`        | Can interact from further away |
| {% endtab %} |                                |

{% tab title="Interaction Methods" %}
**Choose Your System**

**Quick Heal Interaction:**

```lua
UseDrawTextForQuickHeal = false, -- true = DrawText | false = Target/Raycast
```

**Table Interaction:**

```lua
UseDrawTextForTables = false, -- true = DrawText | false = Target
```

{% hint style="warning" %}
**Important:** If `true`, Target is disabled. If `false`, DrawText is disabled. You cannot use both simultaneously.
{% endhint %}
{% endtab %}

{% tab title="Notifications" %}
**Notification Toggles**

**Control which notifications appear to players:**

```lua
Notifications = {
    -- Quick Heal Notifications
    ShowQuickHealStart = true,   -- "Reviving pet..." (to veterinarian)
    ShowQuickHealSuccess = true, -- "Pet revived! +25 HP" (to veterinarian)
    ShowQuickHealToOwner = true, -- "Your pet was healed by Dr. Smith (+25 HP)" (to owner)
    
    -- Table Treatment Notifications
    ShowTableTreatStart = true,   -- "Treating pet..." (to veterinarian)
    ShowTableTreatSuccess = true, -- "Pet fully treated! +100 HP, +100 Hunger, +100 Thirst" (to veterinarian)
    ShowTableTreatToOwner = true, -- "Your pet was fully treated by Dr. Smith" (to owner)
    
    -- Table Interaction Notifications
    ShowPlacePetSuccess = true,  -- "Pet placed on treatment table" (to owner)
    ShowRemovePetSuccess = true, -- "Pet removed from table" (to owner)
},
```

**Set to `false` to disable specific notifications.**

***

#### Notification Timing

| Notification            | When It Appears              | Recipient    |
| ----------------------- | ---------------------------- | ------------ |
| `ShowQuickHealStart`    | Vet starts reviving          | Veterinarian |
| `ShowQuickHealSuccess`  | Pet successfully revived     | Veterinarian |
| `ShowQuickHealToOwner`  | Pet revived by vet           | Pet Owner    |
| `ShowTableTreatStart`   | Vet starts table treatment   | Veterinarian |
| `ShowTableTreatSuccess` | Treatment complete           | Veterinarian |
| `ShowTableTreatToOwner` | Pet treated on table         | Pet Owner    |
| `ShowPlacePetSuccess`   | Owner places pet on table    | Pet Owner    |
| `ShowRemovePetSuccess`  | Owner removes pet from table | Pet Owner    |

***

{% endtab %}

{% tab title="DrawText Keys" %}
**Keybind Configuration**

**Used only when DrawText mode is enabled.**

```lua
Keys = {
    -- 💀 Quick Heal Key (Revive Dead Pet)
    -- Veterinarian uses this key when near a dead pet
    DrawTextQuickHeal = 38, -- E key | Shows: "Press [E] to revive pet"
    
    -- 💉 Table Heal Key (Treat Pet on Table)
    -- Veterinarian uses this key to treat a pet on a table
    DrawTextTableHeal = 38, -- E key | Shows: "Press [E] to treat pet"
    
    -- 🛏️ Place Pet Key (Owner Action)
    -- Pet owner uses this key to place their pet on a treatment table
    DrawTextPlaceOnTable = 311, -- K key | Shows: "Press [K] to place pet on table"
    
    -- 🐕 Remove Pet Key (Owner Action)
    -- Pet owner uses this key to remove their pet from a treatment table
    DrawTextRemoveFromTable = 182, -- L key | Shows: "Press [L] to remove pet from table"
},
```

***

#### Common Key Codes

| Key   | Code  | Default Use            |
| ----- | ----- | ---------------------- |
| **E** | `38`  | Quick Heal, Table Heal |
| **K** | `311` | Place Pet on Table     |
| **L** | `182` | Remove Pet from Table  |

{% hint style="info" %}
**Full Key List:** [FiveM Controls Reference](https://docs.fivem.net/docs/game-references/controls/)
{% endhint %}

***

#### Key Conflict Prevention

**Avoid these keys:**

❌ **W, A, S, D** - Movement\
❌ **SHIFT** - Sprint\
❌ **CTRL** - Crouch\
❌ **SPACE** - Jump\
❌ **LEFT MOUSE** - Attack\
❌ **RIGHT MOUSE** - Aim\
❌ **R** - Reload\
❌ **ESC, TAB, ENTER** - Menus\
❌ **F1-F3** - Phone/radio (common)

***

{% hint style="warning" %}
**After changing keys:** Restart resource and test for conflicts
{% endhint %}
{% endtab %}
{% endtabs %}

***

### 🎯 Interaction Methods Comparison

#### DrawText vs Target

| Feature        | DrawText Mode          | Target Mode                   |
| -------------- | ---------------------- | ----------------------------- |
| **Setup**      | No dependencies        | Requires ox\_target/qb-target |
| **Visual**     | Text prompt on screen  | Icon on raycast               |
| **Activation** | Press key (E, K, L)    | Look + click/key              |
| **Conflicts**  | Possible key conflicts | No key conflicts              |
| **Immersion**  | Text blends naturally  | Icon more obvious             |
| **Best For**   | Roleplay servers       | Target-heavy servers          |

***

### 💡 Best Practices

#### For Server Owners

**Setting Up Clinics:**

1. **Location Selection**
   * Choose accessible locations (near roads)
   * Consider adding map blips for visibility
   * Multiple locations encourage activity
2. **Table Placement**
   * Space tables 2-3 meters apart
   * Face tables toward clinic entrance
   * Place 2-4 tables per clinic
3. **Job Configuration**
   * Set appropriate veterinarian grades
   * Balance pay with responsibility

***

#### For Veterinarians

**Professional Roleplay:**

**Quick Heal (Emergency):**

1. Assess the situation (ask owner what happened)
2. Explain you're providing emergency care
3. Mention pet needs full treatment later
4. Perform revival animation
5. Advise owner to visit clinic

**Table Treatment (Full Care):**

1. Greet the pet owner
2. Examine the pet (roleplay the animation)
3. Discuss findings ("Pet is dehydrated...")
4. Perform treatment
5. Give care instructions ("Keep pet fed/watered")

{% hint style="success" %}
**Immersion Tip:** Use /me commands during treatment! Example: `/me examines the pet's vital signs`
{% endhint %}

***

#### For Pet Owners

**Seeking Treatment:**

1. **Notice Pet Needs Care**
   * Low HP, hunger, or thirst
   * Pet is dead/unconscious
2. **Locate Veterinarian**
   * Check job list or ask in chat
   * Call for help if emergency
3. **Bring Pet to Clinic**
   * Spawn pet near clinic
   * Place on treatment table
   * Wait for veterinarian
4. **After Treatment**
   * Thank the veterinarian
   * Pay (if using payment system)
   * Remove pet from table

{% hint style="info" %}
**Roleplay Enhancement:** Describe your pet's symptoms to the vet for better immersion!
{% endhint %}

***

### ⚠️ Troubleshooting

{% hint style="warning" %}
**Common Issues and Solutions**
{% endhint %}

#### DrawText Not Appearing

**Problem:** No text prompt shows when near pet/table

**Solutions:**

1. ✅ Verify `UseDrawTextForQuickHeal` or `UseDrawTextForTables` is `true`
2. ✅ Check you're within interaction distance
3. ✅ Reconnect to server (DrawText initializes on join)
4. ✅ Verify you have veterinarian permissions (for vet actions)
5. ✅ Check pet is dead (for Quick Heal) or alive (for table placement)

***

#### Target Not Working

**Problem:** No target icon appears when looking at pet/table

**Solutions:**

1. ✅ Verify `UseDrawTextForQuickHeal` or `UseDrawTextForTables` is `false`
2. ✅ Ensure target system is installed (ox\_target, qb-target or custom (cdev\_lib))
3. ✅ Check target system is started before cdev\_pets
4. ✅ Verify target system is configured correctly
5. ✅ Look directly at the pet/table (raycast required)
6. ✅ Check you have veterinarian permissions

***

#### Can't Place Pet on Table

**Problem:** "Place Pet" option doesn't work or doesn't appear

**Solutions:**

1. ✅ **Pet must be spawned** (not in bag) - use `/petbag` first
2. ✅ **Pet must be alive** - dead pets cannot be placed
3. ✅ **Pet must be nearby** - within 5 meters (DetectionDistance)
4. ✅ **Table must be empty** - no other pet on the table
5. ✅ **You must own the pet** - can't place other players' pets
6. ✅ Check you're within TableInteractionDistance (2m default)

***

#### Can't Treat Pet

**Problem:** "Treat Pet" option doesn't work

**Solutions:**

1. ✅ **Must be a veterinarian** - Check job and grade
2. ✅ **Pet must be on table** - Owner must place it first
3. ✅ **Can't already be treating** - Wait for current treatment to finish
4. ✅ **Table must have pet** - Verify pet is actually sitting on table
5. ✅ Check you're within TableInteractionDistance (2m default)

***

#### Treatment Animation Doesn't Play

**Problem:** No animation or wrong animation plays

**Solutions:**

1. ✅ Verify animation dict/name are correct in config
2. ✅ Check animation duration isn't too short (<1000ms)
3. ✅ Test animation manually with `/e` command
4. ✅ Ensure animation isn't blocked by other resources
5. ✅ Try a different animation (see configuration tab)

**Testing Animations:**

```lua
/e kneel -- Test kneeling animation /e mechanic -- Test repair animation
```

***

#### Pet Doesn't Revive

**Problem:** Quick Heal animation plays but pet stays dead

**Solutions:**

1. ✅ Check `HealthRecover` in config is > 0
2. ✅ Verify pet is actually dead (not just low HP)
3. ✅ Check server console for errors
4. ✅ Verify pet sync event is firing (check F8 console)

***

#### Owner Doesn't Get Notification

**Problem:** Owner doesn't see "Pet was healed" message

**Solutions:**

1. ✅ Check `ShowQuickHealToOwner` or `ShowTableTreatToOwner` is `true`
2. ✅ Verify notification system is working (test with other notifications)
3. ✅ Check owner is online and in range
4. ✅ Ensure pet ownership is correctly stored in database

***

### ❓ FAQ

<details>

<summary><strong>Can I have both DrawText and Target enabled?</strong></summary>

**No.** The system prevents conflicts by disabling one when the other is enabled.

If `UseDrawTextForQuickHeal = true`, Target for Quick Heal is automatically disabled.

**Why?** To prevent duplicate interactions and key conflicts.

**Solution:** Choose one system per interaction type.

</details>

<details>

<summary><strong>Can non-veterinarians see the interactions?</strong></summary>

**No.** Veterinary-specific interactions (Quick Heal, Table Treatment) only appear for players with veterinarian job/grade.

**Pet owners** can see "Place Pet" and "Remove Pet" interactions regardless of job.

**This prevents:** Non-vets from trying to heal pets.

</details>

<details>

<summary><strong>What happens if pet owner disconnects during treatment?</strong></summary>

**The treatment completes anyway.**

* Pet health/hunger/thirst are saved to database
* Next time owner connects, pet will be fully healed
* Veterinarian still receives completion notification

**Table behavior:** Pet remains on table until manually removed or server restart.

</details>

<details>

<summary><strong>Can I charge players for treatment?</strong></summary>

**Currently not built-in.** You can add payment manually

</details>

<details>

<summary><strong>How many treatment tables can I have per clinic?</strong></summary>

**No hard limit.** You can place as many tables as needed.

**Recommendations:**

* **Small Clinic:** 2-3 tables
* **Medium Clinic:** 4-6 tables
* **Large Hospital:** 8-12 tables

**Performance:** Tables are lightweight and don't impact performance.

**Best Practice:** Space tables 2-3 meters apart for easy navigation.

</details>

<details>

<summary><strong>Can I delete a table after placing it?</strong></summary>

**Yes!** Two methods:

**Method 1: In-Game Creator**

1. `/pscreator`
2. Select shop
3. Manage Treatment Tables
4. Select table from list
5. Click "Delete Table"

**Method 2: Database**

* Edit `vetTables` JSON in `cdev_pets_petshops` table
* Remove the table entry
* Restart resource's

{% hint style="warning" %}
**After deletion:** Restart first cdev\_lib after cdev\_pets to apply changes
{% endhint %}

</details>

<details>

<summary><strong>Does Quick Heal restore hunger/thirst?</strong></summary>

**No by default system.**

**Why separate?** To encourage full treatment visits for complete care.

</details>

<details>

<summary><strong>Can I customize the animations?</strong></summary>

**Yes!** Animations are fully configurable.

**Edit in config:**

```lua
-- 💉 Quick Treatment Animation
            -- Played when veterinarian revives a dead pet
            QuickTreatmentAnim = {
                dict = "amb@medic@standing@kneel@idle_a", -- Animation dictionary
                anim = "idle_a",                          -- Animation name
                flag = 1,                                 -- Animation flag (1 = normal)
                duration = 3000,                          -- Animation duration in ms (3 seconds)
            },

            -- 🔧 Table Treatment Animation
            -- Played when veterinarian treats a pet on a table
            TableTreatmentAnim = {
                dict = "mini@repair",  -- Animation dictionary
                anim = "fixing_a_ped", -- Animation name
                flag = 1,              -- Animation flag (1 = normal)
                duration = 5000,       -- Animation duration in ms (5 seconds)
            },
```

**Finding Animations:**

1. Use [DurtyFree's GTA V Data Dumps](https://github.com/DurtyFree/gta-v-data-dumps)
2. Search for medical/examination animations
3. Test with `/e animname` in-game
4. Add to config

**Popular Medical Animations:**

* `amb@medic@standing@kneel@idle_a` - Kneeling examination
* `mini@repair` - Repair/fixing motion
* `amb@world_human_bum_wash@male@low@idle_a` - Cleaning motion

</details>

***


# Pet Manager (Admin Tool)

## 🎮 Pet Manager (Admin Tool)

{% hint style="success" %}
**NEW FEATURE!** Manage all server pets from in-game - no database access needed!
{% endhint %}

### 📋 Overview

The **Pet Manager** is a comprehensive administrative tool that empowers server administrators to view, monitor, and manage all pets in the database without requiring direct database access. View pet statistics, owner information, and delete problematic pets—all from an intuitive in-game menu.

**Perfect for:**

* 🛠️ Server maintenance and cleanup
* 🔍 Troubleshooting pet issues
* 📊 Monitoring pet database health
* 🚫 Removing glitched or abandoned pets

***

### ✨ Key Features

<table data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-cover data-type="files"></th></tr></thead><tbody><tr><td><strong>📊 Complete Database View</strong></td><td>Browse all pets with detailed statistics in real-time</td><td></td></tr><tr><td><strong>👥 Owner Grouping</strong></td><td>Pets organized by owner for easy player-specific management</td><td></td></tr><tr><td><strong>🗑️ Safe Deletion</strong></td><td>Remove pets with confirmation dialog and automatic cleanup</td><td></td></tr><tr><td><strong>🔒 Permission-Based</strong></td><td>Restrict access to authorized administrators only</td><td></td></tr></tbody></table>

#### Complete Feature List

* ✅ **All Pets View** - Browse complete database of all pets (newest first)
* ✅ **By Owner View** - Pets grouped by owner name with pet count
* ✅ **Detailed Statistics** - View HP, hunger, thirst, loyalty, happiness
* ✅ **Quick Delete** - Remove pets with confirmation and automatic cleanup
* ✅ **Real-time Updates** - Menu refreshes after actions
* ✅ **Owner Information** - Display owner name and identifier
* ✅ **Pet Model Display** - Shows pet breed/model information
* ✅ **Audit Logging** - All deletions logged to discord server (Configure inside cdev\_lib)
* ✅ **Framework Support** - Works with QBCore, ESX, and custom frameworks
* ✅ **No Database Required** - Fully in-game management

***

### 🎮 How to Use

{% tabs %}
{% tab title="Opening Pet Manager" %}

#### Accessing the Menu

<figure><img src="https://1004862655-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPhIA9eCA4bwgx77hxx4i%2Fuploads%2FeKdMsetdb7iIlBopH73g%2FFiveM_GTAProcess_DOY1rEQwqa.gif?alt=media&amp;token=b8ed8de4-ae02-451c-b77d-151b392dfbf5" alt=""><figcaption></figcaption></figure>

**Command:**

/petmanager

**What happens:**

1. **Permission Check**
   * System verifies you have `PermPetManager` permission
   * If denied, you'll see "No permission" notification
2. **Menu Opens**
   * Interactive menu appears with CDEV logo
   * Shows "Pet Manager" title
   * Displays two main sections:
     * **All Pets (X)** - Total pet count
     * **Owner Groups** - Players with pets
3. **Navigation Ready**
   * Click any option to browse
   * Use back button to return
   * Menu updates in real-time

{% hint style="warning" %}
**Permission Required:** You must have admin-level permissions configured in `config.lua`
{% endhint %}
{% endtab %}

{% tab title="Viewing All Pets" %}

#### Browsing Complete Pet List

<div align="left"><figure><img src="https://1004862655-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPhIA9eCA4bwgx77hxx4i%2Fuploads%2F1gUiQc84jz0BnlgrXdRt%2FFiveM_GTAProcess_PkBNY3rOJU.gif?alt=media&amp;token=5a0dacef-524b-44ce-bc6f-cad600008c46" alt=""><figcaption></figcaption></figure></div>

**Step-by-Step:**

1. **Click "All Pets (X)"**
   * Opens complete pet database list
   * Sorted by ID (newest first)
2. **Browse Pets**
   * Scroll through list
   * Format: `Pet Name (ID: 123)`
   * ID numbers indicate database entry
3. **Select a Pet**
   * Click any pet entry
   * Opens detailed information screen

{% hint style="info" %}
**Performance:** List handles hundreds of pets smoothly - no lag!
{% endhint %}
{% endtab %}

{% tab title="Viewing by Owner" %}

#### Browsing Pets by Owner

<div align="left"><figure><img src="https://1004862655-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPhIA9eCA4bwgx77hxx4i%2Fuploads%2Fs3K2RDW91K9V9yV3vxFu%2FFiveM_GTAProcess_Kz19jRsMjG.gif?alt=media&amp;token=eeda141f-125a-494b-9371-6fe25a2a7c88" alt=""><figcaption></figcaption></figure></div>

**Step-by-Step:**

1. **View Owner List**
   * Scroll past "All Pets" option
   * See list of player names with pet counts
   * Format: `Owner Name (X pets)`
2. **Select an Owner**
   * Click on player name
   * Opens submenu with their pets only
3. **Browse Owner's Pets**
   * See all pets belonging to that player
   * Click any pet for detailed info

{% hint style="success" %}
**Pro Tip:** Players with 5+ pets may need cleanup or have duplicates
{% endhint %}
{% endtab %}

{% tab title="Viewing Pet Details" %}

#### Pet Information Screen

<div align="left"><figure><img src="https://1004862655-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPhIA9eCA4bwgx77hxx4i%2Fuploads%2FLjcHx2GVDcVHTogKnvNq%2FFiveM_GTAProcess_CxUPMsVEX1.gif?alt=media&amp;token=d2c56d5a-fda4-4cf2-a3e4-4703828a5bcc" alt=""><figcaption></figcaption></figure></div>

**What You See:**

#### Information Fields Explained

| Field         | Description                | Values                            |
| ------------- | -------------------------- | --------------------------------- |
| **ID**        | Unique database identifier | Number (1-999999)                 |
| **Owner**     | Player name who owns pet   | Player name or "Unknown"          |
| **Model**     | Pet breed/model            | Model hash (e.g., a\_c\_shepherd) |
| **Health**    | Current HP                 | 0-100% (0% = dead)                |
| **Hunger**    | Food level                 | 0-100% (low = needs food)         |
| **Thirst**    | Water level                | 0-100% (low = needs water)        |
| **Loyalty**   | Pet bond level             | 0-100% (affects behavior)         |
| **Happiness** | Pet mood                   | 0-100% (affects interactions)     |

#### Reading Pet Status

**Healthy Pet:**

Health: 100% ✅ Hunger: 95% ✅ Thirst: 90% ✅ Loyalty: 85% ✅ Happiness: 80% ✅

**Needs Attention:**

Health: 45% ⚠️ Low HP Hunger: 20% ⚠️ Hungry Thirst: 15% ⚠️ Thirsty Loyalty: 60% ⚠️ Declining Happiness: 50% ⚠️ Sad

**Critical/Dead:**

Health: 0% ❌ Dead Hunger: 0% ❌ Starving Thirst: 0% ❌ Dehydrated Loyalty: 30% ❌ Very low Happiness: 20% ❌ Very sad

{% hint style="info" %}
**Use this to:** Identify pets that need owner attention, find glitched pets, or locate abandoned pets
{% endhint %}
{% endtab %}

{% tab title="Deleting a Pet" %}

#### Removing Pets from Database

<figure><img src="https://1004862655-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPhIA9eCA4bwgx77hxx4i%2Fuploads%2F2LQzhzw61a5mLkV8xiAK%2FFiveM_GTAProcess_ppzSBAwr8r.gif?alt=media&amp;token=eb40867e-ff02-45dd-8a36-a64a7ca7c704" alt=""><figcaption></figcaption></figure>

**Step-by-Step:**

1. **View Pet Information**
   * Navigate to any pet's info screen
   * See "🗑️ Delete Pet" option at bottom
2. **Click Delete Pet**
   * Menu closes
   * Warning dialog appears
3. **Review Warning**
   * Shows pet name and ID
   * Warns action cannot be undone
   * Two options: "Okay" (confirm) or "Cancel"
4. **Confirm Deletion**
   * Click "Okay" to proceed
   * Click "Cancel" to abort
5. **Pet Deleted**
   * Success notification appears
   * Menu automatically reopens
   * Pet removed from list
   * Deleted from database

#### What Gets Deleted

**Automatically Cleaned Up:**

* ✅ Pet database entry (`cdev_pets` table)
* ✅ Pet inventory items (`cdev_pets_inventory` table)
* ✅ Pet customization data
* ✅ Pet statistics and state

**Not Deleted:**

* ❌ Owner's player data (untouched)
* ❌ Other pets (only selected pet)
* ❌ Shop/clinic data

#### Safety Features

**Confirmation Dialog:**

![](https://1004862655-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPhIA9eCA4bwgx77hxx4i%2Fuploads%2Ft3kq157xxZkxNjZaKBOW%2Fimage.png?alt=media\&token=21bac557-0ec0-43ec-946d-e831af8648a8)

**Audit Logging Discord:** \[INFO] Admin PlayerName (ID: 42) deleted pet ID: 27

{% hint style="danger" %}
**WARNING:** Deletion is permanent! Pet cannot be recovered. Always double-check before confirming.
{% endhint %}

#### When to Delete Pets

**Valid Reasons:**

* 🐛 Pet is glitched or stuck
* 👻 Abandoned pet (owner banned/quit)
* 🔄 Duplicate pets
* 📦 Database cleanup
* 🚫 Pet causing server issues

**Invalid Reasons:**

* ❌ Player complaint (use in-game pet removal)
* ❌ Pet just died (players can revive)
* ❌ Low stats (players can restore)

{% hint style="warning" %}
**Best Practice:** Only delete pets that are causing issues or truly abandoned. Let players manage their own pets when possible.
{% endhint %}
{% endtab %}
{% endtabs %}

***

### ⚙️ Configuration

{% hint style="warning" %}
**File Location:** `public/config/config.lua`\
**Section:** `Permissions`\
**Debug Modes Enable:** Yes (`cdev_lib > public > config > config.lua` and `cdev_pets > public > config > config.lua`)\
**Restart Required:** Yes both resources first > (`restart cdev_lib`) and after ( `ensure cdev_pets)`
{% endhint %}

#### Permission Configuration

```lua
    Permissions = {
        -- Permission for adding inventory items for a pet
         -- Others
        PermPetManager = PERMISSION_HIGH,
    },
```

***

#### Permission Levels Explained

{% tabs %}
{% tab title="Permission Levels" %}
**Available Permission Levels**

{% hint style="danger" %}
**For the permission system to work correctly, the player must be registered in the server file `server.cfg` or `permissions.cfg` with&#x20;**<mark style="color:yellow;">**group.admin command allow**</mark>**, as shown in the image bellow**
{% endhint %}

<div align="left"><figure><img src="https://1004862655-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPhIA9eCA4bwgx77hxx4i%2Fuploads%2FW28rPVY3HxzfesEmZP2Y%2Fimage.png?alt=media&amp;token=3c0572ab-ab45-46a4-9bee-ef48be2154fa" alt=""><figcaption></figcaption></figure></div>

***

{% hint style="danger" %}
**NEVER use `PERMISSION_NONE`!** This allows ALL players to delete any pets on the server!
{% endhint %}
{% endtab %}
{% endtabs %}

***

### 💡 Use Cases

#### For Server Owners

**Regular Maintenance:**

1. Weekly database cleanup
2. Remove abandoned pets (players who quit)
3. Delete duplicate pets
4. Clear glitched pets

**Troubleshooting:**

1. Player reports pet stuck/missing
2. Check Pet Manager for pet status
3. Verify pet stats and location
4. Delete if necessary, player can respawn

**Monitoring:**

1. Check total pet count regularly
2. Identify players with excessive pets
3. Monitor pet health trends
4. Spot database issues early

***

#### For Admins

**Player Support:**

**Scenario 1: "My pet disappeared!"**

1. Open Pet Manager
2. Search owner's name
3. Check if pet exists in database
4. View pet stats
5. If glitched: Delete and inform player to respawn

**Scenario 2: "I can't delete my pet"**

1. Open Pet Manager
2. Find player's pets
3. Check pet status
4. Delete problematic pet
5. Player can get new pet from shop

**Scenario 3: "Pet is stuck on table"**

1. Open Pet Manager
2. Find specific pet
3. View pet stats (check if on table)
4. Delete pet to clear table
5. Owner respawns pet normally

***

#### For Database Management

**Cleanup Operations:**

**Remove Abandoned Pets:**

1. Check players who quit server
2. Open Pet Manager
3. Browse by owner
4. Delete pets of banned/inactive players

**Fix Duplicates:**

1. Notice player has multiple identical pets
2. Compare pet IDs and stats
3. Keep newest pet (higher ID)
4. Delete older duplicates

**Resolve Conflicts:**

1. Pet causing lag or errors
2. Identify via Pet Manager
3. Check stats for anomalies
4. Delete problematic pet

{% hint style="success" %}
**Best Practice:** Always inform pet owner before deletion (unless banned/inactive)
{% endhint %}

***

### 🎯 Menu Navigation Guide

#### Menu Hierarchy

![](https://1004862655-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPhIA9eCA4bwgx77hxx4i%2Fuploads%2FzPzF9WqhYo1LU1Z9azra%2Fimage.png?alt=media\&token=51da7c5a-1514-441d-aba4-4a20d1b197a4)

***

#### Navigation Tips

**Keyboard Shortcuts:**

* `ESC` - Close menu
* `BACKSPACE` - Go back one level
* `ENTER` - Select option

**Mouse:**

* Scroll to browse long lists
* Click to select
* Click back arrow to return

**Finding Specific Pets:**

**Method 1: Search by Name**

1. Open "All Pets"
2. Scroll to find name
3. Pet names are alphabetical

**Method 2: Search by Owner**

1. Browse owner list
2. Find player name
3. View their pets only

**Method 3: Search by ID**

1. Open "All Pets"
2. Look for "(ID: X)" in name
3. IDs are sequential

{% hint style="info" %}
**Pro Tip:** Use owner search for player-specific issues. Use "All Pets" for general browsing.
{% endhint %}

***

### ⚠️ Troubleshooting

{% hint style="warning" %}
**Common Issues and Solutions**
{% endhint %}

#### Menu Won't Open

**Problem:** Typing `/petmanager` does nothing

**Solutions:**

1. ✅ Check you have `PermPetManager` permission in config
2. ✅ Verify your admin/god/ ace command permission is active
3. ✅ Restart cdev\_pets: `restart cdev_pets`
4. ✅ Check F8 console for errors
5. ✅ Reconnect to server

***

#### No Pets Showing

**Problem:** Menu opens but "All Pets" shows 0 pets

**Solutions:**

1. ✅ Check if any pets exist in database
2. ✅ Verify `cdev_pets` table exists
3. ✅ Check database connection (other resources working?)
4. ✅ Restart both cdev\_pets and cdev\_lib
5. ✅ Check server console for SQL errors

**Verify Database:**

SELECT COUNT(\*) FROM cdev\_pets;

**If returns 0:** No pets in database (this is normal if no players have pets yet)

**If returns NULL/error:** Database table missing or corrupted

***

#### Delete Doesn't Work

**Problem:** Click "Delete Pet" but pet still exists

**Solutions:**

1. ✅ Check confirmation dialog appeared
2. ✅ Verify you clicked "Okay" (not "Cancel")
3. ✅ Check server console for errors
4. ✅ Refresh Pet Manager (close and reopen)
5. ✅ Check database directly

**Verify Deletion in Database:**

SELECT \* FROM cdev\_pets WHERE id = \[pet\_id];

**If pet still exists:**

* Check server console for SQL error
* Verify database permissions
* Check if pet is spawned (might need despawn first)

***

#### Menu Doesn't Refresh

**Problem:** After deleting pet, menu still shows it

**Solution:** Menu **automatically refreshes** after deletion.

**If it doesn't:**

1. ✅ Wait 1-2 seconds (slight delay)
2. ✅ Close and reopen menu manually
3. ✅ Check if deletion actually succeeded (server console)
4. ✅ Restart resource if persistent

***

### ❓ FAQ

<details>

<summary><strong>Does deleting a pet notify the owner?</strong></summary>

**No.** Deletion is silent from owner's perspective.

**Best Practice:**

1. Message owner in-game first
2. Explain why deletion is needed
3. Wait for response if possible
4. Delete after confirmation

**Exception:** Banned players or abandoned pets (no notification needed)

</details>

<details>

<summary><strong>What happens to pet inventory when deleted?</strong></summary>

**Automatically cleaned up!**

Pet Manager deletes:

* ✅ Pet entry (`cdev_pets` table)
* ✅ Pet inventory (`cdev_pets_inventory` table)
* ✅ All related data

Owner keeps:

* ✅ Their player data
* ✅ Other pets (if they have multiple)
* ✅ Money/items (unaffected)

**No manual cleanup needed** - it's all automatic!

</details>

<details>

<summary><strong>Can I recover a deleted pet?</strong></summary>

**No.** Deletion is **permanent and irreversible**.

**No recovery method:**

* ❌ No "undo" button
* ❌ No backup restore (unless you have database backups)
* ❌ No way to restore stats/inventory

**Prevention:**

* Always double-check before confirming
* Verify pet ID matches what you want to delete
* Consider if deletion is truly necessary

**Alternative:** If unsure, take note of pet stats before deletion so owner can recreate similar pet

</details>

<details>

<summary><strong>Can players see Pet Manager?</strong></summary>

**No.** Only admins with `PermPetManager` permission can access it.

**Regular players:**

* ❌ Command does nothing
* ❌ Can't open menu
* ❌ Can't view database

**This prevents:**

* Players deleting others' pets
* Unauthorized database access
* Privacy violations

**Players manage their own pets via:** `/petbag` command only

</details>

<details>

<summary><strong>How do I find a specific pet quickly?</strong></summary>

**Method 1: Search by Owner (Fastest)**

/petmanager → \[Owner Name] → \[Pet Name]

**Method 2: Search by ID**

/petmanager → All Pets → Look for (ID: X)

**Method 3: Scroll and Search**

/petmanager → All Pets → Scroll through list

**Pro Tip:** If you know the owner, use Method 1 - much faster than scrolling through all pets!

</details>

<details>

<summary><strong>Does Pet Manager show spawned pets only?</strong></summary>

**No.** Pet Manager shows **ALL pets in the database**, regardless of spawn status.

**You'll see:**

* ✅ Spawned pets (currently active)
* ✅ Pets in bags (not spawned)
* ✅ Dead pets
* ✅ Abandoned pets
* ✅ Pets on treatment tables

**Status indicators:**

* Health 0% = Dead pet
* Owner "Unknown" = Likely abandoned
* Multiple pets per owner = Normal

</details>

<details>

<summary><strong>Can I edit pet stats instead of deleting?</strong></summary>

**Not directly in Pet Manager.** It's a view/delete only tool.

**To edit pet stats:**

**Option 1: Database (Recommended)**

UPDATE cdev\_pets SET health = 100, hunger = 100, thirst = 100 WHERE id = \[pet\_id];

**Option 2: Player Actions**

* Owner feeds/waters pet
* Veterinarian treats pet
* Pet naturally regenerates

**Why no editing in Pet Manager?**

* Prevents accidental stat changes
* Encourages in-game roleplay solutions
* Keeps admin tool simple and focused

**Future Feature:** Stat editing might be added in future updates!

</details>


# Routing Bucket System

## 🏠 Routing Bucket System

{% hint style="success" %}
**NEW FEATURE!** Pets now work seamlessly in apartments and houses with full routing bucket support!
{% endhint %}

### 📋 Overview

The **Routing Bucket System** enables pets to function properly inside apartments, houses, and other instanced areas that use FiveM's routing bucket technology. Players can spawn and interact with their pets anywhere, regardless of which bucket they're in.

**Perfect for:**

* 🏘️ Apartment systems (qb-apartments, qbx\_properties)
* 🏡 Housing scripts with instancing
* 🎮 Custom housing systems using buckets
* 🔄 Multi-instance gameplay

***

### ✨ Key Features

<table data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-cover data-type="files"></th></tr></thead><tbody><tr><td><strong>🖥️ Server-Side Spawning</strong></td><td>Pets spawned server-side for proper bucket synchronization</td><td></td></tr><tr><td><strong>🔄 Auto-Sync System</strong></td><td>Pets automatically stored/restored on bucket changes</td><td></td></tr><tr><td><strong>🏠 Full Housing Support</strong></td><td>Works with qb-apartments, qbx_properties, ps-housing and more</td><td></td></tr><tr><td><strong>⚡ Zero Performance Impact</strong></td><td>Minimal server overhead (~0.01ms per spawn)</td><td></td></tr></tbody></table>

#### Complete Feature List

* ✅ **Server-Side Pet Spawning** - Pets spawned on server for bucket compatibility
* ✅ **Auto-Store on Bucket Change** - Pets automatically stored when changing buckets
* ✅ **Apartment/House Support** - Full compatibility with housing scripts
* ✅ **Seamless Transitions** - Smooth pet handling across bucket changes
* ✅ **Framework Agnostic** - Works with any framework or housing system
* ✅ **Backward Compatible** - Existing pets work without migration
* ✅ **Performance Optimized** - Minimal impact on server performance

***

### 🎮 How It Works

{% tabs %}
{% tab title="What is a Routing Bucket?" %}

#### Understanding Routing Buckets

{% hint style="info" %}
**Routing Buckets** create isolated "instances" of the game world. Players in different buckets cannot see or interact with each other.
{% endhint %}

**Common Use Cases:**

🏠 **Apartments**

* Each apartment is a separate bucket
* Only people inside see each other
* Prevents interference from outside players

🏡 **Houses**

* Private instances for property owners
* Isolated from main world
* Multiple houses can exist in same location

🎮 **Custom Instances**

* Special events or missions
* PvP arenas
* Admin areas

#### How Buckets Work

**Default World (Bucket 0):**

All players spawn here by default Main city, streets, public áreas

**Apartment Example (Bucket 5):**

Player enters apartment → Moved to bucket 5 Only players in bucket 5 can see each other Player exits → Returns to bucket 0

{% hint style="warning" %}
**Without routing bucket support:** Pets would become invisible or glitched when players enter apartments!
{% endhint %}
{% endtab %}

{% tab title="System Flow" %}

#### Complete System Flow

**Step-by-Step Process:**

1. **Player in Main World (Bucket 0)**

Player has pet spawned Pet visible to everyone in bucket 0

2. **Player Enters Apartment**

Housing script changes bucket (0 → 5) Pet Manager detects bucket change If AutoSyncBucket = true → Pet auto-stored

3. **Inside Apartment (Bucket 5)**

Player spawns pet normally Pet spawns in bucket 5 (server-side) Pet visible only to players in bucket 5

4. **Player Exits Apartment**

Housing script returns to bucket 0 Pet Manager detects bucket change Pet auto-stored again

5. **Back in Main World**

Player can spawn pet normally Pet spawns in bucket 0 Everything works as before
{% endtab %}

{% tab title="Configuration" %}

#### System Configuration

You can find this configs inside the file `config.lua`:

```lua
    RoutingBucket = {
        -- ⚠️ IMPORTANT: Does not affect existing clients or saved pets
        -- 📊 PERFORMANCE: TRUE = +0.01ms per active pet | FALSE = No impact
        UseServerSideSpawning = false, -- Default: false (backward compatible)

        -- Automatically stores pet when player enters different dimension-- (e.g., entering apartment, garage, or house)
        -- ⚠️ REQUIREMENT: Only works if UseServerSideSpawning = true
        -- 📊 PERFORMANCE: TRUE = +0.01ms per second | FALSE = No impact
        AutoSyncBucket = true, -- Default: true

        -- How often (in seconds) to check for dimension changes
        -- ⚠️ REQUIREMENT: Only works if AutoSyncBucket = true
        -- 📊 PERFORMANCE: 1 second = ~0.01ms/s | 5 seconds = ~0.002ms/s
        BucketCheckInterval = 1, -- Default: 1 second (recommended)

        Notifications = {
            -- Show notification when pet is auto-stored due to dimension change
            ShowAutoDespawnNotification = true, -- Default: true (recommended)
        },

        -- Logs routing bucket operations to server console
        DebugLogging = true, -- Default: false (recommended for production)
    },
```

#### Configuration Options

**`UseServerSideSpawning`**

{% hint style="danger" %}
**REQUIRED:** Must be `true` for routing bucket support!
{% endhint %}

| Value   | Effect                                             |
| ------- | -------------------------------------------------- |
| `true`  | ✅ Pets spawn server-side, work in all buckets      |
| `false` | ❌ Pets spawn client-side, won't work in apartments |

**When to use `true`:**

* You have apartment/housing scripts
* You use any system with routing buckets
* You want maximum compatibility

**When to use `false`:**

* When you don't use any RoutingBucket System , and need better perfomance

***

**`AutoSyncBucket`**

{% hint style="success" %}
**RECOMMENDED:** Set to `true` to prevent pet glitches!
{% endhint %}

| Value   | Behavior                                            |
| ------- | --------------------------------------------------- |
| `true`  | ✅ Pet auto-stored on bucket change (recommended)    |
| `false` | ⚠️ Pet may glitch/become invisible on bucket change |

**When to use `true`:**

* You want automatic, seamless behavior
* You don't want players to manually store pets
* Best user experience (recommended)

**When to use `false`:**

* You want manual control over pet storage
* Custom implementation needed
* Advanced use cases only
  {% endtab %}
  {% endtabs %}

***

### 🔧 Installation

{% stepper %}
{% step %}

#### Update Resource Files

Replace all files in your `cdev_pets` folder with the new version.

{% hint style="warning" %}
**Backup First:** Always backup your current version before updating!
{% endhint %}
{% endstep %}

{% step %}

#### Add Configuration

Open `config.lua` and add the routing bucket section and follow settings bellow:

```lua
    RoutingBucket = {
        -- ⚠️ IMPORTANT: Does not affect existing clients or saved pets
        -- 📊 PERFORMANCE: TRUE = +0.01ms per active pet | FALSE = No impact
        UseServerSideSpawning = true, -- Default: false (backward compatible)

        -- Automatically stores pet when player enters different dimension-- (e.g., entering apartment, garage, or house)
        -- ⚠️ REQUIREMENT: Only works if UseServerSideSpawning = true
        -- 📊 PERFORMANCE: TRUE = +0.01ms per second | FALSE = No impact
        AutoSyncBucket = true, -- Default: true

        -- How often (in seconds) to check for dimension changes
        -- ⚠️ REQUIREMENT: Only works if AutoSyncBucket = true
        -- 📊 PERFORMANCE: 1 second = ~0.01ms/s | 5 seconds = ~0.002ms/s
        BucketCheckInterval = 1, -- Default: 1 second (recommended)

        Notifications = {
            -- Show notification when pet is auto-stored due to dimension change
            ShowAutoDespawnNotification = true, -- Default: true (recommended)
        },

        -- Logs routing bucket operations to server console
        DebugLogging = true, -- Default: false (recommended for production)
    },
```

{% endstep %}

{% step %}

#### Restart Resource

**restart cdev\_lib**\
**ensure cdev\_pets**

{% hint style="success" %}
✅ **No database changes needed!** System is fully backward compatible.
{% endhint %}
{% endstep %}
{% endstepper %}

***

### 🏘️ Housing Compatibility

#### Supported Scripts

<table><thead><tr><th width="250">Housing Script</th><th width="120">Status</th><th>Notes</th></tr></thead><tbody><tr><td><strong>vms-housing</strong></td><td>✅ Tested</td><td>Full compatibility, works out of box</td></tr><tr><td><strong>qbx_properties</strong></td><td>✅ Tested</td><td>Full compatibility, works out of box</td></tr><tr><td><strong>ps-housing</strong></td><td>✅ Compatible</td><td>Should work with default config</td></tr><tr><td><strong>Custom Scripts</strong></td><td>✅ Compatible</td><td>Works with any script using routing buckets</td></tr></tbody></table>

***

### 📊 Performance

#### Server Impact

{% hint style="success" %}
**Minimal Impact:** System adds negligible overhead to server performance.
{% endhint %}

**Measurements:**

| Operation               | Time      | Impact     |
| ----------------------- | --------- | ---------- |
| Pet Spawn (Server-Side) | \~0.01ms  | Negligible |
| Bucket Change Detection | \~0.001ms | Negligible |
| Auto-Store Pet          | \~0.005ms | Negligible |

**Comparison:**

| Operation               | Server-Side | Client-Side   | Difference                              |
| ----------------------- | ----------- | ------------- | --------------------------------------- |
| Pet Spawn               | \~0.01ms    | \~0.001ms     | +0.009ms per spawn (insignificant)      |
| Bucket Change Detection | \~0.001ms   | No additional | +0.001ms per pet spawned in server-side |
| Auto-Store Pet          | \~0.005ms   | No additional | +0.005ms per pet spawned in server-side |

#### Client Impact

{% hint style="success" %}
**Zero Additional Impact:** No extra client-side processing required!
{% endhint %}

* Same resource usage as before
* No additional rendering cost
* No FPS impact

***

### 🔍 Troubleshooting

{% tabs %}
{% tab title="Pet Disappears in Apartment" %}

#### Problem: Pet disappears when entering apartment

**Symptoms:**

* Pet visible in main world
* Pet disappears when entering apartment
* No errors in console

**Solution:**

1. **Enable Auto-Sync:**

```lua
AutoSyncBucket = true, -- Must be true
```

2. **Verify Server-Side Spawning:**

```lua
UseServerSideSpawning = true, -- Must be true
```

3. **Restart Resources:**

```lua
/restart cdev_lib
/ensure cdev_pets
```

3. **Test Again:**
   * Spawn pet in main world
   * Enter apartment
   * Pet should auto-store (check inventory/menu)
   * Spawn pet inside apartment

{% hint style="success" %}
**Fixed:** Pet now auto-stores on bucket change!
{% endhint %}
{% endtab %}

{% tab title="Pet Not Visible to Others" %}

#### Problem: Pet not visible to other players in apartment

**Symptoms:**

* You see your pet
* Other players don't see your pet
* They're in same apartment

**Solution:**

1. **Check Server-Side Spawning:**

```lua
UseServerSideSpawning = true, -- MUST be enabled
```

2. **Verify Both Players in Same Bucket:**
   * Both should be in same bucket number
3. **Check Console for Errors:**
   * Look for pet spawn errors
   * Check server console
4. **Restart Resources:**

```lua
/restart cdev_lib
/ensure cdev_pets
```

{% hint style="info" %}
**Note:** This usually means server-side spawning is disabled. Always keep it `true`!
{% endhint %}
{% endtab %}
{% endtabs %}

***

### 📚 FAQ

<details>

<summary><strong>Do I need to update my database?</strong></summary>

**No!** The system is fully backward compatible. All existing pets work without any database changes.

</details>

<details>

<summary><strong>Will this break existing pets?</strong></summary>

**No.** All existing pets continue working exactly as before. The new system only adds routing bucket support - it doesn't change how pets work in the main world (bucket 0).

</details>

<details>

<summary><strong>Does this work with ESX/QBCore/custom frameworks?</strong></summary>

**Yes!** The routing bucket system is framework-agnostic. It works with:

* ESX
* QBCore
* QBox
* Custom frameworks
* No framework at all

</details>

<details>

<summary><strong>Can I disable it if I don't use apartments?</strong></summary>

Yes, if you are not using any system that requires RoutingBucket, it is recommended that you do not enable the RoutingBucket settings. With this system disabled, your server will have better performance.

If you really want to disable:

```lua
RoutingBucket = {
 UseServerSideSpawning = false,
 AutoSyncBucket = false,
},
```

</details>

<details>

<summary><strong>What happens if a player's internet disconnects in an apartment?</strong></summary>

The pet behaves the same as disconnecting anywhere else:

* Pet despawns on disconnect
* Data saved to database
* Pet available when player reconnects
* No data loss

</details>

<details>

<summary><strong>Can admins see pets in all buckets?</strong></summary>

No. Admins are subject to the same routing bucket restrictions as regular players. This is a FiveM limitation - entities only render in the same bucket.

To view/manage all pets, use the **Pet Manager** admin tool (`/petmanager`).

</details>

***


# Pet Transfer System

## 🐾 Pet Transfer System <a href="#pet-transfer-system" id="pet-transfer-system"></a>

{% hint style="success" %}
**NEW FEATURE!** Allows players to securely transfer their pets to other players, supporting optional fees and robust validation.
{% endhint %}

### 📋 Overview

The **Pet Transfer System** enables safe and validated transfer of pets between players. It ensures pets are not active (spawned) during transfers and that recipients do not already have active pets. The system supports optional transfer fees requiring recipient confirmation.

Ideal for servers with pet systems featuring inventories and animations, providing a seamless and secure pet ownership transfer process.

**Perfect for:**

* 🐾 Secure pet ownership transfers with validations
* 💰 Managing optional transfer fees between players
*

🎮 Enhancing player interaction with pet trading features \* 🔔 Clear notifications and Discord logging for auditing

***

### ✨ Key Features

<table data-view="cards"><thead><tr><th>Feature</th><th>Description</th></tr></thead><tbody><tr><td><strong>🖥️ Interactive Pet Transfer Menu</strong></td><td>User-friendly UI for selecting pets, viewing detailed status, skills, and inventory</td></tr><tr><td><strong>✅ Robust Validations</strong></td><td>Prevents transfers of active pets and ensures recipient has no active pets</td></tr><tr><td><strong>💰 Optional Transfer Fee</strong></td><td>Supports configurable fees with mandatory recipient approval before transfer</td></tr><tr><td><strong>🔔 Notifications and Discord Logs</strong></td><td>Clear communication with players and detailed administrative logging</td></tr></tbody></table>

#### Complete Feature List

* ✅ **Interactive Pet Transfer Menu** – Easy selection and detailed info on pets for transfer
* ✅ **Active Pet Transfer Prevention** – Ensures pets currently out cannot be transferred
* ✅ **Recipient Pet Check** – Prevents transfer if recipient already has an active pet
* ✅ **Configurable Transfer Fees** – Supports fees with recipient approval and validation
* ✅ **Clear Notifications** – Informative messages guide players through the transfer process
* ✅ **Discord Logging** – All transfer actions, successes, failures, and declines are logged
* ✅ **Robust Server-Side Validation** – Validations happen server-side to prevent cheating or desyncs
* ✅ **Flexible Configuration** – Easily enable/disable system and adjust fee

***

### 🎮 How to Use

{% tabs %}
{% tab title="Player Perspective" %}

#### Accessing the Menu

<figure><img src="https://1004862655-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPhIA9eCA4bwgx77hxx4i%2Fuploads%2F9MjzIQ9CdVhSTnpzIwaD%2FFiveM_GTAProcess_Q9YLUdH3mU.gif?alt=media&amp;token=9b29a9d3-cc7b-46a3-98d2-011b5bbf3d95" alt=""><figcaption></figcaption></figure>

**Command:**

/pettransfer

#### What Happens:

**1️⃣ System Enable Check**

* System verifies if Pet Transfer is enabled in configuration
* If `PetTransfer.enable = false`, you'll see **"Pet transfer is currently disabled!"** notification
* Command fails gracefully with no menu opening

**2️⃣ Pet Ownership Check**

* Server fetches all pets owned by you from database
* If you have **no pets**, you'll see **"You have no pets to transfer"** notification
* If you have pets, menu proceeds to open

**3️⃣ Menu Opens**

* Interactive menu appears showing all your pets
* Each pet displays:
  * **Pet Name** and **ID**
  * **Model/Breed** information
  * **K9 Status** (Yes/No indicator)
  * **Inventory Count** (number of items)

**4️⃣ Pet Details View**

When you select a pet, you see detailed information organized in sections:

**📋 Pet Information**

* Pet ID
* Pet Name
* K9 Status (Yes/No)

**💚 Pet Stats**

* Health percentage
* Hunger percentage
* Thirst percentage
* Stamina percentage
* Loyalty percentage
* Happiness percentage

**🛡️ K9 Skills** (Only for K9 pets)

* Sniff level
* Resistance level
* Agility level
* Attack level

**📦 Pet Inventory**

* List of items with quantities and slots
* Hidden items (like "k9activation") are automatically filtered out
* Shows "Inventory (Empty)" if no visible items

**🔄 Transfer Pet Section**

* Input field for **Target Player ID**
* Input field for **Transfer Fee** (if enabled in config)
* Instructions text
* **Confirm Transfer** button

**5️⃣ Transfer Initiation**

When you click **Confirm Transfer**:

* System validates all inputs (player ID, fee range)
* Checks if pet is stored (not active/spawned)
* Checks if recipient has no active pets
* If fee is set, sends confirmation request to recipient
* You see **"Waiting for target player to confirm transfer and fee..."** notification

**6️⃣ Recipient Confirmation (If fee is enabled)**

Recipient receives a popup with:

* Sender's name
* Pet name being transferred
* Fee amount
* **Accept** or **Decline** buttons

**7️⃣ Transfer Completion**

* If accepted: Money transferred, pet ownership updated, both players notified
* If declined: Both players notified, no changes made
* If insufficient funds: Both players notified of failure

***

{% hint style="info" %}
**Permission Required:** No special permissions needed for players. System is available to all players by default when enabled.
{% endhint %}

{% hint style="warning" %}
**Important:** Pets must be stored (not active) before transfer. If your pet is out, store it first using the pet menu.
{% endhint %}
{% endtab %}

{% tab title="💰 Transfer Fee (Charge) System" %}

#### Overview

<figure><img src="https://1004862655-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPhIA9eCA4bwgx77hxx4i%2Fuploads%2F9MjzIQ9CdVhSTnpzIwaD%2FFiveM_GTAProcess_Q9YLUdH3mU.gif?alt=media&amp;token=9b29a9d3-cc7b-46a3-98d2-011b5bbf3d95" alt=""><figcaption></figcaption></figure>

{% hint style="success" %}
Add a realistic economic layer to pet transfers with the optional transfer fee system!\
Senders can request payment for their pets, which recipients must approve before ownership changes.
{% endhint %}

***

#### How It Works

| Step                               | Description                                                                      |
| ---------------------------------- | -------------------------------------------------------------------------------- |
| 1️⃣ **Set Transfer Fee**           | Sender inputs a fee amount within configured minimum and maximum bounds.         |
| 2️⃣ **Recipient Prompt**           | Recipient receives a detailed prompt including sender’s name, pet info, and fee. |
| 3️⃣ **Approval Required**          | Recipient must accept or decline the fee to proceed.                             |
| 4️⃣ **Funds Check & Transaction**  | System verifies recipient's funds and processes payment if approved.             |
| 5️⃣ **Completion or Cancellation** | Transfer completes on success; otherwise, appropriate notifications are sent.    |

***

#### Configuration Options

{% hint style="info" %}
Make sure to set these values in your configuration file:
{% endhint %}

| Option         | Description                      | Example |
| -------------- | -------------------------------- | ------- |
| `enableCharge` | Enable or disable the fee system | `true`  |
| `minCharge`    | Minimum allowed fee amount       | `50`    |
| `maxCharge`    | Maximum allowed fee amount       | `1000`  |

***

#### Important Notes

* 🧾 The **recipient pays the fee**, not the sender.
* ⚠️ Transfers only complete after **recipient’s explicit acceptance**.
* ⛔ Fees outside min/max trigger validations and rejection.
* 🔒 All fee validations happen **server-side** to prevent abuse.
* 📜 Full transaction and transfer logs are posted to Discord for audit.

{% hint style="warning" %}
Ensure player notifications clearly indicate the fee amount and actions required to avoid confusion.
{% endhint %}

***

Bring depth and fairness to your pet trading economy with this intuitive transfer fee system!
{% endtab %}
{% endtabs %}

***

### ⚙️ Configuration

{% hint style="warning" %}
**File Location:** `public/config/config.lua`\
**Section:** `After PedShop`\
**Restart Required:** Yes both resources first > (`restart cdev_lib`) and after ( `ensure cdev_pets)`
{% endhint %}

#### Permission Configuration

```lua
    -- ==========================================
    -- 🔄 PET TRANSFER SYSTEM CONFIGURATION
    -- ==========================================
    --
    -- 🐕 OVERVIEW:
    -- The Pet Transfer system allows players to transfer their pets (including all stats and inventory)
    -- to another player. Optionally, the feature can be fully disabled or you can require the new owner
    -- to pay a transfer fee (with confirmation).

    PetTransfer = {
        -- 🔘 Master toggle: Set to 'false' to completely disable pet transfers (players will not see the transfer option in pet menu)
        enable = true,

        -- 💸 Enable/Disable charging a fee for transferring pets
        -- If 'false', no fee required or confirmation for the receiving player; transfer is instant.
        -- If 'true', transferring player will enter a transfer amount, and the receiver must accept the charge and have enough money.
        enableCharge = true,

        -- 💵 Minimum and maximum fee allowed when charging is enabled
        -- (Prevents typos, very low/high charges, and can be used for default server economy balancing)
        minCharge = 0,      -- Smallest amount player must charge (default: 0 = free allowed)
        maxCharge = 200000, -- Highest amount allowed for a transfer (default: 50000)
    },
```

***

### 🎯 Menu Navigation Complete Review

<div align="left"><figure><img src="https://1004862655-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPhIA9eCA4bwgx77hxx4i%2Fuploads%2F6ejH5ZI7a3CkoP7cwrlH%2FFiveM_GTAProcess_Fs8SUvdjtg.gif?alt=media&amp;token=47e05474-8799-4d7b-9a30-c120facc3a1a" alt=""><figcaption></figcaption></figure></div>

***

### ❓ Frequently Asked Questions (FAQ)

<details>

<summary><strong>Q1: Can I transfer a pet that is currently active (spawned)?</strong></summary>

No. Pets must be stored (not spawned) before they can be transferred to another player.

</details>

<details>

<summary><strong>Q2: What happens if the recipient declines the transfer fee?</strong></summary>

The transfer is cancelled safely, and both sender and recipient receive a notification.

</details>

<details>

<summary><strong>Q3: Can I transfer a pet without a transfer fee?</strong></summary>

Yes. The transfer fee is optional and can be disabled in the configuration.

</details>

<details>

<summary><strong>Q4: What if the recipient does not have enough money to pay the transfer fee?</strong></summary>

The transfer will fail, and both players are notified about the insufficient funds.

</details>

<details>

<summary><strong>Q5: How can I see which pets belong to which player?</strong></summary>

Use the *Owner Groups* section in the menu to browse players with pets and view their pets.

</details>

<details>

<summary><strong>Q6: What permissions are required to use pet transfer?</strong></summary>

By default, all players can use the pet transfer feature when enabled. Administrative permissions control access to transfer settings and logs.

</details>

<details>

<summary><strong>Q7: Are all items in the pet's inventory transferred as well?</strong></summary>

Yes, except special hidden items like `"k9activation"` used internally by the system.

</details>

<details>

<summary><strong>Q8: Can I customize the transfer fee limits?</strong></summary>

Yes. Configure minimum and maximum fee values in the configuration file (`PublicSharedPetsConfig.PetTransfer`).

</details>

<details>

<summary><strong>Q9: Is the pet transfer system compatible with my custom pet system?</strong></summary>

The system is designed to be framework-agnostic but requires pets to have unique identifiers and inventory support. Custom integrations may be necessary.

</details>

<details>

<summary><strong>Q10: Where can I find logs of transfers?</strong></summary>

Transfer actions, successes, failures, and fee transactions are logged in Discord channels if you have set up the webhook integration.

</details>


# Show Blip on Map

## 🗺️ Show Blip on Map <a href="#pet-transfer-system" id="pet-transfer-system"></a>

{% hint style="success" %}
**NEW FEATURE!** This feature is fully compatible with existing shops. Old shops will maintain their blips by default.
{% endhint %}

### 📋 Overview

The Show Blip on Map feature gives you complete control over pet shop blip visibility. You can now choose whether each shop displays a map marker, allowing for hidden locations, secret shops, or cleaner map interfaces.

**Perfect for:**

* 🗺️ Controlling pet shop blip visibility on the map
* 🎨 Creating cleaner map interfaces with fewer markers
* 🔒 Managing secret or hidden pet shops
* 🎮 Enhancing role-play experiences with discoverable locations

***

### ✨ Key Features

<table data-view="cards"><thead><tr><th>Feature</th><th>Description</th></tr></thead><tbody><tr><td>🖥️ <strong>Per-Shop Blip Control</strong></td><td>Toggle blip visibility individually for each pet shop with easy checkbox control</td></tr><tr><td><strong>✅ Smart Value Preservation</strong></td><td>Blip settings (ID, Size, Color) are saved even when disabled, allowing easy re-activation</td></tr><tr><td>🔄 <strong>Full Backward Compatibility</strong></td><td>Existing shops automatically keep their blips visible without manual migration</td></tr><tr><td>🔔 <strong>Instant Updates</strong></td><td>Blip changes apply immediately to all nearby players when saved</td></tr></tbody></table>

#### Complete Feature List

* ✅ **Per-Shop Blip Toggle** – Control blip visibility individually for each shop
* ✅ **Value Preservation** – Blip settings saved even when disabled
* ✅ **Backward Compatibility** – Old shops automatically maintain visible blips
* ✅ **Smart Validation** – Blip fields only required when enabled
* ✅ **Instant Synchronization** – Changes apply immediately to all nearby players
* ✅ **Clean Delete Handling** – Blips properly removed when shops are deleted
* ✅ **Separate Handle Storage** – Prevents blip ID conflicts and duplication
* ✅ **Flexible Configuration** – Easy to enable/disable per shop without data loss

***

### 🎮 How to Use

{% tabs %}
{% tab title="Creating a Pet Shop with Blip Control" %}

## Accessing the Menu

<figure><img src="https://1004862655-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPhIA9eCA4bwgx77hxx4i%2Fuploads%2FUyyZz9gN35M9jpQZQkik%2FFiveM_GTAProcess_fVTYcaLOEa.gif?alt=media&amp;token=6f996cd5-f832-44aa-ab65-87037fdb0ba0" alt=""><figcaption></figcaption></figure>

### Command:

`/pscreator`

### What Happens:

**1️⃣ Permission Check**

* System verifies you have `PermCreatePetShop` permission
* If denied, you'll see "No permission" notification
* Menu will not open without proper permissions

**2️⃣ Menu Opens**

* Pet Shop Creator menu appears with CDEV logo
* Select **New Shop** option

**3️⃣ Basic Information**\
Configure shop details:

* **Shop Name** - Enter your shop name
* **Shop Logo** - Enter logo URL (optional)

**4️⃣ Blip Configuration**\
Set blip appearance values:

* **Blip ID** - Sprite number (default: 273)
* **Blip Size** - Scale value (default: 1)
* **Blip Color** - Color ID (default: 0)
* **Blip Location** - Click to set shop center coordinates with your current position

**5️⃣ Blip Visibility Control**\
Choose if shop appears on map:

* **Show Blip on Map** checkbox:
  * ☐ Unchecked = Hidden shop (no map marker) - **Default for new shops**
  * ✅ Checked = Visible shop (appears on map)

**6️⃣ Additional Setup**

* **Setup Management** - Configure management tablet locations
* Review all settings

**7️⃣ Create Shop**

* Click **Create** button
* System validates all required fields:
  * Shop name must be filled
  * Blip Location is required (even if blip disabled)
  * If blip enabled: validates Blip ID, Size, and Color
* If blip enabled: Appears on all nearby players' maps
* Success notification shown

{% hint style="danger" %}
**Blip Location is Always Required:** Even for hidden shops, you must set a Blip Location. It's used for internal distance calculations and proximity detection.
{% endhint %}
{% endtab %}

{% tab title="Editing Shop Blip Settings" %}

#### Accessing the Menu

<figure><img src="https://1004862655-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPhIA9eCA4bwgx77hxx4i%2Fuploads%2FNxjQU44Hed1ThOKnXEsC%2FFiveM_GTAProcess_iv5wOPUT33.gif?alt=media&amp;token=b0a2e2c9-aa89-46bf-86cb-cac9e761b68b" alt=""><figcaption></figcaption></figure>

### Command:

`/pscreator`

### What Happens:

**1️⃣ Permission Check**

* System verifies you have `PermCreatePetShop` permission
* Menu opens if permission granted

**2️⃣ Select Shop to Edit**

* Choose **Manage Shops** from main menu
* List of all existing shops displays
* Select the shop you want to edit

**3️⃣ Current Settings Displayed**\
Menu shows all current configuration:

* Shop Name and Logo
* **Blip ID** - Current sprite number
* **Blip Size** - Current scale
* **Blip Color** - Current color ID
* **Blip Location** - Current center coordinates
* **Show Blip on Map** - Current checkbox state:
  * ✅ Checked = Blip currently visible
  * ☐ Unchecked = Blip currently hidden

**4️⃣ Modify Blip Settings**\
You can change:

* Any blip value (ID, Size, Color)
* Blip Location (click to update with current position)
* Toggle **Show Blip on Map** checkbox

**5️⃣ Toggle Blip Visibility**\
To enable/disable blip:

* Click **Show Blip on Map** checkbox
* Checkbox toggles immediately
* **No automatic save** - you must click Update

**6️⃣ Save Changes**

* Click **Update** button
* System validates changes:
  * If blip enabled: validates ID, Size, Color values
  * If blip disabled: preserves all values for future use
* Changes saved to database

**7️⃣ Changes Applied Instantly**\
After clicking Update:

* All nearby players receive update
* If blip **enabled**: Appears on everyone's map immediately
* If blip **disabled**: Removed from everyone's map immediately
* Shop functionality unchanged (purchases, management, etc. still work)

***

{% hint style="success" %}
**Value Preservation:** When you disable the blip, all your settings (ID, Size, Color) are saved. Re-enabling the blip later will use the same values!
{% endhint %}

{% hint style="danger" %}
**Important:** You must click **Update** after toggling the checkbox. The checkbox only marks your preference - changes aren't saved until you update!
{% endhint %}
{% endtab %}
{% endtabs %}

***

### ❓ Frequently Asked Questions (FAQ)

<details>

<summary><strong>Q1: Can I hide the blip but keep the shop functional?</strong></summary>

Yes! Disabling the blip only removes the map marker. All shop functionality (management, purchases, veterinary, etc.) remains fully operational.

</details>

<details>

<summary><strong>Q2: What happens to my blip settings when I disable the blip?</strong></summary>

All your blip settings (ID, Size, Color, Location) are **preserved**. When you re-enable the blip, it will use the same values.

</details>

<details>

<summary><strong>Q3: Do I need to reconfigure existing shops?</strong></summary>

No. Existing shops automatically maintain their blips. The feature only applies when you choose to disable blips manually.

</details>

<details>

<summary><strong>Q4: Can I have some shops with blips and others without?</strong></summary>

Yes! The setting is **per-shop**. Each shop can independently have its blip enabled or disabled.

</details>

<details>

<summary><strong>Q5: What if I forget to set Blip Location?</strong></summary>

Blip Location is **required** for all shops, even if the blip is disabled. It's used for internal distance calculations and shop proximity detection.

</details>

<details>

<summary><strong>Q6: Will players see the blip disappear immediately after I disable it?</strong></summary>

Yes. When you click Update, all nearby players will have the blip removed from their map instantly.

</details>

<details>

<summary><strong>Q7: Does disabling the blip affect performance?</strong></summary>

Yes, positively! Fewer blips on the map means slightly better client performance, especially on servers with many shops.

</details>

<details>

<summary><strong>Q8: What happens if I delete a shop with a blip?</strong></summary>

The blip is automatically removed from all players' maps when the shop is deleted. No manual cleanup needed.

</details>


# Pet Movement & Follow System

## 🏃Pet Movement & Follow System <a href="#pet-transfer-system" id="pet-transfer-system"></a>

{% hint style="success" %}
**NEW FEATURE!** Advanced dynamic speed system that adapts to player movement in real-time.
{% endhint %}

### 📋 Overview

The **Pet Movement & Follow System** gives you complete control over how pets follow players. The system dynamically adjusts pet speed based on player movement (walking, running, sprinting), preventing pets from falling behind and includes smart teleportation for stuck situations.

**Perfect for:**

* 🏃 Ensuring pets always keep up with players
* 🎮 Creating realistic pet following behavior
* ⚡ Preventing pets from getting lost or stuck
* 🎨 Customizing pet speed for different gameplay styles
* 🔧 Optimizing server performance with configurable update intervals

***

### ✨ Key Features

<table data-view="cards"><thead><tr><th>Feature</th><th>Description</th></tr></thead><tbody><tr><td><h3>🎯 Dynamic Speed Adjustment</h3></td><td>Pet speed automatically adapts based on player movement state (walking/running/sprinting)</td></tr><tr><td><h3>🚀 Smart Teleportation System</h3></td><td>Automatically teleports pets to players when they get too far away, preventing permanent separation</td></tr><tr><td><h3>⚙️ Performance Optimization</h3></td><td>Configurable update intervals allow balancing between responsiveness and server performance</td></tr><tr><td><h3>🔄 Full Backward Compatibility</h3></td><td>Works seamlessly with existing pet systems without requiring migration</td></tr><tr><td><h3>🎨 Visual Quality Controls</h3></td><td>Built-in limits prevent animation glitches while allowing extreme speeds for special use cases</td></tr><tr><td><h3>📏 Distance-Based Intelligence</h3></td><td>Speed boost only activates when pets are far enough, preventing unnatural close-range behavior</td></tr></tbody></table>

#### Complete Feature List

* ✅ **Dynamic Speed Multipliers** – Three-tier speed system (walking/running/sprinting)
* ✅ **Real-Time Speed Detection** – Automatically detects player movement state
* ✅ **Distance-Based Activation** – Speed boost only when pet is far enough
* ✅ **Smart Teleportation** – Auto-teleport when pet exceeds maximum distance
* ✅ **Ground Detection** – Teleport finds valid ground coordinates
* ✅ **Animation Preservation** – Speed limits prevent animation desync
* ✅ **Configurable Performance** – Adjustable update intervals for optimization
* ✅ **Thread Management** – Automatic cleanup when changing pet states
* ✅ **Ownership Handling** – Maintains network ownership during follow

***

### 🎮 How to Configure <a href="#how-to-configure" id="how-to-configure"></a>

### Accessing Configuration

**File Location:**

```
cdev_pets/public/config/config.lua
```

**Configuration Section:**

```lua
PublicSharedPetsConfig = {
     -- ==========================================
    -- 🐾 PET MOVEMENT & FOLLOW SYSTEM
    -- ==========================================
    -- 🐕 OVERVIEW:
    -- This system controls how pets follow players, adjusting their speed
    -- dynamically based on player movement (walking, running, sprinting).
    -- Prevents pets from falling behind and includes smart teleportation.

    PetMovement = {

        -- ==========================================
        -- 🏃 SPEED MULTIPLIER SETTINGS
        -- ==========================================
        --
        -- 💡 HOW IT WORKS:
        -- 1.0 = Normal NPC speed (default GTA V speed)
        -- 2.0 = 2x faster than normal
        -- 10.0 = 10x faster (66 m/s when sprinting)
        --
        -- ⚠️ TECHNICAL LIMITS (Native):
        -- MIN: 0.0 (frozen) | MAX: 10.0 (extremely fast)
        --
        -- ⚠️ RECOMMENDED LIMITS (Visual Quality):
        -- MIN: 1.0 | MAX: 4.0
        -- Values above 4.0 cause animation desync and look unnatural
        -- ==========================================

        -- 🚶 Base Speed (Player Walking)
        -- Applied when player is walking normally
        -- TECHNICAL: 0.0-10.0 | RECOMMENDED: 1.5-2.5 | VISUAL LIMIT: 3.0
        BaseSpeedMultiplier = 1.8,

        -- 🏃 Running Speed (Player Running)
        -- Applied when player is running (holding Shift on keyboard)
        -- TECHNICAL: 0.0-10.0 | RECOMMENDED: 2.0-3.0 | VISUAL LIMIT: 4.0
        RunningSpeedMultiplier = 2.2,

        -- 🏃💨 Sprinting Speed (Player Sprinting)
        -- Applied when player is sprinting (tapping Shift repeatedly)
        -- TECHNICAL: 0.0-10.0 | RECOMMENDED: 2.5-4.0 | VISUAL LIMIT: 5.0
        -- ⚠️ WARNING: Values above 5.0 will cause severe animation glitches
        SprintingSpeedMultiplier = 3.0,

        -- ==========================================
        -- 📏 DISTANCE SETTINGS
        -- ==========================================

        -- 🎯 Minimum Distance for Speed Boost
        -- Pet only gets speed boost when farther than this distance
        -- If pet is closer, it uses BaseSpeedMultiplier
        -- MIN: 0.0 | MAX: 50.0 | RECOMMENDED: 4.0-8.0
        MinDistanceForBoost = 5.0,

        -- 🚀 Maximum Follow Distance (Teleport Trigger)
        -- When pet is farther than this distance, it teleports to player
        -- This prevents pets from getting permanently lost
        -- MIN: 10.0 | MAX: 500.0 | RECOMMENDED: 30.0-60.0
        MaxFollowDistance = 40.0,

        -- ==========================================
        -- ⚙️ PERFORMANCE SETTINGS
        -- ==========================================

        -- ⏱️ Speed Update Interval
        -- How often the system checks and updates pet speed (in milliseconds)
        -- Lower = More responsive but higher CPU usage
        -- Higher = Less responsive but better performance
        -- MIN: 50 | MAX: 5000 | RECOMMENDED: 200-500
        UpdateInterval = 300,

        -- ==========================================
        -- 🔧 TELEPORT SYSTEM
        -- ==========================================

        -- 📍 Enable Smart Teleportation
        -- When enabled, pet teleports to player when too far away
        -- When disabled, pet will keep running (may get stuck/lost)
        -- true = Enabled | false = Disabled
        EnableTeleport = true,
    },
}
```

{% tabs %}
{% tab title="Speed Multiplier Configuration" %}

### 🚶 Base Speed Multiplier

**Applied when:** Player is walking normally\
**Default Value:** `1.8`\
**Technical Range:** 0.0 - 10.0\
**Recommended Range:** 1.5 - 2.5\
**Visual Quality Limit:** 3.0

```
luaBaseSpeedMultiplier = 1.8,
```

**What it does:**

* Controls pet speed when you're walking at normal pace
* Value of 1.8 means pet moves 1.8x faster than default NPC speed
* Lower values make pets more relaxed but may lag slightly behind
* Higher values make pets more eager but can look rushed

***

### 🏃 Running Speed Multiplier

**Applied when:** Player is running (holding Shift)\
**Default Value:** `2.2`\
**Technical Range:** 0.0 - 10.0\
**Recommended Range:** 2.0 - 3.0\
**Visual Quality Limit:** 4.0

```
luaRunningSpeedMultiplier = 2.2,
```

**What it does:**

* Controls pet speed when you're running
* Should be higher than BaseSpeedMultiplier
* Value of 2.2 ensures pets keep up during normal running
* Provides smooth transition between walking and sprinting

***

### 🏃💨 Sprinting Speed Multiplier

**Applied when:** Player is sprinting (tapping Shift repeatedly)\
**Default Value:** `3.0`\
**Technical Range:** 0.0 - 10.0\
**Recommended Range:** 2.5 - 4.0\
**Visual Quality Limit:** 5.0

```
luaSprintingSpeedMultiplier = 3.0,
```

**What it does:**

* Controls pet speed during maximum player speed
* Highest speed multiplier in the system
* Value of 3.0 = 3x normal NPC speed
* ⚠️ **Warning:** Values above 5.0 cause severe animation glitches

***

{% endtab %}

{% tab title="Distance Settings" %}

### 🎯 Minimum Distance for Speed Boost

**Default Value:** `5.0` meters\
**Range:** 0.0 - 50.0\
**Recommended:** 4.0 - 8.0

```
luaMinDistanceForBoost = 5.0,
```

**What it does:**

* Pet only gets speed boost when farther than this distance
* If closer than this value, pet uses `BaseSpeedMultiplier`
* Prevents pets from running frantically when already close
* Creates more natural close-range behavior

**Example:**

* You're walking, pet is 3 meters away → Uses BaseSpeedMultiplier (1.8x)
* You're running, pet is 7 meters away → Uses RunningSpeedMultiplier (2.2x)

***

### 🚀 Maximum Follow Distance (Teleport Trigger)

**Default Value:** `40.0` meters\
**Range:** 10.0 - 500.0\
**Recommended:** 30.0 - 60.0

```
luaMaxFollowDistance = 40.0,
```

**What it does:**

* When pet exceeds this distance, it teleports to you
* Prevents pets from getting permanently lost
* Finds valid ground coordinates automatically
* Maintains heading (faces same direction as player)

**Use Cases:**

* **Lower values (25-35):** More frequent teleports, safer for complex maps
* **Higher values (50-80):** Fewer teleports, pets run longer distances
* **Very high (100+):** Minimal teleports, only for stuck situations

***

{% endtab %}

{% tab title="Performance Settings" %}

### ⏱️ Speed Update Interval

**Default Value:** `300` milliseconds\
**Range:** 50 - 5000\
**Recommended:** 200 - 500

```
luaUpdateInterval = 300,
```

**What it does:**

* How often the system checks and updates pet speed
* Lower = More responsive but higher CPU usage
* Higher = Less responsive but better performance

**Performance Guide:**

| Value  | Responsiveness | Performance | Use Case                         |
| ------ | -------------- | ----------- | -------------------------------- |
| 100ms  | Instant        | High CPU    | Small servers (<32 players)      |
| 300ms  | Fast           | Balanced    | **Recommended for most servers** |
| 500ms  | Normal         | Low CPU     | Large servers (100+ players)     |
| 1000ms | Delayed        | Minimal CPU | Extreme optimization needed      |

***

{% endtab %}

{% tab title="Teleport System" %}

### 📍 Enable Smart Teleportation

**Default Value:** `true`\
**Options:** `true` or `false`

```
luaEnableTeleport = true,
```

**What it does:**

* **When true:** Pet teleports when exceeding `MaxFollowDistance`
* **When false:** Pet keeps running indefinitely (may get stuck/lost)

**Recommendation:** Keep enabled unless you have custom teleport handling

***

{% endtab %}
{% endtabs %}

### 🔧 Configuration Examples <a href="#configuration-examples" id="configuration-examples"></a>

***

{% tabs %}
{% tab title="Slow, Realistic Pet (Lazy Dog)" %}

```lua
PetMovement = {
    BaseSpeedMultiplier = 1.3,      -- Slow walking
    RunningSpeedMultiplier = 1.8,   -- Moderate running
    SprintingSpeedMultiplier = 2.5, -- Fast only when necessary
    MinDistanceForBoost = 8.0,      -- Large buffer zone
    MaxFollowDistance = 30.0,       -- Teleport sooner
    UpdateInterval = 400,
    EnableTeleport = true,
}
```

{% endtab %}

{% tab title="Fast, Energetic Pet (Active Puppy)" %}

```lua
PetMovement = {
    BaseSpeedMultiplier = 2.2,      -- Quick walking
    RunningSpeedMultiplier = 2.8,   -- Fast running
    SprintingSpeedMultiplier = 3.5, -- Very fast sprinting
    MinDistanceForBoost = 4.0,      -- Small buffer zone
    MaxFollowDistance = 50.0,       -- Let it run longer
    UpdateInterval = 200,
    EnableTeleport = true,
}
```

{% endtab %}

{% tab title="Performance Optimized (Large Server)" %}

```lua
PetMovement = {
    BaseSpeedMultiplier = 1.8,      -- Standard speed
    RunningSpeedMultiplier = 2.2,
    SprintingSpeedMultiplier = 3.0,
    MinDistanceForBoost = 6.0,
    MaxFollowDistance = 40.0,
    UpdateInterval = 600,           -- Low CPU usage
    EnableTeleport = true,
}
```

{% endtab %}

{% tab title="Extreme Speed (Don't Care About Animations)" %}

```lua
PetMovement = {
    BaseSpeedMultiplier = 3.0,
    RunningSpeedMultiplier = 5.0,
    SprintingSpeedMultiplier = 8.0, -- Super fast!
    MinDistanceForBoost = 3.0,
    MaxFollowDistance = 60.0,
    UpdateInterval = 250,
    EnableTeleport = true,
}
```

{% hint style="danger" %}
**⚠️ Warning: Animations WILL glitch with these values!**
{% endhint %}
{% endtab %}
{% endtabs %}

***

### ❓ Frequently Asked Questions (FAQ) <a href="#frequently-asked-questions-faq" id="frequently-asked-questions-faq"></a>

<details>

<summary>Q1: What's the difference between Technical and Recommended limits?</summary>

**Answer:**

* **Technical Limits (0.0 - 10.0):** What the game engine accepts
* **Recommended Limits:** What looks good visually without animation glitches
* **Visual Quality Limits:** Maximum before severe animation desync occurs

You CAN use values up to 10.0, but animations will break above 5.0.

</details>

<details>

<summary>Q2: Do these settings apply to all pets or per-pet?</summary>

**Answer:**\
These are **global settings** that apply to all pets on your server. All pets use the same speed multipliers. If you need per-pet customization, you would need custom development.

</details>

<details>

<summary>Q3: Does the system work with leashed pets?</summary>

**Answer:**\
No, this system only affects the **Follow** state. Leashed pets use the existing system and are not affected by these settings.

</details>

<details>

<summary>Q4: Will existing pets automatically use this system?</summary>

**Answer:**\
Yes! This is **fully backward compatible**. All existing pets will automatically use the new dynamic speed system when following players. No migration needed.

</details>

<details>

<summary>Q5: Can I disable the speed system and use default behavior?</summary>

**Answer:**\
Yes, set all multipliers to `1.0`:

```lua
BaseSpeedMultiplier = 1.0,
RunningSpeedMultiplier = 1.0,
SprintingSpeedMultiplier = 1.0,
```

This reverts to default GTA V NPC speed (but pets will lag behind).

</details>

<details>

<summary>Q6: Does teleportation work indoors and in interiors?</summary>

**Answer:**\
Yes! The system uses `GetGroundZFor_3dCoord` to find valid ground coordinates, which works in most interiors. However, some custom MLOs may cause issues. If pets teleport into walls, increase `MaxFollowDistance` to reduce teleport frequency.

</details>

<details>

<summary>Q7: What happens when a pet is in a vehicle?</summary>

**Answer:**\
The speed system only applies to Follow State. When pets are in vehicles, this system is automatically disabled and cleanup occurs.

</details>

<details>

<summary>Q8: Can I use different speeds for different pet types (dogs vs cats)?</summary>

**Answer:**\
Not with the default configuration. The system applies globally to all pets.

</details>

<details>

<summary>Q9: Does this affect server performance significantly?</summary>

**Answer:**\
**Minimal impact** when properly configured:

* Each active following pet runs one thread
* Thread checks distance + applies speed multiplier every `UpdateInterval` ms
* Default 300ms = \~3 checks per second per pet
* 50 active pets = \~150 calculations/second (negligible)

For servers with 100+ simultaneous pets, increase `UpdateInterval` to 500-1000ms.

</details>

***

### Speed Reference Table

| Multiplier | Sprint Speed | Description                    |
| ---------- | ------------ | ------------------------------ |
| 1.0        | Normal       | Default GTA V ped speed        |
| 2.0        | \~13 m/s     | 2x normal speed                |
| 3.0        | \~20 m/s     | 3x normal speed                |
| 5.0        | \~33 m/s     | Animation glitches start       |
| 10.0       | \~66 m/s     | Maximum speed, severe glitches |

***


# Pet Place Preview

## 🐩Pet Palce Preview <a href="#pet-transfer-system" id="pet-transfer-system"></a>

{% hint style="success" %}
**NEW FEATURE!** This feature is fully compatible with existing shops. Old shops will maintain their pet placed by default.
{% endhint %}

### 📋 Overview

The Pet Preview feature lets you place a pet in the shop gallery for display only. From the management panel inventory, the manager can choose Place (pet is buyable via target/drawtext) or Place Preview (pet is visible but cannot be bought). Ideal for showcases, display-only models, or shops that want to show pets without selling them at that spot.

**Perfect for:**

* Controlling which pets in the gallery can be bought and which are display-only
* Creating showcases and display areas without selling the displayed model
* Keeping the shop organized (preview vs for sale)
* Improving role-play with decorative or demo pets

***

### ✨ Key Features

<table data-view="cards"><thead><tr><th>Feature</th><th>Description</th></tr></thead><tbody><tr><td>🖥️ Place vs Place Preview</td><td>Two buttons in the manager inventory: one to place a pet for sale (Place) and one for preview only (Place Preview).</td></tr><tr><td>🔴 No Purchase on Preview</td><td>Place Preview pets do not show buy target/drawtext; players cannot purchase when aiming at them.</td></tr><tr><td>🔄 <strong>Full Backward Compatibility</strong></td><td>Existing shops and already-placed pets keep working; only new placements use Place or Place Preview.</td></tr><tr><td>🔔 Preview with Zero Stock</td><td>Place Preview can be used even when the item has 0 stock (display only).</td></tr><tr><td>❌ Single Remove Place</td><td>The same “Remove Place” button removes both Place and Place Preview pets from the gallery.</td></tr></tbody></table>

#### Complete Feature List

* ✅ Place vs Place Preview – Two buttons in the manager inventory: one to place a pet for sale (Place) and one for preview only (Place Preview).
* ✅ No Purchase on Preview – Place Preview pets do not show buy target/drawtext; players cannot purchase when aiming at them.
* ✅ Single Remove Place – The same “Remove Place” button removes both Place and Place Preview pets from the gallery.
* ✅Backward Compatibility – Existing shops and already-placed pets keep working; only new placements use Place or Place Preview.
* ✅ Preview with Zero Stock – Place Preview can be used even when the item has 0 stock (display only).
* ✅ Target & Drawtext – In both target (ThirdEye) and drawtext modes, the buy option only appears for pets placed with Place, never for Place Preview.

***

### 🎮 How to Use

{% tabs %}
{% tab title="Creating a Pet Only Preview" %}

## Accessing the Management Panel

<figure><img src="https://1004862655-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPhIA9eCA4bwgx77hxx4i%2Fuploads%2FpntEuvFN4lRdzv4yKD1Y%2FFiveM_GTAProcess_5ZwDINOPLC.gif?alt=media&amp;token=d096eacd-49ff-4ab2-b9bb-e65cabef613a" alt=""><figcaption></figcaption></figure>

### Step by Step:

**1️⃣ Open Management**

* System verifies you have `Boss / Manager` permission
* If denied, you'll see not see the target or drawtext

**2️⃣ Go to Inventory**

* If you don't have any pet you need go to Buy Products Tab

**3️⃣ Place Preview ( Sky Button )**

* **After click the button the pet will spawn for you place in any where**
* **Remember If you use Place Preview the buy buttons will not appear**
  {% endtab %}

{% tab title="Place VS Place Preview" %}

#### Peview Pet vs Place Pet

<figure><img src="https://1004862655-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPhIA9eCA4bwgx77hxx4i%2Fuploads%2FQ2Huy9iSohyUH5nUwsW8%2FFiveM_GTAProcess_kYQsh8n7Vw.gif?alt=media&amp;token=8eef5f91-5cd0-47a6-9506-9bf4823fbdb4" alt=""><figcaption></figcaption></figure>

### Place Button vs Place Preview Button:

{% hint style="warning" %}
**Place vs Place Preview – Two buttons in the manager inventory: one to place a pet for sale (Place) and one for preview only (Place Preview).**
{% endhint %}
{% endtab %}
{% endtabs %}


# Custom Currency in Pet Shop

## 💎Custom Currency in Pet Shop <a href="#pet-transfer-system" id="pet-transfer-system"></a>

{% hint style="success" %}
**NEW FEATURE!** This feature is fully compatible with existing shops. Old shops will maintain their pet placed by default.
{% endhint %}

### 📋 Overview

The **Custom Currency** system lets you define shop items that are paid **only** with a currency of your choice (e.g. `crypto` from Qbox, or your own VIP/points). When an item uses `customCurrency`, the player pays **only** that currency—no cash is charged. The pet shop **(NPC shop / Tab Shop)** displays the custom currency balance in the header next to cash, with a diamond icon (or your own icon), and shows “Buy \[Currency Name]” on the button.

**Perfect for:**

* 💎 VIP-only or premium items paid with a custom currency
* 🪙 Crypto or other in-game currencies
* 💰 Have profit on your server using our pet system.

***

### ✨ Key Features

<table data-view="cards"><thead><tr><th>Feature</th><th>Description</th></tr></thead><tbody><tr><td>📁 <strong>Custom currency per item</strong></td><td>In <code>shop.lua</code>, set <code>customCurrency = { crypto = 50 }</code> (or your key). Item is paid only with that currency.</td></tr><tr><td>💰 <strong>Header balance</strong></td><td>When the shop has custom-currency items, the header shows cash + custom currency balance (with icon).</td></tr><tr><td>📝 <strong>Single language key</strong></td><td>The name shown (e.g. “Crypto”, “VIP Coins”) comes from <code>vip_coins</code> in <code>data/languages</code>—one key for all.</td></tr><tr><td>🔧 <strong>Optional custom icon</strong></td><td>Use default diamond SVG or your own image via <code>Shop.CustomCurrencyIcon</code> in config.</td></tr><tr><td>🔃 <strong>Balance refresh after purchase</strong></td><td>After a successful purchase, the shop reopens with updated cash and custom currency balance.</td></tr></tbody></table>

***

### 🔧 How Setup Custom Currency & Preview

***

{% tabs %}
{% tab title="How Setup" %}

#### **1.** Open the file `api.lua` located at: `cdev_lib > public > server > api.lua`

#### **2.** Inside this file, we will modify the three functions shown below.

{% hint style="warning" %}
**Note:** Since I am using **QBox/QBCore**, no changes are required. If you are using another VIP currency system, configure it correctly for **QBCore/QBox** or **ESX**.
{% endhint %}

```lua
-- 💎 Custom currency (e.g. crypto, vip_coins) for shop systems.
-- Used when shop items have customCurrency in config; implement per currencyType in the blocks below.
-- QBCore/Qbox: money types beyond cash/bank (e.g. crypto) are read from PlayerData.money[currencyType].
GetCustomCurrencyFromSource = function(source, currencyType)
    if clib_Config.isQBCore then
        local player = clib.frameworks.QBCore.Functions.GetPlayer(source)
        if not player or not player.PlayerData.money then return 0 end
        local amount = player.PlayerData.money[currencyType]
        return (type(amount) == "number" and amount >= 0) and amount or 0
    elseif clib_Config.isESX then
        -- 🔧 ESX: add accounts or custom logic per currencyType (e.g. "crypto")
        return 0
    else
        -- 🔧 If using custom, implement your own code here
        return 0
    end
end,
AddCustomCurrencyForSource = function(source, currencyType, amount)
    if clib_Config.isQBCore then
        local player = clib.frameworks.QBCore.Functions.GetPlayer(source)
        if player and amount > 0 then
            player.Functions.AddMoney(currencyType, amount)
        end
    elseif clib_Config.isESX then
        -- 🔧 ESX: add account or custom logic per currencyType
    else
        -- 🔧 If using custom, implement your own code here
    end
end,
RemoveCustomCurrencyFromSource = function(source, currencyType, amount)
    if clib_Config.isQBCore then
        local player = clib.frameworks.QBCore.Functions.GetPlayer(source)
        if player and amount > 0 then
            player.Functions.RemoveMoney(currencyType, amount)
        end
    elseif clib_Config.isESX then
        -- 🔧 ESX: remove from account or custom logic per currencyType
    else
        -- 🔧 If using custom, implement your own code here
    end
end,
```

#### **3.** Now open the file `config.lua` located at: `cdev_pets > public > config > config.lua`

We will add a pet-type product to be sold using a custom currency. Locate the product you want to edit.

{% hint style="info" %}
**Note:** In this example, I am using the **crypto** currency available in **QBCore/QBox**.
{% endhint %}

{% hint style="warning" %}
⚠️ **Important:** The variable passed inside the `customCurrency` object will be the variable used by the functions in **cdev\_lib**. e.g ( I use **crypto** from QBCore/Qbox )

Set **`price = 0`** (recommended so it’s clear the item is custom-currency only).
{% endhint %}

```lua
-- [[ CUSTOM CURRENCY ]]
-- Item is paid ONLY with the currency defined here. Set price = 0.
--
-- • The KEY inside customCurrency is the name used to read/write in the database (e.g. "crypto" = money.crypto column in Qbox).
--   That key must exist in cdev_lib (GetCustomCurrencyFromSource / RemoveCustomCurrencyFromSource).
--
-- • To change the DISPLAY name (what the player sees: "Crypto", "VIP Coins", etc.), edit "vip_coins" in data/languages (en.lua, pt.lua, etc.).
--   One language key for the currency name; no need to create one per type.
{
    PetShopId = "pet_hottweiler",
    key = "pet_chop",
    label = "Hottweiler",
    hasFemale = true,
    price = 0, -- (Optional) but recommended
    category = "pet_category_pets",
    description = "A Hottweiler",
    vip = true, -- Enable this if you want only VIP can Buy this product
    customCurrency = { crypto = 50 }, -- Add this line
    canBeK9 = true,
},
```

#### **4. (Optional) Change the Custom Currency name**

⚠️ **Attention:** I will use the `en.lua` file as an example, but you can use any file inside `cdev_pets/data/languages`. After opening it, simply search for the variable named `vip_coins`.

***

{% hint style="info" %}
If you want to change the diamond icon in the Shop header, simply access the configuration file at:

`cdev_pets > public > config > config.lua` (Line 461)

```lua
-- Custom currency icon in shop header. If empty, the default diamond SVG is used. If set (e.g. "nui://cdev_pets/html/icons/vip.png"), that image is used instead.
CustomCurrencyIcon = "",
```

{% endhint %}
{% endtab %}

{% tab title="Shop Preview" %}
{% hint style="warning" %}
⚠️ **Attention:** In the gift below, I only added it for one item, which is the **Hotweiller pet**, but you can apply this system to any pet or item (accessories).
{% endhint %}

<figure><img src="https://1004862655-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPhIA9eCA4bwgx77hxx4i%2Fuploads%2FbMJBuwcSwDAqOjBzPPFL%2FFiveM_GTAProcess_aerheDmenP.gif?alt=media&amp;token=1a2e60ad-f6fe-4bd4-a559-ee0a5e566e1d" alt=""><figcaption></figcaption></figure>
{% endtab %}
{% endtabs %}

***

#### ❓ Frequently Asked Questions

<details>

<summary><strong>Q1: Can an item use both cash and custom currency?</strong></summary>

No. With the current design, if an item has \`customCurrency\`, it is paid \*\*only\*\* with that currency. Set \`price = 0\` so the item is clearly “custom currency only.” If you set both \`price\` and \`customCurrency\`, only the custom currency is charged; the cash price is ignored.

</details>

<details>

<summary><strong>Q2: Where does the custom currency balance appear?</strong></summary>

Only in the \*\*NPC Pet Shop\*\* (the one opened from the ped). The header shows cash and, when the shop has at least one custom-currency item, the custom currency balance with the diamond (or custom) icon. Player-owned pet shops do not show or use this.

</details>

<details>

<summary><strong>Q3: How do I change the name “VIP Coins” (or “Crypto”) that the player sees?</strong></summary>

Edit the \*\*\`vip\_coins\`\*\* key in your language files under \`cdev\_pets/data/languages/\` (e.g. \`en.lua\`, \`pt.lua\`). One key is used for the display name everywhere (button, price, header). You do not need a separate language key per currency type.

</details>

<details>

<summary><strong>Q4: I use Qbox; how do I use “crypto” from players.money?</strong></summary>

Ensure your framework exposes \`money.crypto\` (e.g. in \`PlayerData.money.crypto\` when the player is loaded). cdev\_lib’s default implementation for QBCore/Qbox reads and writes \`PlayerData.money\[currencyType]\`, so \`customCurrency = { crypto = 50 }\` in \`shop.lua\` will use that. Set \`vip\_coins\` in languages to the label you want (e.g. “Crypto”).

</details>

<details>

<summary><strong>Q5: Can I use my own icon instead of the diamond?</strong></summary>

Yes. In \`public/config/config.lua\`, under \`Shop\`, set \`CustomCurrencyIcon\` to your image URL (e.g. \`"nui://cdev\_pets/html/icons/vip.png"\`). If empty, the default diamond SVG is used.

</details>

<details>

<summary><strong>Q6: Does the balance update after I buy an item?</strong></summary>

Yes. After a successful purchase, the shop reopens and both cash and custom currency balances are refreshed before the shop is shown again.

</details>


# Custom Sounds for Pets (Vocalization)

## 🎤 Custom Sounds for Pets <a href="#pet-transfer-system" id="pet-transfer-system"></a>

{% hint style="danger" %}
**Attention: This custom sounds (vocalization) system will not work for certain&#x20;**<mark style="color:red;">**actions**</mark>**&#x20;for some animals such as (**<mark style="color:yellow;">**Lion, Tiger, Capybara, Puma**</mark>**) because the models were made based on dogs to function correctly with our system. Bellow the table from actions not will change the sound.**
{% endhint %}

| Actions               | Work / Not Work | Detail                                              |
| --------------------- | --------------- | --------------------------------------------------- |
| Cuddle                | ⛔ Not work      | Keeps making dog sounds                             |
| Following             | ⛔ Not work      | Keeps making dog sounds wehn follow/running         |
| Bump                  | ⛔ Not work      | Keeps making dog sounds                             |
| Bark while running    | ⛔ Not work      | Keeps making dog sounds                             |
| Bark K9               | ✅ Work          | After you use Bark K9 interaction with other player |
| Whine                 | ✅ Work          | Sad, hungry, thirsty, and low on health             |
| Growl                 | ✅ Work          | Hungry and angry                                    |
| Agitated              | ✅ Work          | **Playing and happy**                               |
| Idle Sounds (Panting) | ⛔ Not work      | Keeps making dog sounds                             |

{% hint style="success" %}
**NEW FEATURE!** This feature is fully compatible with existing shops. Old shops will maintain their pet placed by default.
{% endhint %}

### 📋 Overview

The **Custom Sounds** system lets you use audio files (`.ogg`) for pet vocalizations instead of GTA’s native sounds. Cats can meow, lions/tigers can roar, and any pet can use unique sounds. URLs are configured in `anims.lua` in the `Vocalization` section of each category (BigDog, SmallDog, Cat, BigCat). Audio is played at the pet’s position via **xsound**.

**Perfect for:**

* 🐱 Cats with real meows (instead of no sound or dog sounds)
* 🦁 Big cats (lion, tiger, puma, capybara) with roars/grunts
* 🎶 Any pet with custom and realistc sounds (bark, growl, whine, etc.)

***

### ✨ Key Features

<table data-view="cards"><thead><tr><th>Feature</th><th>Description</th></tr></thead><tbody><tr><td>🎶 <strong>One sound per vocal type</strong></td><td>In <code>Vocalization</code> use <code>customSoundBark</code>, <code>customSoundWhine</code>, <code>customSoundGrowl</code>, <code>customSoundAgitated</code>, <code>customSoundSniff</code>, and optionally <code>customSoundBarkSeq</code>. If you set a custom, it takes priority; otherwise the native sound is used (when available).</td></tr><tr><td>❌ <strong>xsound optional</strong></td><td>If the <strong>xsound</strong> resource is not installed or not <code>started</code>, the system does not error: it simply does not play the custom sound and uses the native one (or nothing).</td></tr><tr><td>🐈‍⬛ <strong>Sound at pet position</strong></td><td>Sound is played at the pet’s position in the world (3D) using the xsound API.</td></tr><tr><td>🔧 Optional settings for each pet category.</td><td>Inside the file <code>public/config/anims.lua</code>, you will find the <strong>VocalizeAnim</strong> and <strong>Vocalization</strong> options for each pet category.</td></tr></tbody></table>

***

### 🔧 How Configs and Setup Custom Sounds

***

### Setup a Custom Sounds

{% stepper %}
{% step %}

### **Install (or update) dependencies**

{% hint style="warning" %}
If you have already installed it, please check if it is on the **latest** version and ensure it is running before the <mark style="color:yellow;">**cdev\_lib**</mark> and <mark style="color:yellow;">**cdev\_pets**</mark> resources.
{% endhint %}

{% embed url="<https://github.com/Xogy/xsound/releases>" %}

1. Download **xsound-1.1-experimental.zip** (or the latest stable release)
2. **Extract** the ZIP. After extracting, the folder will be named **`xsound-1.1-experimental`** (or similar).
3. **Rename the folder** to exactly **`xsound`**.
4. Place the **`xsound`** folder inside your server’s **resources root folder** (the same folder that contains `cdev_lib`, `[cdev]`, `[cdev_assets]`, etc.).

```
resources/
  xsound/           ← folder renamed to "xsound"
  cdev_lib/
  [cdev_assets]/
  [cdev]/cdev_pets
  ...
```

<div align="left"><figure><img src="https://1004862655-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPhIA9eCA4bwgx77hxx4i%2Fuploads%2FD9roUedSTIuIMBNW8ToE%2Fimage.png?alt=media&amp;token=083c1e30-b3f8-4e14-860b-da5f5467ec17" alt=""><figcaption></figcaption></figure></div>
{% endstep %}

{% step %}

### **Start order in `server.cfg`**

{% hint style="danger" %}
**xsound** must be started **before** `cdev_lib` and `cdev_pets`. Add this at the end of your `server.cfg` (after your other resources):
{% endhint %}

```lua
# cdev
ensure xsound
ensure cdev_lib
ensure [cdev_assets]
ensure [cdev] -- or cdev_pets 
```

{% endstep %}

{% step %}

### **Place sound files in xsound**

{% hint style="warning" %}
You can download the sounds from websites such as: [Meow Sound](https://freesound.org/people/lextrack/sounds/333916/) and it will be necessary to convert them from <mark style="color:yellow;">**.mp3**</mark> to <mark style="color:yellow;">**.ogg**</mark>.
{% endhint %}

1. Open the **`xsound`** folder you placed in `resources/`.
2. Go into **`html/sounds/`**.
3. Put your **`.ogg`** files in that folder (e.g. `meow.ogg`, `lion_roar.ogg`).

Example structure:

```
resources/xsound/
  html/
    sounds/
      meow.ogg
      lion_roar.ogg
      cat_hiss.ogg
```

{% endstep %}

{% step %}

### **Configure URLs in `anims.lua`**

{% hint style="danger" %}
To find out which anims category is being used, you can open the file `pets.lua` located at `cdev_pets > public > config > pets.lua` and search for <mark style="color:yellow;">**Animations = DogAnims**</mark>.
{% endhint %}

1. Open **`cdev_pets/public/config/anims.lua`**.
2. Find the pet category you want to customize: **BigDog**, **SmallDog**, **Cat**, or **BigCat** (each has a `Vocalization` block).
3. Inside **`Vocalization`**, add (or uncomment) the custom sound keys. The URL must point to the file inside xsound:
   * Format: **`nui://xsound/html/sounds/FILENAME.ogg`**

Example for **Cat** (meow):

```lua
Vocalization = {
    animalType = 3,
    bark = nil,
    bark_seq = nil,
    whine = nil,
    growl = nil,
    agitated = nil,
    sniff = nil,
    -- Custom sounds (xsound)
    customSoundBark     = "nui://xsound/html/sounds/meow.ogg",
    customSoundBarkSeq  = "nui://xsound/html/sounds/meow2.ogg",
    customSoundWhine    = "nui://xsound/html/sounds/cat_whine.ogg",
    customSoundGrowl    = nil,
    customSoundAgitated = "nui://xsound/html/sounds/cat_hiss.ogg",
    customSoundSniff    = nil,
    vocalizeLabelKey = "pet_meow",
},
```

Example for **BigCat** (lion, tiger, puma, etc.):

```lua
Vocalization = {
    animalType = 3,
    bark = nil,
    bark_seq = nil,
    whine = nil,
    growl = nil,
    agitated = nil,
    sniff = nil,
    customSoundBark     = "nui://xsound/html/sounds/lion_roar.ogg",
    customSoundBarkSeq  = "nui://xsound/html/sounds/lion_roar2.ogg",
    customSoundWhine    = "nui://xsound/html/sounds/lion_whine.ogg",
    customSoundGrowl    = "nui://xsound/html/sounds/lion_growl.ogg",
    customSoundAgitated = "nui://xsound/html/sounds/lion_snarl.ogg",
    customSoundSniff    = nil,
    vocalizeLabelKey = "pet_vocalize",
},
```

{% hint style="info" %}
If you set a **custom** for a type (e.g. `customSoundBark`), that sound is used when the pet “barks” (or the corresponding action).
{% endhint %}

{% hint style="warning" %}
If you leave it **`nil`**, the system uses the native sound (when the category has one) or plays nothing.
{% endhint %}
{% endstep %}
{% endstepper %}

***

#### 🔊 Vocal Radius Sound Play

{% hint style="warning" %}
You can modify the distance at which players will hear the custom sounds. By default, it is set to a **40-meter radius**, which is recommended. However, if you want to change it, simply open the file `config.lua` located at `cdev_pets > public > config > config.lua` (line 32).
{% endhint %}

```lua
-- Max distance (meters) for players to hear custom vocal (Meow/Bark, happiness, mood, etc.) when synced; only players within this radius receive the sound
VocalSyncRadius = 40.0,
```

#### ❓ Frequently Asked Questions

<details>

<summary><strong>Q:</strong> How can I play these sounds?</summary>

A: The sounds are triggered <mark style="color:yellow;">automatically</mark> based on the pet’s actions. The **Bark** and **Sniff** systems are only enabled when the pet is of type <mark style="color:yellow;">**K9**</mark>. If the pet is a K9, you can use the target or drawtext interaction to trigger the sound.

</details>

<details>

<summary><strong>Q: What happens if I don’t install xsound?</strong></summary>

A: Nothing breaks. The system checks if the `xsound` resource is `started`. If it isn’t, custom sounds are skipped and only native sounds are used (or none for cat/BigCat when they have no natives).

</details>

<details>

<summary><strong>Q: Can I use only custom sounds and leave natives as nil?</strong></summary>

A: Yes. For Cat and BigCat, natives are already `nil`. Just set the `customSound*` keys you want; when a custom exists, it has priority.

</details>

<details>

<summary><strong>Q: What audio format should I use?</strong></summary>

A: Use **`.ogg`** files in the `xsound/html/sounds/` folder. The URL in the config should end in `.ogg`.

</details>

<details>

<summary><strong>Q: Does the target label (Bark / Meow / Vocalize) change by category?</strong></summary>

A: Yes. Each category has `vocalizeLabelKey` in `Vocalization` (`pet_bark`, `pet_meow`, `pet_vocalize`). The text shown in the target comes from the translation keys in `data/languages` (e.g. `pet_meow` = "Meow", `pet_vocalize` = "Vocalize").

</details>

<details>

<summary><strong>Q: Do I need to restart the server after adding sounds?</strong></summary>

A: After adding new `.ogg` files to `xsound/html/sounds/` or changing `anims.lua` or Install xsound you need full server restart ensures xsound loads the files correctly.

</details>


# Item Configuration

{% hint style="info" %}
Pet items are only available for pets, these items cannot be used in an external inventory
{% endhint %}

Items for the pet's inventory can be edited in:

`cdev_pets/public/config/items.lua`

## Item Structure

```lua
    ["baseball"] = {
        label = "Baseball",
        category = ECategoryInventoryPets.BALLS,
        stack = true,
        description = "A great option for playing with pets, especially dogs. They are simple, straightforward, and effective toys that can be used for playing fetch or rolling around the house or yard.",
        metadata = {},
        usable = true,
        onUse = {
            event = "cdev_pets:useBall",
            data = {},
            net = false,
            close = true,
            preventRestoreState = true,
        }
    },
```

* `["baseball"]` - Item id (will be used to spawn this item and saving on db)
* `label` - Item's display name
* `category` - Item's category for inventory filter, categories are:
  * `ECategoryInventoryPets.COLLAR` - **Collar**
  * `ECategoryInventoryPets.FUR` - **Fur**
  * `ECategoryInventoryPets.LEASH`- **Leash**
  * `ECategoryInventoryPets.BOWL`- **Bowl**
  * `ECategoryInventoryPets.CLOTHES`- **Clothes**
  * `ECategoryInventoryPets.BALLS`- **Balls**
  * `ECategoryInventoryPets.FOOD`- **Food**
  * `ECategoryInventoryPets.DRINKS`- **Drinks**
* `stack` - Whether item stacks
* `description` - Item's display description
* `metadata` - Persistent data to be saved with the item on DB
* `usable` - Whether item can be right clicked to use
* `onUse` - Usage information
  * `event` - Event triggered when using
  * `data` - Data passed to event
  * `net` - Determine if the event is networked or not
  * `close` - Close inventory on use
  * `preventRestoreState` - Prevent pet from restoring back to it's previous state, **only used internally**.
* `isPremiumPackage` - **Only used internally.**

## Adding custom bowls, beds and so on.

Adding custom assets to this pet script is fairly simple, simply copy an item entry from this file that matches the custom asset you're trying to add, edit the properties to your liking and you're set.

## Adding Inventory Icons

Inventory icons can be changed/added in `cdev_lib/nui/dist/pets/inventory` . Make sure to name the icon to the item id and save format as png.


# VIP Configuration

how to set up the VIP system for cdev\_pets

{% hint style="info" %}
If you need any help with this, please make a ticket, Ash can guide you through the process if you have any questions on the steps below
{% endhint %}

## Step 1 - Create a discord bot

This is so the script can grab what players have what roles

* Head to <https://discord.com/developers/applications>
* Click New Application on the top right
* Finish creating the bot

{% hint style="warning" %}
Make sure your bot has the server members intent checked on the "bot" page of your bot
{% endhint %}

## Step 2 - Invite the bot to your discord server

{% hint style="warning" %}
Make sure that you put the bots role above your basic member role in your roles settings
{% endhint %}

## Step 3 - Head to `cdev_lib/public/server/api.lua` and fill out the information at the top:

`clib_API.DiscordGuildId` is your servers guild id,\
( you can get this by right clicking your server and pressing Copy Server ID )\
\
`clib_API.DiscordBotToken` is the token from the bot you created\
( you can find this on the bot tab of your bot )

## Step 4 - Head to `cdev_lib/public/config/config.lua`

make sure that`UseVIPSystem = true`\
add your role ID's in `VIPRoleIds`

## Step 5 - Head to `cdev_pets/public/config/config.lua`

make sure that `UseVIPSystem = true`

## Step 6 - You are done! Test it out!


# Pet Shop Configuration

## Integration

By default, the pet shop can be accessed from your pet bag menu. If you want to open the shop through another way, first disable the button in the config file by setting

<pre class="language-lua" data-title="public/config/config.lua" data-full-width="false"><code class="lang-lua"><strong>WantPetShopButton = false,
</strong></code></pre>

and then you need to trigger this event from your own script:

```lua
TriggerEvent("cdev_pets:loadShop")
```

## Enabling Ped Shop

<figure><img src="https://1004862655-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPhIA9eCA4bwgx77hxx4i%2Fuploads%2FpXegz6BPohfcpYB0v4FA%2Fimage.png?alt=media&amp;token=8b1958c2-0cde-4c4f-a9c9-a7cf80ea8111" alt=""><figcaption></figcaption></figure>

{% code title="public/config/config.lua" lineNumbers="true" %}

```lua
    PedShop = {

        -- If true, it will create a pet shop to use as a pet shop.
        WantPedShop = false,

        -- Coords to define where the ped will spawn
        PedCoords = vector4(-1281.44, -1414.52, 3.35, 125.32),

        -- Parameter to define the ped model.
        PedModel = "a_m_m_beach_01",

    },
```

{% endcode %}

## Modifying Shop Items

Shop items are available in `cdev_pets/public/config/shop.lua`

```lua
    {
        key = "pet_chop",
        label = "Hottweiler (Female)",
        price = 5000,
        category = "pet_category_dog",
        description = "A Hottweiler",
        customization = {
            drawables = {
                ["4"] = 1,
            }
        },
    },
```

* `key` - Item id (from items.lua)
  * When adding a pet entry, this id should be the same from pets.lua instead.
* `label` - **Only required for pet entries**, otherwise automatically obtained from items.lua
* `price` - Cost of the item
* `category` - Item category on the shop, categories are in the `config.lua` file under "Shop"
* `description` - **Only required for pet entries**, otherwise automatically obtained from items.lua
* `customization` - **Optional for pet entries,** this pet will automatically start with this customization
  * drawables
    * `["componentId"] = drawableId`
  * textures
    * `["componentId"] = textureId`
* `vip` - If true and if VIP enabled in the config, item will have golden highlight and only be purchaseable if has VIP status
* `canBeK9` - Determines if a pet is eligible to be bought as K9


# Pet Configuration

Pets can be tweaked/added in `cdev_pets/public/config/pets.lua`


# K9 Training Guide

## Ramp

The Ramp training technique is designed to improve your dog's agility by having them repeatedly go up and down a ramp.

<div align="left"><figure><img src="https://1004862655-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPhIA9eCA4bwgx77hxx4i%2Fuploads%2FTtBPh37i6BafUo5IvC5D%2Framp.png?alt=media&amp;token=d83f3589-7349-430f-b080-b240c7607902" alt="" width="264"><figcaption></figcaption></figure></div>

**Procedure Set Up the Ramp**: Place the ramp in a safe and secure area where your dog has plenty of space to move around.

**Repetition**: Have your dog repeatedly go up and down the ramp. Consistent practice will help them build confidence and agility.

**Monitoring**: Watch your dog closely for signs of fatigue or distress. Each dog is unique, and some may take longer to adjust to the ramp.

**Increased Agility**: Regular ramp training will improve your dog's agility, making them more nimble and responsive.

{% hint style="danger" %}
**Safety Precautions**: Ensure the ramp is stable and secure to prevent accidents. If your dog falls, they may sustain serious injuries that require immediate veterinary attention. Always have a first aid kit and emergency contact information for your vet on hand.
{% endhint %}

## Hoop

Hoop training is designed to test your dog's ability to learn through trial and error, ultimately improving their agility and attack skills. A well-trained dog in these areas can effectively detain a suspect without causing harm, allowing law enforcement to make an arrest.

<div align="left"><figure><img src="https://1004862655-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPhIA9eCA4bwgx77hxx4i%2Fuploads%2FkIh8fzk21Hjb3ClHJIIL%2Fhoop.png?alt=media&amp;token=4a07d852-15e8-4590-9b66-f417d3fbaae5" alt="" width="264"><figcaption></figcaption></figure></div>

**Procedure Set Up the Hoop**: Place the hoop securely at an appropriate height for your dog to jump through.

**Repetition**: Have your dog repeatedly jump through the hoop to build confidence and skill. He may fall before he is able to complete. Positive Reinforcement: Reward your dog with treats or praise when they successfully jump through the hoop.

**Benefits Increased Agility**: Enhances your dog's agility, making them more nimble and responsive.

**Improved Attack Skills**: Develops your dog's ability to detain suspects without causing harm, giving law enforcement time to act.

{% hint style="danger" %}
**Safety Precautions Supervision**: Always supervise your dog during training to prevent injuries. Proper Equipment: Ensure the hoop is stable and at a safe height for your dog. Hoop training, when done correctly, can significantly enhance your dog's agility and attack skills, making them an invaluable asset in law enforcement scenarios.
{% endhint %}

## Cones

Cones training is the foundational level of training for your K9. It is designed to improve your dog's stamina and endurance, enabling them to perform for longer periods without tiring.

<div align="left"><figure><img src="https://1004862655-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPhIA9eCA4bwgx77hxx4i%2Fuploads%2FrtkCxKUERRm536HnPMdK%2Fcone.png?alt=media&amp;token=1819d07f-55ea-4c37-9cff-141ebc1019c3" alt="" width="183"><figcaption></figcaption></figure></div>

**Procedure Set Up the Cones**: Arrange a series of cones in a straight line or a zigzag pattern.

**Repetition**: Have your dog weave through the cones multiple times, gradually increasing the speed as they become more comfortable.

**Benefits Increased Resistance:** Enhances your dog's resistance, allowing them to perform longer without getting tired. Relaxing Training: Provides a low-stress training environment where your dog can build endurance at their own pace.

Cones training is a gentle yet effective way to build your dog's stamina and resistance, laying a solid foundation for more advanced training techniques.

## Sniffing

Sniffing training is essential for teaching your dog to detect drugs or guns (maybe just donuts!). This training helps develop your dog's ability to accurately identify specific scents, making them a valuable asset in law enforcement.

**Procedure Preparation**: Ensure the server owner has set up the drugs, guns or what he want the k9 to be able to detect in the dog script to enable training.\
**Introduction**: Familiarize your dog with the scent of the drug by allowing them to sniff it in a controlled environment.\
**Guided Practice**: Have someone or a car carry the drug, and encourage your dog to sniff the person or vehicle.\
**Reward**: If your dog successfully identifies the drug, reward them with treats or praise to reinforce the behavior.\
**Repetition**: Repeat the exercise multiple times to reinforce the training. Check the stats to know how good he is on this trainning before going to the real life catch.

**Benefits Accurate Detection**: A well-trained dog will be able to consistently identify drugs without error.

Sniffing training is straightforward yet highly effective in developing your dog's drug detection capabilities. With proper setup and consistent practice, your dog can become an expert in identifying drugs.

{% hint style="warning" %}
**Requirements Server Setup**: Ensure the server owner has properly configured the drug setup in the dog script before beginning training.
{% endhint %}

## Dummy

Dummy training is crucial for enhancing your K9's attack skills. This exercise involves timing how long it takes for your dog to successfully remove a leg from a dummy, helping develop precision and control in real-world scenarios.

<div align="left"><figure><img src="https://1004862655-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPhIA9eCA4bwgx77hxx4i%2Fuploads%2FgtlDgNOlBsPf5bE0gDV2%2Fdummy.png?alt=media&amp;token=b53b00f7-bd8f-479a-87b6-d790b94874cc" alt="" width="264"><figcaption></figcaption></figure></div>

**Procedure Set Up**: Secure a dummy in a safe training area.

**Guided Practice:** Encourage your dog to attack the dummy, focusing on removing the dummy's leg. Timing: Use a timer to track how long it takes for your dog to get the dummy's leg out.

**Controlled Stop**: Stop your dog a few seconds before they completely remove the leg to prevent loss of attack stats. This teaches control and precision.

**Repetition**: Repeat the exercise multiple times to reinforce the training.

**Benefits Improved Attack Skills**: Enhances your dog's ability to hold a suspect in place without causing harm.

**Controlled Aggression**: Teaches your dog to stop on command, ensuring they do not harm the suspect or dummy.

**Time Tracking**: Helps measure progress and effectiveness of the training.

**Key Points Precision**: The goal is to train your dog to attack and hold without causing harm. Control: Stopping your dog a few seconds before they remove the leg ensures they maintain control and precision.

Dummy training is essential for developing your dog's attack skills, ensuring they can effectively detain suspects without causing harm. Regular practice with proper timing and control will lead to a well-trained and reliable K9.

{% hint style="danger" %}
Safety Precautions Supervision: Always supervise your dog during training to ensure they do not cause harm to the dummy or themselves. Proper Equipment: Use a durable dummy designed for K9 training to withstand repeated attacks. If he takes the leg out, you will need to buy a new one.
{% endhint %}


# Admin Commands

`/addpet`

**Description:**\
Adds a new pet for a specified player with given attributes. This command is primarily used by administrators to assign pets to players manually.

**Command Syntax:**

```
/addpet <playerID> <petShopID> <isK9> <petName>
```

**Parameters:**

* `<playerID>` (number): **Required.** The server ID of the player who will receive the pet.
* `<petShopID>` (string): **Required.** The identifier of the pet shop from which the pet is being added. This corresponds to predefined pet shop entries.
* `<isK9>` (boolean): **Required.** Indicates whether the pet is a K9 (police dog). Use `true` for K9 pets or `false` for regular pets.
* `<petName>` (string): **Required.** The desired name for the pet.

**Usage Example:**

```
/addpet 23 k9_shop_01 true Rex
```

*This command assigns a K9 pet named "Rex" from the pet shop with ID "k9\_shop\_01" to the player with server ID `23`.*

**Functionality:**

* **Validation:** Ensures all required parameters are provided and valid.
* **Pet Creation:** Inserts a new pet into the database with the specified attributes.
* **Skill Assignment:** Assigns default skills to the pet if it is designated as a K9.
* **Item Assignment:** Grants the pet a K9 activation item if applicable.
* **Notification:** Sends feedback to the administrator about the success or failure of the operation.

***

#### `/givepetitem`

**Description:**\
Gives a specified item to a player's pet's inventory. This command allows administrators to equip pets with items such as toys, treats, or accessories.

**Command Syntax:**

```
/givepetitem <playerID> <item> <quantity>
```

**Parameters:**

* `<playerID>` (number): **Required.** The server ID of the player whose pet will receive the item.
* `<item>` (string): **Required.** The identifier of the item to give to the pet.
* `<quantity>` (number): **Required.** The number of items to grant. Defaults to `1` if not specified.

**Usage Example:**

```
/givepetitem 23 chew_toys 2
```

*This command gives `2` "chew\_toys" to the pet owned by the player with server ID `23`.*

**Functionality:**

* **Validation:** Checks if all required parameters are provided and valid.
* **Inventory Management:** Adds the specified item and quantity to the pet's inventory.
* **Notification:** Informs the administrator about the successful addition of the item or any errors encountered.

***

#### `/delpet`

**Description:**\
Deletes a pet associated with a player. This command is useful for removing pets that are no longer needed or were assigned incorrectly.

**Command Syntax:**

```
/delpet <playerID> <petID>
```

**Parameters:**

* `<playerID>` (number): **Required.** The server ID of the player who owns the pet.
* `<petID>` (number): **Required.** The unique identifier of the pet to delete.


# Exports

### Client-Side Exports

#### TakeInPet

**Description:**\
Hides the player's current pet if it's within a certain range.

**Export Statement:**

```lua
exports("TakeInPet", TakeInPet)
```

**Usage:**

```lua
exports.cdev_pets:TakeInPet()
```

**Parameters:**

* None

**Returns:**

* None

**Functionality:**

* Checks if the player owns a pet.
* Verifies if the pet is within a 10-unit distance from the player.
* If conditions are met, it triggers a server callback to hide the pet.
* Notifies the player about the action's success or failure.

***

#### ForceTakeInPet

**Description:**\
Forcefully hides the player's current pet, regardless of its position.

**Export Statement:**

```lua
exports("ForceTakeInPet", ForceTakeInPet)
```

**Usage:**

```lua
exports.cdev_pets:ForceTakeInPet()
```

**Parameters:**

* None

**Returns:**

* None

**Functionality:**

* Checks if the player owns a pet.
* Triggers a server callback to hide the pet without checking the distance.
* Closes any open pet-related menus.

***

#### Attack

**Description:**\
Commands the player's pet to attack a specified target.

**Export Statement:**

```lua
exports("Attack", Attack)
```

**Usage:**

```lua
exports.cdev_pets:Attack(targetPed)
```

**Parameters:**

* `targetPed` (Entity): The entity the pet should attack.

**Returns:**

* None

**Functionality:**

* Ensures the player owns a pet.
* Checks if the pet is not already in an attack state.
* Initiates the attack sequence on the target entity.

***

#### CanEnterVehicle

**Description:**\
Checks if the player's pet can enter a specific vehicle.

**Export Statement:**

```lua
exports("CanEnterVehicle", function(vehicle) ... end)
```

**Usage:**

```lua
local canEnter = exports.cdev_pets:CanEnterVehicle(vehicle)
```

**Parameters:**

* `vehicle` (Entity): The vehicle entity to check.

**Returns:**

* `boolean`: `true` if the pet can enter the vehicle, `false` otherwise.

**Functionality:**

* Determines if the player owns a pet.
* Invokes the pet's method to verify if it can enter the specified vehicle.

***

#### CanExitVehicle

**Description:**\
Checks if the player's pet can exit a specific vehicle.

**Export Statement:**

```lua
exports("CanExitVehicle", function(vehicle) ... end)
```

**Usage:**

```lua
local canExit = exports.cdev_pets:CanExitVehicle(vehicle)
```

**Parameters:**

* `vehicle` (Entity): The vehicle entity to check.

**Returns:**

* `boolean`: `true` if the pet can exit the vehicle, `false` otherwise.

**Functionality:**

* Determines if the player owns a pet.
* Checks if the pet is currently in the specified vehicle.
* Returns the pet's ability to exit based on its current state.

***

#### cdev\_pets:onTargetPlaceVehicle

Places the player's spawned owned pet into a vehicle seat.

**Trigger (client):**

```lua
TriggerEvent('cdev_pets:onTargetPlaceVehicle', {
    entity = vehicle, -- vehicle entity handle
    payload = {
        door = 1,                  -- seat/door index used by cdev_pets
        doorname = 'seat_pside_f', -- vehicle bone name
    },
})
```

**Payload fields:**

| Field              | Type     | Description                          |
| ------------------ | -------- | ------------------------------------ |
| `entity`           | `number` | Vehicle entity handle.               |
| `payload.door`     | `number` | Door/seat index: `1`, `2`, or `3`.   |
| `payload.doorname` | `string` | Vehicle bone name (see table below). |

**Supported seat bones:**

| `doorname`     | `door` | Seat                |
| -------------- | ------ | ------------------- |
| `seat_pside_f` | `1`    | Front passenger     |
| `seat_dside_r` | `2`    | Rear driver side    |
| `seat_pside_r` | `3`    | Rear passenger side |

**What happens internally:**

1. Resolves `PetManagerClient.ownedPet` (pet must be spawned and out).
2. Checks the pet is within **10 meters** of the player.
3. Calls server callback `cdev_pets:attemptVehicle` (e.g. stamina / tired checks).
4. On success, runs `pet:EnterVehicle(entity, door, doorname)`.

**Returns:** None (failures are handled silently or via in-game notifications from `cdev_pets`).

***

#### cdev\_pets:onTargetTakeVehicle

Removes the player's pet from a vehicle.

**Trigger (client):**

```lua
TriggerEvent('cdev_pets:onTargetTakeVehicle', {
    entity = vehicle, -- vehicle entity handle the pet is in
})
```

**Requirements:**

* Pet must be spawned (`ownedPet` exists).
* Pet state must be `VEHICLE`.
* Pet must be attached to the given `entity`.

**What happens internally:**

* Calls `pet:Idle()`, which plays the exit animation and detaches the pet.

**Returns:** None.

***

#### QBX\_radialmenu Example

{% content-ref url="/pages/c6tq911UZAnFDFICo0D4" %}
[How Setup qbx\_radialmenu](https://docs.cdev.shop/fivem/pet-system/exports/how-setup-qbx_radialmenu)
{% endcontent-ref %}

***

#### Example client-side code using the pet interaction events and vehicle exports.

Add this to **your** resource's client script example inside your `qbx_radialmenu` (not inside `cdev_pets`):

```lua
-- Seat bones used by cdev_pets for vehicle placement
local PET_VEHICLE_BONES = {
    seat_pside_f = 1, -- front passenger
    seat_dside_r = 2, -- rear driver side
    seat_pside_r = 3, -- rear passenger side
}

--- Returns the closest vehicle to the player within maxDistance meters.
local function getClosestVehicle(maxDistance)
    local ped = PlayerPedId()
    local coords = GetEntityCoords(ped)
    return GetClosestVehicle(coords.x, coords.y, coords.z, maxDistance or 5.0, 0, 71)
end

--- Finds the nearest valid seat bone on a vehicle to the player.
local function getClosestVehicleSeatBone(vehicle, maxBoneDistance)
    local ped = PlayerPedId()
    local playerCoords = GetEntityCoords(ped)
    local closestBone, closestDistance

    for boneName in pairs(PET_VEHICLE_BONES) do
        local boneIndex = GetEntityBoneIndexByName(vehicle, boneName)
        if boneIndex ~= -1 then
            local boneCoords = GetWorldPositionOfEntityBone(vehicle, boneIndex)
            local distance = #(playerCoords - boneCoords)
            if not closestDistance or distance < closestDistance then
                closestBone = boneName
                closestDistance = distance
            end
        end
    end

    if closestBone and closestDistance <= (maxBoneDistance or 5.0) then
        return closestBone, PET_VEHICLE_BONES[closestBone]
    end
end

--- Put the player's pet into the closest nearby vehicle (standalone).
function PutPetInClosestVehicle()
    if GetResourceState('cdev_pets') ~= 'started' then
        print('[pets] cdev_pets is not running')
        return false
    end

    local vehicle = getClosestVehicle(5.0)
    if vehicle == 0 or not DoesEntityExist(vehicle) then
        print('[pets] No vehicle nearby')
        return false
    end

    if not exports.cdev_pets:CanEnterVehicle(vehicle) then
        print('[pets] Pet cannot enter this vehicle')
        return false
    end

    local boneName, doorIndex = getClosestVehicleSeatBone(vehicle, 5.0)
    if not boneName then
        print('[pets] No valid seat bone found on this vehicle')
        return false
    end

    TriggerEvent('cdev_pets:onTargetPlaceVehicle', {
        entity = vehicle,
        payload = {
            door = doorIndex,
            doorname = boneName,
        },
    })

    return true
end

--- Remove the player's pet from the closest nearby vehicle (standalone).
function RemovePetFromClosestVehicle()
    if GetResourceState('cdev_pets') ~= 'started' then
        print('[pets] cdev_pets is not running')
        return false
    end

    local vehicle = getClosestVehicle(5.0)
    if vehicle == 0 or not DoesEntityExist(vehicle) then
        print('[pets] No vehicle nearby')
        return false
    end

    if not exports.cdev_pets:CanExitVehicle(vehicle) then
        print('[pets] Pet cannot exit this vehicle right now')
        return false
    end

    TriggerEvent('cdev_pets:onTargetTakeVehicle', {
        entity = vehicle,
    })

    return true
end

-- Optional: expose as net events so a radial menu can call them by name
RegisterNetEvent('my_pets:client:putInVehicle', PutPetInClosestVehicle)
RegisterNetEvent('my_pets:client:removeFromVehicle', RemovePetFromClosestVehicle)
```

**Usage from anywhere on the client:**

```lua
PutPetInClosestVehicle()
RemovePetFromClosestVehicle()
```

Replace `print()` with your notification system if desired.

***

#### spawnPet

**Description:**\
Spawns a pet with a specified ID at the player's location or custom coordinates.

**Export Statement:**

```lua
exports("spawnPet", function(id, customCoords) ... end)
```

**Usage:**

```lua
exports.cdev_pets:spawnPet(petId, customCoordinates)
```

**Parameters:**

* `id` (number): The unique identifier of the pet to spawn.
* `customCoords` (table, optional): Coordinates to spawn the pet at. If not provided, spawns at the player's current location.

**Returns:**

* None

**Functionality:**

* Determines the spawn location based on provided coordinates or the player's current position.
* Requests the server to spawn the pet.
* Loads the pet's model and customization settings.
* Adds the pet to the client's pet manager and sets up necessary interactions.

#### QuickActionFollow

**Description:**\
Toggles follow/stay on the player's spawned owned pet from external menus (radial, custom UI). Uses the same logic as the in-game follow quick action but always targets `ownedPet` and skips the player whistle animation. Recommended for `qb-radialmenu`, `ox_lib` radial, and similar integrations.

Export Statement:

```lua
exports("QuickActionFollow", function() onQuickActionFollow(true) end)
```

Usage:

```lua
exports['cdev_pets']:QuickActionFollow()
```

**Parameters:**\
None

**Returns:**\
None

**Functionality:**

* Resolves the pet as `PetManagerClient.ownedPet` (or `currentPetTarget` if no owned pet is out).
* Validates `CanDrawQuickActions()` (requires `Keybinds.Enabled = true` in config, pet within `Range`, player on foot, etc.).
* If the pet is not following: triggers server callback `cdev_pets:attemptFollow`; on success, starts follow without player whistle animation.
* If the pet is already following: sets the pet to stay (`Idle`).
* Handles attack stand-down and bed/dead states the same way as the default follow keybind.
* Does nothing if no valid pet, cooldown is active, or conditions are not met (no error thrown).

Config requirements:

* `PublicSharedPetsConfig.Keybinds.Enabled` must be `true` (even when using only a radial menu).
* Pet must be spawned and within `PublicSharedPetsConfig.Range` (default `5.0`).

Related events (alternative to this export):

* `TriggerEvent('cdev_pets:quickAction:follow')` — same handler; may play player whistle animation when not called via this export.

***

### Server-Side Exports

#### addpet

**Description:**\
Adds a new pet for a specified player with given attributes.

**Export Statement:**

```lua
exports("addpet", function (data) ... end)
```

**Usage:**

```lua
exports.cdev_pets:addpet({
    PlayerId = playerId,
    petShopId = "pet_hottweiler", -- Example
    isK9 = true,
    petName = "Rex"
})
```

**Parameters:**

* `data` (table): Contains the following keys:
  * `PlayerId` (number): The player's server ID.
  * `petShopId` (string): **Pet Identification for the Pet Shop**\
    You can find each pet's `PetShopId` in the `shop.lua` file, located at:\
    `cdev_pets/public/config/shop.lua`.
  * `isK9` (boolean): Indicates if the pet is a K9 (police dog).
  * `petName` (string): Name of the pet.

**Returns:**

* None

**Functionality:**

* Validates the provided data.
* Inserts the new pet into the database with specified attributes.
* Assigns skills if the pet is designated as a K9.
* Provides the pet with a K9 activation item if applicable.

***

#### givepetitem

**Description:**\
Gives an item to a player's pet's inventory.

**Export Statement:**

```lua
exports("givepetitem", function (data) ... end)
```

**Usage:**

```lua
exports.cdev_pets:givepetitem({
    PlayerId = playerId,
    item = "ball",
    quantity = 3
})
```

**Parameters:**

* `data` (table): Contains the following keys:
  * `PlayerId` (number): The player's server ID.
  * `item` (string): The identifier of the item to give.
  * `quantity` (number): The quantity of the item to give.

**Returns:**

* None

**Functionality:**

* Validates the provided data.
* Adds the specified item to the pet's inventory.
* Notifies the player of the successful addition.

***

#### delpet

**Description:**\
Deletes a pet associated with a player.

**Export Statement:**

```lua
exports("delpet", function (data) ... end)
```

**Usage:**

```lua
exports.cdev_pets:delpet({
    PlayerId = playerId,
    petId = 101
})
```

**Parameters:**

* `data` (table): Contains the following keys:
  * `PlayerId` (number): The player's server ID.
  * `petId` (number): The unique identifier of the pet to delete.

**Returns:**

* None

**Functionality:**

* Validates the provided data.
* Removes the pet from the player's ownership.
* Deletes the pet from the database.
* Notifies the player of the successful deletion.

***

#### isPetOutBySource

**Description:**\
Checks if a player currently has a pet out (active).

**Export Statement:**

```lua
exports("isPetOutBySource", function (source) ... end)
```

**Usage:**

```lua
local isOut = exports.cdev_pets:isPetOutBySource(playerId)
```

**Parameters:**

* `source` (number): The player's server ID.

**Returns:**

* `boolean`: `true` if the player has a pet out, `false` otherwise.

**Functionality:**

* Retrieves the pet associated with the player.
* Returns whether the pet is currently active and out.

***


# How Setup qbx\_radialmenu

This guide walks you through adding **cdev\_pets** actions to [**qbx\_radialmenu**](https://github.com/Qbox-project/qbx_radialmenu) — the radial menu used with **Qbox** (`qbx_core`) and **ox\_lib**.

After completing these steps, players will have a **Pet** submenu in the radial with follow, menu, cuddle, bag, stand, cancel, and put/remove pet from vehicle options.

***

### Prerequisites

Make sure these resources are installed and started **before** `qbx_radialmenu` in your `server.cfg`:

```cfg
ensure ox_lib
ensure qbx_core
ensure cdev_lib
ensure cdev_pets
ensure qbx_radialmenu
```

| Resource         | Role                                             |
| ---------------- | ------------------------------------------------ |
| `ox_lib`         | Radial UI, locales, `lib.getClosestVehicle`      |
| `qbx_core`       | Player data, notifications                       |
| `cdev_lib`       | Required dependency of `cdev_pets`               |
| `cdev_pets`      | Pet system (events & exports used by the radial) |
| `qbx_radialmenu` | Radial menu configuration                        |

***

### Step 1 — Configure cdev\_pets

Open `cdev_pets/public/config/config.lua` and confirm these settings:

```lua
Keybinds = {
    -- REQUIRED for radial quick actions (follow, cuddle, menu, stand, cancel)
    Enabled = true,

    QuickAction_Bubbles = true,   -- optional: set false to hide on-screen bubbles
    QuickAction_UseTarget = false, -- optional: set true to show quick actions only on target
},

Range = 5.0, -- used by follow/cuddle/menu quick actions
```

> **Important:** `Keybinds.Enabled` must stay `true` even if players only use the radial menu. If it is `false`, quick actions triggered from the radial will silently fail.

Vehicle interaction inside `cdev_pets` is independent of the radial. You can keep the default target/drawtext or disable it:

```lua
PetVehicleInteractionTarget = true,  -- false = use drawtext + X key instead of target
```

When using the radial for vehicles, players can use **Put Pet In Car** / **Remove Pet From Car** from the menu instead.

***

### Step 2 — Add the Pet menu to config

Open `qbx_radialmenu/config/client.lua`.

Inside the `menuItems` table, add the **Pet** block at the top (or anywhere inside `menuItems`):

```lua
menuItems = {
    {
        id = 'pet',
        icon = 'dog',
        label = 'Pet',
        items = {
            {
                id = 'pet-follow',
                icon = 'person-walking',
                label = 'Follow',
                event = 'cdev_pets:quickAction:follow',
            },
            {
                id = 'pet-menu',
                icon = 'bars',
                label = 'Menu',
                event = 'cdev_pets:quickAction:menu',
            },
            {
                id = 'pet-cuddle',
                icon = 'heart',
                label = 'Cuddle',
                event = 'cdev_pets:quickAction:cuddle',
            },
            {
                id = 'pet-cancel',
                icon = 'ban',
                label = 'Cancel',
                event = 'cdev_pets:quickAction:cancel',
            },
            {
                id = 'pet-bag',
                icon = 'bag-shopping',
                label = 'Bag',
                event = 'cdev_pets:quickAction:bag',
            },
            {
                id = 'pet-stand',
                icon = 'arrow-up',
                label = 'Stand',
                event = 'cdev_pets:quickAction:stand',
            },
            {
                id = 'pet-in-car',
                icon = 'car-side',
                label = 'Put Pet In Car',
                event = 'cdev:pets:client:insertPetIntoVehicle',
            },
            {
                id = 'pet-out-car',
                icon = 'car-side',
                label = 'Remove Pet From Car',
                event = 'cdev:pets:client:removePetFromVehicle',
            },
        },
    },
    -- ... your existing menu items (citizen, general, etc.)
},
```

#### Menu item reference

| ID            | Label               | Event                                   | Description                     |
| ------------- | ------------------- | --------------------------------------- | ------------------------------- |
| `pet-follow`  | Follow              | `cdev_pets:quickAction:follow`          | Toggle follow / stay            |
| `pet-menu`    | Menu                | `cdev_pets:quickAction:menu`            | Open pet stats / inventory menu |
| `pet-cuddle`  | Cuddle              | `cdev_pets:quickAction:cuddle`          | Cuddle with pet                 |
| `pet-cancel`  | Cancel              | `cdev_pets:quickAction:cancel`          | Cancel current pet action       |
| `pet-bag`     | Bag                 | `cdev_pets:quickAction:bag`             | Store pet in bag                |
| `pet-stand`   | Stand               | `cdev_pets:quickAction:stand`           | Stand up from bed               |
| `pet-in-car`  | Put Pet In Car      | `cdev:pets:client:insertPetIntoVehicle` | Custom handler (Step 3)         |
| `pet-out-car` | Remove Pet From Car | `cdev:pets:client:removePetFromVehicle` | Custom handler (Step 3)         |

Icons use [Font Awesome 5](https://fontawesome.com/v5/search?o=r\&m=free) names (no `fa-` prefix), as required by qbx\_radialmenu.

***

### Step 3 — Create the vehicle client script

`qbx_radialmenu` loads every file in `client/` automatically (`client/*.lua` in `fxmanifest.lua`). You do **not** need to edit the manifest.

Create a new file:

**`qbx_radialmenu/client/pets.lua`**

```lua
local function notify(message, nType)
    exports.qbx_core:Notify(message, nType or 'error')
end

local function getClosestVehicle(maxDistance)
    local coords = GetEntityCoords(cache.ped)
    return lib.getClosestVehicle(coords, maxDistance or 5.0, false)
end

RegisterNetEvent('cdev:pets:client:insertPetIntoVehicle', function()
    local bones = {
        seat_pside_f = 1,
        seat_dside_r = 2,
        seat_pside_r = 3,
    }
    local playerCoords = GetEntityCoords(cache.ped)
    local closestVehicle = getClosestVehicle(5.0)

    if not closestVehicle or closestVehicle == 0 then
        return notify(locale('error.pet_no_vehicle_nearby'))
    end

    if GetResourceState('cdev_pets') ~= 'started' then
        return notify(locale('error.pet_resource_missing'))
    end

    if not exports.cdev_pets:CanEnterVehicle(closestVehicle) then
        return notify(locale('error.pet_cant_enter_vehicle'))
    end

    local closestBone
    local closestDistance = 5.0

    for bone, door in pairs(bones) do
        local boneIndex = GetEntityBoneIndexByName(closestVehicle, bone)
        if boneIndex ~= -1 then
            local boneCoords = GetWorldPositionOfEntityBone(closestVehicle, boneIndex)
            local distance = #(playerCoords - boneCoords)

            if distance < closestDistance then
                closestBone = bone
                closestDistance = distance
            end
        end
    end

    if not closestBone then
        return notify(locale('error.pet_no_valid_door'))
    end

    TriggerEvent('cdev_pets:onTargetPlaceVehicle', {
        entity = closestVehicle,
        payload = {
            door = bones[closestBone],
            doorname = closestBone,
        },
    })
end)

RegisterNetEvent('cdev:pets:client:removePetFromVehicle', function()
    local closestVehicle = getClosestVehicle(5.0)

    if not closestVehicle or closestVehicle == 0 then
        return notify(locale('error.pet_no_vehicle_nearby'))
    end

    if GetResourceState('cdev_pets') ~= 'started' then
        return notify(locale('error.pet_resource_missing'))
    end

    if exports.cdev_pets:CanExitVehicle(closestVehicle) then
        TriggerEvent('cdev_pets:onTargetTakeVehicle', { entity = closestVehicle })
    else
        notify(locale('error.pet_cant_exit_vehicle'))
    end
end)
```

#### Why this file is needed

Quick actions (follow, menu, bag, etc.) call **cdev\_pets events directly** — no extra code required.

Vehicle actions need a small bridge script because:

1. The radial must find the closest vehicle and seat bone.
2. `exports.cdev_pets:CanEnterVehicle` / `CanExitVehicle` validate the action.
3. The actual placement uses `TriggerEvent('cdev_pets:onTargetPlaceVehicle', ...)` and `TriggerEvent('cdev_pets:onTargetTakeVehicle', ...)`.

There is no `PutPetInVehicle` export in cdev\_pets — see **Vehicle Integration & External Menus** for details.

***

### Step 4 — Add locale strings

Open `qbx_radialmenu/locales/en.json` and add these keys inside the `"error"` object:

```json
"pet_no_vehicle_nearby": "No vehicle nearby.",
"pet_cant_enter_vehicle": "Your pet cannot enter this vehicle.",
"pet_no_valid_door": "Could not find a valid door for your pet.",
"pet_cant_exit_vehicle": "Your pet cannot exit right now. Try getting in and out of the vehicle.",
"pet_resource_missing": "Pet system (cdev_pets) is not running."
```

Repeat for any other locale files you use (e.g. `locales/pt.json`) with translated strings.

***

### Step 5 — Restart the resource

In your server console or txAdmin:

```
restart qbx_radialmenu
```

Or restart the full server. Players already connected should reconnect or restart `qbx_radialmenu` to load the new menu.

***

### How players use the radial

| Action                     | How                                                                                                             |
| -------------------------- | --------------------------------------------------------------------------------------------------------------- |
| **Open radial menu**       | Default key **Z** (ox\_lib keybind). Changeable in **ESC → Settings → Key Bindings → FiveM → Open radial menu** |
| **Open Pet submenu**       | Radial → **Pet** (dog icon)                                                                                     |
| **Follow / Cuddle / Menu** | Pet must be **spawned** (out of bag), player **on foot**, within **5 m** of pet                                 |
| **Bag**                    | Stores the spawned pet                                                                                          |
| **Stand**                  | Only works when the pet is on a bed                                                                             |
| **Put Pet In Car**         | Pet spawned, stand near a vehicle door (\~5 m), valid seat bone on the model                                    |
| **Remove Pet From Car**    | Pet must be inside the nearby vehicle                                                                           |

***

### File checklist

After setup, you should have changed or added these files:

| File                                 | Action                                                        |
| ------------------------------------ | ------------------------------------------------------------- |
| `cdev_pets/public/config/config.lua` | Verify `Keybinds.Enabled = true`                              |
| `qbx_radialmenu/config/client.lua`   | Add `pet` menu block to `menuItems`                           |
| `qbx_radialmenu/client/pets.lua`     | **Create** — vehicle bridge script                            |
| `qbx_radialmenu/locales/en.json`     | Add pet error strings                                         |
| `qbx_radialmenu/fxmanifest.lua`      | **No change** — `client/*.lua` loads `pets.lua` automatically |

***

### Troubleshooting

| Problem                              | Solution                                                                                                                      |
| ------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------- |
| Pet menu does not appear             | Restart `qbx_radialmenu` after editing config. Ensure player is logged in (menu registers on `QBCore:Client:OnPlayerLoaded`). |
| Follow / Cuddle / Menu do nothing    | Set `Keybinds.Enabled = true` in `cdev_pets` config. Pet must be spawned and within range.                                    |
| Put Pet In Car does nothing          | Pet must be out of bag. Stand closer to a door. Check vehicle class (bikes/boats blocked).                                    |
| "No vehicle nearby"                  | Move within 5 m of a vehicle.                                                                                                 |
| "Your pet cannot enter this vehicle" | Pet may be dead, already in a vehicle, or vehicle class not allowed.                                                          |
| "Could not find a valid door"        | Vehicle model may lack seat bones; try another side of the car.                                                               |
| Remove from car fails                | Use **Remove Pet From Car** while standing next to the vehicle the pet is in. Enter/exit the vehicle once and retry.          |
| Notifications in wrong language      | Set ox\_lib locale in server.cfg: `setr ox:locale en`                                                                         |

***


# Misc Integrations

## Vehicle interaction

By default the script uses the target system to interact with the vehicle in order to seat the pet. If you disabled that in the config file you can use the following events from your own script:

* Check if your pet can be placed in a vehicle
  * `exports["cdev_pets"]:CanEnterVehicle(vehicle)`
* Check if your pet can be taken out of a vehicle
  * `exports["cdev_pets"]:CanExitVehicle(vehicle)`
* Request to place your pet in a vehicle
  * `TriggerEvent("cdev_pets:onTargetPlaceVehicle", { entity = vehicle })`
* Request to take your pet out of a vehicle
  * `TriggerEvent("cdev_pets:onTargetTakeVehicle", { entity = vehicle })`

### Example for QBCore Framework

{% code title="Snippet provided by @MikeyB" lineNumbers="true" %}

```etlua
RegisterNetEvent("putpetincar", function()
    local playerPed = PlayerPedId()
    local playerCoords = GetEntityCoords(playerPed)
    local closestVehicle = QBCore.Functions.GetClosestVehicle(playerCoords)
    local vehicle = closestVehicle
    if exports["cdev_pets"]:CanEnterVehicle(vehicle) then
        TriggerEvent("cdev_pets:onTargetPlaceVehicle", { entity = vehicle })
    else
        QBCore.Functions.Notify("Can not enter, try getting in and out of the vehicle..", "error")
    end
  end)
  
  RegisterNetEvent("removepetincar", function()
    local playerPed = PlayerPedId()
    local playerCoords = GetEntityCoords(playerPed)
    local closestVehicle = QBCore.Functions.GetClosestVehicle(playerCoords)
    local vehicle = closestVehicle
    if exports["cdev_pets"]:CanExitVehicle(vehicle) then
      TriggerEvent("cdev_pets:onTargetTakeVehicle", { entity = vehicle })
    else
        QBCore.Functions.Notify("Can not enter, try getting in and out of the vehicle..", "error")
    end
  end)
```

{% endcode %}

## Quick Actions Keybinds

If you opt to disable keybinds for quick actions, you can use the following events from your own script:

```lua
TriggerEvent("cdev_pets:quickAction:follow")
TriggerEvent("cdev_pets:quickAction:menu")
TriggerEvent("cdev_pets:quickAction:cuddle")
TriggerEvent("cdev_pets:quickAction:cancel")
TriggerEvent("cdev_pets:quickAction:bag")
TriggerEvent("cdev_pets:quickAction:stand")
```

## Attacking

If you opt to disable attacking automatically when aiming at a ped, you can use the following export to start attacking a target:

<pre class="language-lua"><code class="lang-lua"><strong>exports["cdev_pets"]:Attack(entity)
</strong></code></pre>

## K9

To determine what players can purchase K9s, you can modify the integration in cdev\_pets/public/server/api.lua in the function:

```lua
PetResourceAPI.IsPlayerAllowedToBuyK9
```

By default it checks for players who have the police job.

### Bark

```lua
TriggerEvent("cdev_pets:barkAt", { entity = 0 }) 
```

## Play Emote

If you opt to disable the target resource or for other reason you can trigger pet emotes from your own script with the following event:

```lua
TriggerEvent("cdev_pets:useEmote", { payload = { dict = "", anim = "" } }
```

The built in emotes that the pets play are Sit and Lay Down:

```
Sit:
creatures@rottweiler@tricks@                sit_loop

Lay Down:
creatures@rottweiler@amb@sleep_in_kennel@   sleep_in_kennel
```

## AddPet EXPORT

The `addpet` function adds a pet for a player or character, supporting both regular pets and K9 units.

### Parameters

* `PlayerId` (optional): Player's source ID.
* `CharacterId` (optional): Character ID if PlayerId is not provided.
* `petShopId` (required): ID of the pet from the pet shop.
* `isK9` (optional, boolean): `true` if the pet is a K9 unit, `false` otherwise (default: `false`).
* `petName` (required): Name of the pet.

### Function Workflow

1. Checks if data exists.
2. Verifies that either `PlayerId` or `CharacterId` is provided.
3. Looks up the pet's details from `petShopId`.
4. If the pet is a K9, it assigns K9 skills like sniff and attack.
5. Adds the pet to the database.
6. If the pet is a K9, it gives the player a K9-related item.

### Example

```javascript
exports.addpet({
    PlayerId = 2,
    petShopId = "pet_hottweiler",
    isK9 = true,
    petName = "Buddy"
})
```

This will add a K9 pet named "Buddy" for the player with `PlayerId` 2.


# OX Inventory

Integration for ox\_inventory throwing the pet ball

### When using OX Inventory and the ball does not spawn please execute the following integration:

1. Head to `cdev_pets/public/client/api.lua` file and add the following code at the end

```etlua
exports("IsHoldingBall", function()
    local pet = PetManagerClient.ownedPet
    return pet ~= nil and pet.state == PetState.FETCH
end)
```

2. Next, navigate to `ox_inventory/client.lua` and locate the line `'client.interval = SetInterval(function',` then replace that function with the following code:

```etlua
client.interval = SetInterval(function()
	if invOpen == false then
		playerCoords = GetEntityCoords(playerPed)
	
		if currentWeapon and IsPedUsingActionMode(playerPed) then
			SetPedUsingActionMode(playerPed, false, -1, 'DEFAULT_ACTION')
		end
	
	elseif invOpen == true then
		if not canOpenInventory() then
			client.closeInventory()
		else
			playerCoords = GetEntityCoords(playerPed)
	
			if currentInventory and not currentInventory.ignoreSecurityChecks then
	                    local maxDistance = (currentInventory.distance or currentInventory.type == 'stash' and 4.8 or 1.8) + 0.2
	
				if currentInventory.type == 'otherplayer' then
					local id = GetPlayerFromServerId(currentInventory.id)
					local ped = GetPlayerPed(id)
					local pedCoords = GetEntityCoords(ped)
	
					if not id or #(playerCoords - pedCoords) > maxDistance or not (client.hasGroup(shared.police) or canOpenTarget(ped)) then
						client.closeInventory()
						lib.notify({ id = 'inventory_lost_access', type = 'error', description = locale('inventory_lost_access') })
					else
						TaskTurnPedToFaceCoord(playerPed, pedCoords.x, pedCoords.y, pedCoords.z, 50)
					end
	
				elseif currentInventory.coords and (#(playerCoords - currentInventory.coords) > maxDistance or canOpenTarget(playerPed)) then
					client.closeInventory()
					lib.notify({ id = 'inventory_lost_access', type = 'error', description = locale('inventory_lost_access') })
				end
			end
		end
	end
	
	if client.parachute and GetPedParachuteState(playerPed) ~= -1 then
		Utils.DeleteEntity(client.parachute[1])
		client.parachute = false
	end
	
	if EnableWeaponWheel then return end
	
	local weaponHash = GetSelectedPedWeapon(playerPed)
	
	if currentWeapon then
		if weaponHash ~= currentWeapon.hash and currentWeapon.timer then
			local weaponCount = Items[currentWeapon.name]?.count
	
			if weaponCount > 0 then
				SetCurrentPedWeapon(playerPed, currentWeapon.hash, true)
				SetAmmoInClip(playerPed, currentWeapon.hash, currentWeapon.metadata.ammo)
				SetPedCurrentWeaponVisible(playerPed, true, false, false, false)
	
				weaponHash = GetSelectedPedWeapon(playerPed)
			end
	
			if weaponHash ~= currentWeapon.hash then
	                    lib.print.info(('%s was forcibly unequipped (caused by game behaviour or another resource)'):format(currentWeapon.name))
				if not exports["cdev_pets"]:IsHoldingBall() then
					currentWeapon = Weapon.Disarm(currentWeapon, true)
				end
			end
		end
	elseif client.weaponmismatch and not client.ignoreweapons[weaponHash] then
		local weaponType = GetWeapontypeGroup(weaponHash)
	
		if weaponType ~= 0 and weaponType ~= `GROUP_UNARMED` then
			if not exports["cdev_pets"]:IsHoldingBall() then
				Weapon.Disarm(currentWeapon, true)
			end
		end
	end
end, 200)
```

3. Now navegate to `ox_inventory/data/items.lua` file and add the following code at the end

```
["baseball"] = {
	label = "BaseBall for Pet",
	weight = 1,
	consume = 0,
	stack = false,
	close = true,
	client = {
		image = "baseball.png",
		event = "cdev_pets:useBall",
	}
},
```


# Troubleshooting

common issues that customers may experience & why

### Pets not spawning in?

{% hint style="danger" %}
Check to make sure you have an active CFX Element Club subscription: [HERE](https://portal.cfx.re/subscriptions)
{% endhint %}

### \[cdev\_pets] (ERROR) Network control timeout for spawning pet, Please Try Again!

<div align="center"><figure><img src="https://1004862655-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPhIA9eCA4bwgx77hxx4i%2Fuploads%2FkrhZYAPd7MQU17l0zR9U%2Fimage.png?alt=media&amp;token=8d185e84-a69b-44ad-b22f-701f54fe10d7" alt=""><figcaption></figcaption></figure></div>

{% hint style="danger" %}
If you have an anti-cheat, it may be blocking the pet events, please check with your AC provider on how you can resolve this
{% endhint %}


# Config Files: Pets


# anims.lua

```lua

clib = exports.cdev_lib:Get()
loc = clib.localizer.get

DogAnims = {
    ["BigDog"] = {
        -- General
        PlayerCallPetLeftAnim = { "missfra0_chop_find", "call_chop_l" },
        PlayerCallPetRightAnim = { "missfra0_chop_find", "call_chop_r" },

        -- Bed
        PlayerPickupBed = { "pickup_object", "pickup_low" },
        PetSleepBedAnim = { "creatures@rottweiler@amb@sleep_in_kennel@", "sleep_in_kennel" },
        PetLeaveBedAnim = { "creatures@rottweiler@amb@sleep_in_kennel@", "exit_kennel" },

        -- Drink
        PlayerPickupBowl = { "pickup_object", "pickup_low" },
        PetDrinkingAnim = { "amb@lo_res_idles@", "creatures_world_deer_grazing_lo_res_base" },

        -- Eat
        PetBegAnim = { "creatures@rottweiler@tricks@", "beg_enter" },
        PetBegLoopAnim = { "creatures@rottweiler@tricks@", "beg_loop" },
        PetBegExitAnim = { "creatures@rottweiler@tricks@", "beg_exit" },
        PettingPlayerAnim = { "creatures@rottweiler@tricks@", "petting_franklin" },
        PetMoveAnim = { "creatures@rottweiler@move", "walk_start_180_r" },

        -- Sit
        PetSitAnim = { "creatures@rottweiler@tricks@", "sit_loop" },
        BackSitCarOffset = { x = 0.0, y = -0.25, z = 0.45 },
        FrontSitCarOffset = { x = 0.0, y = 0.0, z = 0.45 },

        -- Cuddle
        PlayerCuddleAnim = { "creatures@rottweiler@tricks@", "petting_franklin" },
        PetCuddleAnim = { "creatures@rottweiler@tricks@", "petting_chop" },

        -- Throw Ball
        PetThrowBallPickup = { "creatures@rottweiler@move", "fetch_pickup" },
        PetThrowBallDrop = { "creatures@rottweiler@move", "fetch_drop" },

        -- Bag
        PetBagStance = { "cdev@bigdogbag", "bag_clip" },
      
        Poses = {
            SitGround = {  
                label = loc("bigdoggroundsit"),
                icon = "BIGSITGROUND",
                dog = { "gnddogposehuman01@animations", "gnddogposehuman01_clip" },
                player = { "gndhumanposedog01@animations", "gndhumanposedog01_clip" },
                config = {
                    freeze = true,
                    bone = -1,
                    offsetX = -0.6,
                    offsetY = 0.1,
                    offsetZ = -0.85,
                    rotationX = 70.07,
                    rotationY = -149.47,
                    rotationZ = 11.82
                }
            },

            OnKnee = { 
                label = loc("bigdogonknee"),
                icon = "BIGONKNEE",
                dog = { "gnddogposehuman02@animations", "gnddogposehuman02_clip" },
                player = { "gndhumanposedog02@animations", "gndhumanposedog02_clip" },
                config = {
                    freeze = true,
                    bone = 0,
                    offsetX = -0.09,
                    offsetY = 0.51,
                    offsetZ = -0.62,
                    rotationX = -130.65,
                    rotationY = -7.71,
                    rotationZ = -120.06,
                }
            },

            Sitgroundlay = { 
                label = loc("bigdogsitgroundlay"),
                icon = "BIGSITGROUNDDLAY",
                dog = { "gndcarinhocachorrodeitado@animations", "gndcarinhocachorrodeitado_clip" },
                player = { "gndcarinhohumamcachorrodeitado@animations", "gndcarinhohumamcachorrodeitado_clip" },
                config = {
                    freeze = true,
                    bone = 0,
                    offsetX = -0.09,
                    offsetY = 0.49,
                    offsetZ = 0.4,
                    rotationX = -14.36,
                    rotationY = 32.98,
                    rotationZ = 55.66,
                }
            },

            -- Todo
            LayGround = { 
                label = loc("bigdoglay"), 
                icon = "LAYGROUNDBIG",
                player = { "gndhumansleepdog@animations", "gndhumansleepdog_clip" },
                dog = { "gnddogsleep@animations", "gnddogsleep_clip" },
                config = {
                    freeze = true,
                    bone = 0,
                    offsetX = -0.1,
                    offsetY = -0.25,
                    offsetZ = 0.0,
                    rotationX = 0.0,
                    rotationY = -80.98,
                    rotationZ = 80.49,
                }
            },
            
            HoldAir = {
                label = loc("bigdogholdair"), 
                icon = "BIGHOLDAIR",
                player = { "gndhumancarrydog@animations", "gndhumancarrydog_clip" },
                dog = { "gnddogcarry@animations", "gnddogcarry_clip" },
                config = {
                    freeze = false,
                    offsetX = 0.01,
                    offsetY = 0.54,
                    offsetZ = 0.49,
                    rotationX = 0.0,
                    rotationY = 0.0,
                    rotationZ = -84.63,
                    flag = 49,
                    bone = 24816,
                }
            }
        }

    },
    ['SmallDog'] = {
        -- General
        PlayerCallPetLeftAnim = { "missfra0_chop_find", "call_chop_l" },
        PlayerCallPetRightAnim = { "missfra0_chop_find", "call_chop_r" },

        -- Bed
        PlayerPickupBed = { "pickup_object", "pickup_low" },
        PetSleepBedAnim = { "ped@cdev", "sleep_in_kennel_clip" },
        PetLeaveBedAnim = { "ped@cdev", "exit_kennel_clip" },

        -- Drink
        PlayerPickupBowl = { "pickup_object", "pickup_low" },
        PetDrinkingAnim = { "ped@cdev", "eat_clip" },

        -- Eat
        PetBegAnim = { "ped@cdev", "beg_clip" },
        PetBegLoopAnim = { "ped@cdev", "beg_clip" },
        PetBegExitAnim = { "ped@cdev", "beg_clip" },
        PettingPlayerAnim = { "creatures@rottweiler@tricks@", "petting_franklin" },
        --PetMoveAnim = {"creatures@rottweiler@move", "walk_start_180_r"},

        -- Sit
        PetSitAnim = { "ped@cdev", "sit_clip" },
        BackSitCarOffset = { x = 0.0, y = 0.0, z = 0.3 },
        FrontSitCarOffset = { x = 0.0, y = 0.0, z = 0.3 },

        -- Cuddle
        PlayerCuddleAnim = { "creatures@rottweiler@tricks@", "petting_franklin" },
        PetCuddleAnim = { "ped@cdev", "beg_clip" },

        -- Throw Ball
        PetThrowBallPickup = { "ped@cdev", "fetch1_clip" },
        PetThrowBallDrop = { "ped@cdev", "fetch2_clip" },

        -- Bag
        PetBagStance = { "cdev@frbullbag", "bag_clip" },

        Poses = {
            SitGround = { -- Done
                label = loc("smalldoggroundsit"),
                icon = "SMALLSITGROUND",
                player = { "gndhumanposedog01@animations", "gndhumanposedog01_clip" },
                dog = { "gndpugsentadopose01@animations", "gndpugsentadopose01_clip" },
                config = {
                    freeze = true,
                    bone = 0,
                    offsetX = -0.13,
                    offsetY = 0.8,
                    offsetZ = 0.34,
                    rotationX = -80.0,
                    rotationY = 35.0,
                    rotationZ = 50.0
                },
            },
            Onlap = {
                label = loc("smalldogonlap"),
                icon = "SMALLONLAP", 
                player = { "gndpughumamsentado02@animations", "gndpughumamsentado02_clip" },
                dog = { "gndpugsentado02@animations", "gndpugsentado02_clip" },
                config = {
                    freeze = true,
                    bone = 0,
                    offsetX = -0.12,
                    offsetY = 0.54,
                    offsetZ = 0.66,
                    rotationX = -42.65,
                    rotationY = -13.43,
                    rotationZ = -7.39
                }
            },
            Carry3 = { 
                label = loc("smalldogcarry3"),  
                icon = "SMALLCARRY2",
                player = { "gndcatcolohuman06@animations", "gndcatcolohuman06_clip" },
                dog = { "gndcatcolo06@animations", "gndcatcolo06_clip" },
                config = {
                    freeze = false,
                    flag = 49,
                    bone = 0,
                    offsetX = -0.12,
                    offsetY = -0.07,
                    offsetZ = 0.0,
                    rotationX = -10.1,
                    rotationY = -20.0,
                    rotationZ = -50.1
                }
            },
            Carry1 = { 
                label = loc("smalldogcarry1"),
                icon = "SMALLCARRY1",
                player = { "gndpugcolopose01human@animations", "gndpugcolopose01human_clip" },
                dog = { "gndpugcolopose01@animations", "gndpugcolopose01_clip" },
                config = {
                    freeze = false,
                    flag = 49,
                    bone = 0,
                    offsetX = -0.24,
                    offsetY = 0.06,
                    offsetZ = 0.37,
                    rotationX = 0.0,
                    rotationY = 0.0,
                    rotationZ = -24.57
                }
            },
            Carry2 = { 
                label = loc("smalldogcarry2"),
                icon = "SMALLCARRY2",
                player = { "gndpugcolopose02human@animations", "gndpugcolopose02human_clip" },
                dog = { "gndpugcolopose02@animations", "gndpugcolopose02_clip" },
                config = {
                    freeze = false,
                    flag = 49,
                    bone = 24816,
                    offsetX = 0.0,
                    offsetY = 0.0,
                    offsetZ = 0.0,
                    rotationX = 0.0,
                    rotationY = 0.0,
                    rotationZ = 0.0
                }
            },
            OnShoulder = { 
                label = loc("smalldogonshoulder"),
                icon = "SMALLONSHOULDER",
                player = { "gndpugcolopose03human@animations", "gndpugcolopose03human_clip" },
                dog = { "gndpugcolopose03@animations", "gndpugcolopose03_clip" },
                config = {
                    freeze = false,

                    bone = 0,
                    offsetX = 0.0,
                    offsetY = 0.0,
                    offsetZ = 0.0,
                    rotationX = 0.0,
                    rotationY = 0.0,
                    rotationZ = 0.0
                }
            },
            CarryLap = {
                label = loc("smalldogcarrylap"),
                icon = "SMALLCARRYLAP", 
                player = { "gndpugcolopose04human@animations", "gndpugcolopose04human_clip" },
                dog = { "gndpugcolopose04@animations", "gndpugcolopose04_clip" },
                config = {
                    freeze = false,
                    flag = 49,
                    bone = 0,
                    offsetX = 0.0,
                    offsetY = 0.0,
                    offsetZ = 0.0,
                    rotationX = 0.0,
                    rotationY = 0.0,
                    rotationZ = 0.0
                }
            },
            LayLap = { 
                label = loc("smalldoglaylap"),
                icon = "SMALLONLAP",
                player = { "gndhumampugsentadocruzado@animations", "gndhumampugsentadocruzado_clip" },
                dog = { "gndpugsentadocruzado@animations", "gndpugsentadocruzado_clip" },
                config = {
                    freeze = true,

                    bone = 0,
                    offsetX = 0.0,
                    offsetY = 0.25,
                    offsetZ = -0.05,
                    rotationX = 0.0,
                    rotationY = -20.0,
                    rotationZ = 120.0
                }
            },
            LayGround = { 
                label = loc("smalldoglayground"), 
                icon = "SMALLLAYGROUND",
                player = { "gndhumansleepdog@animations", "gndhumansleepdog_clip" },
                dog = { "gndpugsleeppose@animations", "gndpugsleeppose_clip" },
                config = {
                    freeze = true,
                    bone = 0,
                    offsetX = -0.03,
                    offsetY = 0.66,
                    offsetZ = -0.38,
                    rotationX = -114.66,
                    rotationY = 0.0,
                    rotationZ = 0.0
                }
            },
            HoldAir = { 
                label = loc("smalldogholdair"),
                icon = "SMALLHOLDAIR",
                dog = { "gndpugcarrypose@animations", "gndpugcarrypose_clip" },
                player = { "gndpugcarryhuman@animations", "gndpugcarryhuman_clip" },
                config = {

                    freeze = false,
                    flag = 49,
                    bone = 24816,
                    offsetX = 0.0,
                    offsetY = 0.0,
                    offsetZ = -0.08,
                    rotationX = 0.0,
                    rotationY = 0.0,
                    rotationZ = 0.0,
                }
            }
        },
    },
    ['Cat'] = {
        -- General
        PlayerCallPetLeftAnim = { "missfra0_chop_find", "call_chop_l" },
        PlayerCallPetRightAnim = { "missfra0_chop_find", "call_chop_r" },

        -- Bed
        PlayerPickupBed = { "pickup_object", "pickup_low" },
        PetSleepBedAnim = { "creatures@cat@amb@world_cat_sleeping_ground@base", "base" },
        PetLeaveBedAnim = { "creatures@cat@amb@world_cat_sleeping_ground@exit", "exit" },

        -- Drink
        PlayerPickupBowl = { "pickup_object", "pickup_low" },
        PetDrinkingAnim = { "cdev@cateating", "eating_clip" },
        PetDrinkingHeading = 180,

        -- Eat
        PetBegAnim = { "ped@cdev", "beg_clip" },
        PetBegLoopAnim = { "ped@cdev", "beg_clip" },
        PetBegExitAnim = { "ped@cdev", "beg_clip" },
        PettingPlayerAnim = { "creatures@rottweiler@tricks@", "petting_franklin" },
        PetMoveAnim = { "creatures@cat@move", "idle" },

        -- Sit
        PetSitAnim = { "gndcatseat@animations", "gndcatseat_clip" },

        BackSitCarOffset = { x = 0.0, y = 0.0, z = 0.3 },
        FrontSitCarOffset = { x = 0.0, y = 0.0, z = 0.3 },

        -- Bag

        PetLayDownAnim = {"gndcatdeitadonamochila@animations", "gndcatdeitadonamochila_clip"},

        -- Cuddle
        PlayerCuddleAnim = { "creatures@rottweiler@tricks@", "petting_franklin" },
        PetCuddleAnim = { "ped@cdev", "beg_clip" },

        -- Throw Ball
        PetThrowBallPickup = { "ped@cdev", "fetch1_clip" },
        PetThrowBallDrop = { "ped@cdev", "fetch2_clip" },

        -- Scratch
        PetScratching = {"gndcatarranhando@animations", "gndcatarranhando_clip"},

        -- Ball
        BallFollowing = {"gndcatplaying@animations", "gndcatplaying_clip"},
        Poses = {
            SitGround = { 
                label = loc("catsitground"),
                icon = "SMALLSITGROUND",
                player = { "gndhumanposedog01@animations", "gndhumanposedog01_clip" },
                dog = { "gndcatsentadopose01@animations", "gndcatsentadopose01_clip" },
                config = {
                    freeze = true,
                    
                    bone = 0,
                    offsetX = -0.04,
                    offsetY = 0.85,
                    offsetZ = 0.21,
                    rotationX = -90.0,
                    rotationY = 0.0,
                    rotationZ = 0.0,
                }
            },
            LapGround = { 
                label = loc("catlapground"),
                icon = "CATLAPGROUND",
                player = { "gndcathumamsentado02@animations", "gndcathumamsentado02_clip" },
                dog = { "gndcatsentado02@animations", "gndcatsentado02_clip" },
                config = {
                    freeze = true,

                    bone = 0,
                    offsetX = 0.0,
                    offsetY = 0.39,
                    offsetZ = 0.72,
                    rotationX = -35.32,
                    rotationY = 8.67,
                    rotationZ = 21.68
                }
            },
            Carry1 = {
                label = loc("catcarry1"),
                icon = "CATCARRY1",
                player = { "gndcatcolohuman05@animations", "gndcatcolohuman05_clip" },
                dog = { "gndcatcolo05@animations", "gndcatcolo05_clip" },
                config = {
                    freeze = false,
                    flag = 49,
                    bone = 0,
                    offsetX = 0.0,
                    offsetY = 0.0,
                    offsetZ = 0.0,
                    rotationX = 0.0,
                    rotationY = 0.0,
                    rotationZ = 0.0
                }
            },
            Carry2 = {
                label = loc("catcarry2"),
                icon = "CATCARRY2",
                player = { "gndcatcolohuman@animations", "gndcatcolohuman_clip" },
                dog = { "gndcatcolo@animations", "gndcatcolo_clip" },
                config = {
                    freeze = false,
                    flag = 49,
                    bone = 0,
                    offsetX = 0.0,
                    offsetY = 0.0,
                    offsetZ = 0.0,
                    rotationX = 0.0,
                    rotationY = 0.0,
                    rotationZ = 0.0
                }
            },
            OnShoulder = {
                label = loc("catonshoulder"),
                icon = "CATONSHOULDER",
                player = { "gndcatcolohuman03@animations", "gndcatcolohuman03_clip" },
                dog = { "gndcatcolo03@animations", "gndcatcolo03_clip" },
                config = {
                    freeze = true,
                    bone = 0,
                    offsetX = 0.0,
                    offsetY = 0.0,
                    offsetZ = 0.0,
                    rotationX = 0.0,
                    rotationY = 0.0,
                    rotationZ = 0.0
                }
            },
            Carry3 = {
                label = loc("catcarry3"),
                icon = "CATCARRY2",
                player = { "gndcatcolohuman04@animations", "gndcatcolohuman04_clip" },
                dog = { "gndcatcolo04@animations", "gndcatcolo04_clip" },
                config = {
                    freeze = false,
                    flag = 49,
                    bone = 0,
                    offsetX = 0.0,
                    offsetY = 0.0,
                    offsetZ = 0.0,
                    rotationX = 0.0,
                    rotationY = 0.0,
                    rotationZ = 0.0
                }
            },
            SitGround2 = {
                label = loc("catlapground2"),
                icon = "CATLAPGROUND",
                player = { "gndhumamcatsentado@animations", "gndhumamcatsentado_clip" },
                dog = { "gndcatsentadocruzado@animations", "gndcatsentadocruzado_clip" },
                config = {
                    freeze = true,
                    bone = 0,
                    offsetX = -0.05,
                    offsetY = 1.09,
                    offsetZ = 0.06,
                    rotationX = -105.46,
                    rotationY = 36.07,
                    rotationZ = 35.49
                }
            },
            LayGround = {
                label = loc("catlayground"),
                icon = "CATLAYGROUND",
                player = { "gndhumansleepdog@animations", "gndhumansleepdog_clip" },
                dog = { "gndcatsleep@animations", "gndcatsleep_clip" },
                config = {
                    freeze = true,
                    bone = 0,
                    offsetX = -0.01,
                    offsetY = 0.86,
                    offsetZ = -0.06,
                    rotationX = -93.1,
                    rotationY = 0.0,
                    rotationZ = -0.31
                }
            },
            HoldAir = {
                label = loc("catholdair"),
                icon ="CATHOLDAIR",
                player = { "gndcatcarryhuman@animations", "gndcatcarryhuman_clip" },
                dog = { "gndcatcarry@animations", "gndcatcarry_clip" },
                config = {
                    freeze = false,
                    flag = 49,
                    offsetX = 0.0,
                    offsetY = 0.0,
                    offsetZ = 0.0,
                    rotationX = 0.0,
                    rotationY = 0.0,
                    rotationZ = 0.0,
                    bone = 24816,
                }
            }
        }


    },
}
```


# config.lua

```lua
PlayerShop = {
    Roles = {
        BOSS = 100,
        MANAGER = 50,
        VETERINARY = 25,
        CLERK = 0,
    }
}

PublicSharedPetsConfig = {
    -- If true, certain pet items will be limited to players who have active VIP status
    -- in your server, for setting up VIP integration check the documentation for cdev_lib
    UseVIPSystem = false,

    -- If true, there will be a button for opening the pet shop in your Pet Bag
    -- If false, you must integrate the pet shop by yourself, check docs for cdev_pets
    WantPetShopButton = true,

    -- When true, if the pet is loyal enough it will attack players you aim at, if you decide to keep this disabled use the export to trigger attacks from your own script ":Attack(ped)"
    WantAttackWhenAiming = true,

    -- Works the same as WantAttackWhenAiming, but if you disable WantAttackWhenAiming you can still enable this to allow K9s to attack when aiming
    WantAttackWhenAimingIfK9 = true,

    -- if true, pets can only attack players
    -- if false, pets can attack any entity 
    EnablePetToOnlyAttackPlayers = true,

    -- If true, will enable the new attack update with the police being the only that can use this feature and train the dog
    -- If false, will reverse to old one
    -- If This is true need EnablePetToOnlyAttackPlayers to be true
    EnableAttackUpdate = true,

    -- Configuration for opening a pet shop via Ped.
    PedShop = {

        -- If true, it will create a pet shop to use as a pet shop.
        WantPedShop = false,

        -- Coords to define where the ped will spawn
        PedCoords = vector4(-1281.44, -1414.52, 3.35, 125.32),

        -- Parameter to define the ped model.
        PedModel = "a_m_m_beach_01",

    },

    PlayerShop = {
        -- If true, it will use the drawtext system to show the pet shop
        UseDrawtextForPetShopEntities = false,
        UseDrawtextForManagment = false,
        UseDrawTextForStoreStores = true,
        DrawtextDistance = 1.5,

        UseBankInsteadOfCash = false,

            -- ⌨️ Default controls for the shop creator menu (see https://docs.fivem.net/docs/game-references/controls)
        CreatorControls = {
            CONFIRM_ANY_ACTION = 38, -- E
            CANCEL_ANY_ACTION = 200, -- ESC
            GENERAL_SAVE = 201,      -- Enter
            GENERAL_TOGGLE = 37,     -- TAB
            GENERAL_ALTERNATE = 19,  -- L. ALT
            INCREASE = 15,           -- Scroll UP
            DECREASE = 14,           -- Scroll DOWN
        },

        VetControls = {
            CANCEL_ANY_ACTION = 200, -- ESC
            HEAL = 201, -- Enter
        },
        
        -- ⌨️ Default controls for drawtext shops if using any (see https://docs.fivem.net/docs/game-references/controls)
        DrawtextShopControls = {
            BROWSE_STOCK = 38, -- E
            MANAGEMENT = 38,   -- E
            PETSHOP = 38,     -- E
        },

        Job = {
            RoleRequirements = {
                OpenManagementMenu = PlayerShop.Roles.CLERK,
                ManageStock = PlayerShop.Roles.CLERK,
                ManageEmployees = PlayerShop.Roles.MANAGER,
                ManageSettings = PlayerShop.Roles.MANAGER,
                ManageVault = PlayerShop.Roles.MANAGER,
                PlaceDogs = PlayerShop.Roles.MANAGER,
                TreatDogs = PlayerShop.Roles.VETERINARY,
            },
        },
    },

    -- Range the Keybinds/Commands will work
    Range = 5.0,

    Keybinds = {
        Enabled = true,

        QuickAction_Bubbles = true,

        -- Quick action for following/staying
        QuickAction_Follow = "G",

        -- Quick action for opening the menu
        QuickAction_Menu = "E",

        -- Quick action for cuddling
        QuickAction_Cuddle = "F",

        -- Quick action for standing up (leaving bed)
        QuickAction_Stand = "G",

        -- Cancel action
        CancelAction = "X",

        -- Keybind for opening your Pet Bag
        PetsBag = "TAB",
    },

    Commands = {
        Enabled = true,

        -- Command for following/staying
        petfollow = "petfollow",

        -- Command for opening the menu
        openpetmenu = "openpetmenu",

        -- Command for cuddling
        petcuddle = "petcuddle",

        -- Command for cancelling action
        petcancel = "petcancel",

        -- Command for opening pet Bag
        petbag = "petbag",

        -- Command for standing up (leaving bed)
        petstand = "petstand"
    },

    -- Interaction for getting pet into vehicle (if false you should trigger events from your own script, events in docs)
    PetVehicleInteractionTarget = true,

    BagIcon = "https://i.ibb.co/JzwLFNL/Ex4-ETAA-d.png",

    Permissions = {
        -- Permission for adding inventory items for a pet
        PermPetInventoryAddItem = PERMISSION_HIGH,
        PermPetAddPet = PERMISSION_HIGH,
        PermPetDelPet = PERMISSION_HIGH,
        PermCreatePetShop = PERMISSION_HIGH,
        PermAddEmployees = PERMISSION_HIGH,
    },

    Inventory = {
        -- Max slots for pet inventory by default
        Slots = 40,
        -- Max slots for pet inventory for VIP players (if VIP enabled)
        VIPSlots = 120,
    },

    -- Settings related to pet tracker on map
    Tracker = {
        Enabled = true,
        Sprite = 621,
        Color = 5,
        Scale = 1.0,
        UpdateRateMS = 2 * 1000,
    },

    -- Settings related to pet shop
    Shop = {
        Icon = "https://i.ibb.co/JzwLFNL/Ex4-ETAA-d.png",
        PetCategories = {
            "pet_category_pets",
        },
        ApparelCategories = {
            "apparel_category_collar",
            "apparel_category_clothes",
            "apparel_category_shoes",
            "apparel_category_head",
            "apparel_category_patch",
            "apparel_category_glasses",
            "apparel_category_mask",
            --"apparel_category_fur",
        },
        AccessoriesCategories = {
            "accessory_category_leash",
            "accessory_category_bowl",
            "accessory_category_bed",
            "accessory_category_toys",
            "accesorry_category_training"
        },
        CareCategories = {
            "care_category_food",
            "care_category_liquids",
            "care_category_health",
        },
    },

    -- Mood UI settings
    Mood = {
        -- How far away will pet mood be displayed
        ShowRange = 20,
    },

    -- AI Related settings
    AI = {
        -- How frequently will AI tasks be processed on the server in seconds
        -- Changing this may have severe effects, not recommended
        TickFrequency = 60,
    },

    -- Pet stat related configuration
    -- Stats range from 0-100, values are changed per tick (check TickFrequency)
    Stats = {
        -- Appetite lost per tick
        AppetiteDecreasePerTick = 1,
        -- Appetite lost while following per tick
        AppetiteDecreaseFollowingPerTick = 3,
        -- Appetite change stat notification frequency
        AppetiteChangeNotify = 10,
        -- Damage dealt per tick while starving
        StarvationDamagePerTick = 15,
        -- Appetite lost when fetching a toy
        AppetiteDecreaseFromFetch = 1,
        -- Appetitle lost when healed
        ApettiteDecreaseWhenHealed = 3,
        -- Appetite lost when attacking
        AppetiteDecreaseWhenAttacking = 5,

        -- Hydration lost per tick
        HydrationDecreasePerTick = 1,
        -- Hydration lost while following per tick
        HydrationDecreaseFollowingPerTick = 3,
        -- Hydration change stat notification frequency
        HydrationChangeNotify = 10,
        -- Damage dealt per tick while dehydrated
        DehydrationDamagePerTick = 15,
        -- Hydration lost when fetching a toy
        HydrationDecreaseFromFetch = 3,
        -- Hydration lost when healed
        HydrationDecreaseWhenHealed = 3,
        -- Hydration lost when attacking
        HydrationDecreaseWhenAttacking = 5,

        -- Stamina lost while following per tick
        StaminaDecreaseFollowingPerTick = 4,
        -- Stamina lost when fetching a toy
        StaminaDecreaseFromFetch = 4,
        -- Stamina gained when sleeping per tick
        StaminaIncreaseWhileSleepingPerTick = 2,
        -- Stamina change stat notification frequency when sleeping
        StaminaChangeWhileSleepingNotify = 1,
        -- Stamina lost when attacking
        StaminaDecreaseWhenAttacking = 5,

        -- Happiness gained from cuddling (limited to cuddle frequency setting)
        HappinessBoostFromCuddle = 5,
        -- Happiness gained from following (limited to follow frequency setting)
        HappinessBoostFromFollow = 5,
        -- How often in seconds will cuddling increase happiness
        HappinessCuddleFrequency = 60 * 5,
        -- How often in seconds will following increase happiness
        HappinessFollowFrequency = 60 * 2.5,
        -- Pet will get angry when happiness is under this amount
        HappinessAngryThreshold = 30,
        -- Happiness lost when attacked by owner
        HappinessDecreaseWhenAttackedByOwner = 20,
        -- Happiness gained when fetching a toy
        HappinessBoostFromFetch = 5,

        -- Loyalty will increase when happiness above
        LoyaltyIncreaseWhenHappinessAbove = 80,
        -- Loyalty gained per tick when pet is above happiness threshold
        LoyaltyIncreasePerTickWhenHappy = 1,
        -- Loyalty lost per tick when starving
        LoyaltyDecreasePerTickWhenStarving = 1,
        -- Loyalty lost when attacked by owner
        LoyaltyDecreaseWhenAttackedByOwner = 5,
        -- Loyalty gained when revived by owner
        LoyaltyIncreaseWhenRevivedByOwner = 5,
        -- Loyalty gained when healed by owner
        LoyaltyIncreasedWhenHealedByOwner = 1,
        -- Loyalty gained when attacking
        LoyaltyIncreaseWhenAttacking = 1,
        -- Loyalty needed to perform certain actions like attacking
        LoyaltyLoyalThreshold = 80,

        -- How far away will pet stat changes be displayed
        NotifyShowRange = 20,
    },

    K9 = {
        -- Whether or not K9s can sniff for illegal items
        Skills = {
            sniff = {
                -- Level the k9 starts at
                DefaultLevel = 20,
                -- Minimum level the k9 can be at 
                -- if 0 then it will be impossible to sniff
                MinimiumLevel = 1,
                -- How much the sniff level increases per successful sniff
                LevelIncrease = 5,
                -- How much of the skill it will take out 
                TakeOut = 5,
            },
            attack = {
                -- Level the k9 starts at
                DefaultLevel = 20,
                -- Minimum level the k9 can be at
                -- if 0 then it will be impossible to attack
                MinimiumLevel = 1,
                -- How much the attack level increases per successful attack
                LevelIncrease = 5,
                -- How much time the player will be down
                takedownTime = 10000, 
                -- How much of the skill it will take out 
                TakeOut = 5,
            }, 
            agility = {
                -- Level the k9 starts at
                DefaultLevel = 20,
                -- Minimum level the k9 can be at
                -- if 0 then it will be impossible to agility
                MinimiumLevel = 1,
                -- How much the attack level increases per successful attack
                LevelIncrease = 5,
                -- How much of the skill it will take out 
                TakeOut = 5,
            },
            resistance = {
                -- Level the k9 starts at
                DefaultLevel = 20,
                -- Minimum level the k9 can be at
                -- if 0 then it will be impossible to resistance
                MinimiumLevel = 1,
                -- How much the attack level increases per successful attack
                LevelIncrease = 5,
                -- How much of the skill it will take out 
                TakeOut = 5,
            },

            -- How often in seconds will the skill tick
            TakeOutSkillTickFrequency = 720, -- in seconds
        },

        -- Whether or not K9s can sniff for illegal items
        SearchEnabled = true,
        -- Item ids that can be sniffed by K9s
        DrugItems = {
            "phone",
        },
        MoneyItems = {
            "water_bottle",
        },
        WeaponItems = {
            "sandwich",
        },
    },

    -- For development and support feedback only, do not use.
    Debug = true,
}
```


# items.lua

Full list is over 7000 lines hence why this list is shortened.

```lua
---@enum ECategoryInventoryPets
ECategoryInventoryPets = {
    COLLAR = 0,
    FUR = 1,
    LEASH = 2,
    BOWL = 3,
    CLOTHES = 4,
    TOYS = 5,
    FOOD = 6,
    DRINKS = 7,
    TRAINING = 8,
}

---@type { [string]: InventoryItemSpec }
InventoryItemSpecs = {
    ["dummy"] = {
        label = "Dummy",
        category = ECategoryInventoryPets.TRAINING,
        stack = false,
        description = "Dummy item for testing.",
        canbeRemoved = true,
        usable = true,
        isK9 = true,
        onUse = {
            event = "cdev_pets:useDummy",
            data = { staminaDecrese = 5 },
            close = true,
            net = false,
            preventRestoreState = true,
        }
    },
    ["cone"] = {
        label = "Cones",
        category = ECategoryInventoryPets.TRAINING,
        stack = false,
        description = "Tunnel item for testing.",
        canbeRemoved = true,
        usable = true,

        isK9 = true,
        onUse = {
            event = "cdev_pets:useCones",
            data = { staminaDecrese = 5 },
            close = true,
            net = false,
            preventRestoreState = true,
        }
    },
    ["ramp"] = {
        label = "Ramp",
        category = ECategoryInventoryPets.TRAINING,
        stack = false,
        description = "Tunnel item for testing.",
        canbeRemoved = true,
        usable = true,
        isK9 = true,
        onUse = {
            event = "cdev_pets:useRampa",
            data = { staminaDecrese = 5 },
            close = true,
            net = false,
            preventRestoreState = true,
        }
    },
    ["hoop"] = {
        label = "Hoop",
        category = ECategoryInventoryPets.TRAINING,
        stack = true,
        description =
        "A great option for playing with pets, especially dogs. They are simple, straightforward, and effective toys that can be used for playing fetch or rolling around the house or yard.",
        canbeRemoved = true,
        usable = true,

        isK9 = true,
        onUse = {
            event = "cdev_pets:UseHoop",
            data = { staminaDecrese = 5 },
            net = false,
            close = true,
            preventRestoreState = true,
        }
    },
    ["baseball"] = {
        label = "Baseball",
        category = ECategoryInventoryPets.TOYS,
        stack = true,
        description =
        "A great option for playing with pets, especially dogs. They are simple, straightforward, and effective toys that can be used for playing fetch or rolling around the house or yard.",
        canbeRemoved = true,
        usable = true,
        onUse = {
            event = "cdev_pets:useBall",
            data = {},
            net = false,
            close = true,
            preventRestoreState = true,
        }
    },
    ["cleanwater"] = {
        label = "Water Gallon",
        category = ECategoryInventoryPets.DRINKS,
        stack = true,
        description =
        "A great option for pets as it helps keep them hydrated and healthy. It is recommended to provide filtered water to pets to protect them from toxins that can be present in tap water.",
        canbeRemoved = true,
        usable = true,
        metadata = {
            refill = 15,
        },
        onUse = {
            event = "cdev_pets:useWater",
            data = {},
            net = false,
            close = true,
            preventRestoreState = true,
        }
    },
    ["petfood1"] = {
        label = "Chicken Dog Food",
        category = ECategoryInventoryPets.FOOD,
        stack = true,
        description =
        "A tasty and nutritious meal for dogs, packed with essential nutrients for their overall health and well-being.",
        canbeRemoved = true,
        usable = true,
        metadata = {
            refill = 7,
        },
        onUse = {
            event = "cdev_pets:useFood",
            data = {},
            close = true,
        }
    },
    ["petfood2"] = {
        label = "Porterhouse Dog Food",
        category = ECategoryInventoryPets.FOOD,
        stack = true,
        description =
        "A tasty and nutritious meal for dogs, packed with essential nutrients for their overall health and well-being.",
        canbeRemoved = true,
        usable = true,
        metadata = {
            refill = 8,
        },
        onUse = {
            event = "cdev_pets:useFood",
            data = {},
            close = true,
        }
    },
    ["petfood3"] = {
        label = "Filetmignon Dog Food",
        category = ECategoryInventoryPets.FOOD,
        stack = true,
        description =
        "A tasty and nutritious meal for dogs, packed with essential nutrients for their overall health and well-being.",
        canbeRemoved = true,
        usable = true,
        metadata = {
            refill = 10,
        },
        onUse = {
            event = "cdev_pets:useFood",
            data = {},
            close = true,
        }
    },
    ["petfood4"] = {
        label = "Paté Poultry Platter",
        category = ECategoryInventoryPets.FOOD,
        stack = true,
        description =
        "A tasty and nutritious meal for cats, packed with essential nutrients for their overall health and well-being.",
        canbeRemoved = true,
        usable = true,
        metadata = {
            refill = 10,
        },
        onUse = {
            event = "cdev_pets:useFood",
            data = {},
            close = true,
        },
    },
    ["petfood5"] = {
        label = "Tasty Treasure Paté",
        category = ECategoryInventoryPets.FOOD,
        stack = true,
        description =
        "A tasty and nutritious meal for cats, packed with essential nutrients for their overall health and well-being.",
        canbeRemoved = true,
        usable = true,
        metadata = {
            refill = 10,
        },
        onUse = {
            event = "cdev_pets:useFood",
            data = {},
            close = true,
        },
    },
    ["petfood6"] = {
        label = "Proactive Health",
        category = ECategoryInventoryPets.FOOD,
        stack = true,
        description =
        "A tasty and nutritious meal for cats, packed with essential nutrients for their overall health and well-being.",
        canbeRemoved = true,
        usable = true,
        metadata = {
            refill = 10,
        },
        onUse = {
            event = "cdev_pets:useFood",
            data = {},
            close = true,
        },
    },
    ["pettreat1"] = {
        label = "Beef & Bacon Biscuits",
        category = ECategoryInventoryPets.FOOD,
        stack = true,
        description =
        "A tasty and nutritious meal for dogs, packed with essential nutrients for their overall health and well-being.",
        canbeRemoved = true,
        usable = true,
        metadata = {
            refill = 5,
        },
        onUse = {
            event = "cdev_pets:useTreat",
            data = {},
            close = true,
        }
    },
    ["pettreat2"] = {
        label = "Yogurt Biscuits",
        category = ECategoryInventoryPets.FOOD,
        stack = true,
        description =
        "A tasty and nutritious meal for dogs, packed with essential nutrients for their overall health and well-being.",
        canbeRemoved = true,
        usable = true,
        metadata = {
            refill = 7,
        },
        onUse = {
            event = "cdev_pets:useTreat",
            data = {},
            close = true,
        }
    },
    ["pettreat3"] = {
        label = "Peanut Butter Biscuits",
        category = ECategoryInventoryPets.FOOD,
        stack = true,
        description =
        "A tasty and nutritious meal for dogs, packed with essential nutrients for their overall health and well-being.",
        canbeRemoved = true,
        usable = true,
        metadata = {
            refill = 7,
        },
        onUse = {
            event = "cdev_pets:useTreat",
            data = {},
            close = true,
        }
    },
    ["petmedlow"] = {
        label = "Pet Medkit (Low Effect)",
        stack = false,
        description =
        "The Pet Medkit (Low Effect) is a compact first aid kit for pets. It contains basic supplies to address minor injuries and ailments, providing immediate care and peace of mind for your furry friend.",
        canbeRemoved = true,
        usable = true,
        metadata = {
            refill = 10,
        },
        onUse = {
            event = "cdev_pets:useMedication",
            data = {},
            close = true,
            preventRestoreState = true,
        }
    },
    ["petmedmed"] = {
        label = "Pet Medkit (Medium Effect)",
        stack = false,
        description =
        "The Pet Medkit (Medium Effect) is a comprehensive first aid kit for pets, providing intermediate medical support. With a wider range of supplies and treatments, it equips you to handle moderate injuries and health issues. Convenient and reliable, it's designed to ensure your pet's well-being in various emergencies.",
        canbeRemoved = true,
        usable = true,
        metadata = {
            refill = 25,
        },
        onUse = {
            event = "cdev_pets:useMedication",
            data = {},
            close = true,
            preventRestoreState = true,
        }
    },
    ["petmedhigh"] = {
        label = "Pet Medkit (High Effect)",
        stack = false,
        description =
        "The Pet Medkit (High Effect) is an advanced and powerful first aid kit for pets. With a wide array of supplies and treatments, it provides strong medical support for addressing serious injuries and health conditions. Designed to handle high-impact emergencies, this medkit offers comprehensive care and ensures your pet's well-being in critical situations.",
        canbeRemoved = true,
        usable = true,
        metadata = {
            refill = 50,
        },
        onUse = {
            event = "cdev_pets:useMedication",
            data = {},
            close = true,
            preventRestoreState = true,
        }
    },
    ["leashgreen"] = {
        label = "Green Leash",
        category = ECategoryInventoryPets.LEASH,
        stack = false,
        description = "Take your dog for a walk.",
        canbeRemoved = true,
        usable = true,
        onUse = {
            event = "cdev_pets:useLeash",
            data = {
                prop = "leashgreen",
                offset = vector3(0.18, -0.0, -0.02),
                rotation = vector3(300.0, 0.0, 0.0),
            },
            close = true,
            preventRestoreState = true,
        }
    },
    -- OUTFITS --
    ["purpleshoes"] = {
        label = "Purple Shoes",
        category = ECategoryInventoryPets.CLOTHES,

        stack = false,
        description = "Fancy shoes for your pet",
        canbeRemoved = true,
        usable = true,
        onUse = {
            event = "cdev_pets:useClothing",
            data = {
                component = 6,
                drawable = 2,
                texture = 0,
            },
            close = true,
        }
    },
    ["blackcollarstrass"] = {
        label = "Black Collar w Strass",
        category = ECategoryInventoryPets.COLLAR,

        stack = false,
        description = "A very strong collar for your pet, black collar with gray strass",
        canbeRemoved = true,
        usable = true,
        onUse = {
            event = "cdev_pets:useClothing",
            data = {
                component = 8,
                drawable = 1,
                texture = 3,
            },
            close = true,
        }
    },
    ["goldcollar"] = {
        label = "Gold Collar",
        category = ECategoryInventoryPets.COLLAR,

        stack = false,
        description = "A very strong collar for your pet, there is gold strass",
        canbeRemoved = true,
        usable = true,
        onUse = {
            event = "cdev_pets:useClothing",
            data = {
                component = 8,
                drawable = 1,
                texture = 1
            },
            close = true,
        }
    },
    ["whitecollar"] = {
        label = "White Collar",
        category = ECategoryInventoryPets.COLLAR,
        stack = false,
        description = "A very strong collar for your pet completely white",
        canbeRemoved = true,
        usable = true,
        onUse = {
            event = "cdev_pets:useClothing",
            data = {
                component = 8,
                drawable = 1,
                texture = 2,
            },
            close = true,
        }
    },
    ["greencamohoodie"] = {
        label = "Green Camo Hoodie",
        category = ECategoryInventoryPets.CLOTHES,

        stack = false,
        description = "A beautiful sweatshirt for your pet.",
        canbeRemoved = true,
        usable = true,
        onUse = {
            event = "cdev_pets:useClothing",
            data = {
                component = 3,
                drawable = 3,
                texture = 2,
            },
            close = true,
        }
    },
    ["allblackcollar"] = {
        label = "All Black Collar",
        category = ECategoryInventoryPets.COLLAR,

        stack = false,
        description = "A very strong collar for your pet completely black",
        canbeRemoved = true,
        usable = true,
        onUse = {
            event = "cdev_pets:useClothing",
            data = {
                component = 8,
                drawable = 2,
                texture = 1,
            },
            close = true,
        }
    },
    ["greendothoodie"] = {
        label = "Green Dot Hoodie",
        category = ECategoryInventoryPets.CLOTHES,

        stack = false,
        description = "A beautiful sweatshirt for your pet.",
        canbeRemoved = true,
        usable = true,
        onUse = {
            event = "cdev_pets:useClothing",
            data = {
                component = 3,
                drawable = 1,
                texture = 2,
            },
            close = true,
        }
    },
    ["yellowbootslong"] = {
        label = "Yellow Boots Long",
        category = ECategoryInventoryPets.CLOTHES,

        stack = false,
        description = "A good rain day shoes for your pet color yellow",
        canbeRemoved = true,
        usable = true,
        onUse = {
            event = "cdev_pets:useClothing",
            data = {
                component = 6,
                drawable = 1,
                texture = 0,
            },
            close = true,
        }
    },
    ["yellowhoodie"] = {
        label = "Yellow Hoodie",
        category = ECategoryInventoryPets.CLOTHES,
        stack = false,
        description = "A beautiful sweatshirt for your pet.",
        canbeRemoved = true,
        usable = true,
        onUse = {
            event = "cdev_pets:useClothing",
            data = {
                component = 3,
                drawable = 1,
                texture = 5,
            },
            close = true,
        }
    },
    ["bluebootslong"] = {
        label = "Blue Boots Long",
        category = ECategoryInventoryPets.CLOTHES,

        stack = false,
        description = "A good rain day shoes for your pet, color blue",
        canbeRemoved = true,
        usable = true,
        onUse = {
            event = "cdev_pets:useClothing",
            data = {
                component = 6,
                drawable = 1,
                texture = 1,
            },
            close = true,
        }
    },
    ["redbootslong"] = {
        label = "Red Boots Long",
        category = ECategoryInventoryPets.CLOTHES,

        stack = false,
        description = "A good rain day shoes for your pet, color red",
        canbeRemoved = true,
        usable = true,
        onUse = {
            event = "cdev_pets:useClothing",
            data = {
                component = 6,
                drawable = 1,
                texture = 2,
            },
            close = true,
        }
    },
    ["lightyellowhoodie"] = {
        label = "Light Yellow Hoodie",
        category = ECategoryInventoryPets.CLOTHES,

        stack = false,
        description = "A beautiful sweatshirt for your pet.",
        canbeRemoved = true,
        usable = true,
        onUse = {
            event = "cdev_pets:useClothing",
            data = {
                component = 3,
                drawable = 1,
                texture = 3,
            },
            close = true,
         }
    },
}
```


# pets.lua

```lua
---@alias PetLeashSettings { Bone: number, BoneName: string, BoneOffset: table }
---@alias PetFloatingUISetting { Bone: number, Offset: table; MenuOffset: table; BalloonOffset: table; StatsOffset: table }
---@alias CameraSettings { Bone: number, Offset: table, Rotation: table }
---@alias BallSettings { Enable: boolean, AttachBone: number, AttachBoneOffset: table }
---@alias PetDetails { Item: string, LeashSettings: PetLeashSettings, FloatingUISettings: PetFloatingUISetting, CameraCloseSettings: CameraSettings, BallSettings: BallSettings, Customization: any, Animations: any }
---@type table<string, PetDetails>
PetDetails = {
    ["cdev_dog_rott"] = {
        Item = "pet_chop",
        LeashSettings = {
            Bone = 39317,
            BoneName = "SKEL_Neck_1",
            BoneOffset = vector3(0.0, 0.15, -0.1),
        },
        FloatingUISettings = {
            Bone = 31086,
            Offset = vector3(0.0, 0.0, 0.6),
            MenuOffset = vector3(0.0, 0.05, 0.4),
            BalloonOffset = vector3(0.0, 0.0, 1.0),
            StatsOffset = vector3(-0.2, 0.0, -0.1)
        },
        CameraCloseSettings = {
            Bone = 31086,
            Offset = vector3(0.3, 1.2, 0.5),
            Rotation = vector3(0.0, 0.0, 160.0),
        },
        BallSettings = {
            Enable = true,
            AttachBone = 46240,
            AttachBoneOffset = vector3(0.14, 0.0, 0.05),
        },
        Animations = DogAnims["BigDog"]
    },
    ["cdev_dog_dobb"] = {
        Item = "pet_dobermann",
        LeashSettings = {
            Bone = 39317,
            BoneName = "SKEL_Neck_1",
            BoneOffset = vector3(0.0, 0.15, -0.1),
        },
        FloatingUISettings = {
            Bone = 31086,
            Offset = vector3(0.0, 0.0, 0.6),
            MenuOffset = vector3(0.0, 0.05, 0.4),
            BalloonOffset = vector3(0.0, 0.0, 1.0),
            StatsOffset = vector3(-0.2, 0.0, -0.1)
        },
        CameraCloseSettings = {
            Bone = 31086,
            Offset = vector3(0.3, 1.2, 0.5),
            Rotation = vector3(0.0, 0.0, 160.0),
        },
        BallSettings = {
            Enable = true,
            AttachBone = 46240,
            AttachBoneOffset = vector3(0.14, 0.0, 0.05),
        },
        Animations = DogAnims["BigDog"]
    },
    ["cdev_dog_golden"] = {
        Item = "pet_golden",
        LeashSettings = {
            Bone = 39317,
            BoneName = "SKEL_Neck_1",
            BoneOffset = vector3(0.0, 0.15, -0.1),
        },
        FloatingUISettings = {
            Bone = 31086,
            Offset = vector3(0.0, 0.0, 0.6),
            MenuOffset = vector3(0.0, 0.05, 0.4),
            BalloonOffset = vector3(0.0, 0.0, 1.0),
            StatsOffset = vector3(-0.2, 0.0, -0.1)
        },
        CameraCloseSettings = {
            Bone = 31086,
            Offset = vector3(0.3, 1.2, 0.5),
            Rotation = vector3(0.0, 0.0, 160.0),
        },
        BallSettings = {
            Enable = true,
            AttachBone = 46240,
            AttachBoneOffset = vector3(0.14, 0.0, 0.05),
        },
        Animations = DogAnims["BigDog"]
    },
    ["cdev_dog_husky"] = {
        Item = "pet_husky",
        LeashSettings = {
            Bone = 39317,
            BoneName = "SKEL_Neck_1",
            BoneOffset = vector3(0.0, 0.15, -0.1),
        },
        FloatingUISettings = {
            Bone = 31086,
            Offset = vector3(0.0, 0.0, 0.6),
            MenuOffset = vector3(0.0, 0.05, 0.4),
            BalloonOffset = vector3(0.0, 0.0, 1.0),
            StatsOffset = vector3(-0.2, 0.0, -0.1)
        },
        CameraCloseSettings = {
            Bone = 31086,
            Offset = vector3(0.3, 1.2, 0.5),
            Rotation = vector3(0.0, 0.0, 160.0),
        },
        BallSettings = {
            Enable = true,
            AttachBone = 46240,
            AttachBoneOffset = vector3(0.14, 0.0, 0.05),
        },
        Animations = DogAnims["BigDog"]
    },
    ["cdev_dog_gold"] = {
        Item = "pet_gold",
        LeashSettings = {
            Bone = 39317,
            BoneName = "SKEL_Neck_1",
            BoneOffset = vector3(0.0, 0.15, -0.1),
        },
        FloatingUISettings = {
            Bone = 31086,
            Offset = vector3(0.0, 0.0, 0.6),
            MenuOffset = vector3(0.0, 0.05, 0.4),
            BalloonOffset = vector3(0.0, 0.0, 1.0),
            StatsOffset = vector3(-0.2, 0.0, -0.1)
        },
        CameraCloseSettings = {
            Bone = 31086,
            Offset = vector3(0.3, 1.2, 0.5),
            Rotation = vector3(0.0, 0.0, 160.0),
        },
        BallSettings = {
            Enable = true,
            AttachBone = 46240,
            AttachBoneOffset = vector3(0.14, 0.0, 0.05),
        },
        Animations = DogAnims["BigDog"]
    },
    ["cdev_dog_pug"] = {
        Item = "pet_pug",
        LeashSettings = {
            Bone = 39317,
            BoneName = "SKEL_Neck1",
            BoneOffset = vector3(0.0, 0.15, -0.1),
        },
        FloatingUISettings = {
            Bone = 31086,
            Offset = vector3(0.0, 0.0, 0.6),
            MenuOffset = vector3(0.0, 0.05, 0.4),
            BalloonOffset = vector3(0.0, 0.0, 1.0),
            StatsOffset = vector3(-0.2, 0.0, -0.1)
        },
        CameraCloseSettings = {
            Bone = 31086,
            Offset = vector3(0.3, 1.2, 0.5),
            Rotation = vector3(0.0, 0.0, 160.0),
        },
        BallSettings = {
            Enable = true,
            AttachBone = 46240,
            AttachBoneOffset = vector3(0.14, 0.0, 0.05),
        },
        Animations = DogAnims["SmallDog"],
    },
    ["cdev_dog_shusky"] ={
        Item = "pet_shusky",
        LeashSettings = {
            Bone = 39317,
            BoneName = "SKEL_Neck1",
            BoneOffset = vector3(0.0, 0.15, -0.1),
        },
        FloatingUISettings = {
            Bone = 31086,
            Offset = vector3(0.0, 0.0, 0.6),
            MenuOffset = vector3(0.0, 0.05, 0.4),
            BalloonOffset = vector3(0.0, 0.0, 1.0),
            StatsOffset = vector3(-0.2, 0.0, -0.1)
        },
        CameraCloseSettings = {
            Bone = 31086,
            Offset = vector3(0.3, 1.2, 0.5),
            Rotation = vector3(0.0, 0.0, 160.0),
        },
        BallSettings = {
            Enable = true,
            AttachBone = 46240,
            AttachBoneOffset = vector3(0.14, 0.0, 0.05),
        },
        Animations = DogAnims["SmallDog"],
    },
    ["cdev_dog_frbull"] = {
        Item = "pet_frbul",
        LeashSettings = {
            Bone = 39317,
            BoneName = "SKEL_Neck1",
            BoneOffset = vector3(0.0, 0.15, -0.1),
        },
        FloatingUISettings = {
            Bone = 31086,
            Offset = vector3(0.0, 0.0, 0.6),
            MenuOffset = vector3(0.0, 0.05, 0.4),
            BalloonOffset = vector3(0.0, 0.0, 1.0),
            StatsOffset = vector3(-0.2, 0.0, -0.1)
        },
        CameraCloseSettings = {
            Bone = 31086,
            Offset = vector3(0.3, 1.2, 0.5),
            Rotation = vector3(0.0, 0.0, 160.0),
        },
        BallSettings = {
            Enable = true,
            AttachBone = 46240,
            AttachBoneOffset = vector3(0.14, 0.0, 0.05),
        },
        Animations = DogAnims["SmallDog"],
        SkipVehicleScenarios = true,
    },
    ["cdev_dog_bully"] = {
        Item = "pet_bully",
        LeashSettings = {
            Bone = 39317,
            BoneName = "SKEL_Neck_1",
            BoneOffset = vector3(0.0, 0.15, -0.1),
        },
        FloatingUISettings = {
            Bone = 31086,
            Offset = vector3(0.0, 0.0, 0.6),
            MenuOffset = vector3(0.0, 0.05, 0.4),
            BalloonOffset = vector3(0.0, 0.0, 1.0),
            StatsOffset = vector3(-0.2, 0.0, -0.1)
        },
        CameraCloseSettings = {
            Bone = 31086,
            Offset = vector3(0.3, 1.2, 0.5),
            Rotation = vector3(0.0, 0.0, 160.0),
        },
        BallSettings = {
            Enable = true,
            AttachBone = 46240,
            AttachBoneOffset = vector3(0.14, 0.0, 0.05),
        },
        Animations = DogAnims["BigDog"],
    },
    ["cdev_dog_pitt"] = {
        Item = "pet_pitt",
        LeashSettings = {
            Bone = 39317,
            BoneName = "SKEL_Neck_1",
            BoneOffset = vector3(0.0, 0.15, -0.1),
        },
        FloatingUISettings = {
            Bone = 31086,
            Offset = vector3(0.0, 0.0, 0.6),
            MenuOffset = vector3(0.0, 0.05, 0.4),
            BalloonOffset = vector3(0.0, 0.0, 1.0),
            StatsOffset = vector3(-0.2, 0.0, -0.1)
        },
        CameraCloseSettings = {
            Bone = 31086,
            Offset = vector3(0.3, 1.2, 0.5),
            Rotation = vector3(0.0, 0.0, 160.0),
        },
        BallSettings = {
            Enable = true,
            AttachBone = 46240,
            AttachBoneOffset = vector3(0.14, 0.0, 0.05),
        },
        Animations = DogAnims["BigDog"],
    },
    ["cdev_dog_shep"] = {
        Item = "pet_shep",
        LeashSettings = {
            Bone = 39317,
            BoneName = "SKEL_Neck_1",
            BoneOffset = vector3(0.0, 0.15, -0.1),
        },
        FloatingUISettings = {
            Bone = 31086,
            Offset = vector3(0.0, 0.0, 0.6),
            MenuOffset = vector3(0.0, 0.05, 0.4),
            BalloonOffset = vector3(0.0, 0.0, 1.0),
            StatsOffset = vector3(-0.2, 0.0, -0.1)
        },
        CameraCloseSettings = {
            Bone = 31086,
            Offset = vector3(0.3, 1.2, 0.5),
            Rotation = vector3(0.0, 0.0, 160.0),
        },
        BallSettings = {
            Enable = true,
            AttachBone = 46240,
            AttachBoneOffset = vector3(0.14, 0.0, 0.05),
        },
        Animations = DogAnims["BigDog"],
    },
    ["cdev_dog_chow"] = {
        Item = "pet_chow",
        LeashSettings = {
            Bone = 39317,
            BoneName = "SKEL_Neck_1",
            BoneOffset = vector3(0.0, 0.15, -0.1),
        },
        FloatingUISettings = {
            Bone = 31086,
            Offset = vector3(0.0, 0.0, 0.6),
            MenuOffset = vector3(0.0, 0.05, 0.4),
            BalloonOffset = vector3(0.0, 0.0, 1.0),
            StatsOffset = vector3(-0.2, 0.0, -0.1)
        },
        CameraCloseSettings = {
            Bone = 31086,
            Offset = vector3(0.3, 1.2, 0.5),
            Rotation = vector3(0.0, 0.0, 160.0),
        },
        BallSettings = {
            Enable = true,
            AttachBone = 46240,
            AttachBoneOffset = vector3(0.14, 0.0, 0.05),
        },
        Animations = DogAnims["BigDog"],
    },
    ["cdev_dog_dal"] = {
        Item = "pet_dal",
        LeashSettings = {
            Bone = 39317,
            BoneName = "SKEL_Neck_1",
            BoneOffset = vector3(0.0, 0.15, -0.1),
        },
        FloatingUISettings = {
            Bone = 31086,
            Offset = vector3(0.0, 0.0, 0.6),
            MenuOffset = vector3(0.0, 0.05, 0.4),
            BalloonOffset = vector3(0.0, 0.0, 1.0),
            StatsOffset = vector3(-0.2, 0.0, -0.1)
        },
        CameraCloseSettings = {
            Bone = 31086,
            Offset = vector3(0.3, 1.2, 0.5),
            Rotation = vector3(0.0, 0.0, 160.0),
        },
        BallSettings = {
            Enable = true,
            AttachBone = 46240,
            AttachBoneOffset = vector3(0.14, 0.0, 0.05),
        },
        Animations = DogAnims["BigDog"],
    },
    ["cdev_dog_mal"] = {
        Item = "pet_mal",
        LeashSettings = {
            Bone = 39317,
            BoneName = "SKEL_Neck_1",
            BoneOffset = vector3(0.0, 0.15, -0.1),
        },
        FloatingUISettings = {
            Bone = 31086,
            Offset = vector3(0.0, 0.0, 0.6),
            MenuOffset = vector3(0.0, 0.05, 0.4),
            BalloonOffset = vector3(0.0, 0.0, 1.0),
            StatsOffset = vector3(-0.2, 0.0, -0.1)
        },
        CameraCloseSettings = {
            Bone = 31086,
            Offset = vector3(0.3, 1.2, 0.5),
            Rotation = vector3(0.0, 0.0, 160.0),
        },
        BallSettings = {
            Enable = true,
            AttachBone = 46240,
            AttachBoneOffset = vector3(0.14, 0.0, 0.05),
        },
        Animations = DogAnims["BigDog"],
    },
    ["cdev_dog_terrier"] = {
        Item = "pet_terrierk",
        LeashSettings = {
            Bone = 39317,
            BoneName = "SKEL_Neck_1",
            BoneOffset = vector3(0.0, 0.15, -0.1),
        },
        FloatingUISettings = {
            Bone = 31086,
            Offset = vector3(0.0, 0.0, 0.6),
            MenuOffset = vector3(0.0, 0.05, 0.4),
            BalloonOffset = vector3(0.0, 0.0, 1.0),
            StatsOffset = vector3(-0.2, 0.0, -0.1)
        },
        CameraCloseSettings = {
            Bone = 31086,
            Offset = vector3(0.3, 1.2, 0.5),
            Rotation = vector3(0.0, 0.0, 160.0),
        },
        BallSettings = {
            Enable = true,
            AttachBone = 46240,
            AttachBoneOffset = vector3(0.14, 0.0, 0.05),
        },
        Animations = DogAnims["BigDog"],
    },
    ["cdev_dog_minipitt"] = {
        Item = "pet_minpit",
        LeashSettings = {
            Bone = 39317,
            BoneName = "SKEL_Neck1",
            BoneOffset = vector3(0.0, 0.15, -0.1),
        },
        FloatingUISettings = {
            Bone = 31086,
            Offset = vector3(0.0, 0.0, 0.6),
            MenuOffset = vector3(0.0, 0.05, 0.4),
            BalloonOffset = vector3(0.0, 0.0, 1.0),
            StatsOffset = vector3(-0.2, 0.0, -0.1)
        },
        CameraCloseSettings = {
            Bone = 31086,
            Offset = vector3(0.3, 1.2, 0.5),
            Rotation = vector3(0.0, 0.0, 160.0),
        },
        BallSettings = {
            Enable = true,
            AttachBone = 46240,
            AttachBoneOffset = vector3(0.14, 0.0, 0.05),
        },
        Animations = DogAnims["SmallDog"],
    },
    ["cdev_dog_chiua"] = {
        Item = "pet_chiua",
        LeashSettings = {
            Bone = 39317,
            BoneName = "SKEL_Neck1",
            BoneOffset = vector3(0.0, 0.15, -0.1),
        },
        FloatingUISettings = {
            Bone = 31086,
            Offset = vector3(0.0, 0.0, 0.6),
            MenuOffset = vector3(0.0, 0.05, 0.4),
            BalloonOffset = vector3(0.0, 0.0, 1.0),
            StatsOffset = vector3(-0.2, 0.0, -0.1)
        },
        CameraCloseSettings = {
            Bone = 31086,
            Offset = vector3(0.3, 1.2, 0.5),
            Rotation = vector3(0.0, 0.0, 160.0),
        },
        BallSettings = {
            Enable = true,
            AttachBone = 46240,
            AttachBoneOffset = vector3(0.14, 0.0, 0.05),
        },
        Animations = DogAnims["SmallDog"],
    },
    ["cdev_dog_dash"] = {
        Item = "pet_dash",
        LeashSettings = {
            Bone = 39317,
            BoneName = "SKEL_Neck1",
            BoneOffset = vector3(0.0, 0.15, -0.1),
        },
        FloatingUISettings = {
            Bone = 31086,
            Offset = vector3(0.0, 0.0, 0.6),
            MenuOffset = vector3(0.0, 0.05, 0.4),
            BalloonOffset = vector3(0.0, 0.0, 1.0),
            StatsOffset = vector3(-0.2, 0.0, -0.1)
        },
        CameraCloseSettings = {
            Bone = 31086,
            Offset = vector3(0.3, 1.2, 0.5),
            Rotation = vector3(0.0, 0.0, 160.0),
        },
        Gender = {
            DrawableId = "0",
        },
        BallSettings = {
            Enable = true,
            AttachBone = 46240,
            AttachBoneOffset = vector3(0.14, 0.0, 0.05),
        },
        Animations = DogAnims["SmallDog"],
    },
    ["cdev_dog_york"] = {
        Item = "pet_york",
        LeashSettings = {
            Bone = 39317,
            BoneName = "SKEL_Neck1",
            BoneOffset = vector3(0.0, 0.15, -0.1),
        },
        FloatingUISettings = {
            Bone = 31086,
            Offset = vector3(0.0, 0.0, 0.6),
            MenuOffset = vector3(0.0, 0.05, 0.4),
            BalloonOffset = vector3(0.0, 0.0, 1.0),
            StatsOffset = vector3(-0.2, 0.0, -0.1)
        },
        CameraCloseSettings = {
            Bone = 31086,
            Offset = vector3(0.3, 1.2, 0.5),
            Rotation = vector3(0.0, 0.0, 160.0),
        },
        BallSettings = {
            Enable = true,
            AttachBone = 46240,
            AttachBoneOffset = vector3(0.14, 0.0, 0.05),
        },
        Animations = DogAnims["SmallDog"],
    },
    -- cats
    ["cdev_cat_turk"] = {
        Item = "pet_turk",
        LeashSettings = {
            Bone = 39317,
            BoneName = "SKEL_Neck1",
            BoneOffset = vector3(0.0, 0.15, -0.1),
        },
        FloatingUISettings = {
            Bone = 31086,
            Offset = vector3(0.0, 0.0, 0.6),
            MenuOffset = vector3(0.0, 0.05, 0.4),
            BalloonOffset = vector3(0.0, 0.0, 1.0),
            StatsOffset = vector3(-0.2, 0.0, -0.1)
        },
        CameraCloseSettings = {
            Bone = 31086,
            Offset = vector3(0.3, 1.2, 0.5),
            Rotation = vector3(0.0, 0.0, 160.0),
        },
        BallSettings = {
            Enable = true,
            AttachBone = 46240,
            AttachBoneOffset = vector3(0.14, 0.0, 0.05),
        },
        Animations = DogAnims["Cat"]
    },
    ["cdev_cat_amer"] = {
        Item = "pet_amer",
        LeashSettings = {
            Bone = 39317,
            BoneName = "SKEL_Neck1",
            BoneOffset = vector3(0.0, 0.15, -0.1),
        },
        FloatingUISettings = {
            Bone = 31086,
            Offset = vector3(0.0, 0.0, 0.6),
            MenuOffset = vector3(0.0, 0.05, 0.4),
            BalloonOffset = vector3(0.0, 0.0, 1.0),
            StatsOffset = vector3(-0.2, 0.0, -0.1)
        },
        CameraCloseSettings = {
            Bone = 31086,
            Offset = vector3(0.3, 1.2, 0.5),
            Rotation = vector3(0.0, 0.0, 160.0),
        },
        BallSettings = {
            Enable = true,
            AttachBone = 46240,
            AttachBoneOffset = vector3(0.14, 0.0, 0.05),
        },
        Animations = DogAnims["Cat"]
    }
}
```


# shop.lua

List is shortened

```lua
---@type PetShopItem[]
PetShopItems = {
    {
        PetShopId = "pet_hottweiler",
        key = "pet_chop",
        label = "Hottweiler",
        hasFemale = true,
        price = 5000,
        category = "pet_category_pets",
        description = "A Hottweiler",
        canBeK9 = true,
    },
    {
        PetShopId = "pet_dobermann_basic",
        key = "pet_dobermann",
        label = "Dobermann",
        hasFemale = false,
        price = 5000,
        category = "pet_category_pets",
        description = "A Dobermann",
        canBeK9 = true,
    },
    {
        PetShopId = "pet_dobermann_black_yelloweye",
        key = "pet_dobermann",
        thumbnail = "pet_dobberman_black_yelloweye.webp",
        label = "Dobermann",
        hasFemale = true,
        isPremiumPackage = true,
        price = 5000,
        category = "pet_category_pets",
        description = "A Dobermann",
        customization = {
            drawables = {
                ["4"] = 0,
            },
            textures = {
                ["4"] = 1
            }
        },
        canBeK9 = true,
    },
    {
        PetShopId = "pet_dobermann_black",
        key = "pet_dobermann",
        thumbnail = "pet_dobermann_black.webp",
        label = "Dobermann",
        hasFemale = true,
        isPremiumPackage = true,
        price = 5000,
        category = "pet_category_pets",
        description = "A Dobermann",
        customization = {
            drawables = {
                ["4"] = 0,
            },
            textures = {
                ["4"] = 2
            }
        },
        canBeK9 = true,
    },
    {
        PetShopId = "pet_golden_retriever",
        key = "pet_golden",
        label = "Golden Retriever",
        isPremiumPackage = true,
        price = 5000,
        category = "pet_category_pets",
        description = "A Golden Retriever",
        canBeK9 = true,
    },
    {
        PetShopId = "pet_husky_gray",
        key = "pet_husky",
        thumbnail = "pet_husky_gray.webp",
        label = "Husky Gray",
        hasFemale = true,
        isPremiumPackage = true,
        price = 5000,
        category = "pet_category_pets",
        description = "A Husky",
        canBeK9 = true,
    },
    {
        PetShopId = "pet_husky_caramel",
        key = "pet_husky",
        thumbnail = "pet_husky_caramel.webp",
        hasFemale = true,
        label = "Husky Caramel",
        isPremiumPackage = true,
        price = 5000,
        category = "pet_category_pets",
        description = "A Husky",
        customization = {
            drawables = {
                ["4"] = 0,
                ["3"] = 0,
            },
            textures = {
                ["4"] = 1,
                ["3"] = 1,
            }
        },
        canBeK9 = true,
    },
    {
        PetShopId = "pet_gold",
        key = "pet_gold",
        label = "Golden Retriever",
        isPremiumPackage = true,
        price = 5000,
        category = "pet_category_pets",
        description = "A Golden Retriever",
        canBeK9 = true,
    },
    {
        PetShopId = "pet_pug",
        key = "pet_pug",
        label = "Pug",
        hasFemale = true,
        price = 5000,
        category = "pet_category_pets",
        description = "A Pug",
        canBeK9 = false,
        isPremiumPackage = true,
    },
    {
        PetShopId = "pet_shusky",
        key = "pet_shusky",
        label = "Small Husky",
        hasFemale = true,
        isPremiumPackage = true,
        price = 5000,
        category = "pet_category_pets",
        description = "A Small Husky",
        canBeK9 = true,
    },
    {
        PetShopId = "pet_chiua",
        key = "pet_chiua",
        label = "Chihuahua",
        hasFemale = true,
        price = 5000,
        category = "pet_category_pets",
        description = "A Chihuahua",
        canBeK9 = false,
        isPremiumPackage = true,
    },
    {
        PetShopId = "pet_dash",
        key = "pet_dash",
        label = "Dachshund",
        hasFemale = true,
        price = 5000,
        category = "pet_category_pets",
        description = "A Dachshund",
        canBeK9 = false,
        isPremiumPackage = true,
    },
    {
        PetShopId = "pet_york",
        key = "pet_york",
        label = "Yorkshire Terrier",
        hasFemale = true,
        price = 5000,
        category = "pet_category_pets",
        description = "A Yorkshire Terrier",
        canBeK9 = false,
        isPremiumPackage = true,
    },
    {
        PetShopId = "pet_terrierk",
        key = "pet_terrierk",
        label = "Terrier",
        hasFemale = true,
        price = 5000,
        category = "pet_category_pets",
        description = "A Terrier",
        canBeK9 = false,
        isPremiumPackage = true,
    },
    {
        PetShopId = "pet_husky_white",
        key = "pet_husky",
        thumbnail = "pet_husky_white.webp",
        label = "Husky White",
        isPremiumPackage = true,
        price = 5000,
        hasFemale = true,
        category = "pet_category_pets",
        description = "A Husky",
        customization = {
            drawables = {
                ["4"] = 0,
                ["3"] = 0,
            },
            textures = {
                ["4"] = 2,
                ["3"] = 2,
            }
        },
        canBeK9 = true,
    },
    {
        PetShopId = "pet_bulldog_black",
        key = "pet_frbul",
        thumbnail = "pet_frbull_black.webp",
        hasFemale = true,
        label = "Bulldog Black",
        isPremiumPackage = true,
        price = 5000,
        category = "pet_category_pets",
        description = "A Bulldog",
    },
    {
        PetShopId = "pet_turk_white_heterochromia",
        key = "pet_turk",
        thumbnail = "pet_turk_white_heterochromia.webp",
        label = "White Heterochromia Cat",
        isPremiumPackage = true,
        price = 5000,
        category = "pet_category_pets",
        description = "An Orange Turkish Cat",
        canBeK9 = false,
    },
    {
        PetShopId = "pet_turk_black",
        key = "pet_turk",
        label = "Black Turkish Cat",
        thumbnail = "pet_turk_black.webp",
        isPremiumPackage = true,
        price = 5000,
        customization = {
            drawables = {
                ["0"] = 0,
                ["3"] = 0,
                ["6"] = 0,
            },
            textures = {
                ["0"] = 1,
                ["3"] = 1,
                ["6"] = 1,
            }
        },
        category = "pet_category_pets",
        description = "A Turkish Cat",
        canBeK9 = false,
    },
    {
        PetShopId = "pet_turk_white",
        key = "pet_turk",
        label = "White Turkish Cat",
        thumbnail = "pet_turk_white.webp",
        isPremiumPackage = true,
        price = 5000,
        customization = {
            drawables = {
                ["0"] = 0,
                ["3"] = 0,
                ["6"] = 0,
            },
            textures = {
                ["0"] = 2,
                ["3"] = 2,
                ["6"] = 2,
            }
        },
        category = "pet_category_pets",
        description = "A Turkish Cat",
        canBeK9 = false,
    },
    {
        PetShopId = "pet_turk_grey",
        key = "pet_turk",
        label = "Grey Turkish Cat",
        thumbnail = "pet_turk_grey.webp",
        isPremiumPackage = true,
        price = 5000,
        customization = {
            drawables = {
                ["0"] = 0,
                ["3"] = 0,
                ["6"] = 0,
            },
            textures = {
                ["0"] = 3,
                ["3"] = 3,
                ["6"] = 3,
            }
        },
        category = "pet_category_pets",
        description = "A Turkish Cat",
        canBeK9 = false,
    },
    {
        PetShopId = "pet_turk_snow_1",
        key = "pet_turk",
        label = "Snow Turkish Cat 1",
        thumbnail = "pet_turk_snow.webp",
        isPremiumPackage = true,
        price = 5000,
        customization = {
            drawables = {
                ["0"] = 0,
                ["3"] = 0,
                ["6"] = 0,
            },
            textures = {
                ["0"] = 4,
                ["3"] = 4,
                ["6"] = 4,
            }
        },
        category = "pet_category_pets",
        description = "A Turkish Cat",
        canBeK9 = false,
    },
    {
        PetShopId = "pet_turk_snow_2",
        key = "pet_turk",
        label = "Snow Turkish Cat 2",
        thumbnail = "pet_turk_snow_2.webp",
        isPremiumPackage = true,
        price = 5000,
        customization = {
            drawables = {
                ["0"] = 0,
                ["3"] = 0,
                ["6"] = 0,
            },
            textures = {
                ["0"] = 5,
                ["3"] = 5,
                ["6"] = 5,
            }
        },
        category = "pet_category_pets",
        description = "A Turkish Cat",
        canBeK9 = false,
    },
    {
        PetShopId = "pet_turk_snow_3",
        key = "pet_turk",
        label = "Snow Turkish Cat 3",
        thumbnail = "pet_turk_snow_3.webp",
        isPremiumPackage = true,
        price = 5000,
        customization = {
            drawables = {
                ["0"] = 0,
                ["3"] = 0,
                ["6"] = 0,
            },
            textures = {
                ["0"] = 6,
                ["3"] = 6,
                ["6"] = 6,
            }
        },
        category = "pet_category_pets",
        description = "A Turkish Cat",
        canBeK9 = false,
    },
    {
        PetShopId = "pet_turk_snow_4",
        key = "pet_turk",
        label = "Snow Turkish Cat 4",
        thumbnail = "pet_turk_snow_4.webp",
        isPremiumPackage = true,
        price = 5000,
        customization = {
            drawables = {
                ["0"] = 0,
                ["3"] = 0,
                ["6"] = 0,
            },
            textures = {
                ["0"] = 7,
                ["3"] = 7,
                ["6"] = 7,
            }
        },
        category = "pet_category_pets",
        description = "A Turkish Cat",
        canBeK9 = false,
    },
    {
        PetShopId = "pet_amer_orange",
        key = "pet_amer",
        thumbnail = "pet_amer_orange.webp",
        label = "Orange American Cat",
        price = 5000,
        category = "pet_category_pets",
        description = "An American Cat",
        canBeK9 = false,
    },
    {
        PetShopId = "pet_amer_grey",
        key = "pet_amer",
        thumbnail = "pet_amer_grey.webp",
        label = "Grey American Cat",
        price = 5000,
        customization = {
            drawables = {
                ["0"] = 0,
                ["3"] = 0,
                ["6"] = 0,
            },
            textures = {
                ["0"] = 1,
                ["3"] = 1,
                ["6"] = 1,
            }
        },
        category = "pet_category_pets",
        description = "An American Cat",
        canBeK9 = false,
    },
    {
        PetShopId = "pet_amer_white",
        key = "pet_amer",
        thumbnail = "pet_amer_white.webp",
        label = "White American Cat",
        price = 5000,
        customization = {
            drawables = {
                ["0"] = 0,
                ["3"] = 0,
                ["6"] = 0,
            },
            textures = {
                ["0"] = 2,
                ["3"] = 2,
                ["6"] = 2,
            }
        },
        category = "pet_category_pets",
        description = "An American Cat",
        canBeK9 = false,
    },
    {
        PetShopId = "pet_amer_gray",
        key = "pet_amer",
        thumbnail = "pet_amer_gray.webp",
        label = "Gray American Cat",
        price = 5000,
        customization = {
            drawables = {
                ["0"] = 0,
                ["3"] = 0,
                ["6"] = 0,
            },
            textures = {
                ["0"] = 3,
                ["3"] = 3,
                ["6"] = 3,
            }
        },
        category = "pet_category_pets",
        description = "An American Cat",
        canBeK9 = false,
    },
    {
        PetShopId = "pet_amer_black",
        key = "pet_amer",
        thumbnail = "pet_amer_black.webp",
        label = "Black American Cat",
        price = 5000,
        customization = {
            drawables = {
                ["0"] = 0,
                ["3"] = 0,
                ["6"] = 0,
            },
            textures = {
                ["0"] = 4,
                ["3"] = 4,
                ["6"] = 4,
            }
        },
        category = "pet_category_pets",
        description = "An American Cat",
        canBeK9 = false,
    },
    {
        PetShopId = "pet_amer_blue_eyes_orange",
        key = "pet_amer",
        thumbnail = "pet_amer_blue_eyes_orange.webp",
        label = "Blue Eyes Orange American Cat",
        price = 5000,
        customization = {
            drawables = {
                ["0"] = 0,
                ["3"] = 0,
                ["6"] = 0,
            },
            textures = {
                ["0"] = 5,
                ["3"] = 5,
                ["6"] = 5,
            }
        },
        category = "pet_category_pets",
        description = "An American Cat",
        canBeK9 = false,
    },
    {
        PetShopId = "pet_amer_brown",
        key = "pet_amer",
        thumbnail = "pet_amer_brown.webp",
        label = "Brown American Cat",
        price = 5000,
        customization = {
            drawables = {
                ["0"] = 0,
                ["3"] = 0,
                ["6"] = 0,
            },
            textures = {
                ["0"] = 6,
                ["3"] = 6,
                ["6"] = 6,
            }
        },
        category = "pet_category_pets",
        description = "An American Cat",
        canBeK9 = false,
    },
    {
        PetShopId = "pet_amer_white_grey",
        key = "pet_amer",
        thumbnail = "pet_amer_white_grey.webp",
        label = "White and Grey American Cat",
        price = 5000,
        customization = {
            drawables = {
                ["0"] = 0,
                ["3"] = 0,
                ["6"] = 0,
            },
            textures = {
                ["0"] = 7,
                ["3"] = 7,
                ["6"] = 7,
            }
        },
        category = "pet_category_pets",
        description = "An American Cat",
        canBeK9 = false,
    },
    {
        PetShopId = "pet_amer_black_orange_eyes",
        key = "pet_amer",
        thumbnail = "pet_amer_black_orange_eyes.webp",
        label = "Black Orange Eyes American Cat",
        price = 5000,
        customization = {
            drawables = {
                ["0"] = 0,
                ["3"] = 0,
                ["6"] = 0,
            },
            textures = {
                ["0"] = 8,
                ["3"] = 8,
                ["6"] = 8,
            }
        },
        category = "pet_category_pets",
        description = "An American Cat",
        canBeK9 = false,
    },
    {
        PetShopId = "pet_frbul_brown",
        key = "pet_frbul",
        thumbnail = "pet_frbull_brown.webp",
        hasFemale = true,
        label = "Bulldog Brown",
        isPremiumPackage = true,
        price = 5000,
        category = "pet_category_pets",
        description = "A Bulldog",
        customization = {
            drawables = {
                ["4"] = 0,
            },
            textures = {
                ["4"] = 1,
            }
        },
    },
    {
        PetShopId = "pet_frbul_caramel",
        key = "pet_frbul",
        thumbnail = "pet_frbull_caramel.webp",
        hasFemale = true,
        label = "Bulldog Caramel",
        isPremiumPackage = true,
        price = 5000,
        category = "pet_category_pets",
        description = "A Bulldog",
        customization = {
            drawables = {
                ["4"] = 0,
            },
            textures = {
                ["4"] = 2,
            }
        },
    },
    {
        PetShopId = "pet_bully_white",
        key = "pet_bully",
        thumbnail = "pet_bully_white.webp",
        hasFemale = true,
        label = "American Bully White",
        isPremiumPackage = true,
        price = 5000,
        category = "pet_category_pets",
        description = "An American Bully White",
    },
    {
        PetShopId = "pet_bully_black",
        key = "pet_bully",
        thumbnail = "pet_bully_black.webp",
        hasFemale = true,
        label = "American Bully Black",
        isPremiumPackage = true,
        price = 5000,
        category = "pet_category_pets",
        description = "An American Bully Black",
        customization = {
            drawables = {
                ["4"] = 0,
            },
            textures = {
                ["4"] = 1,
            }
        },
    },
}
```


# Migrate to Clothing V2

{% hint style="danger" %}
**Warning: The `cdev_pets` version must be 2.9.0 or higher, and the `cdev_lib` version must be 2.6.0 or higher.**
{% endhint %}

To proceed, simply start the script and execute the command `migratetoclothingv2`. After that, restart the script.

You can refer to the video example below for further guidance.

{% embed url="<https://drive.google.com/file/d/1gWEOeHKGT4tpGgLedUYduqxIOLi3zjBr/view>" %}


# FAQ

## How can I add another job to use the K9 pet?

***

You can add another job by configuring the `IsPlayerAllowedToBuyK9` function, which you can find in the file `cdev_pets > public > server > api.lua`.

Suppose the other job you want to add is named **Xerif**, then the code will look like this:

```
PetResourceAPI.IsPlayerAllowedToBuyK9 = function(source)
    local jobName, grade = clib.api.Character.GetCharacterJobFromSource(source)

    if jobName ~= "police" and jobName ~= "Xerif" then
        return false
    end

    return true
end
```

## How stop Dog Attack?

***

After the pet starts attacking the player or NPC, keep holding the G key until it obeys your command to stop attacking.

## Issue with DrawText for players in Asia how Fix it?

***

**To fix the DrawText issue, go to `cdev_lib > public > config > config.lua` (lines 31 and 32) and change them to match the code below exactly.**

<figure><img src="https://1004862655-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPhIA9eCA4bwgx77hxx4i%2Fuploads%2FksNZj8GVSSemy0DxFReV%2FErro.png?alt=media&amp;token=f4bb8fea-ef55-486a-8a24-92f35d38a8dc" alt=""><figcaption></figcaption></figure>

> ```lua
> DrawTextConfig = {
>         OverrideDrawtextFont = true,
>         OverrideDrawtextFontId = 4
>     },
> ```

***

## **How Pet Stamina System Work ?**

***

{% hint style="info" %}
Stamina represents your pet’s physical energy. It is consumed when the pet performs activities and regenerated only under specific conditions.
{% endhint %}

### 📍 Where are stamina settings located?

All stamina-related configuration values can be found here:

```
cdev_pets/public/config/config.lua
```

***

### ⚙️ Stamina Configuration Values

```lua
StaminaDecreaseFollowingPerTick = 4,
StaminaDecreaseFromFetch = 4,
StaminaIncreaseWhileSleepingPerTick = 2,
StaminaChangeWhileSleepingNotify = 1,
StaminaDecreaseWhenAttacking = 5,
```

***

### ⏱️ How often does stamina update? (AI Tick)

Stamina does **not** update every second.\
It updates based on the server’s AI Tick system:

```lua
AI = {
    TickFrequency = 60, -- in seconds
}
```

#### 🔎 Meaning:

**Stamina is updated only once every 60 seconds (1 minute).**

Whether the pet is following, sleeping, or performing an action, stamina will only change at each tick.

***

## 😴 How Stamina Regenerates

Stamina increases **only** when the pet is properly sleeping in its bed.

#### Regeneration Rate:

```lua
StaminaIncreaseWhileSleepingPerTick = 2
```

| State               | Stamina Change | Amount            |
| ------------------- | -------------- | ----------------- |
| **Sleeping in bed** | Increase       | **+2 per minute** |

#### ⚠️ Important Requirement

{% hint style="danger" %}
**You (the owner) must remain near the pet while it sleeps.**\
If you move too far away, the pet may leave the sleeping state and stamina will stop regenerating.
{% endhint %}

{% hint style="warning" %}
**If your pet is very** <mark style="color:$success;">hungry</mark> **or very** <mark style="color:$success;">thirsty</mark>**, it will lose stamina — even while sleeping.**
{% endhint %}

***

## 📉 Stamina Consumption (Default Config)

Below is a complete list of all actions that reduce stamina.

***

### 🐕 Following

| Action              | Stamina Change    | Value             |
| ------------------- | ----------------- | ----------------- |
| Following the owner | Decrease per tick | **–4 per minute** |

***

### 🎾 Fetching (Toy/Ball)

```lua
StaminaDecreaseFromFetch = 4
```

| Action      | Stamina Change    |
| ----------- | ----------------- |
| Fetch a toy | **–4 per action** |

***

### 🐺 Attacking

```lua
StaminaDecreaseWhenAttacking = 5
```

| Action | Stamina Change    |
| ------ | ----------------- |
| Attack | **–5 per action** |

***

## 🎓 Training Activities

Training stamina costs are configured here:

```lua
training = {
    Cones = { StaminaDecrease = 5 },
    Ramp  = { StaminaDecrease = 7 },
    Dummy = { StaminaDecrease = 7 },
    Hoop  = { StaminaDecrease = 7 }
}
```

#### Training Stamina Costs

| Training                   | Stamina Cost |
| -------------------------- | ------------ |
| **Cones**                  | –5           |
| **Ramp**                   | –7           |
| **Dummy (Practice Dummy)** | –7           |
| **Hoop (Ring)**            | –7           |

***

## 💤 Tired State (Stamina = 0)

When stamina reaches **0**, the pet becomes **Tired**.

Effects:

* Cannot attack
* Cannot train
* Cannot fetch
* Cannot perform demanding actions
* May whine or show tired mood
* Must sleep to recover stamina

***

## 📘 Complete Stamina Overview (Summary Table)

| Situation           | Change | Amount                | Notes                  |
| ------------------- | ------ | --------------------- | ---------------------- |
| Pet sleeping in bed | +      | **+2 / minute**       | Owner must stay close  |
| Pet following owner | –      | **–4 / minute**       | Tick = 60s             |
| Fetch toy           | –      | **–4 / action**       | Instant                |
| Attack              | –      | **–5 / action**       | Instant                |
| Cones training      | –      | **–5**                | Requires stamina       |
| Ramp training       | –      | **–7**                | Requires stamina       |
| Dummy training      | –      | **–7**                | Requires stamina       |
| Hoop training       | –      | **–7**                | Requires stamina       |
| Stamina minimum     | 0      | Pet becomes **Tired** | Cannot perform actions |

***

## 🛠 Balancing Tips (Optional)

| Goal                                 | Change                                         |
| ------------------------------------ | ---------------------------------------------- |
| Faster stamina recovery              | Increase `StaminaIncreaseWhileSleepingPerTick` |
| Slower stamina drain while following | Lower `StaminaDecreaseFollowingPerTick`        |
| Faster stat updates                  | Reduce `AI.TickFrequency` (use with caution)   |

***

## 💡 Additional Notes

* Stamina is clamped between **0 and 100**.
* Notifications are sent every time **increase**.
* Stamina changes happen at **tick intervals**, not instantly.
* The pet must be truly *inside* the bed’s interaction area to start sleeping.

***

## My K9 dog is not dealing damage to the player it was ordered to attack how fix it?

***

⚠ <mark style="color:yellow;">**Attention:**</mark> <mark style="color:red;">**Your**</mark> <mark style="color:yellow;">**K9**</mark> <mark style="color:red;">**will not deal damage to the player because the setting**</mark> <kbd>**EnableAttackUpdate**</kbd><mark style="color:red;">**is enabled in the configuration file:**</mark>\
`cdev_pets > public > config > config.lua` (lines 39–40).

**With this setting&#x20;**<mark style="color:yellow;">**enabled**</mark>**, only&#x20;**<mark style="color:yellow;">**K9**</mark>**&#x20;pets are&#x20;**<mark style="color:red;">**allowed to attack**</mark>**, and they will&#x20;**<mark style="color:yellow;">**only target players**</mark>**. However, they will not cause any&#x20;**<mark style="color:red;">**damage**</mark>**&#x20;— they will simply&#x20;**<mark style="color:yellow;">**knock the player down and immobilize**</mark>**&#x20;them, making the behavior more realistic, just like a real-life K9 unit.**

**Now, if you want the pet to deal damage to the player, you will need to make some changes in the file**\
`cdev_pets > public > config > config.lua` **as shown below.**

```lua
    -- if true, pets can only attack players
    -- if false, pets can attack any entity
    EnablePetToOnlyAttackPlayers = false, or EnablePetToOnlyAttackPlayers = true,

    -- If true, will enable the new attack update with the police being the only that can use this feature and train the dog
    -- If true, only the K9 will be able to attack, and it won’t deal damage to players — it will only knock them down and immobilize them to make it more realistic.
    -- If false, will reverse to old one
    -- If This is true need EnablePetToOnlyAttackPlayers to be true
    EnableAttackUpdate = false,
```

⚠ <mark style="color:yellow;">**Attention:**</mark> <mark style="color:red;">**Keep in mind that if you disable the EnableAttackUpdate setting, all pets will be able to attack, removing the exclusivity of the**</mark> <mark style="color:yellow;">**K9**</mark> <mark style="color:red;">**pet.**</mark>

## Is it possible to add a pet Add-ON to the Pets system? And How Add ?

***

Yes, it’s possible to add a pet <mark style="color:yellow;">Add-on</mark> or even a <mark style="color:red;">some</mark> <mark style="color:yellow;">native GTA V</mark> animal. However, below you can find a list of functions that will be compatible and others that will not be compatible with Add-on pets or native GTA V animals.

⚠ <mark style="color:yellow;">**Attention:**</mark> <mark style="color:red;">**You will only be able to add pets (Add-on or native) that belong to the Dog or Cat category. Other pets, such as**</mark> <mark style="color:yellow;">**a\_c\_chickenhawk, a\_c\_chimp, a\_c\_fish, a\_c\_hen, a\_c\_pig, a\_c\_rat**</mark><mark style="color:red;">**, cannot be added — your pet will not have any movements and will also die instantly**</mark>.

\
⚠ <mark style="color:yellow;">**Attention:**</mark> <mark style="color:red;">**Issues with animations related to positioning, Add-on crashes and other problems with added pets (not including ours) are not covered by our support.**</mark>

| Appears                                             | Actions                                 | Accessories                | Care                   |
| --------------------------------------------------- | --------------------------------------- | -------------------------- | ---------------------- |
| --------------------                                | Follow, Cuddle, Pet Stats, Animations ✅ | Leash, Beds, Bwols, Toys ✅ | Food, Liquid, Health ✅ |
| Collar, Clothes, Shoes, Head, Patch, Glasse, Maks ⛔ | K9 Functions (Sniff, Training) ⛔        | -------------------        | --------------------   |

### How install new pet Add-on or retail pet from GTAV

{% stepper %}
{% step %}

### Add the animal’s photo to the shop.

⚠ <mark style="color:yellow;">**Recommended size:**</mark>**&#x20;237 x 168**

⚠ <mark style="color:yellow;">**To make sure the image works correctly in the shop, please use the**</mark> WEBP <mark style="color:yellow;">format for the photo.</mark>

⚠ <mark style="color:yellow;">**The file name (the animal’s photo) must match exactly the**</mark> <mark style="color:red;">**KEY**</mark> <mark style="color:yellow;">**variable name defined in**</mark> <kbd>**cdev\_pets > public > config > shop.lua**</kbd><mark style="color:yellow;">**.**</mark>

**Add the photo in the&#x20;**<mark style="color:yellow;">**cdev\_lib**</mark>**&#x20;resource under the path:&#x20;**<kbd>**cdev\_pets > html > pets > > inventory**</kbd>**.**
{% endstep %}

{% step %}

### Creating the animal

**You will add a line by copying from another animal inside the&#x20;**<mark style="color:yellow;">**pets.lua**</mark>**&#x20;file located in the folder&#x20;**<kbd>**cdev\_pets > public > config > pets.lua**</kbd>**.**

**Example (Using a native pet from GTAV):**

```lua
    ["a_c_westy"] = { -- Change 
        Item = "a_c_westy", -- Change
        LeashSettings = { -- No touch
            Bone = 39317, -- No touch
            BoneName = "SKEL_Neck1", -- No touch
            BoneOffset = vector3(0.0, 0.15, -0.1), -- No touch
        },
        FloatingUISettings = { -- No touch
            Bone = 31086, -- No touch
            Offset = vector3(0.0, 0.0, 0.6), -- No touch
            MenuOffset = vector3(0.0, 0.05, 0.4), -- No touch
            BalloonOffset = vector3(0.0, 0.0, 1.0), -- No touch
            StatsOffset = vector3(-0.2, 0.0, -0.1) -- No touch
        },
        CameraCloseSettings = { -- No touch
            Bone = 31086, -- No touch
            Offset = vector3(0.3, 1.2, 0.5), -- No touch
            Rotation = vector3(0.0, 0.0, 160.0), -- No touch
        },
        BallSettings = { -- No touch
            Enable = true, -- No touch
            AttachBone = 46240, -- No touch
            AttachBoneOffset = vector3(0.14, 0.0, 0.05), -- No touch
        },
        Animations = DogAnims["SmallDog"], -- Change
    },
```

**Explanation of the part that needs to be changed:**

<mark style="color:blue;">**\["**</mark><mark style="color:yellow;">**a\_c\_westy**</mark><mark style="color:blue;">**"]**</mark>: Inside the key, instead of <kbd>**a\_c\_westy**</kbd>, you will put the name of the <mark style="color:yellow;">resource (the pet add-on folder you are adding)</mark> Or, if the pet is from GTAV, you should only use the ped name as shown on the website.

\ <mark style="color:blue;">**Item = "**</mark><mark style="color:yellow;">**a\_c\_westy**</mark><mark style="color:blue;">**"**</mark>: Here you will enter the spawn name of the ped. For an add-on file, you can find it inside the <mark style="color:yellow;">**peds.meta**</mark> file in the section marked as <kbd>\<Name>a\_c\_westy\</Name></kbd>.

<mark style="color:blue;">**Animations = DogAnims\["**</mark><mark style="color:yellow;">**SmallDog**</mark><mark style="color:blue;">**"],**</mark> : In this part, where it says <mark style="color:yellow;">**SmallDog**</mark>, you should choose based on the size and category. There are three options: <mark style="color:yellow;">**BigDog**</mark> (for large dogs), <mark style="color:yellow;">**SmallDog**</mark> (for small dogs), and <mark style="color:yellow;">**Cat**</mark> (for cats).
{% endstep %}

{% step %}

### Adding the new created pet for sale in the shop

**You will copy the line below and paste it inside the&#x20;**<mark style="color:yellow;">**shop.lua**</mark>**&#x20;file located in the folder&#x20;**<kbd>**cdev\_pets > public > config > shop.lua.**</kbd>

```lua
{
    PetShopId = "a_c_westy", -- Change
    key = "a_c_westy", -- Change
    hasFemale = false, -- No touch
    label = "Yorkshire GTAV", -- Change
    isPremiumPackage = false, -- No touch
    price = 5000, -- Change (If you want a different price)
    category = "pet_category_pets", -- Not touch
    description = "A YorkShire GTAV", -- Change
},
```

**Explanation of the part that needs to be changed:**

<mark style="color:blue;">PetShopId = "</mark><mark style="color:yellow;">a\_c\_westy</mark><mark style="color:blue;">"</mark>: Identification name that will be recorded after the purchase in the shop.

<mark style="color:blue;">key = "</mark><mark style="color:yellow;">a\_c\_westy</mark><mark style="color:blue;">"</mark>: Same name given to the <mark style="color:yellow;">**Item**</mark> variable in the<kbd>**pet.lua**</kbd> file, and it will also be used to retrieve the <mark style="color:yellow;">photo</mark> file inside <kbd>**cdev\_lib**</kbd>.

<mark style="color:blue;">label = "</mark><mark style="color:yellow;">Yorkshire GTAV</mark><mark style="color:blue;">"</mark>: Animal name displayed in the shop.

<mark style="color:blue;">description = "</mark><mark style="color:yellow;">A Yorkhire GTAV</mark><mark style="color:blue;">"</mark>: Description of the animal that will be sold in the shop.
{% endstep %}

{% step %}

### Adding the new animal to items exclusive to certain types and sizes of animals

Some items in the <mark style="color:yellow;">**items.lua**</mark> file located in <kbd>**cdev\_pets > public > config > items.lua**</kbd> have exclusivity settings to prevent issues related to the animal’s size and category. For your new animal to be able to purchase these items, you need to add it to the <mark style="color:red;">**limited**</mark> variable.

Example item (dogbaga) :\
\
⚠ <mark style="color:red;">**You will add the name you used in the variable**</mark> **`Item = "a_c_westy"`** <mark style="color:red;">**located in the file:**</mark> <kbd>**cdev\_pets > public > config > pets.lua**</kbd>**.**\
\
**Before add:**

```lua
limited = { "pet_frbul", "pet_minpit", "pet_pug", "pet_shusky", "pet_york", "pet_poodle", "pet_chiua", "pet_dash" },
```

\
**After add:**

```lua
limited = { "pet_frbul", "pet_minpit", "pet_pug", "pet_shusky", "pet_york", "pet_poodle", "pet_chiua", "pet_dash", "a_c_westy" },
```

{% endstep %}
{% endstepper %}

## I changed the keybinds in the config, but they didn’t change in-game. How do I fix this?

***

For anyone who joined before the change, you’ll need to clear the keybinds saved in your FiveM cfg file.

Here’s how:

1. Press `WIN + R`, type `%appdata%`, and open the folder.
2. Navigate to:\
   `AppData/Roaming > CitizenFX > fivem.cfg`
3. Open the `fivem.cfg` file with a text editor.
4. Look for any lines with `cdev_pets` binds and delete them, or remove only the specific bind you want to reset.

Example line to remove:

```
rbind cdev_pets KEYBOARD TAB "+petbag"
```

After clearing these lines, restart FiveM. The new keybinds from your server’s config will then load correctly.

## Is it necessary to add the items that are inside the items.lua file to my inventory?

***

No, and it won’t work if you try to add them. The pet system has its own inventory already integrated with the <mark style="color:yellow;">**cdev\_pets**</mark> resource. So regarding the items, you don’t need to do any configuration or add them to your own inventory system, since it is completely separate and has its own inventory system.

The only item you *can* add to your framework’s inventory if you want is the **baseball** item. For more information on how to add it, you can read the documentation at the link below.

{% content-ref url="/pages/cpB11jNzeLtEtMeEhcbQ" %}
[OX Inventory](https://docs.cdev.shop/fivem/pet-system/misc-integrations/ox-inventory)
{% endcontent-ref %}

***

## Discord Webhook Logs (Pets & Shops)

***

CDev Pets sends several events to Discord using:

```lua
clib_Logs.discord(<title>, <fields>)
```

Below you can find a complete list of all available webhook log types, when they are triggered, and which fields are included.

{% tabs %}
{% tab title="🐾 Pet Logs" %}

#### **Pet Delete - Permission Denied**

**When it fires**\
Triggered when a player tries to delete a pet but does **not** have permission.

| Field      | Description          |
| ---------- | -------------------- |
| Player     | Name of the player   |
| Identifier | Character identifier |

***

#### **Pet Deleted**

**When it fires**\
Triggered when an admin successfully deletes a pet.

| Field        | Description                |
| ------------ | -------------------------- |
| Admin        | Admin name and server ID   |
| Identifier   | Owner character identifier |
| Pet ID       | ID of the deleted pet      |
| {% endtab %} |                            |

{% tab title="🏪 Shop Management Logs" %}

#### **Created Shop**

**When it fires**\
Triggered when a player creates a new shop.

| Field         | Description                    |
| ------------- | ------------------------------ |
| Identifier    | Creator’s character identifier |
| Player        | Creator’s character name       |
| Shop Name     | Name of the created shop       |
| Shop Location | JSON location / blip data      |

***

#### **Deleted Shop**

**When it fires**\
Triggered when a shop is deleted.

| Field        | Description                                    |
| ------------ | ---------------------------------------------- |
| Identifier   | Character identifier of the player deleting it |
| Player       | Player who deleted the shop                    |
| Shop Name    | Deleted shop name                              |
| {% endtab %} |                                                |

{% tab title="👥 Employee Management Logs" %}
{% hint style="warning" %}
`{shop}` is automatically replaced with the shop name in the log title.
{% endhint %}

#### **{shop} Added Employee**

**When it fires**\
Triggered when a new employee is added to a shop.

| Field            | Description                       |
| ---------------- | --------------------------------- |
| Identifier       | Player performing the action      |
| Player           | Player name performing the action |
| Added Identifier | Identifier of new employee        |
| Added Player     | Name of new employee              |
| Role             | Employee role (Employee/Boss)     |

***

#### **{shop} Fired Employee**

**When it fires**\
Triggered when an employee is removed.

| Field            | Description                            |
| ---------------- | -------------------------------------- |
| Identifier       | Player performing the action           |
| Player           | Player name performing the action      |
| Fired Identifier | Character identifier of removed player |
| Fired Player     | Name of removed employee               |
| {% endtab %}     |                                        |

{% tab title="💰 Shop Vault Logs" %}
{% hint style="warning" %}
`{shop}` is automatically replaced with the shop name in the log title.
{% endhint %}

#### **\[{shop}] Deposited vault money**

**When it fires**\
Triggered when money is deposited into the shop vault.

| Field            | Description             |
| ---------------- | ----------------------- |
| Identifier       | Player depositing money |
| Player           | Player name             |
| Amount           | Deposited amount        |
| New Total Amount | New vault balance       |

***

#### **\[{shop}] Withdrawn vault money**

**When it fires**\
Triggered when money is taken out of the vault.

| Field            | Description              |
| ---------------- | ------------------------ |
| Identifier       | Player withdrawing money |
| Player           | Player name              |
| Amount           | Withdrawn amount         |
| New Total Amount | New vault balance        |

***

#### **\[{shop}] Removed vault money**

**When it fires**\
Triggered when money is removed by a system/admin action.

| Field            | Description           |
| ---------------- | --------------------- |
| Identifier       | Player removing money |
| Player           | Player name           |
| Amount           | Amount removed        |
| New Total Amount | New vault balance     |
| {% endtab %}     |                       |

{% tab title="📦 Shop Stock Logs" %}
{% hint style="warning" %}
`{shop}` is automatically replaced with the shop name in the log title.
{% endhint %}

#### **\[{shop}] Added stock**

**When it fires**\
Triggered when items are added to shop inventory.

| Field      | Description         |
| ---------- | ------------------- |
| Identifier | Player adding stock |
| Player     | Player name         |
| Item       | Item ID             |
| Amount     | Quantity added      |

***

#### **\[{shop}] Removed stock**

**When it fires**\
Triggered when items are removed from stock.

| Field      | Description           |
| ---------- | --------------------- |
| Identifier | Player removing stock |
| Player     | Player name           |
| Item       | Item ID               |
| Amount     | Quantity removed      |

***

#### **\[{shop}] Bought stock**

**When it fires**\
Triggered when a player purchases stock for the shop.

| Field      | Description                 |
| ---------- | --------------------------- |
| Identifier | Player buying stock         |
| Player     | Player name                 |
| Items      | JSON with items and amounts |
| Price      | Total purchase price        |

***

#### **\[{shop}] Updated stock price**

**When it fires**\
Triggered when a shop item price is modified.

| Field        | Description           |
| ------------ | --------------------- |
| Identifier   | Player updating price |
| Player       | Player name           |
| Item         | Item ID               |
| Price        | New item price        |
| {% endtab %} |                       |

{% tab title="🐕 Vet Table Logs" %}
{% hint style="warning" %}
`{shop}` is automatically replaced with the shop name in the log title.
{% endhint %}

#### **\[{shop}] Updated vet tables**

**When it fires**\
Triggered when the list of vet tables is updated.

| Field        | Description              |
| ------------ | ------------------------ |
| Identifier   | Player updating          |
| Player       | Player name              |
| Tables Count | New amount of vet tables |

***

#### **\[{shop}] Removed vet table**

**When it fires**\
Triggered when a vet table is removed.

| Field         | Description           |
| ------------- | --------------------- |
| Identifier    | Player removing table |
| Player        | Player name           |
| {% endtab %}  |                       |
| {% endtabs %} |                       |

***

## Where is the Pet MLO location?

***

```
Location coords : vec3(85.74, -204.44, 54.49)
```

<figure><img src="https://1004862655-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPhIA9eCA4bwgx77hxx4i%2Fuploads%2FmxqeJ8nt7xVpn7IuluV7%2FLocation.png?alt=media&amp;token=f9583370-d8cb-4e7e-acaf-3606e3ab3459" alt=""><figcaption></figcaption></figure>

## Is there a way to disable the pet store in the TAB menu?

***

Yes! You can disable the shop button in the pet bag menu (TAB) by editing the `config.lua` file:

Path:

```
cdev_pets > public > config > config.lua
```

Find the line:

```
WantPetShopButton = true
```

and set it to:

```
WantPetShopButton = false
```

## How do I change the colors of the menu ?

***

⚠ <mark style="color:red;">**Before making any changes, make a full backup of the cdev\_lib and cdev\_pets folders. If you don't have experience with development or modifying code, it is not**</mark> <mark style="color:yellow;">**recommended**</mark> <mark style="color:red;">**that you follow these steps.**</mark>

### Changing Bag Pets Menu `cdev_lib > dist > css > app.xxxx.css`

<div align="left"><figure><img src="https://1004862655-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPhIA9eCA4bwgx77hxx4i%2Fuploads%2FzUIkxasUO0gMnnppUa0n%2Fimage.png?alt=media&amp;token=4a59099b-c692-41a3-8be5-2467a020e41d" alt="" width="180"><figcaption></figcaption></figure></div>

***

{% hint style="info" %} <mark style="color:red;">**(Header)**</mark> **`#1f1f22`**
{% endhint %}

Formatted CSS Search For

```css
.ct-container-menu .ct-menu-app .menu-app .ct-header-menu-app .header-menu-app
```

Minified CSS Search For

<pre class="language-css"><code class="lang-css"><strong>padding:3rem;width:100%;background:#1f1f22;border-top-left-radius:2rem;border-top-right-radius:2rem;flex-direction:row;gap:1rem;align-items:center;justify-content:center
</strong></code></pre>

***

{% hint style="info" %} <mark style="color:yellow;">**(Body)**</mark> **`#161619`**
{% endhint %}

Formatted CSS Search For

```css
.ct-container-menu .ct-menu-app .menu-app .ct-body-menu-app .body-menu-app
```

Minified CSS Search For

{% code fullWidth="false" %}

```css
width:100%;padding:2rem;flex-direction:column;gap:1.2rem;max-height:40rem;overflow:auto;background:#161619
```

{% endcode %}

***

{% hint style="info" %} <mark style="color:green;">**(Footer)**</mark> **`#1f1f22`**
{% endhint %}

Formatted CSS Search For

```css
.ct-container-menu .ct-menu-app .menu-app .ct-footer-menu-app .footer-menu-app
```

Minified CSS Search For

```css
padding:2rem;width:100%;background:#1f1f22;border-bottom-left-radius:2rem;border-bottom-right-radius:2rem
```

***

### Changing Main Shop Pets Menu `cdev_lib > dist > css > app.xxxx.css`

<figure><img src="https://1004862655-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPhIA9eCA4bwgx77hxx4i%2Fuploads%2Fhj3nxWvNgUM9iOZnYOl3%2Fimage.png?alt=media&amp;token=b9f6708c-2c60-458f-a75a-1f2ef2094443" alt=""><figcaption></figcaption></figure>

***

{% hint style="info" %} <mark style="color:red;">(</mark><mark style="color:red;">**Side Bar Item Menu)**</mark>**&#x20;Selected `#7289da` Not Selected `#1f1f22`**
{% endhint %}

<mark style="color:yellow;">Selected</mark> Formatted CSS Search For

<pre class="language-css"><code class="lang-css"><strong>.ct-container-shop .ct-shop-app .shop-app .ct-body-shop-app .body-shop-app .ct-left-body-shop-app .left-body-shop-app .ct-menu-left-body-shop-app .menu-left-body-shop-app .ct-body-menu-left-body-shop-app .body-menu-left-body-shop-app .ct-item-menu-left-body-shop-app .item-menu-left-body-shop-app.selected
</strong></code></pre>

<mark style="color:yellow;">Selected</mark> Minified CSS Search For

```css
background:#7289da!important
```

<mark style="color:$success;">Not Selected</mark> Formatted CSS Search For

```
.ct-container-shop .ct-shop-app .shop-app .ct-body-shop-app .body-shop-app .ct-left-body-shop-app .left-body-shop-app .ct-menu-left-body-shop-app .menu-left-body-shop-app .ct-body-menu-left-body-shop-app .body-menu-left-body-shop-app .ct-item-menu-left-body-shop-app .item-menu-left-body-shop-app
```

<mark style="color:$success;">Not Selected</mark> Minified CSS Search For

```css
display:flex;width:100%;height:-moz-fit-content;height:fit-content;align-items:center;padding:2rem;cursor:pointer;background:#1f1f22
```

***

{% hint style="info" %} <mark style="color:yellow;">**(Side Bar Background)**</mark> **`#d9d9d9`**
{% endhint %}

Formatted CSS Search For

```css
.ct-container-shop .ct-shop-app .shop-app .ct-body-shop-app .body-shop-app .ct-left-body-shop-app .left-body-shop-app .ct-menu-left-body-shop-app .menu-left-body-shop-app
```

Minified CSS Search For

```css
display:flex;width:100%;height:100%;background:#d9d9d9;flex-direction:column
```

***

{% hint style="info" %} <mark style="color:orange;">**(Background)**</mark> **`#161619`**
{% endhint %}

Formatted CSS Search For

```css
.ct-container-shop .ct-shop-app .shop-app
```

Minified CSS Search For

```css
display:flex;width:100%;height:100%;align-items:center;background:#161619;padding:2rem 4rem;gap:2rem;flex-direction:column
```

***

{% hint style="info" %} <mark style="color:blue;">**(Text Hrizontal menu)**</mark>**&#x20;Selected `#7289da` Not Selected `#000`**
{% endhint %}

<mark style="color:yellow;">Selected</mark> Formatted CSS Search For

```css
 p.text-title-item-sub-menu-top-right-body-shop-app.selected
```

<mark style="color:yellow;">Selected</mark> Minified CSS Search For

```css
p.text-title-item-sub-menu-top-right-body-shop-app.selected{color:#7289da}
```

<mark style="color:$success;">Not Selected</mark> Formatted CSS Search For

```
p.text-title-item-sub-menu-top-right-body-shop-app
```

<mark style="color:$success;">Not Selected</mark> Minified CSS Search For

```css
p.text-title-item-sub-menu-top-right-body-shop-app{font-size:1.5rem;text-transform:uppercase;color:#000}
```

***

{% hint style="info" %} <mark style="color:green;">**(Background Horizontal Bar)**</mark>`#d9d9d9`
{% endhint %}

Formatted CSS Search For

```css
top-right-body-shop-app
```

Minified CSS Search For

```css
right-body-shop-app{display:flex;width:100%;height:100%;align-items:center;padding:2rem 3rem;background:#d9d9d9}
```

***

{% hint style="info" %}
**(Pagination Menu)** **Selected `#`**`7289da` Not Selected `No Background`
{% endhint %}

Formatted CSS Search For

```css
item-pagination actualPage
```

Minified CSS Search For

```css
.item-pagination.actualPage{border-color:transparent;background:#7289da}
```

***

## How can i buy a K9 pet and K9 items ?

***

To buy the <mark style="color:yellow;">K9</mark> pet and the exclusive <mark style="color:yellow;">K9</mark> **accessories** and **items** in the shop, you need to have the <mark style="color:yellow;">police</mark> job set in your **framework**.

After that, when you click to buy the pet, if it is a <mark style="color:yellow;">K9 type</mark>, you will see an extra <mark style="color:red;">checkbox</mark> appear in the purchase menu, just like in the example below.

<figure><img src="https://1004862655-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPhIA9eCA4bwgx77hxx4i%2Fuploads%2F5lla5LbYrejiIw88LoP6%2FFiveM_GTAProcess_C7AZyPNlqE.gif?alt=media&amp;token=d66eb4c5-5ec8-4141-9d5b-029c0b8b7e53" alt=""><figcaption></figcaption></figure>

If you want to change the required job or add more jobs allowed to buy the K9 and its accessories, follow this tutorial: [Here](#how-can-i-add-another-job-to-use-the-k9-pet)

## How to use the K9 pet's Sniff action ?

***

{% hint style="success" %}
**The Sniff action can be used on both&#x20;**<mark style="color:yellow;">**players**</mark>**&#x20;and&#x20;**<mark style="color:yellow;">**vehicles**</mark>**. For players, it will search only the player's&#x20;**<mark style="color:yellow;">**inventory**</mark>**, while for vehicles, it will search both the&#x20;**<mark style="color:yellow;">**glovebox**</mark>**&#x20;and the&#x20;**<mark style="color:yellow;">**trunk**</mark>**.**
{% endhint %}

⚠ <mark style="color:red;">**To use the**</mark> <mark style="color:yellow;">**Sniff**</mark> <mark style="color:red;">**feature, you first need to have a**</mark> <mark style="color:yellow;">**K9 category pet**</mark><mark style="color:red;">**. You can see how to get a**</mark> <mark style="color:yellow;">**K9**</mark> <mark style="color:red;">**pet**</mark> [**HERE**](https://docs.cdev.shop/fivem/pet-system/faq#how-can-i-buy-a-k9-pet-and-k9-items)<mark style="color:red;">**.**</mark>

<figure><img src="https://1004862655-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPhIA9eCA4bwgx77hxx4i%2Fuploads%2FkNAD14fMqVwFXJZcvr9O%2FFiveM_GTAProcess_wrVKoMGHQm-_online-video-cutter.com_.gif?alt=media&amp;token=cc3c4873-fdb2-4da9-8951-76fe8b1ef2aa" alt=""><figcaption></figcaption></figure>

### How to configure the items that the dog will sniff?

Access the file `config.lua` located in the folder `cdev_pets > public > config > config.lua`.

First, enable the `SearchEnabled` function so that everything works correctly on <mark style="color:yellow;">line 382</mark>:

```lua
SearchEnabled = true
```

Now, go to <mark style="color:yellow;">lines</mark> <mark style="color:yellow;">390</mark> to <mark style="color:yellow;">398</mark> and configure the items for each category as shown in the example below. These will be the items that the dog will search for and identify as <mark style="color:yellow;">illegal</mark>.

<pre class="language-lua"><code class="lang-lua">DrugItems = {
    "phone",
<strong>},
</strong>MoneyItems = {
    "water_bottle",
},
WeaponItems = {
    "sandwich",
},
</code></pre>

### How Sniff system work and Sniff Skill Level?

**The level determines the chance you have to perform the Sniff action successfully so lets use image bellow to example:**

<div align="left"><figure><img src="https://1004862655-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPhIA9eCA4bwgx77hxx4i%2Fuploads%2Fjt5sHGx8qUpzMWTANhui%2FSniff%20Level.png?alt=media&amp;token=a8310e24-8b48-4b5f-9f97-07e61418c4eb" alt=""><figcaption></figcaption></figure></div>

In this case, I have a 20% chance for the K9 dog to successfully find the items. You can change the <mark style="color:yellow;">`DefaultLevel`</mark>and <mark style="color:yellow;">`MinLevel`</mark> in the `config.lua` file located in the folder `cdev_pets > public > config > config.lua` (<mark style="color:yellow;">lines 314</mark> and <mark style="color:yellow;">317</mark>), as shown below.

```lua
sniff = {
    -- Level the k9 starts at
    DefaultLevel = 20,
    -- Minimum level the k9 can be at
    -- if 0 then it will be impossible to sniff
    MinimiumLevel = 1,
    -- How much the sniff level increases per successful sniff
    LevelIncrease = 5,
    -- How much of the skill it will take out
    TakeOut = 5,
},
```

**Now lets explain how the Sniff System Works to better understand the Sniff system, here’s a step-by-step explanation:**

1. **First** – When you trigger the Sniff action near a vehicle, the system will start scanning the **DrugItems** configuration we set up earlier, regardless of where you clicked to activate Sniff.
   * It will first check the **GloveBox**, reading the vehicle’s plate and verifying in the database if any of the configured items are stored there.
   * If it finds an item, it will trigger the **Try Sniff** action, which determines success based on your pet’s level (as explained earlier).
   * If nothing is found in the GloveBox, it will proceed to search the **Trunk** for the configured **DrugItems**.
   * If it finds something in the Trunk, the dog will bark and perform a spinning animation.
2. **Second** – If no items from the **DrugItems** list are found, the system will then check the **MoneyItems** list, following the same process:
   * First, it searches the **GloveBox**, then the **Trunk**.
   * If an item is found, the dog will sit and bark.
3. **Third** – If no items from either the **DrugItems** or **MoneyItems** lists are found, the system will move on to check the **WeaponItems** list.
4. **Four** **and final -** The system works the same way if you use the Sniff action on a player, but it will only check the player's inventory.

***

Do you want me to also **add formatting for code examples** in the documentation so it’s easier for developers to configure the item lists? That would make it even more user-friendly.

## Does the VIP system work only for clothes and accessories ?

***

No, the VIP system works for any item listed in the file: <kbd>cdev\_pets > public > config > shop.lua</kbd>

Inside this file, you just need to add `vip = true` to any item you want to make VIP-only. If the item doesn't already have it, here’s an example of how to add VIP to the dogs:

```lua
{
        PetShopId = "pet_hottweiler",
        key = "pet_chop",
        label = "Hottweiler",
        hasFemale = true,
        vip = true, -- Add this Line
        price = 5000,
        category = "pet_category_pets",
        description = "A Hottweiler",
        canBeK9 = true,
}, 
```

⚠ <mark style="color:red;">**If you change the**</mark> <kbd>**isPremiumPackage**</kbd> <mark style="color:red;">**variable for any pet, I suggest you revert it to avoid potential issues in the future**</mark>

## After I start the assets folder this crash happens how fix ?

***

<div><figure><img src="https://1004862655-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPhIA9eCA4bwgx77hxx4i%2Fuploads%2FT2hsNh3gDf1EhBe32AKz%2Fimage.png?alt=media&amp;token=841a71fb-cfc0-4e0a-bc5b-f72877195b25" alt=""><figcaption></figcaption></figure> <figure><img src="https://1004862655-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPhIA9eCA4bwgx77hxx4i%2Fuploads%2FMbfFKvMC2D60YgxcoIMR%2FPool%20Size.png?alt=media&amp;token=5a7c198b-3333-4eaf-a7ca-e520e69fe246" alt=""><figcaption></figcaption></figure></div>

This happen because you got limit addons texture or other limit you can have in one server for fix this you have some options

1. Remove some others texture like cars , new maps , clothes ..
2. Increase TxdStore inside sever.cfg ( This is not recommend) `increase_pool_size "TxdStore" 26000`

3.Use different games force build to receive more space for addons we recomended use 3258 `sv_enforceGameBuild 3258`

You can check more about Game Build [here](https://docs.fivem.net/docs/server-manual/server-commands/#sv_enforcegamebuild-build)

You can read more inside this documentation and check all limits [here](https://docs.fivem.net/docs/server-manual/server-commands/#increase_pool_size-poolname-increase)

⚠ <mark style="color:red;">**Changing the gamebuild won’t necessarily free up more space, but it will remove updates, which can help allocate more addons. Keep in mind that by using an older gamebuild version, any GTA V updates included in that build will be lost, and clothing slots as well as other limits in GTA V will change, which can negatively affect other resources on your server.**</mark>

{% hint style="info" %}
**You can also access the&#x20;**<mark style="color:red;">**tool**</mark>**&#x20;that&#x20;**<mark style="color:yellow;">**FiveM**</mark>**&#x20;provides to check how much&#x20;**<mark style="color:yellow;">**%**</mark>**&#x20;is being used in the&#x20;**<kbd>**TxDStore Pool**</kbd>**, which is related to textures, by following the image below. Also remember that a large portion, at least&#x20;**<mark style="color:red;">**15 to 20%**</mark>**, comes from the default&#x20;**<mark style="color:yellow;">**GTA V**</mark>**.**\
\
**The full list of pet assets below uses a total of&#x20;**<mark style="color:yellow;">**8.81%**</mark>**&#x20;of the&#x20;**<kbd>**TxDStore**</kbd>**:**

* cdev\_petshop
* cdev\_pets\_assets
* cdev\_pets\_assets2
* cdev\_dog\_pets
* cdev\_cat\_pets
  {% endhint %}

Press the <mark style="color:yellow;">F8</mark> key to open the Client console in order to access the tool below.

<div align="left"><figure><img src="https://1004862655-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPhIA9eCA4bwgx77hxx4i%2Fuploads%2FPSjOUaPcF6KLcD8LmLRt%2Fimage.png?alt=media&amp;token=68345c07-7c4d-42d2-896f-80a545fd5ca6" alt=""><figcaption></figcaption></figure></div>

⚠ <mark style="color:red;">**If you don’t have this option in the**</mark> <mark style="color:yellow;">**F8 menu**</mark><mark style="color:red;">**, you need to change your FiveM**</mark>**&#x20;version**<mark style="color:red;">**. Go to the**</mark> <mark style="color:yellow;">**gear**</mark> <mark style="color:red;">**icon right after opening**</mark> <kbd>**FiveM Settings > Game > Update Channel**</kbd> <mark style="color:red;">**and switch it to**</mark> <mark style="color:yellow;">**Latest (Unstable)**</mark><mark style="color:red;">**.**</mark>

<figure><img src="https://1004862655-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPhIA9eCA4bwgx77hxx4i%2Fuploads%2FEu1kuLXDzOliG6MmqehD%2Fimage.png?alt=media&amp;token=c2b10351-3723-4448-9efd-7236399fd1f6" alt=""><figcaption></figcaption></figure>

## How can I remove some clothes from the stream folder and the store?

***

{% hint style="danger" %}
**Attention:** Removing clothes/accessories from the *stream* folder may cause issues with pets that already have the removed clothing or accessory.
{% endhint %}

{% hint style="info" %}
**Note:** It is only recommended to remove them if you are really running out of space in **txdStore** and want to use the pets.
{% endhint %}

{% hint style="warning" %}
**Below is the list of stream/textures for each category.**\
**Attention:** Do not delete files that contain <mark style="color:yellow;">**^head / ^head\_diff**</mark>, <mark style="color:yellow;">**^lowr / ^lowr\_diff**</mark>, or <mark style="color:yellow;">**^hair / ^hair\_diff**</mark>.
{% endhint %}

| Category                     | Component Number  | Stream names / Texture                                                                                 |
| ---------------------------- | ----------------- | ------------------------------------------------------------------------------------------------------ |
| Collar                       | 8                 | <p>cdev\_xxx\_xxx^accs\_xxx\_u.ydd (Model)<br>cdev\_xxx\_xxx^accs\_diff\_xxx\_x\_uni.ytd (Texture)</p> |
| Mask / Tie (Collar Category) | 1 - Maks, 8 - Tie | <p>cdev\_xxx\_xxx^berd\_xxx\_u.ydd (Model)<br>cdev\_xxx\_xxx^berd\_diff\_xxx\_x\_uni.ytd (Texture)</p> |
| Shoes                        | 6                 | <p>cdev\_xxx\_xxx^feet\_xxx\_u.ydd (Model)<br>cdev\_xxx\_xxx^feet\_diff\_xxx\_x\_uni.ytd (Texture)</p> |
| Head                         | 9                 | <p>cdev\_xxx\_xxx^task\_xxx\_u.ydd (Model)<br>cdev\_xxx\_xxx^task\_diff\_xxx\_x\_uni.ytd (Texture)</p> |
| Glasses                      | 7                 | <p>cdev\_xxx\_xxx^teef\_xxx\_u.ydd (Model)<br>cdev\_xxx\_xxx^teef\_diff\_xxx\_x\_uni.ytd (Texture)</p> |
| Clothes                      | 3                 | <p>cdev\_xxx\_xxx^uppr\_xxx\_u.ydd (Model)<br>cdev\_xxx\_xxx^uppr\_diff\_xxx\_x\_uni.ytd (Texture)</p> |
| Patch                        | 1                 | <p>cdev\_xxx\_xxx^berd\_002\_u.ydd (Model)<br>cdev\_xxx\_xxx^berd\_diff\_002\_x\_uni.ytd (Texture)</p> |

#### 1 - Identifying the clothing you want to remove.

1.2 - First, we will open the store and choose an accessory. In this case, I will choose the <mark style="color:yellow;">Red Air One Shoes</mark>.

<div align="left"><figure><img src="https://1004862655-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPhIA9eCA4bwgx77hxx4i%2Fuploads%2FABn6FDPToXqUaMOSIluM%2Fimage.png?alt=media&amp;token=a410e7a7-76c5-4555-8aab-f63fc5cb0cbd" alt=""><figcaption></figcaption></figure></div>

1.3 - Now we will identify which stream represents the <mark style="color:yellow;">Red Air One Shoes</mark>.\
We already know, according to the table above, that it is among the stream files `cdev_xxx_xxx^feet_xxx` because it belongs to the <mark style="color:yellow;">Shoes</mark> category.

So, open the **`items.lua`** file located at **`cdev_pets > public > config > items.lua`** and search for **“Red Air One Shoes.”**

```lua
data = {
    component = 6, -- This is just type of acessrioes from ped
    drawable = 7, -- This is number of the model so cdev_dog_rott^feet_007_u.ydd
    texture = 0, -- This is the texture color so 0 -> A  cdev_dog_rott^feet_diff_007_a_uni.ytd
},
```

1.4 - **So we found that the drawable number is 7**, which is the model, and the **texture is 0**, which represents letters.\
For example: **0 → A, 1 → B, ...**

Therefore, the **model and texture for the Red Air One Shoes** would be:

**`cdev_dog_rott^feet_007_u.ydd`**\
\&#xNAN;**`cdev_dog_rott^feet_diff_007_a_uni.ytd`**

## Where are the images from shop of the pets, clothes, and accessories located ?

***

All the images that appear in the store menu are located inside the **cdev\_lib** resource:

<kbd>**cdev\_lib > nui > dist > pets > inventory**</kbd>

The cdev\_lib use the <mark style="color:yellow;">**KEY**</mark> variable inside the file: <kbd>cdev\_pets > public > config > shop.lua</kbd> to look up the images in the folder mentioned above.

Example:

```lua
 {
        PetShopId = "pet_hottweiler",
        key = "pet_chop", -- This Key is reference for images inside the folder lib
        label = "Hottweiler",
        hasFemale = true,
        price = 5000,
        category = "pet_category_pets",
        description = "A Hottweiler",
        canBeK9 = true,
    },
```

⚠ <mark style="color:red;">**The images must have the**</mark><kbd>**.webp**</kbd> <mark style="color:red;">**extension. Any changes inside this folder are not recommended unless you have experience.**</mark>

## Pets not spawning in?

***

{% hint style="danger" %}
Check to make sure you have an active CFX Element Club subscription: [HERE](https://portal.cfx.re/subscriptions)
{% endhint %}

## \[cdev\_pets] (ERROR) Network control timeout for spawning pet, Please Try Again!

<div align="center"><figure><img src="https://1004862655-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPhIA9eCA4bwgx77hxx4i%2Fuploads%2FkrhZYAPd7MQU17l0zR9U%2Fimage.png?alt=media&amp;token=8d185e84-a69b-44ad-b22f-701f54fe10d7" alt=""><figcaption></figcaption></figure></div>

{% hint style="danger" %}
If you have an anti-cheat, it may be blocking the pet events, please check with your AC provider on how you can resolve this
{% endhint %}

## After I updated cdev\_pets to version 2.9.3 or (Higher), I can no longer open the store manager how can i fix?

***

<figure><img src="https://1004862655-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPhIA9eCA4bwgx77hxx4i%2Fuploads%2FcnJyy2ZHwBNvYlNCVAai%2FError%20When%20Try%20open%20Manager.png?alt=media&amp;token=193bd8f8-f1f6-48db-9014-48d5356202ae" alt=""><figcaption></figcaption></figure>

✅ <mark style="color:yellow;">**Please note: if you’re not yet using the resource on your production server, and it’s not an issue for you to delete all the cdev\_pets tables, the best practice is to remove them entirely and recreate the shop. This will fix all existing problems and help avoid any future issues.**</mark><br>

### List of all tables to delete <mark style="color:red;">(Only delete everything if you have no problem losing all previously recorded data.)</mark>

* cdev\_pets
* cdev\_pets\_petshops
* cdev\_pets\_petshops\_employees
* cdev\_pets\_petshops\_sales
* cdev\_pets\_petshops\_sell\_prices
* cdev\_pets\_petshops\_stock

\
\
⚠ <mark style="color:red;">**This error happens because in the new updates, some**</mark> <mark style="color:yellow;">**items**</mark> <mark style="color:red;">**were**</mark> <mark style="color:yellow;">**renamed**</mark> <mark style="color:red;">**and problematic items were also**</mark> <mark style="color:yellow;">**removed**</mark> <mark style="color:red;">**from the**</mark> **`items.lua`** <mark style="color:red;">**and**</mark> **`shop.lua`** <mark style="color:red;">**files. Additionally, we replaced all the**</mark> <mark style="color:yellow;">**images**</mark> <mark style="color:red;">**as well. To fix this issue with the store, simply clear the tables in the database listed below and fully restart the server.**</mark>

### List of tables to empty

* cdev\_pets\_petshops\_sales
* cdev\_pets\_petshops\_sell\_prices
* cdev\_pets\_petshops\_stock

### Example Video using <mark style="color:yellow;">HeidiSQL ( version: 12.10.0.7000)</mark>

<div align="left"><figure><img src="https://1004862655-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPhIA9eCA4bwgx77hxx4i%2Fuploads%2FUvQUZI55Lv8XuoulG1tq%2Fheidisql_HIy3VGXBQi.gif?alt=media&amp;token=4c8c43fd-71d7-4da9-95fd-463a151fa2de" alt=""><figcaption></figcaption></figure></div>

⚠ <mark style="color:red;">**In addition to the issue above, it can also happen that when a player opens the**</mark> <kbd>**/petbag**</kbd> <mark style="color:red;">**or the**</mark> <kbd>**TAB**</kbd><mark style="color:red;">**menu and tries to spawn certain pets, a similar error will occur. I’ll use the**</mark> <mark style="color:yellow;">**Golden Retriever**</mark> <mark style="color:red;">**pet as an example, which had some changes made to it.**</mark>

### This is what happens when you try to spawn a pet whose models were changed or that was removed.

<div align="left"><figure><img src="https://1004862655-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPhIA9eCA4bwgx77hxx4i%2Fuploads%2Fj3Q7B9fqtZ3TQDIxrq4z%2FFiveM_GTAProcess_fIeZZGPrKZ.gif?alt=media&amp;token=7be57661-78da-499e-ae59-a39ddf977dee" alt=""><figcaption></figcaption></figure></div>

#### Client Side Error (F8 Console)

<div align="left"><figure><img src="https://1004862655-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPhIA9eCA4bwgx77hxx4i%2Fuploads%2FBWfIzHAZY4TxDbuZa6ZP%2FClient%20Error%20Pet.png?alt=media&amp;token=a698e120-c4c1-4fcb-addc-606558ed46d9" alt=""><figcaption></figcaption></figure></div>

#### Server Side Error (Prompt or TxAdmin Console)

<figure><img src="https://1004862655-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPhIA9eCA4bwgx77hxx4i%2Fuploads%2FqXJV2OsIQiTELXshEbSW%2FServer%20Errror%20Pet.png?alt=media&amp;token=22c1607d-6671-45c5-b073-5595e4383b20" alt=""><figcaption></figcaption></figure>

### Now I’ll explain how to fix this problem if you updated the version and this is happening to your players who had the old pets.

In the database image below, in the `cdev_pets` table, you’ll need to modify two columns: the first is the `KEY` column and the second is the `PETSHOPID` column, as shown in the image below.

<figure><img src="https://1004862655-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPhIA9eCA4bwgx77hxx4i%2Fuploads%2FP2ZCTjmimDaeDS7u7LhK%2FYou%20go%20change%20this.png?alt=media&amp;token=65c31676-0a56-4f59-b923-333f9e4491fd" alt=""><figcaption></figcaption></figure>

First, let’s find the new names for the <mark style="color:yellow;">Golden Retriever</mark>, which we’re using as an example. You’ll start by opening the `shop.lua` file located in the folder `cdev_pets > public > config > shop.lua`, and you’ll find the Golden Retriever code just like in the example below.

```lua
    {
        PetShopId = "pet_gold", -- Here is the (petshopid) column
        key = "pet_gold", -- And Here is the (key) column
        label = "Golden Retriever",
        isPremiumPackage = true,
        price = 5000,
        category = "pet_category_pets",
        description = "A Golden Retriever",
        canBeK9 = true,
    },
```

Now that we have the new strings, we’re going to update them in the database, and the result will look like the image below.

<figure><img src="https://1004862655-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPhIA9eCA4bwgx77hxx4i%2Fuploads%2FdhgSE6WZIe1owVWIXNOL%2FNewStrings.png?alt=media&amp;token=a21fd3e9-1c30-4d6a-9ee7-d581b02eedcc" alt=""><figcaption></figcaption></figure>

<mark style="color:yellow;">After all the changes, you will</mark> shut down <mark style="color:yellow;">and</mark> restart <mark style="color:yellow;">the server, and the pet on your client or your player’s client will be working normally.</mark>

⚠ <mark style="color:red;">**Just a reminder: if you don’t have experience, I recommend not modifying the tables to avoid any serious issues with your server, such as data loss.**</mark>


# How integrate Jobs with Pets QBCore

Now, since you are using the **QBCore framework**, you need to configure the \*\*job in QBCore \*\*to sync with your pet shop, otherwise you won’t be able to assign an employee with permissions.

First, you’ll create the shop just as shown in this video tutorial:

{% embed url="<https://youtu.be/-_eOmtHj4Vk>" %}

When it comes time to configure the player and give them permission, you’ll need to shut down the server and go to the file: `[qb] > qb-core > shared > jobs.lua`

Inside this file, you’ll create a new job and configure it like this:

The job name will be `petshop[shopname]`. For example, if your shop is named “<mark style="color:yellow;">**Pet Shop Test**</mark>”, then the job name will be **petshoppetshoptest**. Below is an example of how the configuration should look:

```lua
petshoppetshoptest = { -- Change this like above
        label = 'Pet Shop Test Shop', -- Change this for your Shop name
        defaultDuty = true, -- No touch
        offDutyPay = false, -- No touch
        grades = {
            ['0'] = { name = 'Clerk', payment = 25 }, -- No touch
            ['25'] = { name = 'Veterinarian', payment = 50 }, -- No touch       
            ['50'] = { name = 'Manager', payment = 75 },  -- No touch         
            ['100'] = { name = 'Boss', payment = 150, isboss = true, bankAuth = true }, -- No touch
        },
},
```


# How integrate Jobs with Pets QBox

Now, since you are using the **Qbox framework**, you need to configure the \*\*job in Qbox \*\*to sync with your pet shop, otherwise you won’t be able to assign an employee with permissions.

First, you’ll create the shop just as shown in this video tutorial:

{% embed url="<https://youtu.be/-_eOmtHj4Vk>" %}

When it comes time to configure the player and give them permission, you’ll need to shut down the server and go to the file: `[qbx] > qbx_core > shared > jobs.lua`

Inside this file, you’ll create a new job and configure it like this:

The job name will be `petshop[shopname]`. For example, if your shop is named “**test**”, then the job name will be **petshoptest**. Below is an example of how the configuration should look:

```lua
['petshoptest'] = {
    label = 'Pet Shop Test Shop',
    defaultDuty = true,
    offDutyPay = false,
    grades = {
        [0] = {
            name = 'Clerk',
            payment = 25
        },
        [25] = {
            name = 'Veterinarian',
            payment = 50
        },
        [50] = {
            name = 'Manager',
            payment = 75
        },
        [100] = {
            name = 'Boss',
            payment = 150,
            isboss = true,
            bankAuth = true
        },
    },
},
```


# Soccer

Standalone advanced Soccer script

## SHOWCASE VIDEO

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

## What is this resource?

This resource is a the most unique and well created entertainment script for your FiveM server, with custom in house made animations to compliment your gameplay.

## INSTALLATION GUIDE

{% content-ref url="/pages/8R4i4yrScWGkU9woXnpc" %}
[Installation Guide QBCore Framework](https://docs.cdev.shop/fivem/soccer/installation-guide-qbcore-framework)
{% endcontent-ref %}

{% content-ref url="/pages/BqWC7QEaNfOguapH90nd" %}
[Installation Guide QBox Framework](https://docs.cdev.shop/fivem/soccer/installation-guide-qbox-framework)
{% endcontent-ref %}

{% content-ref url="/pages/iPqcLONQSVMjujp8aSSC" %}
[Installation Guide ESX Framework](https://docs.cdev.shop/fivem/soccer/installation-guide-esx-framework)
{% endcontent-ref %}

{% hint style="danger" %}
**Do not modify the encrypted files in any way, as this may cause issues with the resource's functionality.**
{% endhint %}


# Configuration

{% hint style="warning" %}
**DISCLAIMER:** Please follow the setup guide of [cDev Library](https://docs.cdev.shop/fivem/cdev-library) first.
{% endhint %}

In order to edit the basic configuration of this resource you simply have to edit the following file:

```
cdev_soccer/public/config/config.lua
```


# Editing Fields

New and existing fields can be edited in:

`cdev_soccer/public/config/fields.lua`

## Field Structure

```lua
{
    Key = "default_field", 
    Middle = vector3(771.279, -233.283, 65.214),
    FieldZone = createBoxZone(vector3(771.29, -233.41, 66.11), 77.600000000001, 119.6, {
        name="default_field",
        heading=333,
        minZ=30.91,
        maxZ=95.91,
    }),
    AreaZone = createBoxZone(vector3(771.02, -233.89, 66.11), 39.4, 69.0, {
        name="default_field_area",
        heading=333,
        minZ=30.91,
        maxZ=95.91,
    }),
    GoaleeZoneRed = createBoxZone(vector3(744.67, -220.58, 66.11), 20.6, 8.8, {
        name="default_field_goaleered",
        heading=334,
        minZ=65.11,
        maxZ=69.11,
        }),
    GoaleeZoneBlue = createBoxZone(vector3(798.15, -247.13, 66.11), 20.0, 7.6, {
        name="default_field_goaleeblue",
        heading=333,
        minZ=65.11,
        maxZ=69.11
    }),
    BlueTeamGoalZone = createBoxZone(vector3(740.98, -218.68, 66.11), 7.4, 0.4, {
        name="default_field_goalblue",
        heading=334,
        minZ=64.11,
        maxZ=68.11
    }),
    RedTeamGoalZone = createBoxZone(vector3(801.7, -248.6, 66.11), 7.4, 0.4, {
        name="default_field_goalred",
        heading=333,
        minZ=64.11,
        maxZ=68.11
    }),
    ManagerNPC = {
        coords = vector3(772.376, -211.728, 65.114),
        heading = 166.779,
        model = "ig_djsolrobt"
    },
    Positions = {
        { index = SoccerFieldPosition.GOALEE, team = RED_TEAM, position = vector3(741.93737792969, -219.08222961426, 66.114501953125), heading = 243.72 },
        { index = SoccerFieldPosition.RIGHT_PULLBACK, team = RED_TEAM, position = vector3(746.72015380859, -228.20501708984, 66.114501953125), heading = 243.72 },
        ...
    },
    TouchlinePositions = {
        { coords = vector4(735.550, -237.454, 66.116, 355.507 ) },
        { coords = vector4(738.542, -239.043, 66.117, 0.788) },
        ...
        { coords = vector4(792.475, -266.479, 66.107, 43.26), corner = true, team = BLUE_TEAM },
        { coords = vector4(809.908, -232.213, 66.114, 123.743), corner = true, team = BLUE_TEAM },
    },
```

{% hint style="info" %}
For setting up polyzones, please follow the official Polyzone script guide [here](https://github.com/mkafrin/PolyZone/wiki/Using-the-creation-script).
{% endhint %}

* `Key` - Field identifier, must be unique to each field
* `Middle` - Origin position of the ball, the middle of the field.
* `FieldZone` - Polyzone for the field, this area must be bigger than the actual field and cover the NPC location, everything will load when the player is inside this area
* `AreaZone` - Polyzone for the area of the soccer field, if the ball leaves this area then it's "out"
* `GoaleeZoneRed` - Polyzone for the red team's goalee area, where the goalee is able to use their hands.
* `GoaleeZoneBlue` - Same as above, for blue team.
* `BlueTeamGoalZone` - Polyzone for the blue team goal, must fit exactly the inside of the goal so whenever the ball enters this zone it's considered a goal, avoid overly thin zones as there may be detection problems depending on hardware.
* `RedTeamGoalZone` - Same as above, for red team.
* `ManagerNPC` - NPC that players can interact with to start games, configure, etc.
  * `coords` - Position of the NPC
  * `heading` - Heading angle of the NPC
  * `model` - Model name of the NPC
* `Positions` - Positions for all player spots, must be generated using the command /setupfield
* `TouchlinePositions` - A list of positions that cover all the edge of the field, you can space those however you want, the script will automatically choose the closer position to where the ball left the area. Cover all the left and right side of the field, and on the front and back side of the field only add the corners with the special properties as indicated below.
  * `coords` - vector4 containing x, y, z, and heading
  * `corner` - Specify `true` if this is a corner of the field
  * `team` - If this is a corner, specify the team that it belongs to

## Using the /setupfield command

{% embed url="<https://youtu.be/MNhq_ySjTjo>" %}

1. Position yourself in one side of the field, at the goalee's place (avoid being too close to the goal as that will make the goalee do an own-score unintentionally), move your camera until the spots are aligned with the other side of the field
2. Right click to lock the spots in position, you may right click again if you need to re-align but keep in mind it will move the goalee spot to where you are standing at the time.
3. Head to the opposite side of the field, and use "CTRL + Scroll Wheel" to adjust the adjacent goalee's position to match the other spot.
4. Use "SHIFT + Scroll Wheel" to adjust the vertical offset of all spots and adjust their distance to your liking, ideally equally close to the center ring.
5. Use "Scroll Wheel" to adjust the horizontal offset of all spots to your liking.
6. Press "Enter" to save the generated positions to "positions.txt" in your server's root directory.


# API

We've created our API to support natively from the configuration files the following partner resource:

[RCore Statistics & Achivements](https://store.rcore.cz/package/6273968)


# Client

```lua
repeat Wait(0) until statsInited

--- @param gameKey string
RegisterNetEvent("cdev_soccer:client:api:onMatchStart", function(gameKey) end)

--- @param gameKey string
--- @param scoringTeamId number
RegisterNetEvent("cdev_soccer:client:api:onGoal", function(gameKey, scoringTeamId) end)

--- @param gameKey string
RegisterNetEvent("cdev_soccer:client:api:onShot", function(gameKey) end)

--- @param gameKey string
--- @param targetPlayerServerId number
RegisterNetEvent("cdev_soccer:client:api:onTackle", function(gameKey, targetPlayerServerId) end)

--- @param gameKey string
RegisterNetEvent("cdev_soccer:client:api:onGameWin", function(gameKey) end)

--- @param gameKey string
RegisterNetEvent("cdev_soccer:client:api:onGameLoss", function(gameKey) end)

--- @param gameKey string
RegisterNetEvent("cdev_soccer:client:api:onSave", function(gameKey) end)

--- @param gameKey string
RegisterNetEvent("cdev_soccer:client:api:onPass", function(gameKey) end)

-- UI / Management
RegisterNetEvent("cdev_soccer:openManagerMenu", function() end)
RegisterNetEvent("cdev_soccer:checkManagerPermission", function() end)

--- @param areaData table
RegisterNetEvent("cdev_soccer:setGoaleeArea", function(areaData) end)

-- Field presence
RegisterNetEvent("cdev_soccer:enteredField", function() end)
RegisterNetEvent("cdev_soccer:leftField", function() end)

--- @param role string
RegisterNetEvent("cdev_soccer:joinAsRole", function(role) end)
RegisterNetEvent("cdev_soccer:leaveRole", function() end)

--- @param role string|number
RegisterNetEvent("cdev_soccer:requestControl", function(role) end)

--- @param teamId number
RegisterNetEvent("cdev_soccer:goal", function(teamId) end)

--- @param power number
--- @param direction vector3
RegisterNetEvent("cdev_soccer:shoot", function(power, direction) end)

RegisterNetEvent("cdev_soccer:playKickSfx", function() end)
RegisterNetEvent("cdev_soccer:out", function() end)

--- @param targetPlayerServerId number
RegisterNetEvent("cdev_soccer:tacklePlayer", function(targetPlayerServerId) end)

--- @param enabled boolean
RegisterNetEvent("cdev_soccer:setGoaleeMode", function(enabled) end)

-- Fields & State
RegisterNetEvent("cdev_soccer:fetchFields", function() end)

--- @param fieldId number
--- @param active boolean
RegisterNetEvent("cdev_soccer:setFieldActive", function(fieldId, active) end)

--- @param fieldId number
--- @param started boolean
RegisterNetEvent("cdev_soccer:setFieldStarted", function(fieldId, started) end)

--- @param players table
RegisterNetEvent("cdev_soccer:updateFieldPlayers", function(players) end)

--- @param data table
RegisterNetEvent("cdev_soccer:getTackled", function(data) end)

--- @param message string
--- @param type string
RegisterNetEvent("cdev_soccer:sendNotification", function(message, type) end)

--- @param seconds number
RegisterNetEvent("cdev_soccer:setCountdown", function(seconds) end)

RegisterNetEvent("cdev_soccer:beginRound", function() end)

--- @param settings table
RegisterNetEvent("cdev_soccer:updateFieldSettings", function(settings) end)

--- @param seconds number
RegisterNetEvent("cdev_soccer:updateTimer", function(seconds) end)

--- @param teamScore number
RegisterNetEvent("cdev_soccer:updateTeamScores", function(homeScore, awayScore) end)

--- @param data table
RegisterNetEvent("cdev_soccer:updateScoreboard", function(data) end)

--- @param winnerTeamId number
RegisterNetEvent("cdev_soccer:winner", function(winnerTeamId) end)

RegisterNetEvent("cdev_soccer:reset", function() end)

--- @param ballEntity number
RegisterNetEvent("cdev_soccer:setBall", function(ballEntity) end)

--- @param fieldId number
RegisterNetEvent("cdev_soccer:preloadField", function(fieldId) end)

--- @param hasPermission boolean
RegisterNetEvent("cdev_soccer:getPermission", function(hasPermission) end)

-- History / Persistence
--- @param positions table
RegisterNetEvent("cdev_soccer:save_positions", function(positions) end)

--- @param history table
RegisterNetEvent("cdev_soccer:fetchHistory", function(history) end)

-- Match lifecycle (client notices)
--- @param gameKey string
RegisterNetEvent("cdev_soccer:newMatch", function(gameKey) end)

--- @param gameKey string
RegisterNetEvent("cdev_soccer:endGame", function(gameKey) end)

--- @param settings table
RegisterNetEvent("cdev_soccer:updateSettings", function(settings) end)

-- Physics
--- @param data table
RegisterNetEvent("cdev_soccer:physicsShoot", function(data) end)

-- Integrations
RegisterNetEvent("cdev_lib:api:playerLoaded", function() end)

--- @param jobData table
RegisterNetEvent("cdev_lib:api:jobUpdate", function(jobData) end)

--- @param message string
--- @param type string
RegisterNetEvent("cdev_lib:AddNotification", function(message, type) end)

```


# Server

```lua
-- types
---@alias SoccerPlayer { serverId: number, playMode: GameplayMode, role: SoccerFieldPosition, team: number, goaleeMode: number, lastPickupInsideGoal?: boolean, inArea?: boolean }

-- API (server-side analytics/hooks)

--- @param gameKey string
--- @param players table  -- array<SoccerPlayer>
AddEventHandler("cdev_soccer:server:api:onMatchStart", function(gameKey, players) end)

--- @param gameKey string
--- @param sourcePlayerServerId number
--- @param scoringTeamId number
AddEventHandler("cdev_soccer:server:api:onGoal", function(gameKey, sourcePlayerServerId, scoringTeamId) end)

--- @param gameKey string
--- @param sourcePlayerServerId number
AddEventHandler("cdev_soccer:server:api:onShot", function(gameKey, sourcePlayerServerId) end)

--- @param sourcePlayerServerId number
--- @param gameKey string
--- @param targetPlayerServerId number
AddEventHandler("cdev_soccer:server:api:onTackle", function(sourcePlayerServerId, gameKey, targetPlayerServerId) end)

--- @param gameKey string
--- @param winningTeamId number
--- @param losingTeamId number
AddEventHandler("cdev_soccer:server:api:onGameEnd", function(gameKey, winningTeamId, losingTeamId) end)

--- @param gameKey string
--- @param playerServerId number
AddEventHandler("cdev_soccer:server:api:onSave", function(gameKey, playerServerId) end)

--- @param gameKey string
--- @param sourcePlayerServerId number
--- @param targetPlayerServerId number
AddEventHandler("cdev_soccer:server:api:onPass", function(gameKey, sourcePlayerServerId, targetPlayerServerId) end)

```


# RCore: Addon

Resource: FiveM Statistics & Achievement

<https://store.rcore.cz/package/6273968>

### Step 1: Head to configuration file located: cdev\_soccer/public/config.lua

Set the below config to **true**

```lua
    Addons = {
        rcore_stats = true, 
    },
```

### Step 2 (Optional): Configure the Achievements file located: cdev\_soccer/addons/rcore\_stats/config.lua

You can adjust the achievement titles and such here.

## Previews

<div><figure><img src="https://1004862655-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPhIA9eCA4bwgx77hxx4i%2Fuploads%2FbK2h8n10Mb63li7H8H6L%2Fimage.png?alt=media&amp;token=16ad802a-aa1a-4b9d-a781-b4a8e9392c70" alt=""><figcaption></figcaption></figure> <figure><img src="https://1004862655-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPhIA9eCA4bwgx77hxx4i%2Fuploads%2FK8jlkZ9vVXvywjiFdM4f%2Fimage2.png?alt=media&amp;token=8263f776-1cf3-40e1-82cc-38d66d5c647f" alt=""><figcaption></figcaption></figure></div>

<div><figure><img src="https://1004862655-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPhIA9eCA4bwgx77hxx4i%2Fuploads%2FvtVvKYfu7s0eVK9FgF08%2Fimage3.png?alt=media&amp;token=b10a10b6-ec2b-46ec-88b7-4a82e39f615e" alt=""><figcaption></figcaption></figure> <figure><img src="https://1004862655-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPhIA9eCA4bwgx77hxx4i%2Fuploads%2F8FIF4Y70d0t6F4eUNmKo%2Fimage4.png?alt=media&amp;token=919a25f4-1688-438e-8bef-09a68b238dc5" alt=""><figcaption></figcaption></figure> <figure><img src="https://1004862655-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPhIA9eCA4bwgx77hxx4i%2Fuploads%2FpkAiFPdEW3npMFSHocvZ%2Fimage5.png?alt=media&amp;token=c84cbd10-0479-4d8c-a13f-4dc641a569a2" alt=""><figcaption></figcaption></figure></div>


# Troubleshooting

common issues that customers may experience & why

### Anti-Cheat bans for infinite stamina

{% hint style="danger" %}
If you have an Anti-Cheat, you may need to whitelist our script to prevent this.\
Please check with your AC provider on how you can resolve this
{% endhint %}

### Soccer ball prop not spawning

{% hint style="danger" %}
This is also usually due to Anti-Cheat, please whitelist the ball prop:<br>
{% endhint %}


# Config Files: Soccer


# config.lua

```lua
PublicSharedSoccerConfig = {
    -- "pl" for normal PolyZone
    -- "ox" for ox_lib zones
    PolyZone = "pl",
    -- check fxmanifest after to see if everything implemented correctly

    Keybinds = {
        ShootBall = { "mouse_button", "mouse_right" },
        SecondaryAction = { "mouse_button", "mouse_left" },
        GoaleeStance = { "keyboard", "lcontrol" },
        Scoreboard = { "keyboard", "tab" },
        Instructions = { "keyboard", "f9" },
    },

    Permissions = {
        PermCreateField = PERMISSION_HIGH,
    },

    Style = {
        StaminaOffsetLeft = "1rem", 
        StaminaOffsetBottom = "7rem",
        KeyInstructionOffsetLeft = "2rem", 
        KeyInstructionOffsetBottom = "20rem",
    },

    UseTarget = true,
    UseGabzMBA = false,
    DisableGunUsage = false,
    WantNPCMarker = true,

    Drawtext = {
        ManagerMenuControl = 38,
    },

    Addons = {
        rcore_stats = false,
    },

    isUsingLoadExport = false, -- if you are using load export, set this to true

    CountdownStartMatch = 10,
    GoalIntermissionDuration = 5,
    OutIntermissionDuration = 3,
    WinnerIntermissionDuration = 5,
    StaminaCostSprintPerTick = 0.16,
    StaminaRecoverPerTick = 0.16,
    StaminaCostTackle = 25,
    StaminaCostDribble = 15,
    ScoreGoal = 100,
    ScoreGoalEveryone = 15,
    ScoreAssist = 75,
    ScoreShot = 30,
    ScorePass = 50,
    ScoreDefense = 50,

    -- It's not recommended to change these values unless you're sure of it as they will heavily impact gameplay
    ShootStrength = 40.0,
    ShootUpStrengthMultiplier = 10.0,
    ShootUpCAP = 20.0, -- Upwards strength is limited to this value to prevent the ball from flying too high

    BallEntityIgnoreRequestControlFilter = false,

    -- For development and support feedback only, do not use.
    Debug = false,
}
```


# fields.lua

```lua
-- ======= DO NOT EDIT THIS PART !!! FIELD CONFIGURATION BELOW !!! =========

local function createBoxZone(coords, width, height, data)
    if IsDuplicityVersion() then
        return
    end

    if PublicSharedSoccerConfig.PolyZone == "ox" then
        return lib.zones.box(
            {
                coords = coords,
                debug = true,
                size = vector3(height, width, coords.z),
                isInside = false,
                OnEnter = function(self)
                    self.isInside = true
                end,
                OnExit = function(self)
                    self.isInside = false
                end,
                isPointInside = function(self, point)
                    return self:contains(point)
                end,
                onPlayerInOut = function(self, onPointInOutCb)
                    CreateThread(function()
                        while self do
                            local point = GetEntityCoords(PlayerPedId())
                            local newIsInside = self:contains(point)
                            if newIsInside ~= self.isInside then
                                onPointInOutCb(newIsInside, point)
                                self.isInside = newIsInside
                            end
                            Wait(500)
                        end
                    end)
                end,
                rotation = data.heading,
            }
        )
    else
        return BoxZone:Create(coords, width, height, data)
    end
end

---@enum SoccerFieldPosition
SoccerFieldPosition = {
    GOALEE = 0,
    LEFT_PULLBACK = 1,
    RIGHT_PULLBACK = 2,
    LEFT_HALFBACK = 3,
    RIGHT_HALFBACK = 4,
    CENTER_HALFBACK = 5,
    LEFT_WING = 6,
    RIGHT_WING = 7,
    LEFT_INSIDE = 8,
    RIGHT_INSIDE = 9,
    CENTER_FORWARD = 10,
}

---@enum GoaleeMode
GoaleeMode = {
    NORMAL = 0,
    HANDS = 1,
}

---@enum GameplayMode
GameplayMode = {
    PLAYER = 0,
    GOALEE = 1,
}


RED_TEAM = 0
BLUE_TEAM = 1

-- =======================================
-- ______ _____ ______ _      _____   _____
-- |  ____|_   _|  ____| |    |  __ \ / ____|
-- | |__    | | | |__  | |    | |  | | (___
-- |  __|   | | |  __| | |    | |  | |\___ \
-- | |     _| |_| |____| |____| |__| |____) |
-- |_|    |_____|______|______|_____/|_____/

-- Hint: In order to generate positions easily, use the command /setupfield in game

---@type SoccerFieldSpec[]
SoccerFields = {
    -- Default Field
    {
        Key = "default_field",                       -- Field identifier, must be unique to each field or will error!
        Middle = vector3(771.279, -233.283, 65.214), -- Ball origin (middle)
        FieldZone = createBoxZone(vector3(771.29, -233.41, 66.11), 77.600000000001, 119.6,
            {                                        -- Polyzone for the field (must be bigger than the area zone and cover the npc)
                name = "default_field",
                heading = 333,
                minZ = 30.91,
                maxZ = 95.91,
            }),
        AreaZone = createBoxZone(vector3(771.02, -233.89, 66.11), 39.4, 69.0,
            { -- Polyzone for the area (if ball leaves this area it's "out")
                name = "default_field_area",
                heading = 333,
                minZ = 30.91,
                maxZ = 95.91,
            }),
        GoaleeZoneRed = createBoxZone(vector3(744.67, -220.58, 66.11), 20.6, 8.8,
            { -- Polyzone for the red team goalee area (where the goalee can use their hands)
                name = "default_field_goaleered",
                heading = 334,
                minZ = 65.11,
                maxZ = 69.11,
            }),
        GoaleeZoneBlue = createBoxZone(vector3(798.15, -247.13, 66.11), 20.0, 7.6,
            { -- Polyzone for the blue team goalee area (where the goalee can use their hands)
                name = "default_field_goaleeblue",
                heading = 333,
                minZ = 65.11,
                maxZ = 69.11
            }),
        RedTeamGoalZone = createBoxZone(vector3(740.98, -218.68, 66.11), 7.4, 0.4,
            { -- Polyzone for the red team goal (where the ball must be to score)
                name = "default_field_goalred",
                heading = 334,
                minZ = 64.11,
                maxZ = 68.11,
            }),
        BlueTeamGoalZone = createBoxZone(vector3(801.7, -248.6, 66.11), 7.4, 0.4,
            { -- Polyzone for the blue team goal (where the ball must be to score)
                name = "default_field_goalblue",
                heading = 333,
                minZ = 64.11,
                maxZ = 68.11
            }),
        ManagerNPC = { -- NPC that manages the field
            coords = vector3(772.376, -211.728, 65.114),
            heading = 166.779,
            model = "ig_djsolrobt"
        },
        Positions = { -- Positions for all player spots, generated with /setupfield
            { index = SoccerFieldPosition.GOALEE,          team = RED_TEAM,  position = vector3(741.93737792969, -219.08222961426, 66.114501953125), heading = 243.72 },
            { index = SoccerFieldPosition.RIGHT_PULLBACK,  team = RED_TEAM,  position = vector3(746.72015380859, -228.20501708984, 66.114501953125), heading = 243.72 },
            { index = SoccerFieldPosition.LEFT_PULLBACK,   team = RED_TEAM,  position = vector3(752.07208251953, -217.24157714844, 66.114501953125), heading = 243.72 },
            { index = SoccerFieldPosition.CENTER_HALFBACK, team = RED_TEAM,  position = vector3(756.85485839844, -226.36436462402, 66.114501953125), heading = 243.72 },
            { index = SoccerFieldPosition.RIGHT_HALFBACK,  team = RED_TEAM,  position = vector3(751.98547363281, -236.33929443359, 66.114501953125), heading = 243.72 },
            { index = SoccerFieldPosition.LEFT_HALFBACK,   team = RED_TEAM,  position = vector3(761.72424316406, -216.38943481445, 66.114501953125), heading = 243.72 },
            { index = SoccerFieldPosition.CENTER_FORWARD,  team = RED_TEAM,  position = vector3(764.31353759766, -230.00543212891, 66.114501953125), heading = 243.72 },
            { index = SoccerFieldPosition.RIGHT_INSIDE,    team = RED_TEAM,  position = vector3(761.63757324219, -235.48715209961, 66.114501953125), heading = 243.72 },
            { index = SoccerFieldPosition.LEFT_INSIDE,     team = RED_TEAM,  position = vector3(766.98950195313, -224.5237121582, 66.114501953125),  heading = 243.72 },
            { index = SoccerFieldPosition.RIGHT_WING,      team = RED_TEAM,  position = vector3(759.88287353516, -239.08171081543, 66.114501953125), heading = 243.72 },
            { index = SoccerFieldPosition.LEFT_WING,       team = RED_TEAM,  position = vector3(768.74426269531, -220.92913818359, 66.114501953125), heading = 243.72 },
            { index = SoccerFieldPosition.GOALEE,          team = BLUE_TEAM, position = vector3(800.61871337891, -247.72821044922, 66.114501953125), heading = 63.72 },
            { index = SoccerFieldPosition.RIGHT_PULLBACK,  team = BLUE_TEAM, position = vector3(795.8359375, -238.60543823242, 66.114501953125),     heading = 63.72 },
            { index = SoccerFieldPosition.LEFT_PULLBACK,   team = BLUE_TEAM, position = vector3(790.48400878906, -249.56886291504, 66.114501953125), heading = 63.72 },
            { index = SoccerFieldPosition.CENTER_HALFBACK, team = BLUE_TEAM, position = vector3(785.70123291016, -240.44609069824, 66.114501953125), heading = 63.72 },
            { index = SoccerFieldPosition.RIGHT_HALFBACK,  team = BLUE_TEAM, position = vector3(790.57061767578, -230.47116088867, 66.114501953125), heading = 63.72 },
            { index = SoccerFieldPosition.LEFT_HALFBACK,   team = BLUE_TEAM, position = vector3(780.83190917969, -250.42102050781, 66.114501953125), heading = 63.72 },
            { index = SoccerFieldPosition.CENTER_FORWARD,  team = BLUE_TEAM, position = vector3(778.24249267578, -236.80502319336, 66.114501953125), heading = 63.72 },
            { index = SoccerFieldPosition.RIGHT_INSIDE,    team = BLUE_TEAM, position = vector3(780.91845703125, -231.32330322266, 66.114501953125), heading = 63.72 },
            { index = SoccerFieldPosition.LEFT_INSIDE,     team = BLUE_TEAM, position = vector3(775.56652832031, -242.28674316406, 66.114501953125), heading = 63.72 },
            { index = SoccerFieldPosition.RIGHT_WING,      team = BLUE_TEAM, position = vector3(782.67321777344, -227.72874450684, 66.114501953125), heading = 63.72 },
            { index = SoccerFieldPosition.LEFT_WING,       team = BLUE_TEAM, position = vector3(773.81182861328, -245.88131713867, 66.114501953125), heading = 63.72 },
        },
        TouchlinePositions = { -- Positions for throwing the ball when the ball goes out (closer selected automatically)
            { coords = vector4(735.550, -237.454, 66.116, 355.507) },
            { coords = vector4(738.542, -239.043, 66.117, 0.788) },
            { coords = vector4(741.017, -240.326, 66.115, 348.075) },
            { coords = vector4(743.991, -241.887, 66.114, 338.533) },
            { coords = vector4(746.842, -243.291, 66.114, 347.581) },
            { coords = vector4(749.714, -244.771, 66.114, 342.3) },
            { coords = vector4(752.529, -246.293, 66.114, 331.905) },
            { coords = vector4(755.395, -247.770, 66.114, 343.135) },
            { coords = vector4(758.161, -249.240, 66.114, 359.89) },
            { coords = vector4(760.483, -250.279, 66.114, 14.772) },
            { coords = vector4(763.671, -251.987, 66.114, 344.414) },
            { coords = vector4(766.308, -253.368, 66.114, 3.52) },
            { coords = vector4(769.143, -254.707, 66.114, 353.553) },
            { coords = vector4(771.905, -256.134, 66.114, 11.644) },
            { coords = vector4(775.027, -257.729, 66.114, 332.952) },
            { coords = vector4(777.878, -259.228, 66.114, 338.654) },
            { coords = vector4(780.592, -260.486, 66.114, 354.927) },
            { coords = vector4(783.431, -261.976, 66.114, 347.298) },
            { coords = vector4(786.857, -263.722, 66.111, 350.137) },
            { coords = vector4(789.666, -265.264, 66.107, 336.45) },
            { coords = vector4(806.676, -230.423, 66.114, 173.205) },
            { coords = vector4(803.783, -229.089, 66.114, 164.92) },
            { coords = vector4(800.710, -227.406, 66.114, 172.844) },
            { coords = vector4(797.887, -226.017, 66.114, 180.16) },
            { coords = vector4(794.749, -224.459, 66.114, 179.077) },
            { coords = vector4(791.520, -222.873, 66.114, 166.601) },
            { coords = vector4(788.420, -221.083, 66.114, 175.163) },
            { coords = vector4(785.380, -219.699, 66.114, 194.137) },
            { coords = vector4(782.516, -218.241, 66.116, 158.089) },
            { coords = vector4(779.722, -216.800, 66.116, 186.271) },
            { coords = vector4(776.900, -215.421, 66.116, 158.682) },
            { coords = vector4(773.146, -213.616, 66.114, 166.327) },
            { coords = vector4(770.191, -212.189, 66.114, 160.581) },
            { coords = vector4(767.245, -210.585, 66.114, 174.074) },
            { coords = vector4(764.345, -209.168, 66.114, 148.847) },
            { coords = vector4(761.699, -207.790, 66.114, 164.96) },
            { coords = vector4(758.868, -206.373, 66.114, 172.699) },
            { coords = vector4(755.570, -204.721, 66.114, 145.185) },
            { coords = vector4(752.080, -203.074, 66.114, 162.307) },
            { coords = vector4(792.475, -266.479, 66.107, 43.26),   corner = true, team = BLUE_TEAM },
            { coords = vector4(809.908, -232.213, 66.114, 123.743), corner = true, team = BLUE_TEAM },
            { coords = vector4(749.295, -201.838, 66.114, 222.925), corner = true, team = RED_TEAM },
            { coords = vector4(732.736, -235.856, 66.114, 295.626), corner = true, team = RED_TEAM },
        },
    },
    -- MBA Field
    {
        Key = "mba_field",
        Middle = vector3(-324.230011, -1968.500000, 20.745253), -- since this field requires a special setup, do not change this position or it will break the field
        IsGabzMBA = true,
        FieldZone = createBoxZone(vector3(-324.33, -1968.61, 21.62), 37.0, 63.8, {
            name = "mba_field",
            heading = 320,
            minZ = 20.62,
            maxZ = 43.82,
            debugPoly = false
        }),
        AreaZone = createBoxZone(vector3(-324.31, -1968.43, 21.62), 30.2, 60.25, {
            name = "mba_area",
            heading = 320,
            minZ = 20.62,
            maxZ = 43.82,
            debugPoly = false
        }),
        GoaleeZoneRed = createBoxZone(vector3(-304.8, -1984.75, 21.62), 8.25, 9.8, {
            name = "mba_field_goaleered",
            heading = 320,
            minZ = 20.62,
            maxZ = 43.82,
            debugPoly = false,
        }),
        GoaleeZoneBlue = createBoxZone(vector3(-343.59, -1952.2, 21.62), 8.25, 9.8, {
            name = "mba_field_goaleeblue",
            heading = 320,
            minZ = 20.62,
            maxZ = 43.82,
            debugPoly = false,
        }),
        RedTeamGoalZone = createBoxZone(vector3(-300.87, -1988.09, 21.62), 5.45, 0.8, {
            name = "mba_field_goalred",
            heading = 320,
            debugPoly = false,
            minZ = 19.27,
            maxZ = 23.27,
        }),
        BlueTeamGoalZone = createBoxZone(vector3(-347.59, -1948.87, 21.62), 5.45, 0.8, {
            name = "mba_field_goalblue",
            heading = 320,
            debugPoly = false,
            minZ = 19.22,
            maxZ = 23.22
        }),
        ManagerNPC = {
            coords = vector3(-319.52, -1952.22, 20.6),
            heading = 272.44,
            model = "ig_djsolrobt"
        },
        Positions = {
            { index = SoccerFieldPosition.GOALEE,          team = RED_TEAM,  position = vector3(-302.70343017578, -1986.6872558594, 21.620252609253), heading = 49.754508972168 },
            { index = SoccerFieldPosition.RIGHT_PULLBACK,  team = RED_TEAM,  position = vector3(-305.04507446289, -1978.1545410156, 21.620252609253), heading = 49.754508972168 },
            { index = SoccerFieldPosition.LEFT_PULLBACK,   team = RED_TEAM,  position = vector3(-311.50570678711, -1985.7873535156, 21.620252609253), heading = 49.754508972168 },
            { index = SoccerFieldPosition.CENTER_HALFBACK, team = RED_TEAM,  position = vector3(-313.8473815918, -1977.2547607422, 21.620252609253),  heading = 49.754508972168 },
            { index = SoccerFieldPosition.RIGHT_HALFBACK,  team = RED_TEAM,  position = vector3(-307.38671875, -1969.6219482422, 21.620252609253),    heading = 49.754508972168 },
            { index = SoccerFieldPosition.LEFT_HALFBACK,   team = RED_TEAM,  position = vector3(-320.30801391602, -1984.8875732422, 21.620252609253), heading = 49.754508972168 },
            { index = SoccerFieldPosition.CENTER_FORWARD,  team = RED_TEAM,  position = vector3(-319.41934204102, -1972.5384521484, 21.620252609253), heading = 49.754508972168 },
            { index = SoccerFieldPosition.RIGHT_INSIDE,    team = RED_TEAM,  position = vector3(-316.18902587891, -1968.7220458984, 21.620252609253), heading = 49.754508972168 },
            { index = SoccerFieldPosition.LEFT_INSIDE,     team = RED_TEAM,  position = vector3(-322.64965820313, -1976.3548583984, 21.620252609253), heading = 49.754508972168 },
            { index = SoccerFieldPosition.RIGHT_WING,      team = RED_TEAM,  position = vector3(-313.6047668457, -1965.6689453125, 21.620252609253),  heading = 49.754508972168 },
            { index = SoccerFieldPosition.LEFT_WING,       team = RED_TEAM,  position = vector3(-325.23391723633, -1979.4079589844, 21.620252609253), heading = 49.754508972168 },
            { index = SoccerFieldPosition.GOALEE,          team = BLUE_TEAM, position = vector3(-345.75262451172, -1950.2492675781, 21.620252609253), heading = 229.75450134277 },
            { index = SoccerFieldPosition.RIGHT_PULLBACK,  team = BLUE_TEAM, position = vector3(-343.41098022461, -1958.7819824219, 21.620252609253), heading = 229.75450134277 },
            { index = SoccerFieldPosition.LEFT_PULLBACK,   team = BLUE_TEAM, position = vector3(-336.95034790039, -1951.1491699219, 21.620252609253), heading = 229.75450134277 },
            { index = SoccerFieldPosition.CENTER_HALFBACK, team = BLUE_TEAM, position = vector3(-334.60870361328, -1959.6817626953, 21.620252609253), heading = 229.75450134277 },
            { index = SoccerFieldPosition.RIGHT_HALFBACK,  team = BLUE_TEAM, position = vector3(-341.0693359375, -1967.3146972656, 21.620252609253),  heading = 229.75450134277 },
            { index = SoccerFieldPosition.LEFT_HALFBACK,   team = BLUE_TEAM, position = vector3(-328.14804077148, -1952.0489501953, 21.620252609253), heading = 229.75450134277 },
            { index = SoccerFieldPosition.CENTER_FORWARD,  team = BLUE_TEAM, position = vector3(-329.03671264648, -1964.3980712891, 21.620252609253), heading = 229.75450134277 },
            { index = SoccerFieldPosition.RIGHT_INSIDE,    team = BLUE_TEAM, position = vector3(-332.26705932617, -1968.2144775391, 21.620252609253), heading = 229.75450134277 },
            { index = SoccerFieldPosition.LEFT_INSIDE,     team = BLUE_TEAM, position = vector3(-325.80639648438, -1960.5816650391, 21.620252609253), heading = 229.75450134277 },
            { index = SoccerFieldPosition.RIGHT_WING,      team = BLUE_TEAM, position = vector3(-334.8512878418, -1971.267578125, 21.620252609253),   heading = 229.75450134277 },
            { index = SoccerFieldPosition.LEFT_WING,       team = BLUE_TEAM, position = vector3(-323.22213745117, -1957.5285644531, 21.620252609253), heading = 229.75450134277 },
        },
        TouchlinePositions = {
            { coords = vector4(-319.98, -1991.31, 21.62, 334.15) },
            { coords = vector4(-323.26, -1988.54, 21.62, 306.95) },
            { coords = vector4(-326.5, -1985.72, 21.62, 344.9) },
            { coords = vector4(-329.87, -1983.03, 21.62, 315.47) },
            { coords = vector4(-332.85, -1980.52, 21.62, 329.66) },
            { coords = vector4(-336.5, -1977.47, 21.62, 320.53) },
            { coords = vector4(-339.8, -1974.7, 21.62, 339.69) },
            { coords = vector4(-342.63, -1972.31, 21.62, 321.61) },
            { coords = vector4(-345.35, -1970.01, 21.62, 342.17) },
            { coords = vector4(-348.04, -1967.78, 21.62, 307.57) },
            { coords = vector4(-325.88, -1947.82, 21.62, 140.77) },
            { coords = vector4(-322.96, -1950.33, 21.62, 145.21) },
            { coords = vector4(-320.4, -1952.42, 21.62, 157.88) },
            { coords = vector4(-317.4, -1954.97, 21.62, 158.17) },
            { coords = vector4(-314.52, -1957.42, 21.62, 150.34) },
            { coords = vector4(-311.86, -1959.65, 21.62, 153.63) },
            { coords = vector4(-308.52, -1962.37, 21.62, 116.69) },
            { coords = vector4(-306.05, -1964.46, 21.62, 158.72) },
            { coords = vector4(-302.51, -1967.46, 21.62, 142.15) },
            { coords = vector4(-300.03, -1969.63, 21.62, 130.02) },
            { coords = vector4(-337.46, -1942.26, 21.62, 181.02), corner = true, team = BLUE_TEAM },
            { coords = vector4(-352.18, -1961.1, 21.62, 329.97),  corner = true, team = BLUE_TEAM },
            { coords = vector4(-312.71, -1994.75, 21.62, 345.31), corner = true, team = RED_TEAM },
            { coords = vector4(-296.43, -1975.06, 21.62, 142.28), corner = true, team = RED_TEAM },
        },
    }
}

if not IsDuplicityVersion() then
    -- Add scenario blocks here if needed
    SetPedPathsInArea(749.258, -201.411, 0.0, 793.137, -267.084, 90.0, false)
    AddScenarioBlockingArea(749.258, -201.411, 0.0, 793.137, -267.084, 90.0, false, true, true, true)
end
```


# Installation Guide QBCore Framework

{% stepper %}
{% step %}

### Install all resources dependencies

Make sure you have all of the following resources installed:

* cdev\_lib <mark style="color:green;">(included with this resource)</mark>
* cdev\_soccer
* xsound [<mark style="color:orange;">(download here)</mark>](https://github.com/Xogy/xsound)
* PolyZone [(download here)](https://github.com/mkafrin/PolyZone/releases/tag/v2.6.1)
  {% endstep %}

{% step %}

### Extract Ziped File

* Extract the contents of <mark style="color:yellow;">cdev\_soccer.pack.zip</mark> after extract should contain the `cdev_soccer` folder.
  {% endstep %}

{% step %}

### Organizing Your Resource Folders

🚩<mark style="color:red;">**Correct folder organization is essential for everything to work properly.**</mark>

➤ Step 1: Create the `[cdev]` folder. Inside your server's `resources` folder and Place **only** the following resource inside:

* cdev\_soccer

➤ Step 2: Add `cdev_lib` to the Resources Root

➤ Step 3: Add `xsound` to the Resources Root

➤ Step 4: Add `PolyZone` to the Resources Root

**Below is an example screenshot showing the correct folder structure:**

<div align="left"><figure><img src="https://1004862655-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPhIA9eCA4bwgx77hxx4i%2Fuploads%2FDVNz0Enjxuc2YRxxc64f%2FFoldersImage.png?alt=media&amp;token=85222a13-91da-4b2f-9fc0-e027623050bc" alt=""><figcaption></figcaption></figure></div>
{% endstep %}

{% step %}

### Server.cfg Configuration

This resource must always be started **after your&#x20;**<mark style="color:yellow;">**framework**</mark>**&#x20;and any&#x20;**<mark style="color:yellow;">**other**</mark>**&#x20;required resources**.

It is essential to follow the correct startup order to ensure proper functionality and avoid conflicts.

**Below is an example screenshot showing the recommended startup order:**

<div align="left"><figure><img src="https://1004862655-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPhIA9eCA4bwgx77hxx4i%2Fuploads%2FmdgVKePxfqeb5NHCxLn1%2FSoocer%20CFG.png?alt=media&amp;token=f22a1804-755b-4b87-a54b-f59fd669958a" alt=""><figcaption></figcaption></figure></div>
{% endstep %}

{% step %}

### Cdev\_lib Configuration

For the game system and the connection between your <mark style="color:yellow;">framework</mark> and the resources to work correctly, you need to configure the `cdev_lib` resource properly according to your <mark style="color:yellow;">framework</mark>. For more details, click the link below to follow the instructions.

{% tabs %}
{% tab title="QBCore" %}
{% content-ref url="/pages/PkCCFDz1sdRi0ZwCg0nY" %}
[QBCore/QBox Configuration](https://docs.cdev.shop/fivem/cdev-library/qbcore-qbox-configuration)
{% endcontent-ref %}
{% endtab %}
{% endtabs %}
{% endstep %}

{% step %}

### Cdev\_soccer Configuration

🚩 <mark style="color:red;">To work correctly,</mark> <mark style="color:yellow;">**cdev\_soccer**</mark> <mark style="color:red;">requires the proper configuration of the polyzone in the</mark> `config.lua` <mark style="color:red;">file located in the</mark> `cdev_soccer > public > config > config.lua` <mark style="color:red;">folder.</mark>\ <mark style="color:red;">Below is how the file should be configured to ensure everything functions properly.</mark>

<div align="left"><figure><img src="https://1004862655-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPhIA9eCA4bwgx77hxx4i%2Fuploads%2FFhBpBsKnbVqxnYlYruYf%2Fimage.png?alt=media&amp;token=76e70a87-4d13-4ea0-95c5-5662c793f1d8" alt=""><figcaption></figcaption></figure></div>
{% endstep %}

{% step %}

### Starting match in-game

**Location Default Field:** `vec4(770.54, -214.28, 66.11, 322.44)`

<figure><img src="https://1004862655-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPhIA9eCA4bwgx77hxx4i%2Fuploads%2FvXVVWP45dW8j8NZLTfhX%2FFiveM_GTAProcess_3PhcGEZBei%20(online-video-cutter.com).gif?alt=media&amp;token=1e6d1c27-1e9c-4ae8-854a-21b1d6710e3f" alt=""><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}


# Installation Guide QBox Framework

{% stepper %}
{% step %}

### Install all resources dependencies

Make sure you have all of the following resources installed:

* cdev\_lib <mark style="color:green;">(included with this resource)</mark>
* cdev\_soccer
* xsound [<mark style="color:orange;">(download here)</mark>](https://github.com/Xogy/xsound)
  {% endstep %}

{% step %}

### Extract Ziped File

* Extract the contents of <mark style="color:yellow;">cdev\_soccer.pack.zip</mark> after extract should contain the `cdev_soccer` folder.
  {% endstep %}

{% step %}

### Organizing Your Resource Folders

🚩<mark style="color:red;">**Correct folder organization is essential for everything to work properly.**</mark>

➤ Step 1: Create the `[cdev]` folder. Inside your server's `resources` folder and Place **only** the following resource inside:

* cdev\_soccer

➤ Step 2: Add `cdev_lib` to the Resources Root

➤ Step 3: Add `xsound` to the Resources Root

**Below is an example screenshot showing the correct folder structure:**

<div align="left"><figure><img src="https://1004862655-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPhIA9eCA4bwgx77hxx4i%2Fuploads%2FphbutTKqEKpkmx05vVOE%2FFolders.png?alt=media&amp;token=fb9010f6-2af5-497c-80fd-cc239f797efc" alt=""><figcaption></figcaption></figure></div>
{% endstep %}

{% step %}

### Server.cfg Configuration

This resource must always be started **after your&#x20;**<mark style="color:yellow;">**framework**</mark>**&#x20;and any&#x20;**<mark style="color:yellow;">**other**</mark>**&#x20;required resources**.

It is essential to follow the correct startup order to ensure proper functionality and avoid conflicts.

**Below is an example screenshot showing the recommended startup order:**

<div align="left"><figure><img src="https://1004862655-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPhIA9eCA4bwgx77hxx4i%2Fuploads%2FRwPLFHoH7kuIUHUbT8vJ%2FServerCFG.png?alt=media&amp;token=28fd2559-3400-4554-bf35-c8d2e6e7aacf" alt=""><figcaption></figcaption></figure></div>
{% endstep %}

{% step %}

### Cdev\_lib Configuration

For the game system and the connection between your <mark style="color:yellow;">framework</mark> and the resources to work correctly, you need to configure the `cdev_lib` resource properly according to your <mark style="color:yellow;">framework</mark>. For more details, click the link below to follow the instructions.

{% tabs %}
{% tab title="QBox" %}
{% content-ref url="/pages/PkCCFDz1sdRi0ZwCg0nY" %}
[QBCore/QBox Configuration](https://docs.cdev.shop/fivem/cdev-library/qbcore-qbox-configuration)
{% endcontent-ref %}
{% endtab %}
{% endtabs %}
{% endstep %}

{% step %}

### Cdev\_soccer Configuration

➤ Step 1: 🚩 <mark style="color:red;">To work correctly,</mark> <mark style="color:yellow;">**cdev\_soccer**</mark> <mark style="color:red;">requires the proper configuration of the polyzone in the</mark> `config.lua` <mark style="color:red;">file located in the</mark> `cdev_soccer > public > config > config.lua` <mark style="color:red;">folder.</mark>\ <mark style="color:red;">Below is how the file should be configured to ensure everything functions properly.</mark>

<div align="left"><figure><img src="https://1004862655-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPhIA9eCA4bwgx77hxx4i%2Fuploads%2FtXvPOMEqXRGOlaUMbqCh%2Fimage.png?alt=media&amp;token=6b0c3106-2698-4df1-bc0a-45dd4018b013" alt=""><figcaption></figcaption></figure></div>

➤ Step 2: <mark style="color:red;">**As in the case of**</mark> <mark style="color:yellow;">**QBox**</mark><mark style="color:red;">**, we use**</mark> **`ox_lib`** <mark style="color:red;">**to mark the**</mark> <mark style="color:yellow;">**zones**</mark><mark style="color:red;">**, it is necessary to enable the**</mark> **`ox_lib`** <mark style="color:$success;">**dependency**</mark> <mark style="color:red;">**inside the**</mark> <mark style="color:yellow;">**fxmanifest.lua**</mark> <mark style="color:red;">**file located in the**</mark> <mark style="color:yellow;">**cdev\_soccer**</mark> <mark style="color:red;">**folder. Leave the file exactly as shown in the picture bellow.**</mark>

<div align="left"><figure><img src="https://1004862655-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPhIA9eCA4bwgx77hxx4i%2Fuploads%2Fdyr1nkZIW0j5oPfFM5Ny%2Fimage.png?alt=media&amp;token=c50a828f-7086-4e1f-b798-4f97e4aae7cc" alt=""><figcaption></figcaption></figure></div>
{% endstep %}

{% step %}

### Starting match in-game

**Location Default Field:** `vec4(770.54, -214.28, 66.11, 322.44)`

<figure><img src="https://1004862655-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPhIA9eCA4bwgx77hxx4i%2Fuploads%2FvXVVWP45dW8j8NZLTfhX%2FFiveM_GTAProcess_3PhcGEZBei%20(online-video-cutter.com).gif?alt=media&amp;token=1e6d1c27-1e9c-4ae8-854a-21b1d6710e3f" alt=""><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}


# Installation Guide ESX Framework

{% stepper %}
{% step %}

### Install all resources dependencies

Make sure you have all of the following resources installed:

* cdev\_lib <mark style="color:green;">(included with this resource)</mark>
* cdev\_soccer
* xsound [<mark style="color:orange;">(download here)</mark>](https://github.com/Xogy/xsound)
  {% endstep %}

{% step %}

### Extract Ziped File

* Extract the contents of <mark style="color:yellow;">cdev\_soccer.pack.zip</mark> after extract should contain the `cdev_soccer` folder.
  {% endstep %}

{% step %}

### Organizing Your Resource Folders

🚩<mark style="color:red;">**Correct folder organization is essential for everything to work properly.**</mark>

➤ Step 1: Create the `[cdev]` folder. Inside your server's `resources` folder and Place **only** the following resource inside:

* cdev\_soccer

➤ Step 2: Add `cdev_lib` to the Resources Root

➤ Step 3: Add `xsound` to the Resources Root

**Below is an example screenshot showing the correct folder structure:**

<div align="left"><figure><img src="https://1004862655-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPhIA9eCA4bwgx77hxx4i%2Fuploads%2FJPS9j41Vqb90Ilbjeymp%2FFoldersImage.png?alt=media&amp;token=2d7239f2-fb28-4a16-91c9-2e7c12f35f36" alt=""><figcaption></figcaption></figure></div>
{% endstep %}

{% step %}

### Server.cfg Configuration

This resource must always be started **after your&#x20;**<mark style="color:yellow;">**framework**</mark>**&#x20;and any&#x20;**<mark style="color:yellow;">**other**</mark>**&#x20;required resources**.

It is essential to follow the correct startup order to ensure proper functionality and avoid conflicts.

**Below is an example screenshot showing the recommended startup order:**

<div align="left"><figure><img src="https://1004862655-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPhIA9eCA4bwgx77hxx4i%2Fuploads%2Fby4vKTKYqB4X2AdC93cy%2Fimage.png?alt=media&amp;token=a28816d0-c1f5-436a-be5d-12148db95513" alt=""><figcaption></figcaption></figure></div>
{% endstep %}

{% step %}

### Cdev\_lib Configuration

For the game system and the connection between your <mark style="color:yellow;">framework</mark> and the resources to work correctly, you need to configure the `cdev_lib` resource properly according to your <mark style="color:yellow;">framework</mark>. For more details, click the link below to follow the instructions.

{% tabs %}
{% tab title="ESX" %}
{% content-ref url="/pages/Yi1MUNc2bDxhthgwzwsL" %}
[ESX Configuration](https://docs.cdev.shop/fivem/cdev-library/esx-configuration)
{% endcontent-ref %}
{% endtab %}
{% endtabs %}
{% endstep %}

{% step %}

### Cdev\_soccer Configuration

➤ Step 1: 🚩 <mark style="color:red;">To work correctly,</mark> <mark style="color:yellow;">**cdev\_soccer**</mark> <mark style="color:red;">requires the proper configuration of the polyzone in the</mark> `config.lua` <mark style="color:red;">file located in the</mark> `cdev_soccer > public > config > config.lua` <mark style="color:red;">folder.</mark>\ <mark style="color:red;">Below is how the file should be configured to ensure everything functions properly.</mark>

<div align="left"><figure><img src="https://1004862655-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPhIA9eCA4bwgx77hxx4i%2Fuploads%2FtXvPOMEqXRGOlaUMbqCh%2Fimage.png?alt=media&amp;token=6b0c3106-2698-4df1-bc0a-45dd4018b013" alt=""><figcaption></figcaption></figure></div>

➤ Step 2: <mark style="color:red;">**As in the case of**</mark> <mark style="color:yellow;">**ESX**</mark><mark style="color:red;">**, we use**</mark> **`ox_lib`** <mark style="color:red;">**to mark the**</mark> <mark style="color:yellow;">**zones**</mark><mark style="color:red;">**, it is necessary to enable the**</mark> **`ox_lib`** <mark style="color:$success;">**dependency**</mark> <mark style="color:red;">**inside the**</mark> <mark style="color:yellow;">**fxmanifest.lua**</mark> <mark style="color:red;">**file located in the**</mark> <mark style="color:yellow;">**cdev\_soccer**</mark> <mark style="color:red;">**folder. Leave the file exactly as shown in the picture bellow.**</mark>

<div align="left"><figure><img src="https://1004862655-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPhIA9eCA4bwgx77hxx4i%2Fuploads%2Fdyr1nkZIW0j5oPfFM5Ny%2Fimage.png?alt=media&amp;token=c50a828f-7086-4e1f-b798-4f97e4aae7cc" alt=""><figcaption></figcaption></figure></div>
{% endstep %}

{% step %}

### Starting match in-game

**Location Default Field:** `vec4(770.54, -214.28, 66.11, 322.44)`

<figure><img src="https://1004862655-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPhIA9eCA4bwgx77hxx4i%2Fuploads%2FvXVVWP45dW8j8NZLTfhX%2FFiveM_GTAProcess_3PhcGEZBei%20(online-video-cutter.com).gif?alt=media&amp;token=1e6d1c27-1e9c-4ae8-854a-21b1d6710e3f" alt=""><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}


# cDev Games

Questions, Truth or Dare & Spin the Bottle

## SHOWCASE VIDEO

{% embed url="<https://youtu.be/NNdx1886pNw>" %}

## What is this resource?

This resource provides quick and easy entertainment including two games

* Truth or Dare (by spinning a custom 3d model bottle)
* Questions Game (configurable by choice in `config.lua`
* Couples Quiz

## INSTALLATION GUIDE

{% content-ref url="/pages/JTlGv9KfXVA0HkhusVBH" %}
[Installation Guide QBCore Framework](https://docs.cdev.shop/fivem/cdev-games/installation-guide-qbcore-framework)
{% endcontent-ref %}

{% content-ref url="/pages/6EdSd6zkmleIrlufZCNi" %}
[Installation Guide QBox Framework](https://docs.cdev.shop/fivem/cdev-games/installation-guide-qbox-framework)
{% endcontent-ref %}

{% content-ref url="/pages/Qbv7a9uPpTNob0hZ27LU" %}
[Installation Guide ESX Framework](https://docs.cdev.shop/fivem/cdev-games/installation-guide-esx-framework)
{% endcontent-ref %}

{% hint style="warning" %}
Make sure that cdev\_lib is started before cdev\_games
{% endhint %}

{% hint style="danger" %}
**Do not modify the encrypted files in any way, as this may cause issues with the resource's functionality.**
{% endhint %}


# OX Inventory

Images & format to add to your inventory.

## Step one

Add images to `ox_inventory/web/images`

Images are available in the `images` folder of this resource.

## Step two

Add items to `ox_inventory/data/items.lua` like listed below

```etlua
	["aboutme"] = {
		label = "About Me Box",
		weight = 100,
		consume = 0,
		stack = true,
		close = true,
		client = {
			image = "aboutme.png",
			export = "cdev_games.use",
			type = 'aboutme'
		}
	},

	["fetish"] = {
		label = "Fetish Box",
		weight = 100,
		consume = 0,
		stack = true,
		close = true,
		client = {
			image = "fetish.png",
			export = "cdev_games.use",
			type = 'fetish'
		}
	},

	["morally"] = {
		label = "About Me Box",
		weight = 100,
		consume = 0,
		stack = true,
		close = true,
		client = {
			image = "morally.png",
			export = "cdev_games.use",
			type = 'morally'
		}
	},

	["sensualus"] = {
		label = "Sensualus Box",
		weight = 100,
		consume = 0,
		stack = true,
		close = true,
		client = {
			image = "sensualus.png",
			export = "cdev_games.use",
			type = 'sensualus'
		}
	},

	["truthordare"] = {
		label = "Truth or Dare Box",
		weight = 100,
		consume = 0,
		stack = true,
		close = true,
		client = {
			image = "truthordare.png",
			export = "cdev_games.use",
			type = 'truthordare'
		}
	},

	["would_you_rather"] = {
		label = "Would you Rather Box",
		weight = 100,
		consume = 0,
		stack = true,
		close = true,
		client = {
			image = "would_you_rather.png",
			export = "cdev_games.use",
			type = 'would_you_rather'
		}
	},
	
	["couplesquiz"] = {
        	label = "Couples Quiz Box",
        	weight = 100,
        	consume = 0,
        	stack = true,
        	close = true,
        	client = {
            		image = "couplesquiz.png",
            		export = "cdev_games.use",
            		type = 'couplesquiz'
        }
    },
```


# QB Inventory

Images & format to add to your inventory.

## Step one

Add images to `qb-inventory/html/images`

Images are available in the `images` folder of this resource.

## Step two

Add items to `qb-core/shared/items.lua` like listed below

```etlua
aboutme                      = { name = 'aboutme', label = 'About Me Box', weight = 100, type = 'item', image = 'aboutme.png', unique = true, useable = true, shouldClose = true, combinable = nil, description = 'About Me Box' },
fetish                       = { name = 'fetish', label = 'Fetish Box', weight = 100, type = 'item', image = 'fetish.png', unique = true, useable = true, shouldClose = true, combinable = nil, description = 'Fetish Box' },
morally                      = { name = 'morally', label = 'About Me Box', weight = 100, type = 'item', image = 'morally.png', unique = true, useable = true, shouldClose = true, combinable = nil, description = 'About Me Box' },
sensualus                    = { name = 'sensualus', label = 'Sensualus Box', weight = 100, type = 'item', image = 'sensualus.png', unique = true, useable = true, shouldClose = true, combinable = nil, description = 'Sensualus Box' },
truthordare                  = { name = 'truthordare', label = 'Truth or Dare Box', weight = 100, type = 'item', image = 'truthordare.png', unique = true, useable = true, shouldClose = true, combinable = nil, description = 'Truth or Dare Box' },
would_you_rather             = { name = 'would_you_rather', label = 'Would you Rather Box', weight = 100, type = 'item', image = 'would_you_rather.png', unique = true, useable = true, shouldClose = true, combinable = nil, description = 'Would you Rather Box' },
couplesquiz                  = { name = 'couplesquiz', label = 'Couple Quiz Box', weight = 100, type = 'item', image = 'couplesquiz.png', unique = true, useable = true, shouldClose = true, combinable = nil, description = 'Couple Quiz Box' },
```


# Exports

## Start Game (client)

You can easily integrate any of the below exports in a different resource to trigger a game.

```etlua
exports["cdev_games"]:use("truthordare")
exports["cdev_games"]:use("would_you_rather")
exports["cdev_games"]:use("couplesquiz")
exports["cdev_games"]:use("aboutme")
exports["cdev_games"]:use("fetish")
exports["cdev_games"]:use("morally")
exports["cdev_games"]:use("sensualus")
```


# Installation Guide ESX Framework

{% stepper %}
{% step %}

### Install all resources dependencies

Make sure you have all of the following resources installed:

* cdev\_lib <mark style="color:$success;">(Include with cdev\_games)</mark>
* cdev\_games
  {% endstep %}

{% step %}

### Extract and Create Correct Name Folder

➤ Step 1: Create the `cdev_games` folder.

* Extract the contents of <mark style="color:yellow;">cdev\_games.pack.zip</mark> into the `cdev_games` folder.
  {% endstep %}

{% step %}

### Organizing Your Resource Folders

🚩<mark style="color:red;">**Correct folder organization is essential for everything to work properly.**</mark>

➤ Step 1: Create the `[cdev]` folder. Inside your server's `resources` folder and Place **only** the following resource inside:

* cdev\_games

➤ Step 2: Add `cdev_lib` to the Resources Root

**Below is an example screenshot showing the correct folder structure:**

<div align="left"><figure><img src="https://1004862655-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPhIA9eCA4bwgx77hxx4i%2Fuploads%2FDH2AuBaXg0xCK6nBU87l%2Fimage.png?alt=media&amp;token=5d5a412c-a3aa-4841-a1d1-9c1b93df4f4c" alt=""><figcaption></figcaption></figure></div>
{% endstep %}

{% step %}

### Server.cfg Configuration

This resource must always be started **after your&#x20;**<mark style="color:yellow;">**framework**</mark>**&#x20;and any&#x20;**<mark style="color:yellow;">**other**</mark>**&#x20;required resources**.

It is essential to follow the correct startup order to ensure proper functionality and avoid conflicts.

**Below is an example screenshot showing the recommended startup order:**

<div align="left"><figure><img src="https://1004862655-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPhIA9eCA4bwgx77hxx4i%2Fuploads%2FIwkY3eT0pfjDwRtiVp5S%2Fimage.png?alt=media&amp;token=7d3d6618-2f83-40bf-b905-470e3cd76d89" alt=""><figcaption></figcaption></figure></div>
{% endstep %}

{% step %}

### Cdev\_lib Configuration

For the game system and the connection between your <mark style="color:yellow;">framework</mark> and the resources to work correctly, you need to configure the `cdev_lib` resource properly according to your <mark style="color:yellow;">framework</mark>. For more details, click the link below to follow the instructions.

{% tabs %}
{% tab title="ESX" %}
{% content-ref url="/pages/Yi1MUNc2bDxhthgwzwsL" %}
[ESX Configuration](https://docs.cdev.shop/fivem/cdev-library/esx-configuration)
{% endcontent-ref %}
{% endtab %}
{% endtabs %}
{% endstep %}

{% step %}

### Cdev\_games Configuration

🚩 <mark style="color:red;">To work correctly,</mark> <mark style="color:yellow;">**cdev\_games**</mark> <mark style="color:red;">requires the proper configuration of the inventory and framework in the</mark> `config.lua` <mark style="color:red;">file located in the</mark> `cdev_games` <mark style="color:red;">folder.</mark>\ <mark style="color:red;">Below is how the file should be configured to ensure everything functions properly.</mark>

<figure><img src="https://1004862655-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPhIA9eCA4bwgx77hxx4i%2Fuploads%2FoNUNyCjmsnfZN4SCMMW0%2Fimage.png?alt=media&amp;token=da3ae57d-283f-4b4b-bbeb-39c37ed4378d" alt=""><figcaption></figcaption></figure>

{% hint style="danger" %}
**If you're using a different&#x20;**<mark style="color:yellow;">**inventory**</mark>**, change the settings according to your custom inventory.**
{% endhint %}
{% endstep %}

{% step %}

### Configuring the items and images in ox\_inventory

{% tabs %}
{% tab title="Ox Iventory" %}
{% content-ref url="/pages/aU0p7wumPG42fMVO2irf" %}
[OX Inventory](https://docs.cdev.shop/fivem/cdev-games/ox-inventory)
{% endcontent-ref %}
{% endtab %}
{% endtabs %}
{% endstep %}

{% step %}

### Using the games in-game

<figure><img src="https://1004862655-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPhIA9eCA4bwgx77hxx4i%2Fuploads%2FXQjQ0DIGCGVgJNiA5AF6%2FFiveM_GTAProcess_er4jlmGEYJ-_online-video-cutter.com_.gif?alt=media&amp;token=2cc15d22-9759-485a-9d26-1ffb18999293" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
T**o interact between the "**<mark style="color:red;">**Read Cards**</mark>**" and "**<mark style="color:red;">**Pickup Cards**</mark>**" menus, use the&#x20;**<mark style="color:yellow;">**mouse**</mark>**&#x20;scroll up and down.**
{% endhint %}
{% endstep %}
{% endstepper %}


# Installation Guide QBCore Framework

{% stepper %}
{% step %}

### Install all resources dependencies

Make sure you have all of the following resources installed:

* cdev\_lib <mark style="color:$success;">(Include with cdev\_games)</mark>
* cdev\_games
  {% endstep %}

{% step %}

### Extract and Create Correct Name Folder

➤ Step 1: Create the `cdev_games` folder.

* Extract the contents of <mark style="color:yellow;">cdev\_games.pack.zip</mark> into the `cdev_games` folder.
  {% endstep %}

{% step %}

### Organizing Your Resource Folders

🚩<mark style="color:red;">**Correct folder organization is essential for everything to work properly.**</mark>

➤ Step 1: Create the `[cdev]` folder. Inside your server's `resources` folder and Place **only** the following resource inside:

* cdev\_games

➤ Step 2: Add `cdev_lib` to the Resources Root

**Below is an example screenshot showing the correct folder structure:**

<div align="left"><figure><img src="https://1004862655-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPhIA9eCA4bwgx77hxx4i%2Fuploads%2FwUBf4p2RxcGcvPqquD2c%2Fimage.png?alt=media&amp;token=9a3f041c-3bc9-4e4e-9e57-6a88c37bc707" alt=""><figcaption></figcaption></figure></div>
{% endstep %}

{% step %}

### Server.cfg Configuration

This resource must always be started **after your&#x20;**<mark style="color:yellow;">**framework**</mark>**&#x20;and any&#x20;**<mark style="color:yellow;">**other**</mark>**&#x20;required resources**.

It is essential to follow the correct startup order to ensure proper functionality and avoid conflicts.

**Below is an example screenshot showing the recommended startup order:**

<div align="left"><figure><img src="https://1004862655-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPhIA9eCA4bwgx77hxx4i%2Fuploads%2F8kFsq9iEO0l5UQsqHpCA%2Fimage.png?alt=media&amp;token=8e950c2d-1089-4a9a-9688-5381a158e7d4" alt=""><figcaption></figcaption></figure></div>
{% endstep %}

{% step %}

### Cdev\_lib Configuration

For the game system and the connection between your <mark style="color:yellow;">framework</mark> and the resources to work correctly, you need to configure the `cdev_lib` resource properly according to your <mark style="color:yellow;">framework</mark>. For more details, click the link below to follow the instructions.

{% tabs %}
{% tab title="QBCore" %}
{% content-ref url="/pages/PkCCFDz1sdRi0ZwCg0nY" %}
[QBCore/QBox Configuration](https://docs.cdev.shop/fivem/cdev-library/qbcore-qbox-configuration)
{% endcontent-ref %}
{% endtab %}
{% endtabs %}
{% endstep %}

{% step %}

### Cdev\_games Configuration

🚩 <mark style="color:red;">To work correctly,</mark> <mark style="color:yellow;">**cdev\_games**</mark> <mark style="color:red;">requires the proper configuration of the inventory and framework in the</mark> `config.lua` <mark style="color:red;">file located in the</mark> `cdev_games` <mark style="color:red;">folder.</mark>\ <mark style="color:red;">Below is how the file should be configured to ensure everything functions properly.</mark>

<div align="left"><figure><img src="https://1004862655-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPhIA9eCA4bwgx77hxx4i%2Fuploads%2FVh8Jp97sprTMHDsWxNHN%2Fimage.png?alt=media&amp;token=a6ac6d79-ce5e-44e9-8909-dd6a15fe85f1" alt=""><figcaption></figcaption></figure></div>

{% hint style="danger" %}
**If you're using a different&#x20;**<mark style="color:yellow;">**inventory**</mark>**, change the settings according to your custom inventory.**
{% endhint %}
{% endstep %}

{% step %}

### Configuring the items and images in ox\_inventory

{% tabs %}
{% tab title="QB Inventory" %}
{% content-ref url="/pages/3VcUkuNjgRqlD9GGFMsz" %}
[QB Inventory](https://docs.cdev.shop/fivem/cdev-games/qb-inventory)
{% endcontent-ref %}
{% endtab %}
{% endtabs %}
{% endstep %}

{% step %}

### Using the games in-game

<figure><img src="https://1004862655-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPhIA9eCA4bwgx77hxx4i%2Fuploads%2FXQjQ0DIGCGVgJNiA5AF6%2FFiveM_GTAProcess_er4jlmGEYJ-_online-video-cutter.com_.gif?alt=media&amp;token=2cc15d22-9759-485a-9d26-1ffb18999293" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
T**o interact between the "**<mark style="color:red;">**Read Cards**</mark>**" and "**<mark style="color:red;">**Pickup Cards**</mark>**" menus, use the&#x20;**<mark style="color:yellow;">**mouse**</mark>**&#x20;scroll up and down.**
{% endhint %}
{% endstep %}
{% endstepper %}


# Installation Guide QBox Framework

{% stepper %}
{% step %}

### Install all resources dependencies

Make sure you have all of the following resources installed:

* cdev\_lib <mark style="color:$success;">(Include with cdev\_games)</mark>
* cdev\_games
  {% endstep %}

{% step %}

### Extract and Create Correct Name Folder

➤ Step 1: Create the `cdev_games` folder.

* Extract the contents of <mark style="color:yellow;">cdev\_games.pack.zip</mark> into the `cdev_games` folder.
  {% endstep %}

{% step %}

### Organizing Your Resource Folders

🚩<mark style="color:red;">**Correct folder organization is essential for everything to work properly.**</mark>

➤ Step 1: Create the `[cdev]` folder. Inside your server's `resources` folder and Place **only** the following resource inside:

* cdev\_games

➤ Step 2: Add `cdev_lib` to the Resources Root

**Below is an example screenshot showing the correct folder structure:**

<div align="left"><figure><img src="https://1004862655-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPhIA9eCA4bwgx77hxx4i%2Fuploads%2F5cV9HxNt3qbv9J62f0G7%2Fimage.png?alt=media&amp;token=de261c65-0915-4ebb-a6b6-c5fb2116777c" alt=""><figcaption></figcaption></figure></div>
{% endstep %}

{% step %}

### Server.cfg Configuration

This resource must always be started **after your&#x20;**<mark style="color:yellow;">**framework**</mark>**&#x20;and any&#x20;**<mark style="color:yellow;">**other**</mark>**&#x20;required resources**.

It is essential to follow the correct startup order to ensure proper functionality and avoid conflicts.

**Below is an example screenshot showing the recommended startup order:**

<div align="left"><figure><img src="https://1004862655-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPhIA9eCA4bwgx77hxx4i%2Fuploads%2FKoRR05UKuoTUfpC0WRtu%2Fimage.png?alt=media&amp;token=1a01afb8-2465-4f0b-af6b-38a5ed81bade" alt=""><figcaption></figcaption></figure></div>
{% endstep %}

{% step %}

### Cdev\_lib Configuration

For the game system and the connection between your <mark style="color:yellow;">framework</mark> and the resources to work correctly, you need to configure the `cdev_lib` resource properly according to your <mark style="color:yellow;">framework</mark>. For more details, click the link below to follow the instructions.

{% tabs %}
{% tab title="QBox" %}
{% content-ref url="/pages/PkCCFDz1sdRi0ZwCg0nY" %}
[QBCore/QBox Configuration](https://docs.cdev.shop/fivem/cdev-library/qbcore-qbox-configuration)
{% endcontent-ref %}
{% endtab %}
{% endtabs %}
{% endstep %}

{% step %}

### Cdev\_games Configuration

🚩 <mark style="color:red;">To work correctly,</mark> <mark style="color:yellow;">**cdev\_games**</mark> <mark style="color:red;">requires the proper configuration of the inventory and framework in the</mark> `config.lua` <mark style="color:red;">file located in the</mark> `cdev_games` <mark style="color:red;">folder.</mark>\ <mark style="color:red;">Below is how the file should be configured to ensure everything functions properly.</mark>

<div align="left"><figure><img src="https://1004862655-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPhIA9eCA4bwgx77hxx4i%2Fuploads%2FoMboq5aSIpAb2fXVh2a5%2Fimage.png?alt=media&amp;token=d6d8eca9-864f-4dec-b43a-e59468e2fdd5" alt=""><figcaption></figcaption></figure></div>

{% hint style="danger" %}
**If you're using a different&#x20;**<mark style="color:yellow;">**inventory**</mark>**, change the settings according to your custom inventory.**
{% endhint %}
{% endstep %}

{% step %}

### Configuring the items and images in ox\_inventory

{% tabs %}
{% tab title="OX Inventory" %}
{% content-ref url="/pages/aU0p7wumPG42fMVO2irf" %}
[OX Inventory](https://docs.cdev.shop/fivem/cdev-games/ox-inventory)
{% endcontent-ref %}
{% endtab %}
{% endtabs %}
{% endstep %}

{% step %}

### Using the games in-game

<figure><img src="https://1004862655-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPhIA9eCA4bwgx77hxx4i%2Fuploads%2FXQjQ0DIGCGVgJNiA5AF6%2FFiveM_GTAProcess_er4jlmGEYJ-_online-video-cutter.com_.gif?alt=media&amp;token=2cc15d22-9759-485a-9d26-1ffb18999293" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
T**o interact between the "**<mark style="color:red;">**Read Cards**</mark>**" and "**<mark style="color:red;">**Pickup Cards**</mark>**" menus, use the&#x20;**<mark style="color:yellow;">**mouse**</mark>**&#x20;scroll up and down.**
{% endhint %}
{% endstep %}
{% endstepper %}


# Banking

Loan, bank accounts, card and payment systems with ATM's

## SHOWCASE VIDEO COMING

## What is this resource?

This resource provides an overall integration of the finances for your FiveM server, we provide various features to enhance the general possibilities for players in terms of loans, credit scores and more!

* ATM's
* Loan System
* Payment Request machines for business owners, players can select which card to pay with.
* Invoice system
* Create creditcards on the go

## INSTALLATION GUIDE

### Step 1: Verify that you have the required dependencies installed

Before you can use this resource, you'll need to make sure that you have the following resources installed:

1. cdev\_lib <mark style="color:green;">(included with this resource)</mark>

**xsound is the audio resource integrated by default on this script, however you can integrate any audio resource in cdev\_lib.**

### Step 2: Extract the files

1. Extract the contents of the `cdev_banking.zip` folder and place the resulting folder in your server's resource directory.

### Step 3: Configure/Install the resource

1. Head to `config.lua` and select your framework inventory (qb, ox or custom).

* `ensure cdev_lib`
* `ensure cdev_banking`

{% hint style="warning" %}
Make sure that cdev\_lib is started before cdev\_banking
{% endhint %}

{% hint style="danger" %}
**Do not modify the encrypted files in any way, as this may cause issues with the resource's functionality.**
{% endhint %}


# Client Exports


# UI

### OpenBank <a href="#getitemcount" id="getitemcount"></a>

Opens Bank Dashboard

```lua
exports.cdev_banking:OpenBank()
```

***

### CloseBank <a href="#getitemcount" id="getitemcount"></a>

ClosesBank Dashboard

```lua
exports.cdev_banking:CloseBank()
```

***

### OpenAtm <a href="#getitemcount" id="getitemcount"></a>

Opens Atm Dashboard

```lua
exports.cdev_banking:OpenAtm()
```

***

### CloseAtm <a href="#getitemcount" id="getitemcount"></a>

Closes Atm Dashboard

```lua
exports.cdev_banking:CloseAtm()
```

***

### OpenPOI <a href="#getitemcount" id="getitemcount"></a>

Opens Payment Machine Dashboard

```lua
exports.cdev_banking:OpenPOI({job})
```

* table: {job: string}


# Server Exports


# Create Account

### CreateAccountByPlayerSource <a href="#getitemcount" id="getitemcount"></a>

Create Account to the Player Source that was provided

```lua
exports.cdev_banking:CreateAccountByPlayerSource(source, skin)
```

* source: `PlayerId`
* skin: `number`

Return:

* Accounts: [`Account[]`](https://docs.cdev.shop/fivem/banking/types-definitions#account)

***

### CreateAccountByPlayerIdentifier <a href="#getitemcount" id="getitemcount"></a>

Create Account to the Player Identifier that was provided

```lua
exports.cdev_banking:CreateAccountByPlayerIdentifier(cid, skin)
```

* cid: `CitizenId`
* skin: `number`

Return:

* Accounts: [`Account[]`](https://docs.cdev.shop/fivem/banking/types-definitions#account)

***

### CreatePersonalAccountByPlayerSource <a href="#getitemcount" id="getitemcount"></a>

Create Personal Account to the Player Source that was provided

```lua
exports.cdev_banking:CreatePersonalAccountByPlayerSource(source, skin)
```

* source: `PlayerId`
* skin: `number`

Return:

* Accounts: [`Account[]`](https://docs.cdev.shop/fivem/banking/types-definitions#account)

***

### CreatePersonalAccountByPlayerIdentifier <a href="#getitemcount" id="getitemcount"></a>

Create Personal Account to the Player Identifier that was provided

```lua
exports.cdev_banking:CreatePersonalAccountByPlayerIdentifier(cid, skin)
```

* cid: `CitizenId`
* skin: `number`

Return:

* Accounts: [`Account[]`](https://docs.cdev.shop/fivem/banking/types-definitions#account)

***

### CreateJobAccount <a href="#getitemcount" id="getitemcount"></a>

Create Account to the Job that was provided

```lua
exports.cdev_banking:CreateJobAccount(jobname, skin)
```

* jobname: `string`
* skin: `number`

Return:

* Accounts: [`Account[]`](https://docs.cdev.shop/fivem/banking/types-definitions#account)

***

### CreateGangAccount <a href="#getitemcount" id="getitemcount"></a>

Create Account to the Gang that was provided

```lua
exports.cdev_banking:CreateGangAccount(gangname, skin)
```

* gangname: `string`
* skin: `number`

Return:

* Accounts: [`Account[]`](https://docs.cdev.shop/fivem/banking/types-definitions#account)


# Get Accounts

Here are all the exports to getAccounts

### GetAccountsByPlayerSource <a href="#getitemcount" id="getitemcount"></a>

Get All Accounts from the Player Source that was provided

```lua
exports.cdev_banking:GetAccountsByPlayerSource(source)
```

* source: `PlayerId`

Return:

* Accounts: [`Account[]`](https://docs.cdev.shop/fivem/banking/types-definitions#account)

***

### GetAccountsByPlayerIdentifier <a href="#getitemcount" id="getitemcount"></a>

Get All Accounts from the Player Identifier that was provided

```lua
exports.cdev_banking:GetAccountsByPlayerIdentifier(cid)
```

* cid: `CitizenID`

Return:

* Accounts: [`Account[]`](https://docs.cdev.shop/fivem/banking/types-definitions#account)

***

### GetAllAccounts <a href="#getitemcount" id="getitemcount"></a>

Gets All Accounts

```
exports.cdev_banking:GetAllAccounts()
```

Return:

* Accounts: [`Account[]`](https://docs.cdev.shop/fivem/banking/types-definitions#account)


# Get Account

### GetPersonalAccountByPlayerSource <a href="#getitemcount" id="getitemcount"></a>

Gets Personal Account from the Player Source that was provided

```lua
exports.cdev_banking:GetPersonalAccountByPlayerSource(source)
```

* source: `PlayerId`

Return:

* Account: [`Account`](https://docs.cdev.shop/fivem/banking/types-definitions#account)

***

### GetPersonalAccountByPlayerIdentifier <a href="#getitemcount" id="getitemcount"></a>

Gets Personal Account from the Player Identifier that was provided

```lua
exports.cdev_banking:GetPersonalAccountByPlayerIdentifier(cid)
```

* cid: `CitizenId`

Return:

* Account: [`Account`](https://docs.cdev.shop/fivem/banking/types-definitions#account)

***

### GetAccountByAccountId <a href="#getitemcount" id="getitemcount"></a>

Gets Account from the Account ID that was provided

```lua
exports.cdev_banking:GetAccountByAccountId(id)
```

* id: `CitizenId`

Return:

* Account: [`Account`](https://docs.cdev.shop/fivem/banking/types-definitions#account)

***

### GetJobAccountByJob <a href="#getitemcount" id="getitemcount"></a>

Gets Job Account from the Job that was provided

```lua
exports.cdev_banking:GetJobAccountByJob(jobname)
```

* jobname: `string`

Return:

* Account: [`Account`](https://docs.cdev.shop/fivem/banking/types-definitions#account)

***

### GetGangAccountByGang <a href="#getitemcount" id="getitemcount"></a>

Gets Gang Account from the Job that was provided

```lua
exports.cdev_banking:GetGangAccountByGang(gangname)
```

* gangname: `string`

Return:

* Account: [`Account`](https://docs.cdev.shop/fivem/banking/types-definitions#account)


# Add Bank Balance

### AddPersonalBankBalanceByPlayerSource <a href="#getitemcount" id="getitemcount"></a>

Add Bank Balance to Personal Account By Player Source

```lua
exports.cdev_banking:AddPersonalBankBalanceByPlayerSource(source, balance)
```

* source: `PlayerId`
* balance: `number`

***

### AddPersonalBankBalanceByPlayerIdentifier <a href="#getitemcount" id="getitemcount"></a>

Add Bank Balance to Personal Account by Player Identifier

```lua
exports.cdev_banking:AddPersonalBankBalanceByPlayerIdentifier(cid, balance)
```

* cid: `CitizenId`
* balance: `number`

***

### AddBankBalanceByAccountId <a href="#getitemcount" id="getitemcount"></a>

Add Bank Balance to Per Account by id

```lua
exports.cdev_banking:AddBankBalanceByAccountId(id, balance)
```

* id: `number`
* balance: `number`


# Remove Bank Balance

### RemovePersonalBankBalanceByPlayerSource <a href="#getitemcount" id="getitemcount"></a>

Remove Bank Balance to Personal Account by Player Source

```lua
exports.cdev_banking:RemovePersonalBankBalanceByPlayerSource(source, balance)
```

* id: `PlayerId`
* balance: `number`

***

### RemovePersonalBankBalanceByPlayerIdentifier <a href="#getitemcount" id="getitemcount"></a>

Remove Bank Balance to Personal Account by Player Identifier

```lua
exports.cdev_banking:RemovePersonalBankBalanceByPlayerIdentifier(cid, balance)
```

* id: `CitizenId`
* balance: `number`

***

### RemoveBankBalanceByAccountId <a href="#getitemcount" id="getitemcount"></a>

Add Bank Balance to Account by AccountId

```lua
exports.cdev_banking:RemoveBankBalanceByAccountId(cid, balance)
```

* id: `CitizenId`
* balance: `number`


# Get Loans

### GetLoansByPlayerSource <a href="#getitemcount" id="getitemcount"></a>

Get Loans by Player Source

```lua
exports.cdev_banking:GetLoansByPlayerSource(source)
```

* source: `PlayerId`

returns:

Loans: [Loan\[\]](https://docs.cdev.shop/fivem/banking/types-definitions#loan)

***

### GetLoansByPlayerIdentifier <a href="#getitemcount" id="getitemcount"></a>

Get Loans by Player Identifier

```lua
exports.cdev_banking:GetLoansByPlayerIdentifier(cid)
```

* cid: `CitizenId`

returns:

Loans: [Loan\[\]](https://docs.cdev.shop/fivem/banking/types-definitions#loan)

***

### GetLoansByAccountId <a href="#getitemcount" id="getitemcount"></a>

Get Loans by Account ID

```lua
exports.cdev_banking:GetLoansByAccountId(accountid)
```

* accountid: `number`

returns:

Loans: [Loan\[\]](https://docs.cdev.shop/fivem/banking/types-definitions#loan)


# Add Loan

### CreatePersonalLoanByPlayerSource <a href="#getitemcount" id="getitemcount"></a>

Create Personal Loan by Player Source

```lua
exports.cdev_banking:CreatePersonalLoanByPlayerSource(source, amount, time, onPaid, onNotPaid)
```

* id: `PlayerId`
* amount: `number`
* time: `number` <mark style="color:green;">-- seconds</mark>
* onPaid: {event: `string`, args: `table`}
* onNotPaid: {event: `string`, args: `table`}

***

### CreatePersonalLoanByPlayerIdentifier <a href="#getitemcount" id="getitemcount"></a>

Create Personal Loan by Player Identifier

```lua
exports.cdev_banking:CreatePersonalLoanByPlayerIdentifier(cid, amount, time, onPaid, onNotPaid)
```

* cid: `CitizenId`
* amount: `number`
* time: `number` <mark style="color:green;">-- seconds</mark>
* onPaid: {event: `string`, args: `table`}
* onNotPaid: {event: `string`, args: `table`}

***

### CreateLoanByAccountId <a href="#getitemcount" id="getitemcount"></a>

Create Loan by Account ID

```lua
exports.cdev_banking:CreatePersonalLoanByPlayerIdentifier(id, amount, time, onPaid, onNotPaid)
```

* id: `number`
* amount: `number`
* time: `number` <mark style="color:green;">-- seconds</mark>
* onPaid: {event: `string`, args: `table`}
* onNotPaid: {event: `string`, args: `table`}

***

**Example using** [**CreatePersonalLoanByPlayerSource**](#getitemcount)

```lua
local src = source
local amount = 100000 -- Money he needs to pay
local time = 100000 -- Time in Seconds
local onPaid = {
        event = "cdev_banking:LoanTest", -- This server event will Trigger if they pay
        args = {
            test = "This is a test"
        }
    }
local onNotPaid = {
        event = "cdev_banking:LoanTest",  -- This server event will Trigger if the time ends and they dont pay successfully
        args = {
            test = "This is a test"
        }
    }

exports.cdev_banking:CreatePersonalLoanByPlayerSource(src, amount, time, onPaid, onNotPaid)
```

**Example Server Event**

```lua
RegisterNetEvent('cdev_banking:LoanTest', function (data)
    print(data.test) -- This would print "This is a test"
end)
```


# Remove Loan

### DeletePersonalLoanByPlayerSource <a href="#getitemcount" id="getitemcount"></a>

Delete personal loan from Account by Player Source

```lua
exports.cdev_banking:DeletePersonalLoanByPlayerSource(source, loanid)
```

* source: `PlayerId`
* loanid: `number`

***

### DeletePersonalLoanByPlayerIdentifier <a href="#getitemcount" id="getitemcount"></a>

Delete Personal Loan by Player Identifier

```lua
exports.cdev_banking:DeletePersonalLoanByPlayerIdentifier(cid, loanid)
```

* cid: `CitizenId`
* loanid: `number`

***

### DeleteLoanByAccountId <a href="#getitemcount" id="getitemcount"></a>

Delete Loan by Account ID

```lua
exports.cdev_banking:DeleteLoanByAccountId(accountid, loanid)
```

* accountid: `number`
* loanid: `number`


# Get Invoices

### GetInvoicesByPlayerSource <a href="#getitemcount" id="getitemcount"></a>

Get Invoices by Player Source

```lua
exports.cdev_banking:GetInvoicesByPlayerSource(source)
```

* source: `PlayerId`

returns:

Invoices: [Invoice\[\]](https://docs.cdev.shop/fivem/banking/types-definitions#invoice)

***

### GetInvoicesByPlayerIdentifier <a href="#getitemcount" id="getitemcount"></a>

Get Invoices by Player Identifier

```lua
exports.cdev_banking:GetInvoicesByPlayerIdentifier(cid)
```

* cid: `CitizenId`

returns:

Invoices: [Invoice\[\]](https://docs.cdev.shop/fivem/banking/types-definitions#invoice)

***

### GetInvoicesByAccountId <a href="#getitemcount" id="getitemcount"></a>

Get Invoices by Account ID

```lua
exports.cdev_banking:GetInvoicesByAccountId(accountid)
```

* accountid: `number`

returns:

Invoices: [Invoice\[\]](https://docs.cdev.shop/fivem/banking/types-definitions#invoice)


# Add Invoice

### CreatePersonalInvoiceByPlayerSource <a href="#getitemcount" id="getitemcount"></a>

Create Personal Invoice by Player Source

```lua
exports.cdev_banking:CreatePersonalInvoiceByPlayerSource(source, amount, time, onPaid, onNotPaid)
```

* id: `PlayerId`
* amount: `number`
* time: `number` <mark style="color:green;">-- seconds</mark>
* onPaid: {event: `string`, args: `table`}
* onNotPaid: {event: `string`, args: `table`}

***

### CreatePersonalInvoiceByPlayerIdentifier <a href="#getitemcount" id="getitemcount"></a>

Create Personal Invoice by Player Identifier

```lua
exports.cdev_banking:CreatePersonalInvoiceByPlayerIdentifier(cid, amount, time, onPaid, onNotPaid)
```

* cid: `CitizenId`
* amount: `number`
* time: `number` <mark style="color:green;">-- seconds</mark>
* onPaid: {event: `string`, args: `table`}
* onNotPaid: {event: `string`, args: `table`}

***

### CreateInvoiceByAccountId <a href="#getitemcount" id="getitemcount"></a>

Create Invoice by Account ID

```lua
exports.cdev_banking:CreateInvoiceByAccountId(id, amount, time, onPaid, onNotPaid)
```

* id: `number`
* amount: `number`
* time: `number` <mark style="color:green;">-- seconds</mark>
* onPaid: {event: `string`, args: `table`}
* onNotPaid: {event: `string`, args: `table`}

***

**Example using** [**CreatePersonalInvoiceByPlayerSource**](#getitemcount)

```lua
local src = source
local amount = 100000 -- Money he needs to pay
local time = 100000 -- Time in Seconds
local onPaid = {
        event = "cdev_banking:Invoice", -- This server event will Trigger if they pay
        args = {
            test = "This is a test"
        }
    }
local onNotPaid = {
        event = "cdev_banking:Invoice",  -- This server event will Trigger if the time ends and they dont pay successfully
        args = {
            test = "This is a test"
        }
    }

exports.cdev_banking:CreatePersonalInvoiceByPlayerSource(src, amount, time, onPaid, onNotPaid)
```

**Example Server Event**

```lua
RegisterNetEvent('cdev_banking:Invoice', function (data)
    print(data.test) -- This would print "This is a test"
end)
```


# Remove Invoices

### DeletePersonalInvoiceByPlayerSource <a href="#getitemcount" id="getitemcount"></a>

Delete Personal Invoice by Player Source

```lua
exports.cdev_banking:DeletePersonalInvoiceByPlayerSource(source, invoiceid)
```

* source: `PlayerId`
* invoiceid: `number`

***

### DeletePersonalInvoiceByPlayerIdentifier <a href="#getitemcount" id="getitemcount"></a>

Delete Personal Invoice by Player Identifier

```lua
exports.cdev_banking:DeletePersonalInvoiceByPlayerIdentifier(cid, invoiceid)
```

* cid: `CitizenId`
* invoiceid: `number`

***

### DeleteInvoiceByAccountId <a href="#getitemcount" id="getitemcount"></a>

Delete Invoice by Account ID

```lua
exports.cdev_banking:DeleteInvoiceByAccountId(accountid, invoiceid)
```

* accountid: `number`
* invoiceid: `number`


# Add Transaction

### AddPersonalTransactionByPlayerSource <a href="#getitemcount" id="getitemcount"></a>

Add Personal Transaction by Player Source

```lua
exports.cdev_banking:AddPersonalTransactionByPlayerSource(source, name, type, amount, to?)
```

* source: `PlayerId`
* name: `string`
* type: `string`
* amount: `number`
* to?: `number` (accountid)

***

### AddPersonalTransactionByPlayerIdentifier <a href="#getitemcount" id="getitemcount"></a>

Add Personal Transaction by Player Identifier

```lua
exports.cdev_banking:AddPersonalTransactionByPlayerIdentifier(cid, name, type, amount, to?)
```

* cid: `CitizenId`
* name: `string`
* type: `string`
* amount: `number`
* to?: `number` (accountid)

***

### AddTransactionByAccountId <a href="#getitemcount" id="getitemcount"></a>

Add Transaction by Account ID

```lua
exports.cdev_banking:AddBankBalanceByAccountId(id, name, type, amount, to?)
```

* id: `number`
* name: `string`
* type: `string`
* amount: `number`
* to?: `number` (accountid)


# Types Definitions

This page provides detailed descriptions of all custom data types used in the accounts system documentation. Each type is explained with its fields and associated data structures.

### Account

Represents a user account in the system with financial and membership information.

**Fields:**

* owner: `string` - The name or identifier of the account owner.
* members: `string[]` - A list of member identifiers linked to the account.
* id: `number` - A unique identifier for the account.
* balance: `number` - The current monetary balance in the account.
* skin: `number` - An identifier for customizing the appearance of the account interface.
* isPersonal: `boolean` - Indicates if the account is for personal use.
* roles: [`role[]`](#role) - A list of roles associated with the account, detailing permissions and access rights.

### Role

Defines access controls and permissions for users associated with an account.

**Fields:**

* identifier: `string` - A unique identifier, typically a citizen ID, for the role.
* permissions: [`permissions`](#permissions) - A set of permissions detailing allowed actions within the account.

### Permissions

Details specific actions a role is allowed to perform in the account management system.

**Fields:**

* DepositMoney: `boolean` - Permission to deposit money into the account.
* SeeStatements: `boolean` - Permission to view account statements.
* TransferMoney: `boolean` - Permission to transfer money to other accounts.
* SeeLoans: `boolean` - Permission to view loan information.
* SeeInvoices: `boolean` - Permission to view invoices.
* WithdrawMoney: `boolean` - Permission to withdraw money from the account.

### Transaction

Describes a financial transaction associated with an account.

**Fields:**

* amount: `number` - The amount of money involved in the transaction.
* type: `string` - The type of transaction (e.g., deposit, withdrawal).
* name: `string` - A brief description or reason for the transaction.
* date: `date` - The date on which the transaction took place.
* n: `number` - A transaction number or identifier.
* to?: `number` - Optional. The account identifier for the recipient, if applicable.

## Loan

**Fields:**

* id: number
* accountid: number
* paid: number
* amount: number
* time: number
* eventdata: {OnPaid: {event: `string`, args: `table`} OnNotPaid: {event: `string`, args: `table`}}

## Invoice

**Fields:**

* id: number
* accountid: number
* name: string <mark style="color:green;">-- Title</mark>
* description: string <mark style="color:green;">-- Reason</mark>
* amount: number
* time: number
* eventdata: {OnPaid: {event: `string`, args: `table`} OnNotPaid: {event: `string`, args: `table`}}


# Emote Menu

This is more than just an emote menu—it's a complete animation system that transforms your FiveM server into a dynamic and engaging environment.

What is the cDev Emote Menu?

The cDev Emote Menu is a powerful enhancement of the standard emote menu, transforming it into an advanced animation player for FiveM servers. With a host of unique features, including an in-game Animation Builder, Sequence Creator, and Position Selector, it offers an immersive experience with an extensive library of custom animations.

<details>

<summary>Feature List</summary>

* **Advanced Animation Builder:**\
  Create custom animations by combining any two animations and one expression with our modern drag-and-drop UI. All custom-built animations are saved to a dedicated category on the client side.
* **Sequence Creator:**\
  Build sequences by selecting multiple animations and assigning specific durations to each. These sequences are also saved to a client-side category.
* **Built-in GIF Recorder:**\
  With our new media library, players can easily record GIFs by entering a few details.
* **Idle System:**\
  Players can set custom idle animations. Server owners can enable this feature, and player preferences are saved between restarts.
* **Position Selector:**\
  Choose the exact position for your animations before playing them, giving you full control over your character's movements.
* **Favorite System:**\
  With over 8,000 animations available, you can save your favorites in a dedicated category, all stored on the client side.
* **Modern & Intuitive UI:**\
  Our user interface is designed to be sleek and user-friendly, ensuring an easy experience for all players.
* **Optimized Performance:**\
  The resource runs at `0.0 ms` when idle and peaks at only `~0.02 ms` while in use, ensuring minimal impact on performance.
* **Custom Hotkey System:**\
  Drag and drop animations into hotkey slots for quick access during gameplay.
* **VIP Functionality:**\
  Server owners can lock specific animations behind a VIP system (function is not escrowed). Discord integration is supported for easy management.
* **Extensive Animation Library:**\
  With over 8,000 animations including: Couple dances, couple poses, car animations (to interact inside the car), car couples animations, couple interactions, couple carry, solo poses, solo animations, police animations, dances, pet (characther) shared animations or alone, walk styles, idles.
* **Expression System:**\
  Players can express themselves with custom facial expressions that are saved between restarts.
* **Walk Styles:**\
  Save your character's walk style preferences and ensure they persist across sessions.
* **GIF-Based Content:**\
  All GIFs and media are uploaded to the cDev CDN, reducing server storage requirements for server owners.
* **Rule Feature:**\
  Restrict specific animations to designated players via a rule feature (API available for server owners).

</details>

## Installation Guide

<details>

<summary>Step 1: Verify that you have the required dependencies installed</summary>

Before you can use this resource, you'll need to make sure that you have the following resource installed:

1. cdev\_lib <mark style="color:green;">(included with this resource)</mark>

</details>

<details>

<summary>Step 2: Extract the files</summary>

1. Extract the contents of the `cdev-emotemenu.pack.zip` folder and place the resulting folder in your server's resource directory.
2. Extract the contents of the `cdev_emotemenuassets.pack.zip`folder and place the resulting folder in your server's resource directory.

</details>

<details>

<summary>Step 3: Ensure the files</summary>

Your ensure should look like this in your `server.cfg`

```lua
ensure cdev_emotemenuassets
ensure cdev_lib
ensure cdev_emotemenu
```

</details>

## 🆕 New Features

{% content-ref url="/pages/I1OE5zxHrcw22MyWtoI8" %}
[(NEW) Features](https://docs.cdev.shop/fivem/emote-menu/new-features)
{% endcontent-ref %}

## Media Lib (<mark style="color:yellow;">no need to ensure</mark>) is just a tool for developers.

{% content-ref url="/pages/SEXjXki8R6jMk16bpj5v" %}
[Media Lib](https://docs.cdev.shop/fivem/emote-menu/media-lib)
{% endcontent-ref %}

{% hint style="warning" %}
Make sure that cdev\_lib is started before cdev\_emotemenu
{% endhint %}


# Register a New Category!

Here’s how to register a new category in the Categories File. This process is straightforward and requires only a few key fields.

***

Category Example

```lua
{
    id = "animations",  -- Unique category identifier
    label = "Animations",  -- Display name for the category
}
```

#### Required Fields

* **id**: `string`\
  The unique identifier for the category.
* **label**: `string`\
  A user-friendly name for the category.




---

[Next Page](https://docs.cdev.shop/llms-full.txt/1)

