# Welcome

This is the official documentation environment for scripts created by RAHE Development.

If you are looking for resource information or assistance with our products, then this is the correct place. We provide installation guides, give tips on how to integrate our resources, answer frequently asked questions and provide other useful information.&#x20;

Every script we have released, or will ever release, will have thorough documentation on this site. Make sure to join our [<mark style="color:blue;">Discord group</mark>](https://discord.gg/Ckm4tVbmRE) to get notified about new releases & updates!

{% hint style="info" %}
If you are a first time reader, then we advise you to read through our [General information](https://docs.rahe.dev/overview/general-information) and [Common questions](https://docs.rahe.dev/overview/common-questions). This will give you an overview about what to expect from our developers and support team.
{% endhint %}

{% content-ref url="/pages/q2ZWN7U8yKGREFVR3VZV" %}
[General information](/general-information)
{% endcontent-ref %}

{% content-ref url="/pages/LI2yfiFYKvKak80t2mDu" %}
[Common questions](/common-questions)
{% endcontent-ref %}


# General information

### Encryption

All of our resources are partially encrypted by the [FiveM asset escrow system](https://forum.cfx.re/t/introducing-asset-escrow-for-your-resources/4777151). This means that some parts of the code are not fully accessible. Don't be frightened, though. Only the necessary parts are protected!

This is required to protect our resources from being leaked and resold. Even billion-dollar companies / very trusted people are sometimes subject to data breaches / hacking. This system protects both - the seller and the buyer. This official system provided by [Cfx.re](https://fivem.net/) is the safest and most convenient way to do this kind of protection.

In general, you shouldn't feel limited because of this. We provide extensive configuration options and as much unencrypted code as possible to allow you a wide range of customizability. And the HTML files are always unencrypted, allowing you to change the designs entirely.

{% hint style="info" %}
Do you feel like you need to access some parts of the encrypted code? Contact us on Discord - let us know what you need and why you need it. If possible, we will include it in a future update.
{% endhint %}

### Support

We offer rudimentary support to all of our customers. Please note - we can't provide unlimited assistance with every issue. Since our scripts are thoroughly tested and run on hundreds of servers successfully, there is a very big chance that your issue is caused by installation or configuration mistakes.

**Assistance from our team&#x20;**<mark style="color:green;">**is provided**</mark>**&#x20;when:**

* You have read through the documentation (and are sure that your issue is not answered).
* You have tried to fix the issue yourself by debugging and validating your installation.

**Assistance from our team&#x20;**<mark style="color:red;">**is not provided**</mark>**&#x20;when:**

* You have not read through the documentation.
* You have not tried to solve the issue yourself (using documentation, Google, Discord).
* You are asking for something to be coded / customized by us.&#x20;
* You are asking us to do the installation for you.

{% hint style="info" %}
If you solve problems without any assistance from us, then it means that our team will have more time to provide you with free updates - which helps us both!
{% endhint %}

### Updates

All of our resources receive regular updates and bugfixes depending on what's requested by the community. We advise you to be in our Discord server so you would get notified of the updates.&#x20;

A great way to stay in touch is to follow our announcements & changelog channel by pressing the 'Follow' button in the corresponding channels.

<figure><img src="/files/mvSlbAOH8KvQtdpuDKdD" alt=""><figcaption><p>Following our #changelog channel</p></figcaption></figure>

{% embed url="<https://discord.gg/Ckm4tVbmRE>" %}

{% hint style="info" %}
Even if you successfully install your resource and think you won't ever need to communicate with us again, we still suggest you stay in our Discord / follow us. Sometimes there might be bugfixes / updates which you should be aware of.
{% endhint %}


# Common questions

### Which frameworks are supported?

All of our resources can be used with every framework. Because of the way we have designed our scripts, the framework related functions are all unencrypted and in one place. This means that after editing a few simple functions, the resource will be ready to work with a new framework.

We provide pre-filled values for the most popular frameworks (ESX, QB) / resources.

### How do I download my script?

Since we are using the official Fivem asset escrow system, all of our resources can be downloaded from FiveM keymaster: <https://keymaster.fivem.net/asset-grants>

### Can I use oxmysql instead of my current MySQL resource?

Yes, oxmysql can be used to replace your ghmattimysql or mysql-async. This means that after you have deleted your old MySQL resource, you can just drop in oxmysql and everything should remain working. This is usually quite straight-forward and takes a few minutes at most.

### MariaDB is recommended for oxmysql. Can I switch to it?

If you aren't already using MariaDB, then yes - you should be able to switch from MySQL to MariaDB. To do this, create a database dump which contains your tables & data. After you have installed MariaDB, import that same dump to your new MariaDB database.&#x20;


# Racing

Racing for your server. Includes competitions, ELO rating, advanced track creation and more.

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


# Installation

In order to ensure a successful installation, please follow the instructions very carefully.

### Dependencies

<details>

<summary>oxmysql</summary>

#### Installation

* Download the [latest build](https://github.com/overextended/oxmysql/releases/latest) of oxmysql (not the source code).
* Extract the contents of the archive to your resources folder.
* Start the resource near the top of your resources in your server.cfg.

#### Required version

Your oxmysql version must be <mark style="color:yellow;">2.0.0 or above</mark> in order to work with our system.

#### Use the built version

Make sure you have downloaded the <mark style="color:yellow;">built version</mark> of oxmysql! If you download the source code, then the resource won't start and queries are unable to execute.&#x20;

The built version can be downloaded from the [releases page](https://github.com/overextended/oxmysql/releases/latest) (oxmysql.zip).

</details>

<details>

<summary>ox_lib</summary>

#### Installation

* Download the [latest build](https://github.com/overextended/ox_lib/releases/latest) of ox\_lib (not the source code).
* Extract the contents of the archive to your resources folder.
* Start the resource near the top of your resources in your server.cfg.

#### Use the built version

Make sure you have downloaded the <mark style="color:yellow;">built version</mark> of ox\_lib! If you download the source code, then it won't function correctly and the application will have problems.&#x20;

The built version can be downloaded from the [releases page](https://github.com/overextended/ox_lib/releases/latest) (ox\_lib.zip).

</details>

### Installing the resource

1. Make sure you have the [dependencies](#dependencies) listed above installed.
2. Extract the contents of the archive to your resources folder.
3. Run the SQL queries provided in <mark style="color:blue;">rahe-racing/sql/db.sql</mark>.
4. Choose your framework tab from the section below & follow the instructions.

{% tabs %}
{% tab title="QB" %}
In the file <mark style="color:blue;">rahe-racing/public/config/shared.lua</mark> change the framework to <mark style="color:blue;">'QB'.</mark>
{% endtab %}

{% tab title="ESX" %}
In the file <mark style="color:blue;">rahe-racing/public/config/shared.lua</mark> change the framework to <mark style="color:blue;">'ESX'.</mark>
{% endtab %}

{% tab title="Standalone" %}
In the file <mark style="color:blue;">rahe-racing/public/config/shared.lua</mark> make sure the framework is set to <mark style="color:blue;">'STANDALONE'.</mark>

Fill in the framework functions (like giving/removing money) if needed, taking QB/ESX as an example.
{% endtab %}

{% tab title="Custom" %}
In the file <mark style="color:blue;">rahe-racing/public/config/shared.lua</mark> make sure the framework is set to <mark style="color:blue;">'CUSTOM'.</mark>

Fill in the framework functions (like giving/removing money) if needed, taking QB/ESX as an example.
{% endtab %}
{% endtabs %}

### Using the resource

Use the command <mark style="color:blue;">/racing</mark> in-game to open the application tablet.

### Importing tracks

There are about 100 custom-made tracks included with the resource. If you wish, you can import these into your database to have some inital tracks. This is completely voluntary and is not required if you want to create your own tracks.

To import them, just run the SQL query provided in <mark style="color:blue;">rahe-racing/sql/tracks.sql</mark>

{% hint style="info" %}
The tracks SQL file is quite large and some databases tend to time out when trying to import the tracks. To counter this, please run the following SQL query before importing:

<mark style="color:blue;">`SET GLOBAL max_allowed_packet=1073741824;`</mark>
{% endhint %}


# Integration

Information about how to integrate our racing system with your server's resources.

### Item creation&#x20;

If you wish to use an item (instead of the default command that comes with the resource).

{% tabs %}
{% tab title="qb-inventory" %}
Add the following line to <mark style="color:blue;">qb-core/shared/items.lua</mark>

```lua
['racingtablet'] = { ['name'] = 'racingtablet', ['label'] = 'Racing tablet', ['weight'] = 1000, ['type'] = 'item', ['image'] = 'racingtablet.png', ['unique'] = true, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'Seems like something to do with cars.' },
```

Add the following image file as <mark style="color:blue;">qb-inventory/html/images/racingtablet.png</mark>

<figure><img src="/files/TGDFLaAuFLrbBGavsFZ8" alt="racingtablet.png"><figcaption></figcaption></figure>

Add this section to the end of <mark style="color:blue;">rahe-racing/public/framework/server.lua</mark>

```lua
QBCore.Functions.CreateUseableItem('racingtablet', function(source, item)    
    TriggerClientEvent('rahe-racing:client:openTablet', source)
end)
```

{% endtab %}

{% tab title="ox\_inventory" %}
Add this section to <mark style="color:blue;">ox\_inventory/data/items.lua</mark>

```lua
['racingtablet'] = {
    label = 'Racing tablet',
    weight = 500,
    description = 'Seems like something to do with cars.',
    stack = false,
    client = {
        export = 'rahe-racing.racingtablet',
    }
},
```

Add the following image file as <mark style="color:blue;">ox\_inventory/web/images/racingtablet.png</mark>

<figure><img src="/files/TGDFLaAuFLrbBGavsFZ8" alt="racingtablet.png"><figcaption></figcaption></figure>
{% endtab %}

{% tab title="OTHER" %}
Create the item in your inventory system. Trigger the following client-side events:

* Event <mark style="color:blue;">rahe-racing:client:openTablet</mark> on tablet item use.
  {% endtab %}
  {% endtabs %}


# Common issues

If you run into problems with our application, then most likely your issue is described here.

#### <mark style="color:blue;">CHECK</mark> | Latest version

Make sure you are running the latest version of our resource. If your resource is outdated, it might have issues that have already been solved in later updates.&#x20;

The latest version is <mark style="color:blue;">v2.0.3</mark> (you can check your version in <mark style="color:blue;">rahe-racing/fxmanifest.lua</mark>).

#### <mark style="color:blue;">CHECK</mark> | Errors on resource start

Make sure that there are no errors when the resource starts up.

:bulb: Type the following command to your server console:

`ensure rahe-racing`

There shouldn't be any errors after this command.

#### <mark style="color:blue;">CHECK</mark> | Required dependencies

Make sure that you have installed both of the required dependencies - <mark style="color:blue;">ox\_lib</mark> and <mark style="color:blue;">oxmysql</mark>. In addition to that, please verify that you have installed them **correctly** (you have downloaded the built versions as is instructed, not the source code versions).

:bulb: Type the following commands to your server console:

`ensure oxmysql`

`ensure ox_lib`

There shouldn't be any errors after these commands. If there are, you have incorrectly installed the dependencies or you haven't started them. Go back to our installation guide which will tell you exactly what to download and where to download it from.&#x20;

#### <mark style="color:red;">SCRIPT ERROR</mark> | `syntax error near '<\1>'`

You have uploaded the resource files to your server using <mark style="color:red;">Filezilla</mark>, which has a tendency to corrupt encrypted files. When the files are corrupted, the resource can't function correctly.

Please re-upload the files using a better FTP client such as <mark style="color:blue;">WinSCP</mark>.

#### <mark style="color:red;">SCRIPT ERROR</mark> | SQL error `Column 'player_identifier' cannot be null` when opening the tablet

You are most likely using the standalone version of our resource. The standalone version of our resource uses <mark style="color:blue;">Steam</mark> as the primary player identifier. If you are getting this error, then it means FiveM is unable to get the player identifier (<mark style="color:blue;">getPlayerIdentifier</mark> function in <mark style="color:blue;">public/framework/server.lua</mark>). This can happen because of two reasons:

1\) Your Steam was not open **before** you launched FiveM.

2\) You haven't configured your server to use <mark style="color:blue;">Steam</mark>. You must set the <mark style="color:blue;">steam\_webApiKey</mark> variable in your server config.

#### <mark style="color:yellow;">ISSUE</mark> | Custom vehicle names are showing up as <mark style="color:blue;">UNDEFINED</mark> in the tablet or are wrong.

We try to get the vehicle model names using two methods.&#x20;

Firstly, we try to get the name from a FiveM native (which takes it from your vehicle meta file):

```lua
GetLabelText(GetDisplayNameFromVehicleModel(modelHash))
```

If your vehicle meta files are not set up correctly, then this native will not work. If you want to fix this, make sure you have added a text entry (<https://docs.fivem.net/natives/?_0x32CA01C3>) for your custom vehicles and that their `gameName` and `modelName` match in the meta file. \
\
If that native didn't work, the system will then try to get the vehicle name from the resource config. So if your vehicle name ends up being <mark style="color:blue;">UNDEFINED</mark>, it means both of the methods have failed.

#### <mark style="color:yellow;">**ISSUE**</mark>**&#x20;| You are getting an error when importing the default tracks.**

This issue is covered in the [installation section](/our-scripts/racing/installation#importing-tracks). Please re-read the track import section there.

#### <mark style="color:yellow;">**ISSUE**</mark>**&#x20;| Some of your keybinds are not working during track creation.**

Most likely, some other resource of yours is using the keybinds, blocking our resource from using them. Please try changing the non-working track creation keybinds to some other keys in the resource config.


# Common questions

Commonly asked questions from our customers. Feel free to read these to get a better overview.

#### Can the tablet be opened with an item?

Yes, the tablet can be opened from any script by triggering the necessary client-side event, which can be found in <mark style="color:blue;">rahe-racing/public/client.lua</mark>. This means it can also be opened by an inventory script. If you are unsure how to do this, please take a look at our racing integration section.

{% content-ref url="/pages/cWtN8TQMQE76JbjjZStj" %}
[Integration](/our-scripts/racing/integration)
{% endcontent-ref %}

#### How do I change the tablet language (locale)?

Our resource uses the locale module from <mark style="color:blue;">ox\_lib</mark>.

All the locales are stored in the <mark style="color:blue;">rahe-racing/locales</mark> folder. In order to specify a language, you must add a convar to your server config (before our resource starts) as instructed in ox\_lib's setup section: <https://overextended.dev/ox_lib/Modules/Locale/Shared#setup>

So if you for example want to use Spanish, and set the convar to <mark style="color:blue;">es</mark>, then our resource will automatically try to load the rahe-<mark style="color:blue;">racing/locales/es.json</mark> file. If you don't set any convar, then the default language will be <mark style="color:blue;">English (en)</mark> and the loaded file will therefore be <mark style="color:blue;">racing/locales/en.json.</mark>

#### I have a higher average position than my friend, why is he above me in the leaderboard?

It's sorted by player ELO, which is not given in normal races. When two people have the same rating, the sorting is random. More about types and competitions in our race types section.

{% content-ref url="/pages/A2n4l8L6dogis3MbDLAN" %}
[Race types explained](/our-scripts/racing/race-types-explained)
{% endcontent-ref %}

#### How do I enable or configure phasing/ghost mode/no collision?

Phasing and its available options are all explained in our config at <mark style="color:blue;">rahe-racing/public/config/server.lua</mark>.

#### Why can't I create a competition? It's telling me that it doesn't have a result.

If you are getting the following error notification in your tablet when trying to create a competition:

<mark style="color:red;">`Competition can't be created. Track '%s' has no '%s' class results (to calculate the DNF timer).`</mark>

Competitions have dynamic DNF timers. This means when the track is short, the DNF timer (time you have to finish after the winner) is short too, for example 3 minutes.

If the track is long, then the DNF timer will also be longer, for example 10 minutes. In order for the system to calculate how long the DNF timer should be (3 minutes or 10 minutes), it needs to know how long the track is.

In order for the system to know how long the track is, it will look at the past results on the track. Meaning that in order to start an S class competition on a track, you must have at least one S class result on that track (normal race). Drive through that track once with the class in a normal race.

#### How are vehicle classes determined?

Vehicles are classed by their performance, we have predefined most of the vanilla GTA cars for you. For custom cars, you must assign a vehicle class to them manually in the table at <mark style="color:blue;">rahe-racing/public/server.lua</mark>.&#x20;

{% hint style="info" %}
Manual class assigning is the best way to ensure fair vehicle classes. If you tried to do it automatically, based on vehicle values (or something else), then it isn't 100% accurate as the vehicle model often affects performance.
{% endhint %}

#### Where can I find the vehicles and their classes?

All the vehicles and their classes can be found in <mark style="color:blue;">rahe-racing/public/server.lua</mark>.&#x20;

#### Can I make it so only certain people are allowed to create tracks / competitions?

Restricting competition & track creation is explained in our config at <mark style="color:blue;">rahe-racing/public/config/server.lua</mark>.


# Race types explained

Want to know more about race types / competitions? Or just have some questions? Read below.

#### What are the types of races?

There are two types of races: normal races and competition races.

* **Normal races** are the default races. They are meant for racing with your friends, testing tracks, testing vehicles, practice. You don't gain ELO (leaderboard positions) with these races.
* **Competition races** are like the name suggests - competitive. In these races you gain ELO to help you climb the leaderboard. By default these races are automatically generated.

**When will competitions be generated?**

Competitions will be generated at config 'competitionGenerationHour'. If this for example is set to 14, then competitions will be generated at 14:00 and a Discord notification will be sent if you have set up the webook.

**When will competition races start?**

The races will start at competitionHour & competitionMinute. When these are set to 19 and 0, the races will start 19:00. Using the example from our previous question, this means that the tracks will be generated 5 hours before the race (19 - 14, this is to let people know so they could prepare).

**How does the competition generator work?**

1. The generation algorithm chooses a random class (chances configurable, if you want one class to be picked more than others).
2. It will try to pick a random track for that class. It will only choose from tracks that have a result for that class. So if you have a new track and you have never driven it with a S class car, it will never be picked into S class competition**s**. If it can't find any tracks for that class, it will start from the beginning with another class.
3. It takes the best result on that track, uses it to estimate how long the race will take and adds a break time. So let's say a 10 minute track is chosen and the race starts at 19:00. Then the race after that will probably start in 10 (best track result) + 15 (break time) minutes = 19:25.

**How many competitions will be generated?**

It depends on your config competitionTargetLength. If the target length is 50 minutes, then the generator could pick 1x50 mins, 2x25 mins, 10x5 mins. Break times between races aren't included in this value, this is pure racing time.

Keep in mind that this value is the minimum length. For example when 49 minutes of tracks have been generated, then the minimum isn't reached and the last track could be for ex. 20 minutes long, taking the total length to 69 minutes. So you have to take into account that generally more will be generated.

**Why are no competitions being generated?**

You probably don't have enough results on different tracks with different classes for the generator. Or your server time is not at competitionGenerationHour.

**The generator is picking the same tracks / classes every day?**

You probably only have results on those tracks. Drive on other tracks, finish them at least once with different classes. Then they will be included in the generation algorithm.


# Drifting

Drifting for your server. Includes competitions, ELO rating, advanced track creation and more.

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


# Installation

In order to ensure a successful installation, please follow the instructions very carefully.

### Dependencies

<details>

<summary>oxmysql</summary>

#### Installation

* Download the [latest build](https://github.com/overextended/oxmysql/releases/latest) of oxmysql (not the source code).
* Extract the contents of the archive to your resources folder.
* Start the resource near the top of your resources in your server.cfg.

#### Required version

Your oxmysql version must be <mark style="color:yellow;">2.0.0 or above</mark> in order to work with our system.

#### Use the built version

Make sure you have downloaded the <mark style="color:yellow;">built version</mark> of oxmysql! If you download the source code, then the resource won't start and queries are unable to execute.&#x20;

The built version can be downloaded from the [releases page](https://github.com/overextended/oxmysql/releases/latest) (oxmysql.zip).

</details>

### Installing the resource

1. Make sure you have the [dependencies](#dependencies) listed above installed.
2. Extract the contents of the archive to your resources folder.
3. Run the SQL queries provided in <mark style="color:blue;">rahe-drifting/db.sql</mark>.
4. Choose your framework tab from the section below & follow the instructions.

{% tabs %}
{% tab title="QB" %}
Open <mark style="color:blue;">rahe-drifting/config/shared.lua</mark> and set line 4 to <mark style="color:blue;">framework = 'QB'</mark>
{% endtab %}

{% tab title="ESX" %}
Open <mark style="color:blue;">rahe-drifting/config/shared.lua</mark> and set line 4 to <mark style="color:blue;">framework = 'ESX'</mark>
{% endtab %}

{% tab title="Custom" %}
Open <mark style="color:blue;">rahe-drifting/config/shared.lua</mark> and set line 4 to <mark style="color:blue;">framework = 'CUSTOM'</mark>
{% endtab %}
{% endtabs %}

### Using the resource

Use the command <mark style="color:blue;">/drifting</mark> in-game to open the application tablet.

### Importing tracks

There are 9 custom-made tracks included with the resource. If you wish, you can import these into your database to have some inital tracks. This is completely voluntary and is not required if you want to create your own tracks.

To import them, just run the SQL query provided in <mark style="color:blue;">rahe-drifting/tracks.sql</mark>

{% hint style="warning" %}
The drifting system is quite similar to our racing. Please refer to racing common questions / explanations if you encounter any issues or would like to know more.
{% endhint %}

{% content-ref url="/pages/YjLhursUgCqwTjYBELqs" %}
[Common questions](/our-scripts/racing/common-questions)
{% endcontent-ref %}

{% content-ref url="/pages/A2n4l8L6dogis3MbDLAN" %}
[Race types explained](/our-scripts/racing/race-types-explained)
{% endcontent-ref %}


# Integration

Information about how to integrate our drifting system with your server's resources.

### Item creation&#x20;

If you wish to use an item (instead of the default command that comes with the resource).

{% tabs %}
{% tab title="qb-inventory" %}
Add the following line to <mark style="color:blue;">qb-core/shared/items.lua</mark>

```lua
['driftingtablet'] = { ['name'] = 'driftingtablet', ['label'] = 'Dritfting tablet', ['weight'] = 1000, ['type'] = 'item', ['image'] = 'driftingtablet.png', ['unique'] = true, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'Seems like something to do with cars.' },
```

Add the following image file as <mark style="color:blue;">qb-inventory/html/images/driftingtablet.png</mark>

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

Add this section to the end of <mark style="color:blue;">rahe-drifting/api/server.lua</mark>

```lua
QBCore.Functions.CreateUseableItem('driftingtablet', function(source, item)
    TriggerClientEvent('rahe-drifting:client:openTablet', source)
end)
```

{% endtab %}

{% tab title="ox\_inventory" %}
Add this section to <mark style="color:blue;">ox\_inventory/data/items.lua</mark>

```lua
['driftingtablet'] = {
    label = 'Drifting tablet',
    weight = 500,
    description = 'Seems like something to do with cars.',
    stack = false,
    client = {
        export = 'rahe-drifting.driftingtablet',
    }
},
```

Add the following image file as <mark style="color:blue;">ox\_inventory/web/images/driftingtablet.png</mark>

<figure><img src="/files/HV1Yj8lhlIHmD4C2BwKf" alt="racingtablet.png"><figcaption></figcaption></figure>

Add this section to the end of <mark style="color:blue;">rahe-drifting/api/client.lua</mark>

```lua
exports('driftingtablet', function(data, slot)
    openTablet()
end)
```

{% endtab %}

{% tab title="OTHER" %}
Create the item in your inventory system. Trigger the following client-side events:

* Event <mark style="color:blue;">rahe-drifting:client:openTablet</mark> on tablet item use.
  {% endtab %}
  {% endtabs %}


# Boosting

Boosting for your server. Includes hacking, VIN scratching, leaderboard and more.

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


# Installation

In order to ensure a successful installation, please follow the instructions very carefully.

### Dependencies

<details>

<summary>oxmysql</summary>

#### Installation

* Download the [latest build](https://github.com/overextended/oxmysql/releases/latest) of oxmysql (not the source code).
* Extract the contents of the archive to your resources folder.
* Start the resource near the top of your resources in your server.cfg.

#### Required version

Your oxmysql version must be <mark style="color:yellow;">2.0.0 or above</mark> in order to work with our system.

#### Use the built version

Make sure you have downloaded the <mark style="color:yellow;">built version</mark> of oxmysql! If you download the source code, then the resource won't start and queries are unable to execute.&#x20;

The built version can be downloaded from the [releases page](https://github.com/overextended/oxmysql/releases/latest) (oxmysql.zip).

</details>

<details>

<summary>ox_lib</summary>

#### Installation

* Download the [latest build](https://github.com/overextended/ox_lib/releases/latest) of ox\_lib (not the source code).
* Extract the contents of the archive to your resources folder.
* Start the resource near the top of your resources in your server.cfg.

#### Use the built version

Make sure you have downloaded the <mark style="color:yellow;">built version</mark> of ox\_lib! If you download the source code, then it won't function correctly and the application will have problems.&#x20;

The built version can be downloaded from the [releases page](https://github.com/overextended/ox_lib/releases/latest) (ox\_lib.zip).

</details>

### Installing the resources

Make sure you have the [dependencies](#dependencies) listed above installed.&#x20;

Extract the contents of the archive to your resources folder. Add both of the resources into your server config file so they would automatically run when the server is starting up.

#### Boosting (rahe-boosting)&#x20;

1. Run the SQL queries provided in <mark style="color:blue;">rahe-boosting/db.sql</mark>.
2. Choose your framework tab from the section below & follow the instructions.

{% tabs %}
{% tab title="QB" %}
Open <mark style="color:blue;">rahe-boosting/config/shared.lua</mark> and set line 4 to <mark style="color:blue;">framework = 'QB'</mark>

Open <mark style="color:blue;">qb-policejob</mark>, find an event called <mark style="color:blue;">police:server:UpdateCurrentCops</mark> in <mark style="color:blue;">qb-policejob/server/main.lua</mark>. Add the following line **into** the function, to the end:&#x20;

```lua
TriggerEvent('police:SetCopCount', amount)
```

This makes the script send a server-side event needed for our boosting script.
{% endtab %}

{% tab title="ESX" %}
Open <mark style="color:blue;">rahe-boosting/config/shared.lua</mark> and set line 4 to <mark style="color:blue;">framework = 'ESX'</mark>
{% endtab %}

{% tab title="Custom" %}
Open <mark style="color:blue;">rahe-boosting/config/shared.lua</mark> and set line 4 to <mark style="color:blue;">framework = 'CUSTOM'</mark>
{% endtab %}
{% endtabs %}

#### Hacking device (rahe-hackingdevice)

&#x20;No additional installation steps required.

### Using the resource

Use the command <mark style="color:blue;">/boosting</mark> in-game to open the application tablet.

Use the command <mark style="color:blue;">/usehackingdevice</mark> in-game to use the hacking device.

Use the command <mark style="color:blue;">/usegpshackingdevice</mark> in-game to use the GPS hacking device.


# Integration

Information about how to integrate our boosting system with your server's resources.

### Introduction

The whole boosting concept by design uses many parts of one's server. Fully integrating it into a server can't be automatically done by us, since code must be inserted into multiple resources.&#x20;

These integrations aren't required - the resource successfully works after completing the installation steps. However, we recommend that you do the integrations so the full potential of our system could be harnessed.

There are thousands of garage, dispatch, inventory or lockpicking scripts out there. We can't possibly provide an example for every one, since it would take an unreasonably long amount of time (and money, since many are paid resources).

It's your task as a developer to do the integrations. They aren't hard - with basic coding knowledge, you should easily be able to finish them in a reasonable amount of time.&#x20;

To help some of the inexperienced developers out there (or just people looking to save time), we have created examples for some of the most popular resources.

{% hint style="danger" %}
If you can't find your resource example(s) below, please refrain from requesting code from our support. We will get overwhelmed if everyone were to request custom integrations. Please look at other resources and use them as an example.
{% endhint %}

{% hint style="info" %}
If you successfully integrated something and think it would be useful for others as well, then feel free to share it with us and we'll add it to the documentation.
{% endhint %}

### Item creation&#x20;

If you wish to use items (instead of the default commands that come with the resource).

{% tabs %}
{% tab title="qb-inventory" %}
Add the following lines to to <mark style="color:blue;">qb-core/shared/items.lua</mark>

```lua
['boostingtablet'] = { ['name'] = 'boostingtablet', ['label'] = 'Boosting tablet', ['weight'] = 1000, ['type'] = 'item', ['image'] = 'boostingtablet.png', ['unique'] = true, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = "Seems like something's installed on this."},
['hackingdevice'] = { ['name'] = 'hackingdevice', ['label'] = 'Hacking device', ['weight'] = 1000, ['type'] = 'item', ['image'] = 'hackingdevice.png', ['unique'] = true, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'Will allow you to bypass vehicle security systems.' },
['gpshackingdevice'] = { ['name'] = 'gpshackingdevice', ['label'] = 'GPS hacking device', ['weight'] = 1000, ['type'] = 'item', ['image'] = 'gpshackingdevice.png', ['unique'] = true, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'If you wish to disable vehicle GPS systems.' },
```

Add the following image file as <mark style="color:blue;">qb-inventory/html/images/boostingtablet.png</mark>

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

Add the following image file as <mark style="color:blue;">qb-inventory/html/images/hackingdevice.png</mark>

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

Add the following image file as <mark style="color:blue;">qb-inventory/html/images/gpshackingdevice.png</mark>

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

Add the following section to the end of <mark style="color:blue;">rahe-boosting/api/server.lua</mark>

```lua
QBCore.Functions.CreateUseableItem("boostingtablet", function(source, item)
    TriggerClientEvent("rahe-boosting:client:openTablet", source)
end)

QBCore.Functions.CreateUseableItem("hackingdevice", function(source, item)
    TriggerClientEvent("rahe-boosting:client:hackingDeviceUsed", source)
end)

QBCore.Functions.CreateUseableItem("gpshackingdevice", function(source, item)
    TriggerClientEvent("rahe-boosting:client:gpsHackingDeviceUsed", source)
end)
```

{% endtab %}

{% tab title="ox\_inventory" %}
Add this section to <mark style="color:blue;">ox\_inventory/data/items.lua</mark>

```lua
['boostingtablet'] = {
    label = 'Boosting tablet',
    weight = 0,
    description = "Seems like something's installed on this.",
    client = {
	export = 'rahe-boosting.boostingtablet',
    }
},
['hackingdevice'] = {
    label = 'Hacking device',
    weight = 0,
    description = 'Will allow you to bypass vehicle security systems.',
    client = {
	export = 'rahe-boosting.hackingdevice',
    }
},
['gpshackingdevice'] = {
    label = 'GPS hacking device',
    weight = 0,
    description = 'If you wish to disable vehicle GPS systems.',
    client = {
	export = 'rahe-boosting.gpshackingdevice',
    }
},
```

Add the following image file as <mark style="color:blue;">ox\_inventory/web/images/boostingtablet.png</mark>

<figure><img src="/files/nQR8YDY5FsHwsJa8TkT4" alt="racingtablet.png"><figcaption></figcaption></figure>

Add the following image file as <mark style="color:blue;">ox\_inventory/web/images/hackingdevice.png</mark>

<figure><img src="/files/twBAV3CziDIAwUBnmcOI" alt="racingtablet.png"><figcaption></figcaption></figure>

Add the following image file as <mark style="color:blue;">ox\_inventory/web/images/gpshackingdevice.png</mark>

<figure><img src="/files/jIKJj0y1pH8FNRlNF7hU" alt="racingtablet.png"><figcaption></figcaption></figure>

Add this section to the end of <mark style="color:blue;">rahe-boosting/api/client.lua</mark>

```lua
exports('boostingtablet', function(data, slot)
    openTablet()
end)

exports('hackingdevice', function(data, slot)
    useHackingDevice()
end)

exports('gpshackingdevice', function(data, slot)
    useGpsHackingDevice()
end)
```

{% endtab %}

{% tab title="OTHER" %}
Create the items in your inventory system. Trigger the following client-side events:

* Event <mark style="color:blue;">rahe-boosting:client:openTablet</mark> on tablet item use.
* Event <mark style="color:blue;">rahe-boosting:client:hackingDeviceUsed</mark> on hacking device item use.
* Event <mark style="color:blue;">rahe-boosting:client:gpsHackingDeviceUsed</mark> on GPS hacking device item use.
  {% endtab %}
  {% endtabs %}

### Giving store items

If you wish to use the built-in store (items that are for sale in the Store tab for money & crypto).

{% tabs %}
{% tab title="qb-inventory" %}
In <mark style="color:blue;">rahe-boosting/api/server.lua</mark>, change the <mark style="color:blue;">giveItem</mark> function to this

```lua
function giveItem(playerId, itemId, amount)    
   if framework == 'ESX' then    
   
   elseif framework == 'QB' then    
      local Player = QBCore.Functions.GetPlayer(playerId) 
      Player.Functions.AddItem(itemId, amount, false)
   else
      -- CUSTOM
   end
end   
```

{% endtab %}

{% tab title="ox\_inventory" %}
In <mark style="color:blue;">rahe-boosting/api/server.lua</mark>, add the following line into your <mark style="color:blue;">giveItem</mark> function (choose the correct section based on your framework)

```lua
exports.ox_inventory:AddItem(playerId, itemId, amount)
```

{% endtab %}

{% tab title="OTHER" %}
Fill in the <mark style="color:blue;">giveItem</mark> function in <mark style="color:blue;">rahe-boosting/api/server.lua</mark> with a function you have in your inventory system to give items. The function must give the player X amount of item Y (check function parameters for playerId, itemId, amount).
{% endtab %}
{% endtabs %}

### Saving VIN scratched vehicles

If you wish that people would be able to VIN scratch vehicles (get the vehicles to their garage).

{% tabs %}
{% tab title="qb-garage" %}
In <mark style="color:blue;">rahe-boosting/api/server.lua</mark>, change the <mark style="color:blue;">vinScratchSuccessful</mark> event to this

```lua
AddEventHandler('rahe-boosting:server:vinScratchSuccessful', function(playerId, vehicleModel, vehicleModelName, licensePlate, vehicleProperties, contractOwnerIdentifier)
    local Player = QBCore.Functions.GetPlayer(playerId)
    MySQL.insert('INSERT INTO player_vehicles (license, citizenid, vehicle, hash, mods, plate, garage, state) VALUES (?, ?, ?, ?, ?, ?, ?, ?)', {
        Player.PlayerData.license,
        Player.PlayerData.citizenid,
        vehicleModel,
        GetHashKey(vehicleModel),
        '{}',
        licensePlate,
        'pillboxgarage',
        1
    })
end)
```

{% endtab %}

{% tab title="OTHER" %}
In <mark style="color:blue;">rahe-boosting/api/server.lua</mark>, fill in the <mark style="color:blue;">vinScratchSuccessful</mark> event. The code you add should insert a vehicle into the database with the parameters available in the event.
{% endtab %}
{% endtabs %}

### Police dispatch calls&#x20;

If you wish police to receive dispatch calls / notifications when important boosts start.

{% tabs %}
{% tab title="ps-dispatch" %}
In <mark style="color:blue;">rahe-boosting/api/client.lua</mark>, change the <mark style="color:blue;">importantBoostStarted</mark> event to this

```lua
AddEventHandler('rahe-boosting:client:importantBoostStarted', function(location, vehicleId, vehicleClass)
    exports["ps-dispatch"]:CustomAlert({
        coords = location,
        message = "Vehicle boost in progress",
        dispatchCode = "10-35A",
        description = 'Vehicle boost',
        radius = 0,
        plate = ('%s (%s class)'):format(GetVehicleNumberPlateText(vehicleId), vehicleClass),
        sprite = 523,
        color = 5,
        scale = 1.5,
        length = 3,
    })
end)
```

{% endtab %}

{% tab title="OTHER" %}
In <mark style="color:blue;">rahe-boosting/api/client.lua</mark>, fill in the <mark style="color:blue;">importantBoostStarted</mark> event. The code you add should send a dispatch call to your online police members.
{% endtab %}
{% endtabs %}

### Giving vehicle keys

If you are using a vehicle key system and need players to have the keys after hacking a boost.

{% tabs %}
{% tab title="qb-vehiclekeys" %}
In <mark style="color:blue;">rahe-boosting/api/client.lua</mark>, change the <mark style="color:blue;">giveKeys</mark> event to this

```lua
AddEventHandler('rahe-boosting:client:giveKeys', function(vehicleId, licensePlate)
    TriggerServerEvent('qb-vehiclekeys:server:AcquireVehicleKeys', licensePlate)
end)
```

{% endtab %}

{% tab title="OTHER" %}
In <mark style="color:blue;">rahe-boosting/api/client.lua</mark>, fill in the <mark style="color:blue;">giveKeys</mark> function. The code you add should allow the player to start / stop the engine of the vehicle.
{% endtab %}
{% endtabs %}

### Make vehicle enterable once the outside hack is completed

{% hint style="danger" %}
**Only required if you are using&#x20;**<mark style="color:blue;">**qb-vehiclekeys**</mark>. This is because it doesn't allow you to simply unlock the doors. It requires for you to set a variable in qb-vehiclekeys.
{% endhint %}

{% tabs %}
{% tab title="qb-vehiclekeys" %}
In <mark style="color:blue;">qb-vehiclekeys/client/main.lua</mark>, add the following event

```lua
AddEventHandler('qb-vehiclekeys:client:setLastPickedVehicle', function(vehicle)
    lastPickedVehicle = vehicle
end)
```

In <mark style="color:blue;">rahe-boosting/api/client.lua</mark>, change the <mark style="color:blue;">hackingDeviceUsed</mark> event to this

```lua
RegisterNetEvent("rahe-boosting:client:hackingDeviceUsed")
AddEventHandler("rahe-boosting:client:hackingDeviceUsed", function()
    TriggerEvent('qb-vehiclekeys:client:setLastPickedVehicle', QBCore.Functions.GetClosestVehicle())
    useHackingDevice()
end)
```

If you use the <mark style="color:blue;">/usehackingdevice</mark> command, change it in <mark style="color:blue;">rahe-boosting/api/client.lua</mark> to this

```lua
RegisterCommand("usehackingdevice", function()
    TriggerEvent('qb-vehiclekeys:client:setLastPickedVehicle', QBCore.Functions.GetClosestVehicle())
    useHackingDevice()
end)
```

If you use <mark style="color:blue;">ox\_inventory</mark> (with the export), then also trigger that event in the export.
{% endtab %}

{% tab title="OTHER" %}
Make sure the vehicles in your server can be entered when their doors are unlocked by the following native

```lua
SetVehicleDoorsLocked(vehicle, 1)
```

{% endtab %}
{% endtabs %}

### Stop lockpicking important boosts, don't allow boost stealing

If you wish to stop cheaters (people who try to lockpick important boosts, instead of hacking).

If you wish that people should not be able to steal other people's boosting vehicles.

{% tabs %}
{% tab title="qb-vehiclekeys" %}
Add the following code block into your <mark style="color:blue;">LockpickDoor</mark> function in <mark style="color:blue;">qb-vehiclekeys/client/main.lua</mark>:

<pre class="language-lua"><code class="lang-lua">local boos<a data-footnote-ref href="#user-content-fn-1">t</a>ingInfo = Entity(vehicle).state.boostingData
if boostingInfo ~= nil and ((not boostingInfo.groupIdentifiers and boostingInfo.cid ~= QBCore.Functions.GetPlayerData().citizenid) or (boostingInfo.groupIdentifiers and not boostingInfo.groupIdentifiers[QBCore.Functions.GetPlayerData().citizenid])) then
    QBCore.Functions.Notify('This vehicle is not meant for you!', 'error')
    return
end

if boostingInfo ~= nil and boostingInfo.advancedSystem then
    QBCore.Functions.Notify('This vehicle requires more advanced systems!', 'error')
    return
end
</code></pre>

In the end, your <mark style="color:blue;">LockpickDoor</mark> function should look something like this:

```lua
function LockpickDoor(isAdvanced)
    local ped = PlayerPedId()
    local pos = GetEntityCoords(ped)
    local vehicle = QBCore.Functions.GetClosestVehicle()

    if vehicle == nil or vehicle == 0 then return end
    if HasKeys(QBCore.Functions.GetPlate(vehicle)) then return end
    if #(pos - GetEntityCoords(vehicle)) > 2.5 then return end
    if GetVehicleDoorLockStatus(vehicle) <= 0 then return end

    local boostingInfo = Entity(vehicle).state.boostingData
    if boostingInfo ~= nil and ((not boostingInfo.groupIdentifiers and boostingInfo.cid ~= QBCore.Functions.GetPlayerData().citizenid) or (boostingInfo.groupIdentifiers and not boostingInfo.groupIdentifiers[QBCore.Functions.GetPlayerData().citizenid])) then
        QBCore.Functions.Notify('This vehicle is not meant for you!', 'error')
        return
    end

    if boostingInfo ~= nil and boostingInfo.advancedSystem then
        QBCore.Functions.Notify('This vehicle requires more advanced systems!', 'error')
        return
    end

    usingAdvanced = isAdvanced
    TriggerEvent('qb-lockpick:client:openLockpick', lockpickFinish)
end 
```

{% hint style="danger" %}
Don't overwrite your whole <mark style="color:blue;">LockpickDoor</mark> function with the example above. Manually insert only the code block needed into the correct place. If you overwrite it, you might break things as your <mark style="color:blue;">LockpickDoor</mark> function might be a newer / older version compared to our example (and therefore different).
{% endhint %}
{% endtab %}

{% tab title="OTHER" %}
If you have a lockpick script, you must not allow important (A / S class) boost vehicles to be lockpicked or started! To counter this, use the data in that vehicle statebag to stop it.

Implement this into your inventory / lockpick script using the following example

```lua
local boostingInfo = Entity(targetVehicle).state.boostingData
if boostingInfo ~= nil and boostingInfo.advancedSystem then
    TriggerEvent("yourNotificationEvent", 'You need a professional system to lockpick this vehicle!')
    return 
 end
```

Use the data in boostingData statebag to stop other players from taking foreign boosting cars. It's very demotivating if you're searching for a car for an hour, and then discover that someone else has taken it.&#x20;

Implement this into your inventory / lockpick script using the following example

```lua
local boostingInfo = Entity(targetVehicle).state.boostingData
if boostingInfo ~= nil and ((not boostingInfo.groupIdentifiers and boostingInfo.cid ~= playerIdentifier) or (boostingInfo.groupIdentifiers and not boostingInfo.groupIdentifiers[playerIdentifier])) then
    TriggerEvent("yourNotificationEvent", 'This vehicle is not meant for you!')
    return 
end
```

{% endtab %}
{% endtabs %}

[^1]:


# Common questions

Commonly asked questions from our customers. Feel free to read these to get a better overview.

#### How does a typical non-important (B, C, D class) boost look like?

1. Accept the contract from the tablet.
2. Find the vehicle from the area marked by a red circle (visible on the map).
3. Lockpick the vehicle if the doors are locked.
4. Deliver it to the drop-off location (marked by a red car icon).

#### How does a typical important (S, A class) boost look like?

1. Accept the contract from the tablet.
2. Find the vehicle from the area marked by a red circle (visible on the map).
3. Hack the vehicle from outside using the <mark style="color:blue;">hacking device</mark> to open the doors.
4. Hack the vehicle from inside using the <mark style="color:blue;">hacking device</mark> to get the keys.
5. Get rid of the GPS tracker by using the <mark style="color:red;">GPS hacking device</mark> as many times as needed.
6. Deliver it to the drop-off location (marked by a red car icon).

#### Where can I find the vehicles and their classes?

All the vehicles and their classes can be found in <mark style="color:blue;">rahe-boosting/config/server.lua</mark>.&#x20;

#### What are the items in the boosting store?

The items in the store are just examples of what you could add into the store. We don't provide any of the items (or their functionalities) that are in the default store configuration.

If you don't have those items in your server, feel free to remove them from the store. Or if you want to add more items to the store, you can also easily do that.

The store items can be found in <mark style="color:blue;">rahe-boosting/config/server.lua</mark>.

#### When is the config value <mark style="color:blue;">`requiredPoliceAmount`</mark> checked?

That value is checked when the automatic contract generator runs. This means that when there aren't enough police online, these contracts will not be generated.

People mistakenly think this is checked when you start the contract - no, it is not checked then. There would be multiple issues if it were checked on contract start (such as police could still go offline, the player could lose his coins and so on).

**How can I make the police able to detect VIN scratched vehicles?**

Our script just inserts the vehicle into the database. If you want to have functionality for police to check if it's VIN scratched or not, then you'd have to implement it.

Usually how it's done is so that you add a new column to your vehicles table. Something like <mark style="color:blue;">is\_stolen</mark>. Make normal vehicles have that value as 0 (false), but when our script inserts a vehicle you make the is\_stolen column 1 (true).

Then you can develop a way for the police to check if the value is 1 or 0.

#### How can I use the hacking device resource in my own scripts?

```lua
TriggerEvent('rahe-hackingdevice:start-hacking', hackType, gameType, duration, callback)
```

* hackType: `RANDOM, NUMERIC, ALPHABET, ALPHANUMERIC, GREEK, BRAILLE, RUNES`
* gameType: `RANDOM, NORMAL, MIRRORED`

A working example:

```lua
local function hackCallback(result)
    print('Hacking result is: ', result)
end

TriggerEvent('rahe-hackingdevice:start-hacking', 'RANDOM', 'RANDOM', 20, hackCallback)
```


# Common issues

If you run into problems with our application, then most likely your issue is described here.

#### <mark style="color:blue;">CHECK</mark> | Latest version

Make sure you are running the latest version of our resource. If your resource is outdated, it might have issues that have already been solved in later updates.&#x20;

The latest version is <mark style="color:blue;">v1.4.7</mark> (you can check your version in <mark style="color:blue;">rahe-boosting/fxmanifest.lua</mark>).

#### <mark style="color:blue;">CHECK</mark> | Errors on resource start

Make sure that there are no errors when the resource starts up.

:bulb: Type the following command to your server console:

`ensure rahe-boosting`

There shouldn't be any errors after this command.

#### <mark style="color:blue;">CHECK</mark> | Required dependencies

Make sure that you have installed both of the required dependencies - <mark style="color:blue;">ox\_lib</mark> and <mark style="color:blue;">oxmysql</mark>. In addition to that, please verify that you have installed them **correctly** (you have downloaded the built versions as is instructed, not the source code versions).

:bulb: Type the following commands to your server console:

`restart oxmysql`

`restart ox_lib`

Make sure there aren't any errors after these commands. If there are, you have incorrectly installed the dependencies or you haven't started them. Go back to our installation guide which will tell you exactly what to download and where to download it from.&#x20;

#### <mark style="color:red;">ERROR</mark> | `syntax error near '<\1>'`

You have uploaded the resource files to your server using <mark style="color:red;">Filezilla</mark>, which has a tendency to corrupt encrypted files. When the files are corrupted, the resource can't function correctly.

Please re-upload the files using a better FTP client such as <mark style="color:blue;">WinSCP</mark>.

#### <mark style="color:red;">ERROR</mark> | `attempt to compare nil with number`

This issue occurs when your <mark style="color:blue;">getOnDutyPoliceAmount</mark> function in <mark style="color:blue;">rahe-boosting/api/server.lua</mark> is returning nil. That function should not be returning nil under any circumstances. It's supposed to return the amount of online police (0 or more).

#### <mark style="color:red;">ERROR</mark> | `attempt to call a nil value (field 'playerHasActiveContract')` or `attempt to call a nil value (field 'getGroupDataForPlayer')`&#x20;

The function <mark style="color:blue;">playerHasActiveContract</mark> & <mark style="color:blue;">getGroupDataForPlayer</mark> are functions that exist in our encrypted part. If you're getting that error, it means the file they are in is not being loaded. Therefore the functions doesn't exist, and you will get these 'nil' errors.

This usually happens because your <mark style="color:red;">ox\_lib is not working</mark>. When ox\_lib is not working, the file encounters an error and won't load. Please go back to the installation page & open the ox\_lib spoiler for guidance.

#### <mark style="color:yellow;">ISSUE</mark> | You are doing an important boost (by default A, S class), but you can't hack the GPS system after hacking the vehicle.

You must complete two hacks (one outside, one inside) before you can start hacking the GPS tracker. Please read our [Common questions](/our-scripts/boosting/common-questions) to get an idea how the process should look like.

\
\ <mark style="color:yellow;">**ISSUE**</mark>**&#x20;| Your vehicle engine is starting automatically after you get in, without you needing to lockpick (non-important boosts) or hack (important boosts).**

Our script does not start the engine anywhere in the script. If your engine is automatically starting, it's some other script of your which is causing it or you have the FiveM default behaviour enabled. If you want to get rid of the FiveM default behaviour, please put this inside some client-side script:

`SetPedConfigFlag(PlayerPedId(), 429, true) -- PED_FLAG_DISABLE_STARTING_VEHICLE_ENGINE`&#x20;

`SetPedConfigFlag(PlayerPedId(), 241, true) -- PED_FLAG_DISABLE_STOPPING_VEHICLE_ENGINE`

If the issue still persists, please investigate your other scripts.

<mark style="color:yellow;">**ISSUE**</mark>**&#x20;| The vehicle doors aren't opening after lockpicking/hacking it.**

Vehicle spawning and the locking is unencrypted at `rahe-boosting/public/client.lua`. We are using simple GTA V natives for locking and unlocking - there is no custom logic keeping the doors locked.

If you aren't able to enter the vehicle, then your lockpick system for some reason is not functioning, or some other script of yours is locking the door again / is not letting you enter the vehicle.&#x20;

For example `qb-vehiclekeys` has a quirk where you have to set a variable in the `qb-vehiclekeys` script before using the hacking device (and we provide a guide how to do it for `qb-vehiclekeys`). That's because `qb-vehiclekeys` will stop you from entering (even if the door is unlocked) unless a lockpick has been used on the vehicle.&#x20;

Might be that whatever locking system you are using is doing something similar.. or you are using `qb-vehiclekeys` and haven't implemented that part from our documentation.&#x20;

#### <mark style="color:yellow;">ISSUE</mark> | Your screen is frozen (only the mouse is visible). This happened when you pressed the green truck icon / yellow gift icon / tried to open the boosting store.

This issue is that your ox\_lib is not running or is not installed correctly. When you do any of these actions, the script tries to open a context menu / input dialog from ox\_lib. Since your ox\_lib is not functioning, the screen freezes up without anything showing.&#x20;

This usually happens when you have mistakenly installed the source code of ox\_lib (instead of the built version). Please go back to the installation page & open the ox\_lib spoiler for guidance.

#### <mark style="color:yellow;">ISSUE</mark> | NPCs are not spawning when you do an important boost.

The peds are spawned when you use the hacking device outside of the vehicle. If you are not getting any NPCs, then you are probably not following the correct procedure (for example, you are lockpicking, which you should not be doing).&#x20;

Read our common questions section - the correct process for important boosts is described there.

{% content-ref url="/pages/uYdthdCPmUdWKzp3lPUn" %}
[Common questions](/our-scripts/boosting/common-questions)
{% endcontent-ref %}


# Speakers

An all-in-one speaker system for your server. Includes support for different speaker models, carrying speakers around, attaching them to different entities, song queues, playlists and more.

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


# Installation

In order to ensure a successful installation, please follow the instructions very carefully.

### Dependencies

<details>

<summary>oxmysql</summary>

#### Installation

* Download the [latest build](https://github.com/overextended/oxmysql/releases/latest) of oxmysql (not the source code).
* Extract the contents of the archive to your resources folder.
* Start the resource near the top of your resources in your server.cfg.

#### Required version

Your oxmysql version must be <mark style="color:yellow;">2.0.0 or above</mark> in order to work with our system.

#### Use the built version

Make sure you have downloaded the <mark style="color:yellow;">built version</mark> of oxmysql! If you download the source code, then the resource won't start and queries are unable to execute.&#x20;

The built version can be downloaded from the [releases page](https://github.com/overextended/oxmysql/releases/latest) (oxmysql.zip).

</details>

<details>

<summary>ox_lib</summary>

#### Installation

* Download the [latest build](https://github.com/overextended/ox_lib/releases/latest) of ox\_lib (not the source code).
* Extract the contents of the archive to your resources folder.
* Start the resource near the top of your resources in your server.cfg.

#### Use the built version

Make sure you have downloaded the <mark style="color:yellow;">built version</mark> of ox\_lib! If you download the source code, then it won't function correctly and the application will have problems.&#x20;

The built version can be downloaded from the [releases page](https://github.com/overextended/ox_lib/releases/latest) (ox\_lib.zip).

</details>

### Installing the resource

1. Make sure you have the [dependencies](#dependencies) listed above installed.
2. Extract the contents of the archive to your resources folder.
3. Ensure the resource is set to start up with the server.

### Framework

If you're using QB, QBX or ESX, your framework will be automatically detected.

For other frameworks, please follow the provided instructions:

<details>

<summary>Using other frameworks</summary>

Firstly, in <mark style="color:blue;">editable\_shared/config.lua</mark> change the framework to <mark style="color:blue;">CUSTOM</mark>.

Secondly, in <mark style="color:blue;">editable\_server/framework.lua</mark>, go to the <mark style="color:blue;">supportedFrameworks</mark> variable and fill in the following:

* resourceName
* loadFramework
* prepareInventory
* giveItem
* removeItem
* getCash
* removeCash
* getIdentifier
* getVehicleIdentifier
* getLoggingText

</details>

### Youtube API key <a href="#youtube-api-key" id="youtube-api-key"></a>

Fill out <mark style="color:blue;">youtubeApiKey</mark> in <mark style="color:blue;">editable\_server/config.lua.</mark>

We have detailed insturctions on how to obtain the API key at [️2️⃣ Obtaining Youtube API key](https://docs.rahe.dev/our-scripts/speakers/integration#id-2-obtaining-youtube-api-key). We recommend following those instructions carefully to get your API key.

### Using the resource <a href="#using-the-resource" id="using-the-resource"></a>

Use the command <mark style="color:blue;">/speakers</mark> in-game to open the speaker creation menu.

**Speaker types**

> Speaker types grant you access to an unlimited amount of different, customizable speakers, each with their own unique properties, such as different 3D models, audio filters and many more.
>
> A set of predefined speaker types will be automatically generated for your comfort and in order to demonstrate the endless abilities of our resource.
>
> 🚩Use the command <mark style="color:blue;">/speakertypes</mark> to create new or edit existing speaker types.

<details>

<summary>🎧 Using forced filters</summary>

For maximum immersion we have introduced a unique funcionality.&#x20;

Forced filters are filters that automatically apply audio effects to speakers in specific situations.&#x20;

Types of forced filters:&#x20;

➖Always on - applied always, regardless of context.&#x20;

➖Interior difference - applied the speaker and player are in different interiors.&#x20;

➖Vehicle based - applied when the speaker is inside a vehicle with closed windows/doors.

When creating new speaker types, you can customize filter intensity and other parameters.

</details>

<details>

<summary>⚙️ Permissions</summary>

When creating new speaker types, permissions are a required field. Here's a list of available permissions and their functions:

* PERMISSION\_QUEUE: Enables queue usage
* PERMISSION\_CARRY: Allows carrying (requires attachData in speaker type)
* PERMISSION\_STORE: Enables storage after creation (ideal for one-time use)
* PERMISSION\_PUBLIC: Allows marking as public
* PERMISSION\_RENAME: Enables renaming
* PERMISSION\_FILTERS: Allows extra filter usage
* PERMISSION\_SETTINGS: Grants access to settings menu
* PERMISSION\_PERMANENT: Allows marking as permanent
* PERMISSION\_ADD\_GROUP: Enables adding to a speaker group
* PERMISSION\_PLAY\_MUSIC: Allows music playback (useful for group-only speakers)
* PERMISSION\_PAUSE\_RESUME: Enables pause/resume functionality
* PERMISSION\_VOLUME\_RANGE: Allows volume/range adjustments
* PERMISSION\_VEHICLE\_ATTACH: Enables vehicle attachment
* PERMISSION\_GIZMO: Allows gizmo usage (for vehicle attachment or moving permanent speakers)

</details>

**Speaker groups**

> Speaker groups allow you to connect different speakers to play the same audio.
>
> This allows you to create very immersive surround sound environments, basically granting you your own sandbox audio tool.
>
> 🚩Use the command <mark style="color:blue;">/speakergroup</mark> to create or access speaker groups.

**All available commands**

{% tabs %}
{% tab title="/speakers" %}
This command can be used to access the speaker creation menu.

See [1️⃣ Speaker creation](https://docs.rahe.dev/our-scripts/speakers/integration#id-1-speaker-creation) for more info.
{% endtab %}

{% tab title="/speakertypes" %}
This command can be used to access the [Speaker types](https://kalms-organization.gitbook.io/speakers-test/our-scripts/speakers/installation#speaker-types) menu.
{% endtab %}

{% tab title="/speakergroup" %}
This command can be used to access the [Speaker groups](https://kalms-organization.gitbook.io/speakers-test/our-scripts/speakers/installation#speaker-groups) menu.
{% endtab %}

{% tab title="/musicvolume" %}
This command can be used to control the volume of the resource.

Instead players having to go to the Windows Volume Mixer and mess with the Chromium Subprocess Volume, players can adjust their personal volume in-game.
{% endtab %}
{% endtabs %}

**Vehicles**

> Speakers can be attached to vehicles and their states saved to your database.
>
> This ensures that speakers remain attached to player-owned vehicles even after storage and respawning.
>
> To enable this feature:
>
> ➖ In <mark style="color:blue;">editable\_server/config.lua</mark>, set <mark style="color:blue;">vehicleSaving</mark> to <mark style="color:blue;">true</mark>.
>
> ➖ In <mark style="color:blue;">editable\_server/framework.lua</mark>, make sure <mark style="color:blue;">getVehicleIdentifier</mark> function is filled.
>
> ➖ Based on your garage resource, add the vehicle created event

{% tabs %}
{% tab title="qb-garages" %}
In qb-garages/server/main.lua add this line (like in the screenshot):

```
CreateThread(function()
    Wait(2000)
    TriggerEvent('rahe-speakers:server:vehicleSpawnedByServer', source, veh)
end)
```

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

Click this link to view the code on Github: [qb-garages/server/main.lua](https://github.com/qbcore-framework/qb-garages/blob/main/server/main.lua#L133)
{% endtab %}

{% tab title="esx\_garage" %}
In <mark style="color:blue;">esx\_garage/server/main.lua</mark> add this line (like in the screenshot):

```
CreateThread(function()
    Wait(2000)
    TriggerEvent('rahe-speakers:server:vehicleSpawnedByServer', source, vehicle)
end)
```

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

Click this link to view the code on Github: [esx\_garage/server/main.lua](https://github.com/esx-framework/esx_garage/blob/main/server/main.lua#L21)
{% endtab %}

{% tab title="cd\_garage" %}
In <mark style="color:blue;">cd\_garage/configs/client\_customise\_me.lua</mark> add this line (like in the screenshot) to the function <mark style="color:blue;">VehicleSpawned</mark>:

```
TriggerServerEvent('rahe-speakers:server:vehicleSpawnedByClient', VehToNet(vehicle))
```

<figure><img src="/files/6Go8rohLeguyaR20b170" alt="" width="563"><figcaption></figcaption></figure>
{% endtab %}

{% tab title="jd\_advanced" %}
If you are using <mark style="color:blue;">jg-advancedgarages</mark>, everything will work out of box as long as you have filled previous prequisites.
{% endtab %}

{% tab title="CUSTOM" %}
🚩If your garage resource is spawning vehicles on client-side&#x20;

After vehicle creation, trigger this event:

```
TriggerServerEvent('rahe-speakers:server:vehicleSpawnedByClient', VehToNet(vehicle))
```

Note: Make sure to pass <mark style="color:blue;">vehicle network ID</mark> to the event.&#x20;

🚩If your garage resource is spawning vehicles on server-side&#x20;

After vehicle creation, trigger this event:

```
TriggerEvent('rahe-speakers:server:vehicleSpawnedByServer', source, vehicleEntityId)
```

Note: Make sure to pass <mark style="color:blue;">player source</mark> and <mark style="color:blue;">vehicle entity ID</mark> to the event.
{% endtab %}
{% endtabs %}

That's it! Speaker states will be saved when attached to database-saved vehicles.


# Integration

Information about how to integrate our speaker system with your server's resources.

### Introduction

We have made the script very easy to use while also keeping it very customizable.

After successfully installing the resource, you should start by completing these following steps:

### **1️⃣** Speaker creation <a href="#id-1-speaker-creation" id="id-1-speaker-creation"></a>

1. **Speaker menu**

Players can create new speakers through the speakers menu by default.

The default command for speakers menu is <mark style="color:blue;">/speakers</mark>.

1. **Inventory**

If you don't want the players to be able to create new speakers through the command, this resource also supports inventory based speakers.

To make this feature work, you will need to change <mark style="color:blue;">creationMethod</mark> to inventory in <mark style="color:blue;">editable\_server/config.lua</mark> and create the speaker item in your inventory resource.

{% tabs %}
{% tab title="ox\_inventory" %}
All speakers use the same item. The difference is in item metadata (image, label, description).&#x20;

Add this section to <mark style="color:blue;">ox\_inventory/data/items.lua</mark>

```lua
['speaker'] = {
    label = 'Speaker',
    weight = 0,
    description = 'Speaker.',
    consume = 0,
    server = {
        export = 'rahe-speakers.speaker'
    }
},
```

If you didn't name the item <mark style="color:blue;">speaker</mark>, adjust the <mark style="color:blue;">inventoryItemId</mark> in <mark style="color:blue;">editable\_server/config.lua</mark> accordingly.
{% endtab %}

{% tab title="qb\_inventory" %}
When using qb-inventory, all created speaker types are automatically added and made usable by the resource.&#x20;

However, inventory images must be added manually.

Add all speaker images to <mark style="color:blue;">qb-inventory/html/images/</mark>.&#x20;

For default seeded speaker images:&#x20;

Add <mark style="color:blue;">speaker\_retro.png</mark> to <mark style="color:blue;">qb-inventory/html/images/</mark>

<figure><img src="/files/vuCYYAIXI3Dz4djlJnyE" alt=""><figcaption><p>speaker_retro.png</p></figcaption></figure>

Add <mark style="color:blue;">speaker\_vibe.png</mark> to <mark style="color:blue;">qb-inventory/html/images/</mark>

<figure><img src="/files/L9qAoqCVkcaXmgJhsZ58" alt=""><figcaption><p>speaker_vibe.png</p></figcaption></figure>

Add <mark style="color:blue;">speaker\_beat.png</mark> to <mark style="color:blue;">qb-inventory/html/images/</mark>

<figure><img src="/files/ROykuGQiaDk9Rko2cje1" alt=""><figcaption><p>speaker_beat.png</p></figcaption></figure>

Add <mark style="color:blue;">speaker\_blast.png</mark> to <mark style="color:blue;">qb-inventory/html/images/</mark>

<figure><img src="/files/RHcvey9vBeAhEoDaHc3t" alt=""><figcaption><p>speaker_blast.png</p></figcaption></figure>
{% endtab %}

{% tab title="qs-inventory" %}
When using qs-inventory, you need to add every speaker item to the correct items file. \
You also have to include every speaker image in the proper directory. \
Default speakers are already provided for you. \
If you create new speaker types, you'll need to add these yourself.

#### 1. Adding items <a href="#id-1.-adding-items" id="id-1.-adding-items"></a>

🚩When using QB, add this section to <mark style="color:blue;">qb-core/shared/items.lua</mark>&#x20;

🚩When using ESX, add this section to <mark style="color:blue;">qs-inventory/shared/items.lua</mark>

```lua
['speaker_retro'] = {
    name = 'speaker_retro',
    label = 'Speaker Retro',
    weight = 1000,
    type = 'item',
    image = 'speaker_retro.png',
    unique = true,
    useable = true,
    shouldClose = true,
    description = 'Low volume, range and quality.',
},
['speaker_vibe'] = {
    name = 'speaker_vibe',
    label = 'Speaker Vibe',
    weight = 1000,
    type = 'item',
    image = 'speaker_vibe.png',
    unique = true,
    useable = true,
    shouldClose = true,
    description = 'Good volume, range and quality.',
},
['speaker_beat'] = {
    name = 'speaker_beat',
    label = 'Speaker Beat',
    weight = 1000,
    type = 'item',
    image = 'speaker_beat.png',
    unique = true,
    useable = true,
    shouldClose = true,
    description = 'Great volume, range, quality and bass.',
},
['speaker_blast'] = {
    name = 'speaker_blast',
    label = 'Speaker Blast',
    weight = 1000,
    type = 'item',
    image = 'speaker_blast.png',
    unique = true,
    useable = true,
    shouldClose = true,
    description = 'Epic volume, range, quality, bass and filters.',
},
```

#### 2. Adding images <a href="#id-2.-adding-images" id="id-2.-adding-images"></a>

Add the following image file as <mark style="color:blue;">qs-inventory/html/images/speaker\_retro.png</mark>

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

Add the following image file as <mark style="color:blue;">qs-inventory/html/images/speaker\_vibe.png</mark>

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

Add the following image file as <mark style="color:blue;">qs-inventory/html/images/speaker\_beat.png</mark>

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

Add the following image file as <mark style="color:blue;">qs-inventory/html/images/speaker\_blast.png</mark>

<figure><img src="/files/RHcvey9vBeAhEoDaHc3t" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="OTHER" %}
\
Check <mark style="color:blue;">editable\_server/framework.lua</mark> for ox\_inventory, qb-inventory and es\_extended examples.

Use these to develop your custom solution, heres' some pointers:

### 🚩For inventories with registerUsableItem <a href="#for-inventories-with-registerusableitem" id="for-inventories-with-registerusableitem"></a>

#### ⚒️ With metadata support (images and labels): <a href="#with-metadata-support-images-and-labels" id="with-metadata-support-images-and-labels"></a>

\- Create item (itemId must match inventoryItemId in editable\_server/config.lua)&#x20;

\- Make the item usable (prepareInventory function in editable\_server/framework.lua)&#x20;

\- Fill out metadata function (getItemDataForSpeakerType in editable\_server/framework.lua) - make sure label and image keys match your inventory&#x20;

\- When item is used, trigger event with player source, typeId from metadata and item's slot

```lua
TriggerEvent('rahe-speakers:server:speakerItemUsed', source, item.metadata.typeId, item.slot)
```

#### ⚒️ Without metadata support: <a href="#without-metadata-support" id="without-metadata-support"></a>

\- Create items automatically (see example for QB in editable\_server/framework.lua) or manually - up to you&#x20;

\- Each speaker type must have its own item id matching the one assigned when creating the speaker type in-game.&#x20;

\- Make each item usable (prepareInventory function in editable\_server/framework.lua)&#x20;

\- When item is used, trigger event with player source and itemId that was used

```lua
TriggerEvent('rahe-speakers:server:itemUsedById', source, itemId)
```

### 🚩For inventories without registerUsableItem <a href="#for-inventories-without-registerusableitem" id="for-inventories-without-registerusableitem"></a>

#### ⚒️ With metadata support (images and labels): <a href="#with-metadata-support-images-and-labels-1" id="with-metadata-support-images-and-labels-1"></a>

\- Create item (itemId must match inventoryItemId in editable\_server/config.lua)&#x20;

\- Make item usable in your inventory resource&#x20;

\- Fill out metadata function (getItemDataForSpeakerType in editable\_server/framework.lua)&#x20;

\- Make sure label and image keys match your inventory&#x20;

\- When item is used, trigger event with player source, typeId from metadata and item's slot

```lua
TriggerEvent('rahe-speakers:server:speakerItemUsed', source, item.metadata.typeId, item.slot)
```

#### ⚒️ Without metadata support: <a href="#without-metadata-support-1" id="without-metadata-support-1"></a>

\- Create each item manually&#x20;

\- Each speaker type must have its own item id matching the one assigned when creating the speaker type in-game.&#x20;

\- Make each item usable in your inventory resource&#x20;

\- When item is used, trigger event with player source and itemId that was used

```lua
TriggerEvent('rahe-speakers:server:itemUsedById', source, itemId)
```

***

Note: When a player creates a new speaker type in-game, they assign it an item ID. This same ID must be used as the item ID in your inventory system. For example, if a player creates Club Speaker speaker type with item ID club\_speaker, you must create an inventory item with the same ID for this speaker type.
{% endtab %}
{% endtabs %}

If you didn't name the item speaker, adjust the inventoryItemId in editable\_server/config.lua accordingly.

### **️**2️⃣ Obtaining Youtube API key <a href="#id-2-obtaining-youtube-api-key" id="id-2-obtaining-youtube-api-key"></a>

A YouTube API key is required for certain features like queues and music history.&#x20;

We provide two detailed tutorials on how to obtain it: one text-based and one video.&#x20;

Choose whichever you prefer.

1. Video tutorial

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

2. Text tutorial

> 1) Register or login into [Google Console Cloud](https://console.cloud.google.com/)
> 2) Skip to step 7 if you already have an account
> 3) Select your country and accept Terms of Service
> 4) Navigate to <mark style="color:blue;">APIs & Services</mark> > <mark style="color:blue;">Credentials</mark> in the left sidebar
> 5) Click <mark style="color:blue;">Create Project</mark>, fill in details, and click <mark style="color:blue;">Create</mark>
> 6) Once project is set up, click <mark style="color:blue;">Create Credentials</mark>
> 7) Select <mark style="color:blue;">API key</mark>
> 8) Copy the key and insert it into <mark style="color:blue;">editable\_server/config.lua</mark> -> <mark style="color:blue;">youtubeApiKey</mark>
> 9) Go to <mark style="color:blue;">Enabled APIs and Services</mark> in the left sidebar
> 10) Click <mark style="color:blue;">Enable APIs and Services</mark> at the top
> 11) Search for <mark style="color:blue;">YouTube Data API v3</mark> and select it
> 12) Click <mark style="color:blue;">Enable</mark>

All done! The script will now use youtube API to fetch music related data!


# Common questions

If you run into problems with our application, then most likely your issue is described here.

## 🔐 Getting `You don't have the necessary permissions` when interacting with a speaker

This message appears when permission checks fail. The logic is not escrowed and can be found in: `editable_server/functions.lua`

Pay attention to these two functions:

* `hasAdminPermissions`
* `hasSpeakerPermissions`

Make sure these functions are set up properly.

Also, since this resource uses ox\_lib's ACL system, ensure the ox\_lib is properly set up in your `server.cfg`

You're likely missing these lines in your `server.cfg`:

```
add_ace resource.ox_lib command.add_ace allow
add_ace resource.ox_lib command.remove_ace allow
add_ace resource.ox_lib command.add_principal allow
add_ace resource.ox_lib command.remove_principal allow
```

For full setup instructions, check the ox\_lib documentation <https://overextended.dev/ox\\_lib#config>

Don't skip the config part - it's important!

## 💡Speaker images not appearing when using ox\_inventory

This usually happens because `ox_inventory` doesn't recognize our CDN as a valid image host.

To fix this, add `media.rahe.dev` to the `validHosts` list in `ox_inventory/modules/utils/server.lua`.

Example:

```lua
local validHosts = {
    ['i.imgur.com'] = true,
    ['media.rahe.dev'] = true,
}
```

## 🛒 How do I add speakers to shops with ox\_inventory?

If you don't want to use the built-in speaker shop, you can manually add speaker items to your existing shop in `ox_inventory/data/shops.lua`

```lua
{ name = 'speaker', price = 500, metadata = {typeId = 1, label = 'Speaker Retro', description = 'Low volume, range and quality.', imageurl = 'https://media.rahe.dev/img/boombox.png'} },
{ name = 'speaker', price = 1000, metadata = {typeId = 2, label = 'Speaker Vibe', description = 'Good volume, range and quality.', imageurl = 'https://media.rahe.dev/img/speaker1.png'} },
{ name = 'speaker', price = 1500, metadata = {typeId = 3, label = 'Speaker Beat', description = 'Great volume, range, quality and bass.', imageurl = 'https://media.rahe.dev/img/speaker2.png'} },
{ name = 'speaker', price = 5000, metadata = {typeId = 4, label = 'Speaker Blast', description = 'Epic volume, range, quality, bass and filters.', imageurl = 'https://media.rahe.dev/img/speaker3.png'} },
```

## 🎧 Is there a "streamer mode"?

Yes! We call this *Safety Preference*.

You can use this feature using the `/safetypreference` command.

It offers three options:

* Play everything
* Play only DMCA safe music
* Play nothing

Perfect for content creators who want to avoid any potential issues.

## ⚠️ Errors when fetching data from the YouTube API

This is usually caused by a missing or expired YouTube API key.

Less commonly, it might happen if someone tries to play a private playlist or video.

{% content-ref url="/pages/uYdthdCPmUdWKzp3lPUn" %}
[Common questions](/our-scripts/boosting/common-questions)
{% endcontent-ref %}


# Boombox

A boombox for your server. Includes different models, carrying, song queues and more.

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


# Installation

In order to ensure a successful installation, please follow the instructions very carefully.

### Dependencies

<details>

<summary>oxmysql</summary>

#### Installation

* Download the [latest build](https://github.com/overextended/oxmysql/releases/latest) of oxmysql (not the source code).
* Extract the contents of the archive to your resources folder.
* Start the resource near the top of your resources in your server.cfg.

#### Required version

Your oxmysql version must be <mark style="color:yellow;">2.0.0 or above</mark> in order to work with our system.

#### Use the built version

Make sure you have downloaded the <mark style="color:yellow;">built version</mark> of oxmysql! If you download the source code, then the resource won't start and queries are unable to execute.&#x20;

The built version can be downloaded from the [releases page](https://github.com/overextended/oxmysql/releases/latest) (oxmysql.zip).

</details>

<details>

<summary>ox_lib</summary>

#### Installation

* Download the [latest build](https://github.com/overextended/ox_lib/releases/latest) of ox\_lib (not the source code).
* Extract the contents of the archive to your resources folder.
* Start the resource near the top of your resources in your server.cfg.

#### Use the built version

Make sure you have downloaded the <mark style="color:yellow;">built version</mark> of ox\_lib! If you download the source code, then it won't function correctly and the application will have problems.&#x20;

The built version can be downloaded from the [releases page](https://github.com/overextended/ox_lib/releases/latest) (ox\_lib.zip).

</details>

<details>

<summary>xsound</summary>

#### Installation

* Download the latest [xsound](https://github.com/Xogy/xsound).
* Extract the contents of the acrhive to your resources folder.
* Start the resource in your server.cfg.

</details>

### Installing the resource&#x20;

1. Make sure you have the [dependencies](#dependencies) listed above installed.
2. Extract the contents of the archive to your resources folder.
3. Run the SQL queries provided in <mark style="color:blue;">rahe-boombox/db.sql</mark>.
4. Choose your framework tab from the section below & follow the instructions.

{% tabs %}
{% tab title="QB" %}
Open <mark style="color:blue;">rahe-boombox/config/shared.lua</mark> and set line 4 to <mark style="color:blue;">framework = 'QB'</mark>
{% endtab %}

{% tab title="ESX" %}
Open <mark style="color:blue;">rahe-boombox/config/shared.lua</mark> and set line 4 to <mark style="color:blue;">framework = 'ESX'</mark>
{% endtab %}

{% tab title="Custom" %}
Open <mark style="color:blue;">rahe-boombox/config/shared.lua</mark> and set line 4 to <mark style="color:blue;">framework = 'CUSTOM'</mark>
{% endtab %}
{% endtabs %}

{% hint style="info" %}
Recommended, but not neccessary:

* Get your own API key using our tutorial in <mark style="color:blue;">config/server.lua</mark>.
* Insert your Youtube API key in <mark style="color:blue;">config/server.lua</mark> (`youtubeApiKey` variable)
  {% endhint %}

### Using the resource

Use the command <mark style="color:blue;">/music</mark> in-game to open the boombox menu.


# Integration

Information about how to integrate our boombox system with your server's resources.

### Item creation&#x20;

If you wish to use an item (instead of the default command that comes with the resource), then read the <mark style="color:blue;">readme.md</mark> file that comes with the resource.


# Tablet

Allows you to open our other scripts (or scripts of your own) from a tablet interface.


# Installation

In order to ensure a successful installation, please follow the instructions very carefully.

### Dependencies

<details>

<summary>ox_lib</summary>

#### Installation

* Download the [latest build](https://github.com/overextended/ox_lib/releases/latest) of ox\_lib (not the source code).
* Extract the contents of the archive to your resources folder.
* Start the resource near the top of your resources in your server.cfg.

#### Use the built version

Make sure you have downloaded the <mark style="color:yellow;">built version</mark> of ox\_lib! If you download the source code, then it won't function correctly and the application will have problems.&#x20;

The built version can be downloaded from the [releases page](https://github.com/overextended/ox_lib/releases/latest) (ox\_lib.zip).

</details>

### Installing the resource

1. Make sure you have the [dependencies](#dependencies) listed above installed.
2. Extract the contents of the archive to your resources folder.
3. Ensure the resource is set to start up with the server.

### Framework&#x20;

If you're using <mark style="color:blue;">ESX</mark> or <mark style="color:blue;">QB</mark> or <mark style="color:blue;">QBX,</mark> your framework will be automatically detected.&#x20;

For other frameworks, please follow the provided instructions:

<details>

<summary>Using other frameworks</summary>

* In the file <mark style="color:blue;">/resource/config/shared.lua</mark> change the framework to <mark style="color:blue;">CUSTOM</mark>.
* In the file <mark style="color:blue;">/framework/server.lua</mark>, go to the <mark style="color:blue;">supportedFrameworks</mark> variable and fill in the three functions for the <mark style="color:blue;">CUSTOM</mark> option (resourceName, loadFramework, registerItem).
* In the file <mark style="color:blue;">/framework/server.lua</mark>, go to the <mark style="color:blue;">getPlayerIdentifer</mark> function and fill in the function. It should return the player's identifier (usually character ID).

</details>

Once everything is set up, proceed to our integration page to setup tablet opening.

{% content-ref url="/pages/Cp32iN2fsB2DQog7nUk5" %}
[Integration](/our-scripts/tablet/integration)
{% endcontent-ref %}


# Integration

Information about how to integrate our tablet system with your server's resources.

### 📂 Tablet opening

**1️⃣ Opening with an item**

The resource configuration is pre-set for the tablet to open with an item by default. To make this feature work, you also need to create an item in your inventory with the ID of <mark style="color:blue;">app\_tablet</mark>.

{% tabs %}
{% tab title="ox\_inventory" %}
Add this section to <mark style="color:blue;">ox\_inventory/data/items.lua</mark>

```lua
['app_tablet'] = {
    label = 'Tablet',
    weight = 0,
    description = 'You can install different applications onto this.',
    stack = false,
    client = {
        export = 'rahe-tablet.tablet'
    }
}
```

Add the following image file as <mark style="color:blue;">ox\_inventory/web/images/app\_tablet.png</mark>

<https://media.rahe.dev/img/app_tablet.png>
{% endtab %}

{% tab title="qb-inventory" %}
Add the following line to <mark style="color:blue;">qb-core/shared/items.lua</mark>

```lua
['app_tablet'] = { ['name'] = 'app_tablet', ['label'] = 'Tablet', ['weight'] = 1000, ['type'] = 'item', ['image'] = 'app_tablet.png', ['unique'] = true, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'You can install different applications onto this.' },
```

Add the following image file as <mark style="color:blue;">qb-inventory/html/images/app\_tablet.png</mark>

<https://media.rahe.dev/img/app_tablet.png>
{% endtab %}

{% tab title="OTHER" %}
Create the item <mark style="color:blue;">app\_tablet</mark> in your inventory system and make it usable.&#x20;

If you are using qs-inventory or core\_inventory, you don't have to do anything extra.

If you are using any other inventory system, then on item use trigger:

&#x20;`exports['rahe-tablet']:tablet()`
{% endtab %}
{% endtabs %}

{% hint style="info" %}
If you didn't name the item <mark style="color:blue;">app\_tablet</mark>, adjust the <mark style="color:blue;">itemId</mark> in resource config accordingly.
{% endhint %}

***

**2️⃣** **Opening with a command**

If you don't wish the tablet to be an item, then in <mark style="color:blue;">resource/config/shared.lua</mark>, change the <mark style="color:blue;">openMethod</mark> option from <mark style="color:blue;">inventory</mark> to <mark style="color:blue;">command</mark>. Use the command <mark style="color:blue;">/tablet</mark> in-game to open the application tablet.

### 📑 Enabling application installs

By default, application installations are disabled, meaning all applications are visible on the tablet. However, you have the option to enable them:

* Navigate to <mark style="color:blue;">/resource/config/shared.lua</mark> and set <mark style="color:blue;">installEnabled</mark> to <mark style="color:blue;">true</mark>.
* In <mark style="color:blue;">config/client.lua</mark> set <mark style="color:blue;">requireInstall</mark> to <mark style="color:blue;">true</mark> for applications you want to require installation.

If you wish to configure options for RAHE resources, then head to <mark style="color:blue;">/resource/client/integrations.lua</mark>. In the default resource, all of our applications have <mark style="color:blue;">requireInstall</mark> set to <mark style="color:blue;">true</mark>, meaning they will need to be installed if you enable installations.

### 💿 Application installation

To install applications, you need to trigger the following <mark style="color:blue;">server-side</mark> export:

&#x20;<mark style="color:blue;">exports\['rahe-tablet']:installApplication(playerId, appId, slot)</mark>

This export will mark the application as installed, indicated by a progress circle. For example, to install our boosting application for player ID 1, who has a tablet in his inventory slot 4, you would use:

<mark style="color:blue;">exports\['rahe-tablet']:installApplication(1, 'rahe-boosting',  4)</mark>

You might wonder about the purpose of the <mark style="color:blue;">slot</mark> variable. This variable is necessary only when you've configured the <mark style="color:blue;">appInstallTarget</mark> in <mark style="color:blue;">/resource/config/shared.lua</mark> to <mark style="color:blue;">metadata</mark> (which is only applicable when using <mark style="color:blue;">ox\_inventory</mark>!). In this case, the <mark style="color:blue;">slot</mark> variable is used retrieve the item in that specific slot and save the installed application ID into the metadata of that item.

**Code example for&#x20;**<mark style="color:blue;">**ox\_inventory**</mark>

To install the application <mark style="color:blue;">rahe-racing</mark> from a USB stick, follow these steps:

1. Add the installation USB item to <mark style="color:blue;">ox\_inventory/data/items.lua</mark>:

```lua
['usb_racing'] = {
    label = 'USB stick',
    weight = 50,
    description = 'An USB stick with a racing program installed onto it.',
    stack = false,
    client = {
       export = 'rahe-tablet.usb_install'
    }
},
```

2. Add the <mark style="color:blue;">usb\_install</mark> export to a client-side file in <mark style="color:blue;">rahe-tablet</mark>, such as the end of <mark style="color:blue;">/resource/client/integrations.lua</mark>:

```lua
exports('usb_install', function(data, slot)
    local metadata = {}
    if data.name == 'usb_racing' then
        metadata = {
            appId = 'rahe-racing',
            appName = 'Racing'
        }
    elseif data.name == 'usb_boosting' then
        metadata = {
            appId = 'rahe-boosting',
            appName = 'Boosting'
        }    
    elseif data.name == 'usb_drifting' then
        metadata = {
            appId = 'rahe-drifting',
            appName = 'Drifting'
        }
    elseif data.name == 'usb_trucking' then
        metadata = {
            appId = 'kub_trucking',
            appName = 'Trucking'
        }
    end

    slot.metadata = metadata
    TriggerServerEvent('rahe-tablet:server:installApp', slot, false)
end)
```

3. Create the <mark style="color:blue;">server-side</mark> event to handle installation. Register the event as follows at the end of <mark style="color:blue;">/resource/server/installation.lua</mark>:

```lua
RegisterNetEvent('rahe-tablet:server:installApp', function(slot, useMetadata)
    local src = source
    if not slot or not slot.slot or not slot.metadata.appId then
        return
    end

    local tabletSlots = exports.ox_inventory:Search(src, 'slots', shConfig.itemId)
    if not next(tabletSlots) then
        lib.notify(src, { 
            title = ("You don't have a tablet to install the application '%s' onto."):format(slot.metadata.appName), 
            type = 'error' 
        })
        return
    end

    local canInstall = canStartInstallation(src, slot.metadata.appId, tabletSlots[1].slot)
    if canInstall ~= true then
        lib.notify(src, { title = canInstall, type = 'error' })
        return
    end

    if not exports.ox_inventory:RemoveItem(src, slot.name, 1, useMetadata and slot.metadata or nil, slot.slot) then
        return
    end

    installApplication(src, slot.metadata.appId, tabletSlots[1].slot)
    lib.notify(src, { 
        title = ("You have installed the application '%s' onto your tablet."):format(slot.metadata.appName), 
        type = 'success' 
    })
end)
```

(it's in the same file as the export function, so we are using the <mark style="color:blue;">installApplication</mark> function directly)


# Taxi


# Installation

In order to ensure a successful installation, please follow the instructions very carefully.

### Dependencies

<details>

<summary>oxmysql</summary>

#### Installation

* Download the [latest build](https://github.com/overextended/oxmysql/releases/latest) of oxmysql (not the source code).
* Extract the contents of the archive to your resources folder.
* Start the resource near the top of your resources in your server.cfg.

#### Required version

Your oxmysql version must be <mark style="color:yellow;">2.0.0 or above</mark> in order to work with our system.

#### Use the built version

Make sure you have downloaded the <mark style="color:yellow;">built version</mark> of oxmysql! If you download the source code, then the resource won't start and queries are unable to execute.&#x20;

The built version can be downloaded from the [releases page](https://github.com/overextended/oxmysql/releases/latest) (oxmysql.zip).

</details>

<details>

<summary>ox_lib</summary>

#### Installation

* Download the [latest build](https://github.com/overextended/ox_lib/releases/latest) of ox\_lib (not the source code).
* Extract the contents of the archive to your resources folder.
* Start the resource near the top of your resources in your server.cfg.

#### Use the built version

Make sure you have downloaded the <mark style="color:yellow;">built version</mark> of ox\_lib! If you download the source code, then it won't function correctly and the application will have problems.&#x20;

The built version can be downloaded from the [releases page](https://github.com/overextended/ox_lib/releases/latest) (ox\_lib.zip).

</details>

### Installing the resources

Make sure you have the [dependencies](#dependencies) listed above installed.&#x20;

Extract the contents of the archive to your resources folder. Add both of the resources into your server config file so they would automatically run when the server is starting up.

#### Required start-up order <a href="#required-order" id="required-order"></a>

```
ensure rahe-navigation
ensure rahe-taxi
```

#### Framework

If you're using <mark style="color:blue;">QB</mark>, <mark style="color:blue;">QBX</mark> or <mark style="color:blue;">ESX</mark>, your framework will be automatically detected.

For other frameworks, please follow the provided instructions:

<details>

<summary>Using other frameworks</summary>

Firstly, in <mark style="color:blue;">public\config\shared\sh\_config.lua</mark> change the framework to <mark style="color:blue;">CUSTOM</mark>.

Secondly, in <mark style="color:blue;">public\api</mark>, fill all the framework related functions.

</details>

### Using the resource

Use the command <mark style="color:blue;">/taxi</mark> to open the taxi launcher.&#x20;

**Make sure this works before moving on to the phone integration.**


# Integration

Information about how to integrate our taxi system with your server's resources.

`rahe-taxi` has auto-detection for the most common fuel, vehicle key and garage resources. If you are running one of the supported systems, no setup is required — it just works.

If you use a custom or unsupported resource, you can plug it in by editing the corresponding file under `public/api/`. These files are unencrypted so you can adapt them to your systems.

> The detection runs in a `CreateThread` at resource start and picks the first matching resource (by `GetResourceState`). If none match, an error is printed and you must implement the integration yourself.

***

#### Fuel system <a href="#fuel-system" id="fuel-system"></a>

**File:** public/api/cl\_fuelsystem.lua (client-side)

**Supported out of the box**

* `LegacyFuel`
* `qs-fuelstations`
* `ox_fuel`
* `cdn-fuel`
* `lc_fuel`

**Function to implement**

```lua
function setVehicleFuel(vehicle, fuel)
    -- vehicle: entity handle (client-side)
    -- fuel:    number 0-100
end
```

This is called when an NPC taxi vehicle is spawned and needs its fuel level set.

**Adding your own fuel system**

Add a new `elseif` branch in the detection thread, then add a matching branch in `setVehicleFuel`:

```lua
elseif GetResourceState('my_fuel') ~= 'missing' then
    detectedFuelSystem = 'my_fuel'
```

```lua
elseif detectedFuelSystem == 'my_fuel' then
    exports['my_fuel']:SetFuel(vehicle, fuel)
```

If everything else fails, the script falls back to the native `SetVehicleFuelLevel`.

***

#### Vehicle keys system <a href="#vehicle-keys-system" id="vehicle-keys-system"></a>

**File:** public/api/sv\_vehiclekeys.lua (server-side)

**Supported out of the box**

* `qbx_vehiclekeys`
* `qs-vehiclekeys`
* `cd_garage`
* `wasabi_carlock`
* `Renewed-Vehiclekeys`
* `qb-vehiclekeys`

**Function to implement**

```lua
function unlockVehicleDoors(playerId, vehNetId, vehicle, plate)
    -- playerId: server id of the player
    -- vehNetId: network id of the vehicle
    -- vehicle:  server-side entity handle
    -- plate:    license plate string
    -- return true on success
end
```

Called when a passenger gets into an NPC driver's taxi so the doors can be unlocked for them.

**Adding your own keys system**

```lua
elseif GetResourceState('my_keys') ~= 'missing' then
    detectedKeySystem = 'my_keys'
```

```lua
elseif detectedKeySystem == 'my_keys' then
    exports['my_keys']:GiveTemporaryKey(playerId, plate)
    return true
```

The fallback unlocks the vehicle via the native `SetVehicleDoorsLocked(vehicle, 1)`.

***

#### Garage system <a href="#garage-system" id="garage-system"></a>

**File:** public/api/sv\_garagesystem.lua (server-side)

**Supported out of the box**

* `qbx_vehicles`
* `qb-garages`
* `esx_garage`

**Function to implement**

```lua
function getPlayerOwnedVehicles(playerIdentifier)
    -- playerIdentifier: citizenid (qb/qbx) or identifier (esx)
    -- return an array of vehicle tables in the format below
end
```

Each entry returned **must** have this shape:

```lua
{
    plate = 'ABC123',          -- string, trimmed (no surrounding spaces)
    name  = 'Brand Model',     -- display name shown in the UI
    model = 'taxi',            -- spawn name (must match VEHICLES config key)
}
```

This is used by drivers to choose which of their owned vehicles to put on duty.

**Vehicle naming**

Display names come from the `VEHICLES` config (`shared/vehicles.lua`). If a model is not present there, an error is logged and the vehicle is skipped (qb/qbx) or returned with the raw model name (esx). Add your custom vehicles to that config to fix this.

**Adding your own garage system**

Add detection and a query branch. Example for a custom MySQL-backed garage:

```lua
elseif GetResourceState('my_garage') ~= 'missing' then
    detectedGarageSystem = 'my_garage'
```

```lua
elseif detectedGarageSystem == 'my_garage' then
    local rows = MySQL.query.await('SELECT plate, model FROM my_garage WHERE owner = ?', { playerIdentifier })
    for _, v in ipairs(rows) do
        local info = VEHICLES[v.model]
        if info then
            playerVehicles[#playerVehicles + 1] = {
                plate = v.plate,
                name  = info.brand .. ' ' .. info.name,
                model = v.model,
            }
        end
    end
    return playerVehicles
```

#### Dispatch system <a href="#dispatch-system" id="dispatch-system"></a>

**File:** public/api/cl\_dispatch.lua (client-side)

Used by the in-app safety report feature. When a rider or driver sends a safety report from the UI, the script forwards it to your dispatch / police-alert resource.

**Supported out of the box**

* `ps-dispatch`
* `cd_dispatch`
* `qs-dispatch`
* `qb-policejob` (default `police:server:policeAlert` event)

**Function to implement**

```lua
function alertPolice(vehicleName, vehiclePlate, message, type)
    -- vehicleName:  display name of the vehicle (e.g. "Albany Taxi")
    -- vehiclePlate: license plate string
    -- message:      free-text message written by the player
    -- type:         'rider' or 'driver' — used to pick the locale string
end
```

The localized text is built from `RiderSafetyReport` / `DriverSafetyReport` in the locale files. The current player's coordinates can be obtained inside the function via `GetEntityCoords(PlayerPedId())`.

**Adding your own dispatch system**

Add detection and a handler branch:

```lua
elseif GetResourceState('my_dispatch') ~= 'missing' then
    detectedDispatchSystem = 'my_dispatch'
```

```lua
elseif detectedDispatchSystem == 'my_dispatch' then
    exports['my_dispatch']:CreateAlert({
        title = '10-90 - Taxi Safety Report',
        message = text,
        coords = coords,
        jobs = { 'police' },
    })
```


# LB-PHONE

This script includes built-in support for **lb-phone**, without additional configuration.

Before using, ensure you have:

* **lb-phone** is installed and working correctly
* **rahe-taxi is installed and works with the /taxi command.**

After you have verified that the apps work you can disable the command by setting <mark style="color:blue;">commandsEnabled</mark> to <mark style="color:blue;">false</mark> in <mark style="color:blue;">public\config\client\cl\_config.lua</mark>

{% tabs %}
{% tab title="public/config/client/cl\_config.lua" %}
commandsEnabled = false,
{% endtab %}
{% endtabs %}


# NPWD

**Before starting please verify that the taxi system works by using the /taxi command.**

#### 📁 1. Folder Structure <a href="#id-1.-folder-structure" id="id-1.-folder-structure"></a>

Ensure the NPWD apps are placed inside the correct directory:

```
[npwd-apps]/
   ├── npwd_rahe_taxi_rider
   └── npwd_rahe_taxi_driver
```

***

#### ⚙️ 2. Resource Startup Order <a href="#id-2.-resource-startup-order" id="id-2.-resource-startup-order"></a>

Make sure your `server.cfg` starts resources in the correct order:

```
ensure rahe-navigation
ensure rahe-taxi
ensure [npwd-apps]
ensure qbx_npwd  # If you're using Qbox
ensure npwd
```

**📌 Important Notes**

* `rahe-taxi` must start **before NPWD**

***

#### 📲 3. Register Apps in NPWD Config <a href="#id-3.-register-apps-in-npwd-config" id="id-3.-register-apps-in-npwd-config"></a>

After confirming the folder structure, register the apps inside:

```
[npwd]/config.json
```

**➕ Add to `apps` array:**

```
 "npwd_rahe_taxi_rider", "npwd_rahe_taxi_driver"
```

It should look something like this:

```
"apps": ["npwd_qbx_mail", "npwd_qbx_garages", "npwd_rahe_taxi_rider", "npwd_rahe_taxi_driver"],
```

#### 🚫 4. Disable Command <a href="#id-4.-disable-command" id="id-4.-disable-command"></a>

After you have verified that the apps work you can disable the command by setting <mark style="color:blue;">commandsEnabled</mark> to false in <mark style="color:blue;">public\config\client\cl\_config.lua</mark>

{% tabs %}
{% tab title="public\_config/client/cl\_config.lua" %}
commandsEnabled = false,
{% endtab %}
{% endtabs %}


# Standalone

### **Item creation** <a href="#item-creation" id="item-creation"></a>

If you don't want to use the command or a phone system, you can use a phone item instead.

{% tabs %}
{% tab title="qb-inventory" %}
Add the following lines to to <mark style="color:blue;">qb-core/shared/items.lua</mark><a class="button secondary">Copy</a>

```lua
['taxiphone'] = { ['name'] = 'taxiphone', ['label'] = 'Taxi phone', ['weight'] = 1000, ['type'] = 'item', ['image'] = 'taxiphone.png', ['unique'] = true, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = "There is an app on that."},
```

Add the image file to <mark style="color:blue;">qb-inventory/html/images/taxiphone.png</mark>

<img src="https://docs.notkuubik.dev/~gitbook/image?url=https%3A%2F%2F1386996739-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FYtqaleKGPdxlpcs59tIj%252Fuploads%252F8kTUKyFKP2bpzgIcUN1H%252Fchoptablet.png%3Falt%3Dmedia%26token%3D847a06f9-0f1e-4e0c-a1b8-93da408c2166&#x26;width=768&#x26;dpr=3&#x26;quality=100&#x26;sign=1c813ceb&#x26;sv=2" alt="" height="100" width="100">

Add the following code to the end of <mark style="color:blue;">public\api\sv\_server.lua</mark><a class="button secondary">Copy</a>

```lua
CreateThread(function()
    QBCore.Functions.CreateUseableItem("taxiphone", function(source, item)
        TriggerClientEvent("rahe-taxi:client:openNUI", source)
    end)
end)
```

{% endtab %}

{% tab title="ox\_inventory" %}
Add this section to <mark style="color:blue;">ox\_inventory/data/items.lua</mark><a class="button secondary">Copy</a>

```lua
['taxiphone'] = {
    label = 'Taxi phone',
    weight = 0,
    description = "There is an app on that",
    client = {
	export = 'rahe-taxi.nuiopen',
    }
},
```

Add the image file to o<mark style="color:blue;">x\_inventory/web/images/taxiphone.png</mark>

<img src="https://docs.notkuubik.dev/~gitbook/image?url=https%3A%2F%2F1386996739-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FYtqaleKGPdxlpcs59tIj%252Fuploads%252F8kTUKyFKP2bpzgIcUN1H%252Fchoptablet.png%3Falt%3Dmedia%26token%3D847a06f9-0f1e-4e0c-a1b8-93da408c2166&#x26;width=768&#x26;dpr=3&#x26;quality=100&#x26;sign=1c813ceb&#x26;sv=2" alt="" height="100" width="100">
{% endtab %}
{% endtabs %}

After you have successfully added the item you can disable the command by setting <mark style="color:blue;">commandsEnabled</mark> to <mark style="color:blue;">false</mark> in <mark style="color:blue;">public\config\client\cl\_config.lua</mark>

public\config\client\cl\_config.lua<a class="button secondary">Copy</a>

```
commandsEnabled = false,
```


# Common questions

Commonly asked questions from our customers. Feel free to read these to get a better overview.


# Common issues

If you run into problems with our application, then most likely your issue is described here.


