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

# Installation

{% stepper %}
{% step %}

#### Install

Install the resource on your Keymaster after purchasing the script. <mark style="color:$primary;">(</mark>[<mark style="color:$primary;">https://portal.cfx.re/</mark>](https://portal.cfx.re/)<mark style="color:$primary;">)</mark>&#x20;

{% endstep %}

{% step %}

#### Drag And Drop

Please place the Locker resource on your base.

{% endstep %}

{% step %}

### Start

Next, please ensure that the Locker resource is included in your `server.cfg` or `resources.cfg`.

{% endstep %}

{% step %}

### Config inventory

You can configure your own inventory system. By default, QS, OX, and QB are supported, but you can easily add or set up your own inventory.
{% endstep %}
{% endstepper %}

<details>

<summary>Here is the <code>config.lua</code> file. (ESX) </summary>

```lua
-----------------------------------------------
-- PE Script - Locker System Configuration
-- Script de casiers pour FiveM
-- Locker system script for FiveM
-----------------------------------------------

Config = {}

-------------------------------------------------
--  Debug Prints
-------------------------------------------------
Config.DebugPrint = true -- true / false
-- FR: Active ou désactive les messages de debug dans la console.
-- EN: Enables or disables debug messages in the console.


-------------------------------------------------
--  Langue / Language
-------------------------------------------------
Config.Locale = 'fr' -- fr / en / de / es / ru / zh
-- FR: Langue utilisée pour les messages et traductions
-- EN: Language used for messages and translations

-------------------------------------------------
-- Framework Resources / Ressources du framework
----------------------------------------------------
-- Name of your ESX resource (change if your server uses a custom ESX resource)
-- Nom de votre ressources ESX (a modifier si votre server utilise une ressource ESX Personnalisée)

Config.ESXResource = "es_extended"

-------------------------------------------------
--  Groupes administrateurs / Admin Group
-------------------------------------------------
Config.AdminGroup = 'admin' 
-- FR: Groupe ayant accès à toutes les fonctions du script
-- EN: Group with access to all script functions

-------------------------------------------------
--  Notification System / Système de notifications
-------------------------------------------------
Config.Notifs = 'PNotif' -- ESX / Custom / PNotif
-- FR: Type de système de notifications utilisé
-- EN: Type of notification system used
-- ESX: Utilise les notifications ESX de base
-- Custom: Utilise un système personnalisé (event 'locker:notify')
-- PNotif: Utilise le système PNotif

-------------------------------------------------
--  Limites des casiers / Locker Limits
-------------------------------------------------
Config.MaxLockers = 25
-- FR: Nombre maximum de casiers créés sur le serveur
-- EN: Maximum number of lockers that can be created on the server

Config.MaxSlotsPerLocker = 25
-- FR: Nombre maximum d'emplacements dans chaque casier
-- EN: Maximum number of slots per locker

Config.MaxWeightPerLocker = 250
-- FR: Poids maximum total pouvant être stocké dans un casier
-- EN: Maximum total weight that can be stored in a locker

-------------------------------------------------
--  Interaction System / Système d'interaction
-------------------------------------------------
Config.InteractionSystem = 'DrawMarker' -- DrawMarker / ox_target / Custom
-- FR: Type de système d'interaction utilisé
-- EN: Type of interaction system used
-- DrawMarker: Utilise les marqueurs et la touche E
-- ox_target: Utilise ox_target pour l'interaction
-- Custom: Utilise un système personnalisé (event 'locker:customInteraction')

-------------------------------------------------
--  Interaction / Interaction Settings
-------------------------------------------------
Config.InteractionDistance = 2.0
-- FR: Distance maximale pour interagir avec un casier
-- EN: Maximum distance to interact with a locker

Config.MarkerDrawDistance = 15.0
-- FR: Distance maximale pour voir les marqueurs
-- EN: Maximum distance to see markers

Config.Keybind = 38
-- FR: Touche pour interagir avec le casier (E par défaut)
-- EN: Key to interact with the locker (default E)

-------------------------------------------------
--  Marqueur / Marker Settings
-------------------------------------------------
Config.MarkerType = 1
-- FR: Type de marqueur utilisé dans le monde (1 = Cylindre au sol)
-- EN: Type of marker used in the world (1 = Cylinder on ground)

Config.MarkerSize = { x = 1.5, y = 1.5, z = 0.8 }
-- FR: Taille du marqueur / Size of the marker
Config.MarkerColor = { r = 52, g = 152, b = 219, a = 200 } 
-- FR: Couleur du marqueur en RGBA / Color of the marker in RGBA

Config.DrawMarkers = true         
-- FR: Afficher les marqueurs sur le monde / Draw markers in the world
Config.Use3DText = true           
-- FR: Afficher un texte 3D au-dessus du casier / Display 3D text above the locker

-------------------------------------------------
--  Discord Webhook Logs
-------------------------------------------------
Config.DiscordWebhook = ""
-- FR: URL du webhook Discord pour les logs (laissez vide pour désactiver)
-- EN: Discord webhook URL for logs (leave empty to disable)

Config.DiscordLogs = {
    enabled = true,
    createLocker = true,
    deleteLocker = true,
    updateLocker = true,
    depositItem = true,
    withdrawItem = true,
    openLocker = false,
}

Config.DiscordColors = {
    create = 5763719,    -- Bleu
    delete = 15548997,   -- Rouge
    update = 16776960,   -- Jaune
    deposit = 5763719,   -- Bleu
    withdraw = 15105570, -- Orange
    open = 8421504,      -- Gris
}

-------------------------------------------------
--  Traductions / Locales
-------------------------------------------------
LOCALES = {}

function _U(str, ...)
    if LOCALES[Config.Locale] ~= nil then
        if LOCALES[Config.Locale][str] ~= nil then
            return string.format(LOCALES[Config.Locale][str], ...)
        else
            return 'Translation [' .. str .. '] does not exist'
        end
    else
        return 'Locale [' .. Config.Locale .. '] does not exist'
    end
end
```

</details>

<details>

<summary>Here is the <code>config.lua</code> file. (QB) </summary>

```lua
-----------------------------------------------
-- PE Script - Locker System Configuration
-- Script de casiers pour FiveM
-- Locker system script for FiveM
-----------------------------------------------

Config = {}

-------------------------------------------------
--  Debug Prints
-------------------------------------------------
Config.DebugPrint = true -- true / false
-- FR: Active ou désactive les messages de debug dans la console.
-- EN: Enables or disables debug messages in the console.

-------------------------------------------------
--  Langue / Language
-------------------------------------------------
Config.Locale = 'fr' -- fr / en / de / es / ru / zh
-- FR: Langue utilisée pour les messages et traductions
-- EN: Language used for messages and translations

-------------------------------------------------
-- Framework Resources / Ressources du framework
----------------------------------------------------
-- Name of your QB resource (change if your server uses a custom QB resource)
-- Nom de votre ressources QB (a modifier si votre server utilise une ressource QB Personnalisée)

Config.QBResource = "qb-core"

-------------------------------------------------
--  Permissions administrateur / Admin Permission
-------------------------------------------------
Config.AdminLicenses = {
    'license:', -- Exemple de license
    -- Ajoutez les licenses des administrateurs ici
    -- FR: Ajoutez les licenses Steam/Rockstar des joueurs autorisés
    -- EN: Add the Steam/Rockstar licenses of authorized players
}
-- FR: Liste des licenses ayant accès aux fonctions administratives
-- EN: List of licenses with access to administrative functions

-------------------------------------------------
--  Notification System / Système de notifications
-------------------------------------------------
Config.Notifs = 'QB' -- QB / Custom / PNotif
-- FR: Type de système de notifications utilisé
-- EN: Type of notification system used
-- QB: Utilise les notifications QBCore de base
-- Custom: Utilise un système personnalisé (event 'locker:notify')
-- PNotif: Utilise le système PNotif

-------------------------------------------------
--  Limites des casiers / Locker Limits
-------------------------------------------------
Config.MaxLockers = 25
-- FR: Nombre maximum de casiers créés sur le serveur
-- EN: Maximum number of lockers that can be created on the server

Config.MaxSlotsPerLocker = 25
-- FR: Nombre maximum d'emplacements dans chaque casier
-- EN: Maximum number of slots per locker

Config.MaxWeightPerLocker = 250
-- FR: Poids maximum total pouvant être stocké dans un casier
-- EN: Maximum total weight that can be stored in a locker

-------------------------------------------------
--  Interaction System / Système d'interaction
-------------------------------------------------
Config.InteractionSystem = 'DrawMarker' -- DrawMarker / ox_target / Custom
-- FR: Type de système d'interaction utilisé
-- EN: Type of interaction system used
-- DrawMarker: Utilise les marqueurs et la touche E
-- ox_target: Utilise ox_target pour l'interaction
-- Custom: Utilise un système personnalisé (event 'locker:customInteraction')

-------------------------------------------------
--  Interaction / Interaction Settings
-------------------------------------------------
Config.InteractionDistance = 2.0
-- FR: Distance maximale pour interagir avec un casier
-- EN: Maximum distance to interact with a locker

Config.MarkerDrawDistance = 15.0
-- FR: Distance maximale pour voir les marqueurs
-- EN: Maximum distance to see markers

Config.Keybind = 38
-- FR: Touche pour interagir avec le casier (E par défaut)
-- EN: Key to interact with the locker (default E)

-------------------------------------------------
--  Marqueur / Marker Settings
-------------------------------------------------
Config.MarkerType = 1
-- FR: Type de marqueur utilisé dans le monde (1 = Cylindre au sol)
-- EN: Type of marker used in the world (1 = Cylinder on ground)

Config.MarkerSize = { x = 1.5, y = 1.5, z = 0.8 }
-- FR: Taille du marqueur / Size of the marker
Config.MarkerColor = { r = 52, g = 152, b = 219, a = 200 } 
-- FR: Couleur du marqueur en RGBA / Color of the marker in RGBA

Config.DrawMarkers = true         
-- FR: Afficher les marqueurs sur le monde / Draw markers in the world
Config.Use3DText = true           
-- FR: Afficher un texte 3D au-dessus du casier / Display 3D text above the locker

-------------------------------------------------
--  Discord Webhook Logs
-------------------------------------------------
Config.DiscordWebhook = ""
-- FR: URL du webhook Discord pour les logs (laissez vide pour désactiver)
-- EN: Discord webhook URL for logs (leave empty to disable)

Config.DiscordLogs = {
    enabled = true,
    createLocker = true,
    deleteLocker = true,
    updateLocker = true,
    depositItem = true,
    withdrawItem = true,
    openLocker = false,
}

Config.DiscordColors = {
    create = 5763719,    -- Bleu
    delete = 15548997,   -- Rouge
    update = 16776960,   -- Jaune
    deposit = 5763719,   -- Bleu
    withdraw = 15105570, -- Orange
    open = 8421504,      -- Gris
}

-------------------------------------------------
--  Traductions / Locales
-------------------------------------------------
LOCALES = {}

function _U(str, ...)
    if LOCALES[Config.Locale] ~= nil then
        if LOCALES[Config.Locale][str] ~= nil then
            return string.format(LOCALES[Config.Locale][str], ...)
        else
            return 'Translation [' .. str .. '] does not exist'
        end
    else
        return 'Locale [' .. Config.Locale .. '] does not exist'
    end
end

```

</details>
