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

# Setup

## Installation

Follow the instructions below to run the gusti-boostsprint script on your server

* Download latest version in github
* Extract rar file \[STANDALONE] Gusti Boostsprint
* Copy / cut gusti-boostsprint into your server's resources folder
* Drag and drop the gusti-boostsprint.sql file into your database
* Open server.cfg
* Add the gusti-boostsprint script by ensure gusti-boostsprint in server.cfg
* Restart server
* Finished
* Now you can enjoy the features of the gusti-boostsprint script on your server

## Configuration

```lua
Config = {}

Config.Framework = "ESX" -- ESX/QBCore
Config.UseOxInventory = true -- Set this to true if you are using ox_inventory
Config.DurationBoostSprint = 10000 -- Time how long it takes to increase running speed in seconds

Config.Language = {
    active = "Your power is now full power",
    notactive = "You are exhausted"
}
```

## Ox Inventory

If you set UseOxInventory to true then you have to add a little code inside the ox\_inventory script

{% code title="ox\_inventory/data/items.lua" %}

```lua
['pill_boost_sprint'] = {
    label = 'Pill Boost Sprint',
    weight = 1,
    stack = true,
    close = true,
},
```

{% endcode %}

{% code title="ox\_inventory/modules/items/client.lua" %}

```lua
Item('pill_boost_sprint', function(data, slot)
    TriggerEvent("gusti-boostsprint:active")
end)
```

{% endcode %}

## Framework

{% tabs %}
{% tab title="ESX" %}
If you are using the Esx framework, you will need to add items to the database

{% code title="gusti-boostsprint/setup/gusti-boostsprint.sql" %}

```sql
INSERT INTO `items` (`name`, `label`, `weight`, `rare`, `can_remove`) VALUES
    ('pill_boost_sprint', 'Pill Boost Sprint', 1, 0, 1)
;
```

{% endcode %}
{% endtab %}

{% tab title="QBCore" %}
If you are using the QBCore framework, you need to add this item line

{% code title="qb-core/shared/items.lua" %}

```lua
['pill_boost_sprint']               = {['name'] = 'pill_boost_sprint',                 ['label'] = 'Pill Boost Sprint',         ['weight'] = 1,            ['type'] = 'item',         ['image'] = 'pill_boost_sprint.png',       ['unique'] = true,          ['useable'] = true,      ['shouldClose'] = true,      ['combinable'] = nil,   ['description'] = 'Use this pill to increase your stamina'},
```

{% endcode %}
{% endtab %}
{% endtabs %}

## Custom Notification

You can customize notifications according to your wishes, which can be found on line `45` > `52`

{% code title="gusti-boostsprint/client/main.lua" %}

```lua
RegisterNetEvent('gusti-boostsprint:notify')
AddEventHandler('gusti-boostsprint:notify', function(args, _type, time)
    if Config.Framework == "ESX" then
        ESX.ShowNotification(args, _type, time)
    elseif Config.Framework == "QBCore" then
        QBCore.Functions.Notify(args, _type, time)
    end
end)
```

{% endcode %}
