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

# HRStorages

## Dependencies

* [HRLib](https://github.com/HRScripts/HRLib/releases/latest) - [documentation](#dependencies)
* [oxmysql](https://github.com/overextended/oxmysql/releases/latest) - [documentation](https://overextended.dev/oxmysql)
* [ox\_inventory](https://github.com/overextended/ox_inventory/releases/latest) - [documentation](https://overextended.dev/ox_inventory)
* [object\_gizmo](https://github.com/Demigod916/object_gizmo/releases/latest) - [documentation](https://github.com/Demigod916/object_gizmo/blob/main/README.md)
* Framework - [ESX](https://github.com/esx-framework/esx_core/releases/latest) - [documentation](https://documentation.esx-framework.org/legacy/installation)/[QBCore](https://github.com/qbcore-framework/qb-core) - [documentation](https://docs.qbcore.org/qbcore-documentation/guides/windows-installation)
* Target - [ox\_target](https://github.com/overextended/ox_target/releases/latest) - [documentation](https://overextended.dev/ox_target)/[qb-target](https://github.com/qbcore-framework/qb-target) - [documentation](https://docs.qbcore.org/qbcore-documentation/qbcore-resources/qb-target)

## Installation

* Download the [dependencies](#dependencies)
* Download [HRStorages](https://github.com/HRScripts/HRStorages/releases/latest)
* Write in your server.cfg:

{% code lineNumbers="true" %}

```apacheconf
start HRLib
start oxmysql
start ox_lib
start framework # ox_core/es_extended/qb-core
start ox_inventory
start target # ox_target/qb-target
```

{% endcode %}

* Restart your server

## Create a storage

If you installed and started the script, each player will be able to create a storage after purchasing one, using the command `/createStorage`.\
If you purchased a storage, after using the command you'll be able to configure your storage's position via&#x20;

## Video Preview

{% embed url="<https://www.youtube.com/watch?ab_channel=HRScriptsDevelopment&v=-UAh9IydMPE>" %}

## Config Preview

<pre class="language-lua" data-line-numbers><code class="lang-lua"><strong>local config = {}
</strong>
config.language = 'bg'

config.target = 'ox_target' -- 'ox_target' or 'qb-target'

config.storageProp = 'prop_container_05mb'

config.storageRobbery = {
    cooldown = {
        enable = true,
        cooldown = 120, -- In seconds
    },
    itemRequired = 'lockpick',
    minigameFunc = function() -- This minigame requires https://github.com/T3development/t3_lockpick resource! If not found, HRStorages will stop with an error in the output
        return exports.t3_lockpick:startLockpick('lockpick', 2, 4)
    end
}

config.signal = {
    enableOwnerSignal = true, -- If true the owner will accept a signal
    blipRadius = 150.0,
    color = 3,
    alpha = 200 -- Max 1000
}

config.stashSettings = {
    maxSlots = 50,
    maxWeight = 5000 -- In grams !! WARNING !! This is using for registering the stash and cannot be changed onto every stash every signle time!!
}

config.store = {
    ped = {
        models = { -- We take a random model from this table here. Configure this from https://docs.fivem.net/docs/game-references/ped-models
            'a_m_y_business_02',
            'a_m_y_business_01',
            'a_m_y_hasjew_01'
        },
        coords = vector4(-230.5639, -916.2744, 31.3108, 340.3738)
    },
    price = 30000,
    getMoneyFrom = 'both', -- 'cash' or 'bank' or 'both'
    commandName = 'createStorage'
}
</code></pre>
