> For the complete documentation index, see [llms.txt](https://complete-scripts.gitbook.io/complete-scripts/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://complete-scripts.gitbook.io/complete-scripts/scripts/complete-daily-bonus/installation.md).

# Installation

Step by step guide to install Complete Daily Bonus on your server.

### **How to download the script**

Complete Daily Bonus is free and you don't need a Keymaster account. Download it from GitHub:

1. Open <https://github.com/Michele-Arici/complete_daily_bonus>
2. Download the latest release, or press **Code > Download ZIP**
3. Extract the archive and copy the folder into your server `resources` folder

{% hint style="danger" %} <mark style="color:red;">**The folder MUST be named exactly complete\_daily\_bonus. GitHub downloads add a suffix (for example complete\_daily\_bonus-main or a version number): remove it, otherwise the menu won't open and the rewards won't be given**</mark>
{% endhint %}

### **Dependencies**

{% hint style="danger" %} <mark style="color:red;">**This asset relies on certain essential dependencies to function correctly. If these dependencies are not installed, the asset may start, but you could encounter errors or warnings in the console**</mark>
{% endhint %}

| Script                                                                     | Download                                 |
| -------------------------------------------------------------------------- | ---------------------------------------- |
| **ESX OR QBCore**                                                          | <https://esx.dev> / <https://qbcore.org> |
| <p><strong>oxmysql</strong><br><em>Needed for the vehicle rewards</em></p> | <https://overextended.dev/oxmysql>       |

{% hint style="warning" %} <mark style="color:orange;">**The fxmanifest.lua loads @mysql-async/lib/MySQL.lua. If your server uses oxmysql, replace that line with '@oxmysql/lib/MySQL.lua'**</mark>
{% endhint %}

### **Correct Asset Placement**

{% hint style="danger" %} <mark style="color:red;">**Properly placing the assets is crucial to avoid errors, FOLLOW THIS ORDER**</mark>
{% endhint %}

To ensure the asset runs smoothly, configure your server.cfg with the sequence specified below:

```lua
# at the bottom of the file, after your framework and oxmysql

ensure complete_daily_bonus

# needed to use the reset command (Config.ResetTimerCommand)
add_ace group.admin command.reset_daily_bonus allow
```

### **Database Configuration**

No SQL file is needed. The timer of each player is saved on the player's PC (client KVP), and vehicle rewards are added to your framework's vehicles table (`owned_vehicles` on ESX, `player_vehicles` on QBCore).

### **Item Configuration**

The script doesn't add any item. The item and weapon rewards in `Config.RouletteData` must exist in your inventory: use the item names of your server.

{% hint style="warning" %} <mark style="color:orange;">**If your inventory handles weapons as items (ox\_inventory, qb-inventory, Qbox), set weapon rewards as type "item" with quantity = 1, see Common errors**</mark>
{% endhint %}

### Configure the script

As the last step, open `complete_daily_bonus/config.lua` and edit it as you like. Please make sure to have basic coding skills before editing it: a single wrong character will stop the script from starting. Every option is explained in the [Config](/complete-scripts/scripts/complete-daily-bonus/config.md) page.

{% hint style="danger" %} <mark style="color:red;">**On QBCore you must edit Config.Notify: by default it uses the ESX notification**</mark>
{% endhint %}

The reward functions (money, items, weapons, vehicles) are in `complete_daily_bonus/server/server.lua`: edit them if you use another framework, inventory or garage script.

Restart the server and use `/daily-bonus` (`Config.OpenCommand`) to open the menu.
