# About escrow system

All my scripts are secured using the FiveM escrow system and licences are only sold on our website using Tebex services in compliance with local and international laws.

***

### How can i find and download the script ?

Once you've buyed the script, you'll find it on your Fivem [portal](https://portal.cfx.re), under the "Assets" -> "Granted Assets" section.

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

{% hint style="warning" %}
**Note:** You must be the owner of the server keymaster to use the resource you purchased.
{% endhint %}

Once you've found the script in the list, you can click on the download button and drop the fresly downloaded files into your server !

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


# "You lack the required entitlement to use ... "

{% hint style="info" %}
This error can be shown if you bought the script on a different cfx account than the current account linked to server key you are using.
{% endhint %}

Here are a few steps you can follow :&#x20;

* Verify that the account you bought the script with is the same as the server key one
  * If not,  you can transfer it : [How to transfer my resource ?](/about-escrow-system/transferring-assets-to-another-account)
* If you're sure its on the right account, try to do a fresh download and reinstall


# Failed to verify protected resource

{% hint style="info" %}
Make sure your servers artifacts are 5181 or above
{% endhint %}

{% hint style="info" %}
Make sure that the .fxap file is still inside the script folder, this file is what makes the encryption and protection works
{% endhint %}

{% hint style="warning" %}
Some FTP programs as FileZilla are not taking account of the .fxap file.&#x20;

Using WinSCP is recommended
{% endhint %}


# Error parsing script / Failed to load script

{% hint style="info" %}
Build is most likely outdated, make sure your servers artifacts are 5181 or above
{% endhint %}


# Transferring assets to another account

{% hint style="danger" %}
**Note:** Transfer will remove this license from your account and move it to another Cfx.re account. This action is irreversible and can be done only once for each license.
{% endhint %}

To transfert a resource, head to the "granted assets" section on your keymaster :&#x20;

* Once you've find the script you want to transfer, click on the *scary* red button&#x20;
* Enter the receiver's account in the popup which appears

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


# FAQ

{% hint style="info" %}
Here, you will found fast answers at the most asked questions
{% endhint %}


# Do you make partnerships ?

{% hint style="danger" %}
If by partnership you're talking about the fact that you want some advertisements on both our discords. Ehhhhhm .. No.&#x20;
{% endhint %}

***

{% hint style="success" %}
If by partnership you're talking about working together on an advanced project then ... feel free to send a DM !&#x20;
{% endhint %}


# Do you take customs orders ?

{% hint style="info" %}
Not a yes, but not a no !\
\
If your project is cool, and suits me, with advanced features, i might like it : feel free to reach me !&#x20;
{% endhint %}

{% hint style="warning" %}
I might never make it, listening to your idea dosen't mean i will do it instantly :smile:\
\
Once i say that i will do it, there is two options :&#x20;

* You pay me at hour rate of work on it and you have the complete exclusivity of the script
* The script will be published but you will receive a free copy !
  {% endhint %}


# And do you send any decrypted ver...

{% hint style="danger" %}
NO
{% endhint %}


# Do you provide assistance / help on your scripts ?

{% hint style="success" %}
Head to the discord help channels or my DM's
{% endhint %}


# Medical Reanimation Script

{% hint style="info" %}
This script is protected using FiveM Escrow system. You will need the 5181 server artifact or above.
{% endhint %}

***

## Description

This resource is a ***paid resource*** aiming to improve EMS roleplay with a life like reanimation steps and realistic CPR.\
The script is available to purchase as well as my other resources [here](https://www.pingouin.dev/mods).

{% embed url="<https://youtu.be/5I7cv1JjFu4>" %}
Full walkthrough of the script
{% endembed %}

{% embed url="<https://youtu.be/13pf1FZaWOA>" %}
Cinematic reveal of the script
{% endembed %}


# General config

This guide will help you to config your script

* [Frameworks](/scripts-docs/medical-reanimation-script/general-config/frameworks-and-compatibility)
* [Keybinds](/scripts-docs/homeless-tent-script/general-config/keybinds)
* [Misc](/scripts-docs/medical-reanimation-script/general-config/miscellaneous)
* [Medical](/scripts-docs/medical-reanimation-script/general-config/medical)
* [Errors and troubleshooting](/scripts-docs/medical-reanimation-script/general-config/errors-and-troubleshooting)


# Frameworks and compatibility

This part will help with the framework part of the config (ESX/QB/Custom ...) and my others scripts compatibility

## cfg.ESX&#x20;

Set to ***true*** if you plan to use ESX Jobs to run the script, ***false*** if not applicable

```lua
cfg.ESX = true,
```

***

## cfg.QB&#x20;

Set to ***true*** if you plan to use QB Jobs to run the script, ***false*** if not applicable

```lua
cfg.QB = true,
```

***

## cfg.jobNames

Set the jobs which are allowed to use the medical part of the script (bags, oxygen ...). This will not affect the CPR part.

***BEFORE :***&#x20;

```lua
cfg.jobNames = {
    'firefighters',
}
```

***AFTER***&#x20;

```lua
cfg.jobNames = {
    'firefighters',
    'EMS',
    'Doctor',
}
```

***

## cfg.useCervicalCollar

Set to ***true*** if you have the cervical collar installed on the server. ***False*** by default.

```lua
cfg.useCervicalCollar = false,
```

***

## cfg.useDragDead

Set to ***true*** if you have the drag dead installed on the server. ***False*** by default.

<pre class="language-lua"><code class="lang-lua"><strong>cfg.useDragDead = true,
</strong></code></pre>

{% hint style="warning" %}
The start order in the cfg must be : \
\
ensure dragDead\
ensure cervicalCollar\
ensure medicalReanimation \
\
For the compatibility to be achieved correctly
{% endhint %}

***

## Revive Event

This is the event you should trigger in your revive functions (TX admin, ambulance job ...)\
\
\- ***Forced*** : sets if the script should force the revive event if player have stuff attached to him

<pre class="language-lua"><code class="lang-lua"><strong>--Client side
</strong><strong>TriggerEvent('pingouin:client:revive', forced --[[Bool]])
</strong></code></pre>

<pre><code><strong>--Server side
</strong><strong>TriggerClientEvent('pingouin:client:revive', cliendId, forced --[[Bool]])
</strong></code></pre>


# Miscellaneous

This will explain the most important configs of the script.

1. [cfg.vehs](#cfg.vehs)
2. [cfg.props](#cfg.props)
3. [cfg.openDoors](#cfg.opendoors)
4. [cfg.refillLocations](#cfg.refilllocations)
5. [GetEupComponents](#geteupcomponents)

***

## 🚑 cfg.vehs

This table will contain all the configs you need to have your vehicle ready for calls !

A vehicle config will look like this :&#x20;

```lua
cfg.vehs = {
	[GetHashKey('ambulance')] = {
		['stryker_lifepak_15'] = {
			pos = vector3(-0.78, -3.3, 0.315), 
			rot = vector3(0, 0, 60.0), 
			bone = '',
		}, 
		['sacOxy'] = {
			pos = vector3(0.95, -3.2, 0.52), 
			rot = vector3(0, 0, 200.0), 
			bone = '',
		},
		doors = {'door_pside_r', 'door_dside_r'},
		useLOS = true,
	}, 
	--[...]
}
```

***Let's dive into this :***&#x20;

1. `[GetHashKey('YourVehicleHere')]` is the vehicle model you want the script to detect, you can add as many occurences as shown in the base config
2. Inside the table of the vehicle, you will put `['stryker_lifepak_15']` and `['sacOxy']`,  these are the base models for the ECG Monitor and Oxygen bag

{% hint style="info" %}
If you want only an oxygen bag or only an ECG monitor in a specific vehicle, just delete the related table ! eg:\
\
For my ambulance to carry only a ECG monitor :

<pre class="language-lua"><code class="lang-lua"><strong>[GetHashKey('ambulance')] = {
</strong>	['stryker_lifepak_15'] = {
		pos = vector3(-0.78, -3.3, 0.315), 
		rot = vector3(0, 0, 60.0), 
		bone = '',
	}, 
	['sacOxy'] = {
		pos = vector3(0.95, -3.2, 0.52), 
		rot = vector3(0, 0, 200.0), 
		bone = '',
	},
	doors = {'door_pside_r', 'door_dside_r'},
	useLOS = true,
},
</code></pre>

Will become :&#x20;

```lua
[GetHashKey('ambulance')] = {
	['stryker_lifepak_15'] = {
		pos = vector3(-0.78, -3.3, 0.315), 
		rot = vector3(0, 0, 60.0), 
		bone = '',
	}, 
	doors = {'door_pside_r', 'door_dside_r'},
	useLOS = true,
},
```

{% endhint %}

3. For each object, you will find a ***pos*** and ***rot*** fields, this is the place where your prop will be place **FROM THE CENTER OF THE VEHICLE.**\
   As a reminder : x = left/right | y = front/back | z = up/down&#x20;

{% hint style="info" %}
To place your objects more simply, use the built-in command `'/coordsTool'` withe the object you want to place (1 for the bag, 2 for the monitor) and the vehicle model to scan near to you.
{% endhint %}

4. `bone = ""`, is the bone you want to attach the prop to (this can be a door, trunk furniture ... useful for very detailed and animated vehicles. No built-in tool provided
5. `doors = {"door_pside_r", "door_dside_r"}`, are the doors the script will open when taking a prop
6. `useLOS = bool`, is the config that sets if the script should check the Line Of Sight between you and the entity. Setting this to false will help with the issue where you are not able to take a prop from a vehicle because of bad collisions.

{% hint style="danger" %}
If the bag is in the vehicle but you can't select it (no outline + key as no effect). This can be a bad vehicle collision / bad model. \
Script is detecting collisions and a bad vehicle model will interfere
{% endhint %}

***

## 🧳cfg.props

This table will contain all the configs you need to adapt the script to your own custom props !

Since this is an "Advanced" configuration, we will not dive deep into this part, you should bee able to figure all this by yourself. However, i will explain the most important fields

* `modelName` : a String representing the model name
* `(Only for backpack) posOnBack` : a vector3 representing the offset position from the back of the player
* `(Only for backpack) rotOnBack` : a vector3 representing the offset rotation from the back of the player
* `bone` & `victimBone`  = A ped bone id to attach the prop to. List can be found [HERE](https://wiki.rage.mp/index.php?title=Bones)

{% hint style="warning" %}
When using a bone, rotation and location will become relative to the bone and not from the ped anymore
{% endhint %}

* `posInHand` : a vector3 representing the offset position from the hand of a player
* `rotInHand` : a vector3 representing the offset rotation from the hand of a player
* `screen` & `gauge:` a table containing the width and height of the screen, its relative position and rotation from the prop center
* `pipeOffsetPos` & `wireOffsetPos` : The position offset from the center of the prop where the wire or tube should start and attach
* posOnVictim : The offset position relative to the ped center or bone if specified, to place the mask or electrode at&#x20;
* rotOnVictim : The offset rotation relative to the ped center or bone if specified, to place the mask or electrode at&#x20;

***

## 🚪cfg.openDoors

Allow the script to open the vehicle doors if you dont use any context menu or Third Eye script

<pre class="language-lua"><code class="lang-lua"><strong>cfg.openDoors = true
</strong></code></pre>

***

## ⛽cfg.refillLocations

These are the coordinates where you can refill an used oxygen tank. Feel free to add or remove locations !

{% hint style="info" %}
vector4(***X*** ,  ***Y*** , ***Z*** , ***Heading***)
{% endhint %}

```lua
cfg.refillLocations = {
	vector4(1194.57, -1483.54, 34.86, 137.77),
	vector4(0.0, 0.0, 0.0, 0.0),
}
```

***

## 👕 GetEupComponents

The EUP components ID's to put for the player to be shirtless

* Component ID is the EUP class you want to select, these can be found [HERE](https://docs.fivem.net/natives/?_0x262B14F48D29DE80)
* Drawable ID is the number of the cloth


# Medical

This will list all the medical actions related configs

* [cfg.commandName](#cfg.commandname)
* [cfg.autoInjuried](#cfg.autoinjuried)
* [cfg.healthLevel](#cfg.healthlevel)
* [cfg.customVitals](#cfg.customvitals)
* [cfg.allowCustomVitals](#cfg.allowcustomvitals)
* [cfg.preset](#cfg.preset)
* [cfg.healOnStop](#cfg.healonstop)
* [cfg.minCprCompressions](#cfg.mincprcompressions)

***

## 🗨️ cfg.commandName

This is the command to  use to set yourself as a injuried / victim

```lua
cfg.commandName = 'injuried'
```

***

## 🤕cfg.autoInjuried

Set to ***true*** if you want the script to automatically set a player as injuried if it's health fall's under a certain level, set with : [cfg.healthLevel](#cfg.healthlevel).\
Set to ***false*** if you don't want this to happen

```lua
cfg.autoInjuried = true 
```

***

## 💓 cfg.healthLevel

Health percentage to be set as "Injuried" for the script. Only applies if [cfg.autoInjuried](#cfg.autoinjuried) is set to ***true***

```lua
cfg.healthLevel = 25
```

***

## 🗨️ cfg.customVitals

This is the command to  use to set acess the custom vitals UI

```lua
cfg.customVitals = 'customVitals'
```

***

## 🛂 cfg.allowCustomVitals

Allow the players to open the customVitals UI and override the script health levels by setting medical cases such as Bradychardia ... and saved presets as defined in cfg.preset.

```lua
cfg.allowCustomVitals = true
```

***

## 🎛️ cfg.preset

These are the presets displayed and used in the custom vitals UI. These are the values from which the script will start to act when a reanimation is ongoing. These will evolve during use.

Fields explanation even if they are mostly self explanatory :&#x20;

* `presetName` : The displayed name in the UI for the actual preset
* `oxygenSaturation` :  Percentage of oxygen between 0% and 100%
* `cardiacFrequency` : A cardiac frequency between 0 and 250
* `reanimationChance` : A percentage between 0 and 100 that the CPR will work
* `arterialPressure` : A string containing the blood pressure in this format ***"systolic/diastolic"***
* `cardiacArrest` ***:*** Sets if the player is in cardiac arrest and needs CPR or just need to be stabilised

***

## 🩹 cfg.healOnStop

Specify if the script should be giving back health after the player stops the /injuried command.

```lua
cfg.healOnStop = true
```

{% hint style="warning" %}
Letting this value at true could cause abuses if a player does /injuried two times, performing the same action as a /revive. Use with caution.
{% endhint %}

***

## 🫀 cfg.minCprCompressions&#x20;

Specify the minimum number of CPR compressions needed to perform before the victim can be revived.

```lua
cfg.minCprCompressions = 131
```

{% hint style="info" %}
The victim will not always recover at the given number of compressions, it could and most likely will take some more CPR compressions since its a random calculation based on this value
{% endhint %}


# Errors and Troubleshooting

This section is related to configs for troubleshooting and common errors

***

## 🔁 cfg.errorMs

If you have this error too often :&#x20;

```
"[Reanimation] Internal error [..] : Unable to reach the owner ped of the [...]. This is a common error from an aborted event, please look at the config. Do not report at the developer.'"
```

Please increase this value (in ms). This can be different depending on your server.

```lua
cfg.errorMs = 300
```

***

## 🔩 cfg.useLegacySpawn

If you dont see the medical props spawning and you got no errors in console, set this to ***true.***\
This can be useful for some OneSync legacy servers.

```lua
cfg.useLegacySpawn = false
```

{% hint style="warning" %}
It will use a different system to spawn props, but it will consume a bit more resources
{% endhint %}

{% hint style="info" %}
if it still dosen't spawn, redo your config correctly. If it's still not working, report at the developer
{% endhint %}


# Features and How to use

Coming soon ...


# Advanced Water Pumps

{% hint style="info" %}
This script is protected using FiveM Escrow system. You will need the 5181 server artifact or above.
{% endhint %}

***

## Description

This resource is a ***paid resource*** aiming to improve firefighters  roleplay with a life like pumping script and a custom flooding system.\
The script is available to purchase as well as my other resources [here](https://www.pingouin.dev/mods).

VIDEO COMING SOON


# General config

This guide will help you to config your script

* [Frameworks](/scripts-docs/advanced-water-pumps/general-config/frameworks-and-compatibility)
* [Misc](/scripts-docs/advanced-water-pumps/general-config/miscellaneous)
* [NUI Config](/scripts-docs/advanced-water-pumps/general-config/nui-config)
* [Errors and troubleshooting](/scripts-docs/advanced-water-pumps/general-config/errors-and-troubleshooting)


# Frameworks and compatibility

This part will help with the framework part of the config (ESX/QB/Custom ...) and my others scripts compatibility

## cfg.ESX&#x20;

Set to ***true*** if you plan to use ESX Jobs to run the script, ***false*** if not applicable

```lua
cfg.ESX = true,
```

***

## cfg.QB&#x20;

Set to ***true*** if you plan to use QB Jobs to run the script, ***false*** if not applicable

```lua
cfg.QB = true,
```

***

## cfg.jobNames

Set the jobs which are allowed to use the script (pumps, hoses ...).

***BEFORE :***&#x20;

```lua
cfg.jobNames = {
    'firefighters',
}
```

***AFTER***&#x20;

```lua
cfg.jobNames = {
    'firefighters',
    'army',
    'technicalService',
}
```


# Miscellaneous

This will explain the most important configs of the script.

1. [cfg.vehicles](#cfg.vehicles)
2. [cfg.pump](#cfg.pump)
3. [cfg.hose](#cfg.hose)
4. [cfg.water](#cfg.water)

***

## 🚒 cfg.vehicles

This table will contain all the configs you need to have your vehicle ready for calls !\
It will define where the pump and the hose will be attached visually in your truck.

A vehicle config will look like this :&#x20;

```lua
cfg.vehicles = {
	[GetHashKey('firetruck')] = {
		pump = {
			pos = vector3(-0.78, -3.3, 0.315), 
			rot = vector3(0, 0, 60.0), 
			bone = '',
		}, 
		hose = {
			pos = vector3(0.95, -3.2, 0.52), 
			rot = vector3(0, 0, 200.0), 
			bone = '',
		},
	}, 
	--[...]
}
```

***Let's dive into this :***&#x20;

1. `GetHashKey(['YourVehicleHere'])` is the vehicle model you want the script to detect, you can add as many occurences as shown in the base config
2. Inside the table of the vehicle, you will put `pump` and `hose` tables, holding the pos and rot values.
3. For each object, you will find a ***pos*** and ***rot*** fields, this is the place where your prop will be place **FROM THE CENTER OF THE VEHICLE.**\
   As a reminder : x = left/right | y = front/back | z = up/down&#x20;

{% hint style="info" %}
To place your objects more simply, use the built-in command `'/vehPumpTool'` with the object you want to place and the vehicle model to scan near to you.
{% endhint %}

***

## 🪣 cfg.pump

This is the config holding the infos of the pump (inlets, position in hands ...)

```lua
cfg.pump = {
    model = "waterPump",
    inletPos = vector3(-0.02, 0.33, 0.0),
    outletPos = vector3(0.18, 0.075, 0.2125),
    posInHand = vector3(0.0, -0.23, -0.47),
    rotInHand = vector3(0.0, 0.0, 0.0),
    bone = 28422,
}
```

1. `model` is the model name of the prop you want to use as a pump
2. `inletPos` is the position of the inlet relative to the pump where the hose will be plugged
3. `outletPos` is the position of the outlet relative to the pump where the hose will be plugged
4. `posInHand` is the position of the pump relative to the player when carried
5. `rotInHand` is the rotation of the pump relative to the player when carried
6. `bone` is the ped bone on which the pump will be attached relative to

***

## 🚿 cfg.hose

This is the config holding the infos of the hose, similar as the pump

```lua
cfg.hose = {
    model = "inctuyau",
    posInHand = vector3(0.28, 0.0, -0.02),
    rotInHand = vector3(45.0, 60.0, -180.0),
    bone = 28422,
}
```

1. `model` is the model name of the prop you want to use as a hose
2. `posInHand` is the position of the hose relative to the player when carried
3. `rotInHand` is the rotation of the hose relative to the player when carried
4. `bone` is the ped bone on which the pump will be attached relatively

***

## 🌊 cfg.water

This configuration will define all your custom zones that can be flooded.

{% hint style="info" %}
They can easily be configured using the "`/quadsTool`" command to retreive the positions
{% endhint %}

Lets dive deeper into it :

```lua
cfg.water = {
    {
        adress = "5 Pump Street",
        bounds = {
            xmin = -265,
            xmax = -249,
            ymin = -455,
            ymax = -429,
        },
        height = 27.75,
        groundAtCoords = 24.4,
    }, 
    --[...]
}

```

1. `address` is the address you will see in the NUI flooding management
2. `bounds` is the table holding the values specifying the position of the water quad
3. `height` is the height at which the level will rise when flooding&#x20;
4. `groundAtCoords` is the height of the ground, starting from where the script will consider the area as clear, unflooded.

***

## 📈cfg.pumpSpeed

This config defines the speed of the pump to drain a flooding.

The values is expressed is meters/second.

```lua
cfg.pumpSpeed = 0.02
```


# NUI config

This will explain the UI related options from the script, especially the NUI containing the flooding management map

1. [cfg.useCommand](#cfg.usecommand)
2. [cfg.commandName](#cfg.commandname)
3. [cfg.blurLevel](#cfg.blurlevel)

***

## 📥 cfg.useCommand

Sets if the command to open the NUI is activated in game. Set at *false* to disable

```lua
cfg.useCommand = true
```

{% hint style="danger" %}
No system is actually in place to trigger the floodings automatically, setting this at false would just block any flooding action. We recommand to keep it as it is for the moment.
{% endhint %}

***

## 📝 cfg.commandName

The command you want to type to open the flooding management panel.

```lua
cfg.commandName = "floodNui"
```

***

## 🌫️ cfg.blurLevel

Sets the blur strength in the UI background. Value at *1.8* by default.

```lua
cfg.blurLevel = 1.8
```


# Errors and Troubleshooting

This section is related to configs for troubleshooting and common errors

***

## 🔩 "*<mark style="color:$danger;">Failed to load water. Does the water.xml exists and is valid ?</mark>*"

The script is unable to load the water infos into the game, its most likely a file or path issue&#x20;

* [ ] Is the resource name a valid name (avoid special characters, spaces ...) ?
* [ ] Does the water.xml file exists within the script ?
* [ ] Do you have any resource using a custom water.xml ? If so, try to disable it momentarily  to see if it fixes the issue.

{% hint style="info" %}
If you tried and verified every of these steps, open a support ticket on the discord
{% endhint %}

***

## ⚓️ "*<mark style="color:$danger;">No water quads found. Please check the water.xml file and config.lua (cfg.water)</mark>*<mark style="color:$danger;">.</mark>"

The script is not able to retreive and match the config with the water data in game, this issue is mostly caused by a misconfiguration. <br>

* [ ] Verify all the values in cfg.water, try to disable them one by one to see if a value breaks the system behavior
* [ ] Verify that the water.xml seems well structured / present no obvious errors

{% hint style="info" %}
If you tried and verified every of these steps, open a support ticket on the discord
{% endhint %}


# Features

This page will describe briefly the features of the script

***

* Carry a pump and some hoses in your vehicle, visually
* Deploy them on a flooded area to start pumping it&#x20;
* Synced realistic hoses, animations, water levels
* Trigger floodings or stop them through a custom NUI panel
* Configure your own flooding areas using a custom tool !
* Configure easily your custom vehicles and props using built-in tools to make the config process faster for you
* Support a custom DLC featuring a pump trailer
* Standalone, but still supports light integration and jobs from all frameworks
* 0.00-0.01 idling to 0.05 in use&#x20;


# \[DLC] Pump Trailer

Infos on the Pump Trailer DLC

The Water Pump script can be coupled with a DLC, the Pump Trailer, allowing an extended experience and a different way to experience the script !\
\
IMAGE ICI IMAGE ICI


# Configuration infos

## 🔗 How to link the DLC to the script&#x20;

The DLC does not need any specific configurations, it is made to be autodetected.

{% hint style="warning" %}
You must start the DLC before the main script, otherwise, it will most likely not detect it !
{% endhint %}

***

## 🏞️ Change the pump textures&#x20;

The textures are unlocked, you can change them like for any other asset&#x20;

***

## 🪝 Attach a trailer / The trailer won't attach to my vehicle&#x20;

You must update the `<trailer>`  values in the `vehicles.meta` of the vehicle you want to be able to tow the trailer with !

***Before :***

```xml
</trailers>
```

***After :***&#x20;

```xml
<trailers>
        <Item>pumpTrailer</Item>
</trailers>
```


# Decapitation script

Here you will be able to find the docs related to the decapitation script !

This is the first ever port of gore / dismemberment on FiveM and i hope that it will suit your needs !


# General config

This page will explain all the config fields and integrations needed !

## cfg.authWeapons

This config is a list of all the weapons that are used by the scriptto decapitate someone.

You can add new one by using this [website](https://wiki.rage.mp/index.php?title=Weapons), crating a new row with the hash inside brackets like this

```lua
[WEAPONHASH] = true,
```

if you want to delete one, juste set it at `false` or delete it from the list !

***

## cfg.ignorePlayers

If this config is set to ***true***, it will ignore players and not decapitate them. Otherwise it will have not effect.

```lua
cfg.ignorePlayers = false
```

***

## cfg.ignoreList

This is a list of all the peds on which the decapitation will have no effects. Hash is used by the script, so dont forget to put `GetHashKey("YOUR_PED_NAME").`

```lua
cfg.ignoreList = {
    [GetHashKey('a_c_cat_01')] = true,
    [GetHashKey('a_c_chickenhawk')] = true,
    [GetHashKey('a_c_chimp')] = true,
    [GetHashKey('a_c_chop')] = true,
}
```


# Integrate with death scripts

"Oh no ! My player ped lost his head forever, now that i respawned, everyone sees me without an head"

**Dont worry, we'll fix that !**

## How to integrate to your death script ?

{% hint style="info" %}
if your death/revive script is using a CLIENT side logic, follow these steps, else jump to the next hint &#x20;
{% endhint %}

* [ ] Find the code part which revives the player inside the death script
* [ ] Paste this line in the event `TriggerServerEvent("dismember:server:resetCommand")`
* [ ] Save and restart the death script

This should look like this now&#x20;

```lua
RegisterNetEvent("MyDeathScript:revive")
AddEventHandler("MyDeathScript:revive", function()
    -- Blahblahblah
    -- Whatever the code is already doing
    TriggerServerEvent("dismember:server:resetCommand")
end)
```

{% hint style="info" %}
if your death/revive script is using a SERVER side logic, follow these :&#x20;
{% endhint %}

* [ ] Find the code part which revives the player inside the death script
* [ ] Paste this line in the event `TriggerClientEvent("dismember:client:resetDismember", -1, netId)`
* [ ] `netId` needs to be the server id of the player to revive, or the source of the event
* [ ] Save and restart the death script

The code should now look like this&#x20;

```lua
RegisterNetEvent("MyDeathScript:revive")
AddEventHandler("MyDeathScript:revive", function(source)
    -- Blahblahblah
    -- Whatever the code is already doing
    TriggerClientEvent("dismember:client:resetDismember", -1, source)
end)
```


# Facial Recognition

Here you will be able to find the docs related to the facial recognition script !

{% hint style="info" %}
This script is protected using FiveM Escrow system. You will need the 5181 server artifact or above.
{% endhint %}

***

## Description

This resource is a ***paid resource*** aiming to improve ropleplay chases of wanted players.\
The script is available to purchase as well as my other resources [here](https://www.pingouin.dev/mods).

{% embed url="<https://youtu.be/1Fm8mfENos0>" %}


# General config

This page will explain all the config fields and integrations needed !

***

* [Frameworks](/scripts-docs/facial-recognition/general-config/frameworks)
*
*


# Frameworks

This part will help with the framework part of the config (ESX/QB/Custom ...)

## cfg.useESX&#x20;

Set to ***true*** if you plan to use ESX Jobs to run the script, ***false*** if not applicable

```lua
cfg.useESX = true,
```

***

## cfg.useQB&#x20;

Set to ***true*** if you plan to use QB Jobs to run the script, ***false*** if not applicable

```lua
cfg.useQB = true,
```

***

## cfg.jobNames

Set the jobs which are allowed to use the panel / research and alerts part of the script. This will not affect the recognition part.

***BEFORE :***&#x20;

```lua
cfg.jobNames = {
    'police',
}
```

***AFTER***&#x20;

```lua
cfg.jobNames = {
    'police',
    'BSCO',
    'sheriff',
}
```


# Miscellaneous

This will explain the most important and features related configs of the script.

## 🚗 cfg.allowVehicle

Allow the script to detect researched players that are in a vehicle.&#x20;

<pre class="language-lua"><code class="lang-lua"><strong>cfg.allowVehicle = true
</strong></code></pre>

***

## 🚦 cfg.maxSpeedVehicle

Set the speed (in m/s) where the camera can't recognize the wanted player anymore.\
(84 m/s is roughly equal to 300kph)

<pre class="language-lua"><code class="lang-lua"><strong>cfg.maxSpeedVehicle = 84
</strong></code></pre>

***

## 🛣️ cfg.camLocations

This table will contain all the configs you need to have your cameras ready to scan people faces !

A  camera config will look like this :&#x20;

```lua
cfg.camLocations = {
    {
        model = 'prop_cctv_cam_05a', 
        pos = vector3(-1453.1483154296875,-769.0479736328125,16.0924072265625), 
        rot = vector3(0,0,-82.65670013427734), 
        isGivingClue = true, 
        recognitionRange = 80.0,
    },
    [...]
}
```

***Let's dive into this :***&#x20;

1. `model = 'prop_cctv_cam_05a'` is the camera model you want to use for the script to spawn.
2. `pos = vector3(-1453.14, -769.04, 16.09)` is the position vector of the camera&#x20;
3. `rot = vector3(0,0,-82.65670013427734)` is the rotation vector of the camera

***As a reminder : x = left/right | y = front/back | z = up/down***&#x20;

{% hint style="info" %}
To place your objects more simply, use the built-in command `'/camPreview'` which will create a config for you in your clipboard from your placement in the game.&#x20;
{% endhint %}

{% embed url="<https://streamable.com/3fc2pc>" %}

4. `isGivingClue = true`,  if this config is  set to false, the camera will recognize the player but won't let it know it. Otherwise, the player will be able to know that he had been recognised
5. `recognitionRange = 80.0`, this is the distance in meters the camera can detect you

***

## ⏲️ cfg.utc

Sets the UTC offset for your server, this will modify the time on the cameras screenshots.\
1 = UTC+1,  2 = UTC+2 ...

<pre class="language-lua"><code class="lang-lua"><strong>cfg.utc = 1
</strong></code></pre>


# Errors and Troubleshooting

This section is related to configs for troubleshooting and common errors

***

## 🔁 cfg.debugBindPlus & cfg.debugBindMinus

If  you dont have numeric tiles on your keyboard, you might need to change the key for the `/camPreview` tool to work.\
Head onto the [fivem controls docs](https://docs.fivem.net/docs/game-references/controls/) for the key ID's

```lua
cfg.debugBindPlus = 314
cfg.debugBindMinus = 315
```

***


# Utils

Nothin' to see here


# Homeless tent script

Here you will be able to find the docs related to the homeless tent script !

{% hint style="info" %}
This script is protected using FiveM Escrow system. You will need the 5181 server artifact or above.
{% endhint %}

***

## Description

This resource is a ***paid resource*** aiming to improve ropleplay of new or broke players by providing them a tent to sleep or hide from the police\
The script is available to purchase as well as my other resources [here](https://www.pingouin.dev/mods).

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


# General config

This page will explain all the config fields and integrations needed !

***

* [Frameworks](/scripts-docs/facial-recognition/general-config/frameworks)
*
*


# Frameworks

This part will help with the framework part of the config (ESX/QB/Custom ...)

You must insert your item in the database to use it. Make sure it matches your [cfg.itemName](#cfg.itemname)

## cfg.ESX&#x20;

Set to ***true*** if you plan to use ESX Jobs to run the script, ***false*** if not applicable

```lua
cfg.ESX = true
```

***

## cfg.QB&#x20;

Set to ***true*** if you plan to use QB Jobs to run the script, ***false*** if not applicable

```lua
cfg.QB = true
```

***

## cfg.itemName&#x20;

Set the name you want to give to the tent item

```lua
cfg.itemName = "tent"
```


# Miscellaneous

This will explain the most important and features related configs of the script.

## ⛺cfg.allowPlayerCustomTent

Allow players to place they own tents. ***False*** if you want to deactivate.

<pre class="language-lua"><code class="lang-lua"><strong>cfg.allowPlayerCustomTent = true
</strong></code></pre>

***

## 💬 cfg.getTentCommand

Set the command you want to use to place a tent.

<pre class="language-lua"><code class="lang-lua"><strong>cfg.getTentCommand = "getTent"
</strong></code></pre>

***

## 🛣️ cfg.allowWaypointToTent

This config allow the player to set a waypoint to their placed tent when trying to place one.

```lua
cfg.allowWaypointToTent = true
```

***

## ⏲️ cfg.tentLifeTime

Sets the number of hours a placed tent should stay on the server. ***(Tents are Persistent through reboots)***&#x20;

<pre class="language-lua"><code class="lang-lua"><strong>cfg.tentLifeTime = 72 * (60 * 60)
</strong></code></pre>

Here, 72 are the number of hours the tent will stay on the server before being deleted.&#x20;

***(Tents are deleted upon the next reboot, not directly during uptime)***

***

## 🏕️ cfg.modelSpawnedByServer

This config is useful if you use a custom prop for the tent. Its the name of the prop you want to spawn as a tent.

```lua
cfg.modelSpawnnedByServer = "prop_skid_tent_01"
```

***

## ⬇️ cfg.spawnOffset

This sets an offset for the z axis when spawning a tent. Change this if you change the base model of the tent.

```lua
cfg.spawnOffset = 0.38
```

***

## ↔️ cfg.scanRange

This is the range in meters for a tent to be seen by the script (Marker visible).

```lua
cfg.scanRange = 25.0
```

***

## 🔖 cfg.drawMarker

This config sets if the script should display a marker on the ground in front of the tent or not

```lua
cfg.drawMarker = true
```

***

## 📃 cfg.tentModel

These are the props recognised as tents for the script, the player can interact with.

```lua
cfg.tentModel = {
    "prop_skid_tent_01",
    "prop_skid_tent_03",
    "prop_skid_tent_01b",
}
```

***

## 🕺 cfg.animCycle

This is the table containing all the animations you can do in the tent, you can add or delete from the list.

The format should always be : `{DICTIONNARY, ANIM}`

A list of anims can be found on this [site](https://forge.plebmasters.de/animations)&#x20;

```lua
cfg.animCycle = {
    {"timetable@tracy@sleep@", "idle_c"},
    {"anim@heists@fleeca_bank@ig_7_jetski_owner", "owner_idle"},
    {"amb@world_human_sit_ups@male@idle_a", "idle_a"},
}
```

***

## 🗨️ hintToDisplay(text)

This is the function creating the notification at the top left of the screen.

You can change its core to modify it and integrate as you need.


# Keybinds

These are the keys you want to use for the script !

## 📖Quick guide&#x20;

Every controls are listed [HERE](https://docs.fivem.net/docs/game-references/controls/#controls)

The key id (number) defines the key listened by the script to trigger the action.

***

## 🔴Key 1 - Main action&#x20;

This key will control the main action (enter, exit, evict). Set to **"E"** by default

```lua
cfg.key = 38
```

***

## 🟠Key 2 - Secondary action&#x20;

This key will control the secondary action (Anims switch). Set to **"X"** by default

```lua
cfg.key2 = 73
```

***

## 🟡Key 3 - rotate1&#x20;

This key will control rotation. Set to **"Left key"** by default

```lua
cfg.key3 = 174,
```

***

## 🟢Key 4 - rotate2

This key will control rotation. Set to **"Right Key"** by default

```lua
cfg.key4 = 175,
```


# Utils

Nothin' to see here


