# zpx-casino

## IMPORTANT

This script automatically inserts the database tables, eliminating the need to run the SQL code provided. If you encounter issues with the automated installation, consider manually running the sql instead.

### DEPENDENCIES

{% hint style="info" %}
ox\_lib - <https://github.com/overextended/ox_lib/releases/latest/download/ox_lib.zip>
{% endhint %}

### PERMISSIONS

Add the following code in your **server.cfg**:

{% tabs %}
{% tab title="QBCORE" %}

```
add_ace qbcore.god zpxcasino allow
```

{% endtab %}

{% tab title="ESX" %}

```
add_ace group.admin zpxcasino allow
```

{% endtab %}
{% endtabs %}

### FUNCTIONALITY

* If you want to use an item to open the online casino, set `Config.UseItemToOpenCasino = true.`
* To use a prop, set the configuration option above to **false** and utilize `/placeprop` to position it.

### QBCORE ONLY

Add the following item on **qb-core/shared/items.lua**:

```lua
zorpex_tablet = { name = 'zorpex_tablet', label = 'Zorpex Tablet', weight = 0, type = 'item', image = 'zorpex_tablet.png', unique = true, useable = true, shouldClose = true, combinable = nil, description = 'Zorpex Tablet to open the online casino'},
```

### ESX ONLY

Add the following item on the database:

```sql
INSERT INTO `items` (`name`, `label`, `weight`, `rare`, `can_remove`) VALUES ('zorpex_tablet', 'Zorpex Tablet', 1, 1, 1)
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://zorpex.gitbook.io/zorpex-documentation/assets/zpx-casino.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
