📁 Police lockers and investigation files [QB & ESX]

PREVIEW

TEBEX (Escrow) - 5€ | Tebex (Open-source) - 10€

QUASAR INVENTORY used for this script and not given!

The CONFIG of the ranks, so put the id of the rank :

Locker

Config.JobPoliceName = "police" -- Name of the font profession on your server

Config.GradePoliceForOpenBypass = 8 -- In-Game Grade of the job in order to modify the password 

Config.GradePoliceForPassword = 7 -- In-Game Grade of the job in order to modify the password
Config.GradePoliceForName = 6 -- In-Game Rank of the job in order to modify the name of the locker
Config.GradePoliceForDelete = 9 -- Grade In-Game of the job in order to empty the locker

Investigation

Config.GradePoliceForCreateEnquete = 1 -- Create afin de créer des archives
Config.GradePoliceForArchiveEnquete = 2 -- Grade in order to archive an investigation
Config.GradePoliceForOpenArchive = 5 -- Rank in order to open the archives of the investigations
Config.GradePoliceForDeleteArchive = 6 -- Grade to permanently remove surveys
Operation of QUASAR INVENTORY for lockers :
local other = { -- Locker trunk storage
    maxweight = 20000,
    slots = 10,
}

TriggerServerEvent("inventory:server:OpenInventory", "stash", "police_prv_"..NumberCasier, other)
TriggerEvent("inventory:client:SetCurrentStash", "police_prv_"..NumberCasier)
Operation of QUASAR INVENTORY for investigations :
local other_enquete = { -- Storage Survey
    maxweight = 10000,
    slots = 20,
}

TriggerServerEvent("inventory:server:OpenInventory", "stash", "enquete_"..S_NumberEnquete, other_enquete)
TriggerEvent("inventory:client:SetCurrentStash", "enquete_"..S_NumberEnquete)
To create lockers in your database using a command :
-- Retirer cette commande une fois utilisé, c'est simple pour insérer les casiers dans la BDD
-- Remove this command once used, it's simple to insert the lockers in the DB

RegisterCommand("CreateInBdd", function()
    CreateInBdd()
end)

function CreateInBdd()
    for i=Config.Minimum, Config.Maixmum, 1 do
    MySQL.ready(function()
        MySQL.Async.execute("INSERT INTO s_police_casier (id, inv_name, name, password) VALUES (@id, @inv_name, @name, @password)",
            {
                ['id'] = i,
                ['inv_name'] = "police_prv_"..i.."",
                ['name'] = "Casier : Disponible",
                ['password'] = math.random(1111, 9999)
            },
            function(result)
            end)
        end)
    end
end
The entire Config.lua file


:fr:
Deux scripts en un ! Ce script propose un systĂšme de casier pour les agents de police ainsi qu’un systĂšme de dossier pour les enquĂȘtes. Veuillez noter que le Quasar Inventory est requis pour utiliser ce script, et que le fonctionnement avec d’autres types d’inventaires n’est pas garanti.
Pour les casiers, il est possible d’ouvrir le casier Ă  l’aide d’un code Ă  4 chiffres, de modifier le nom du casier, ainsi que d’autres fonctionnalitĂ©s configurables en fonction des grades du joueur

:us:
Two scripts in one! This script offers a locker system for police officers as well as a file system for investigations. Please note that the Quasar Inventory is required to use this script, and that operation with other types of inventories is not guaranteed.
For lockers, it is possible to open the locker using a 4-digit code, change the name of the locker, and other configurable features depending on the ranks of the player

Code is accessible Yes
Subscription-based No
Lines (approximately) 700
Framework ESX & QB
Framework Version Legacy & QB - 08/2023
SQL ressource Mysql & @oxmysql
Translation in script FR, EN & Custom
Support Yes

My scripts/mapping

:police_car: Police Menu Extra [ESX (QB in readme.md)] (FREE)
:ballot_box: VoteTopServeur [QB] (FREE)

:manual_wheelchair: Wheelchair [ESX & QB] (1€ ESCROW or 2€ OPEN-SOURCE)
:taxi: Taxi [ESX & QB] (2€ Open-Source)
:elevator: Elevator UI [Standalone] (3€ ESCROW or 7€ OPEN-SOURCE)
:bed: Stretcher [ESX & QB] (5€ ESCROW or 7€ Open-Source)
:file_folder: Police lockers and investigation files [ESX & QB] (5€ ESCROW or 10€ OPEN-SOURCE)
:pen: JobTattoo [ESX & QB] (15€ OPEN-SOURCE)
:iphone: LB Phone Plugin : App News
:file_cabinet:Lockers UI [ESX & QB] (7€ Escrow & 40€ Open-Source)

:racing_car: Karting YMAP [FREE]
:racing_car: Race YMAP Grapeseed [FREE]
:racing_car: Race YMAP Port of Los Santos [FREE]

4 Likes

nice work bro

1 Like


Have Problem

For ‘ESX’, you have to replace the ESX TriggerEvent, with the one used on your server, for the ‘ActiveLife’ it’s another notification system, if you have OkokNotify, just replace the export/TriggerclientEvent

Hi, is it normal that I can’t access the config.lua??

Hi my friend ! It’s fixed you just have to reinstall it on keymaster

will there be a way to do it in ox_inventory pls?

Hi, I will look for this, in order to let you modified regardless of inventory

Watch your CFX private messages

Does it come with the option to pass it to esx_menu_default?

Hi, unfortunately no, it’s been a long time since I’ve used this type of menu and it’s not in my options

If you like to work together I can build it in esx_menu_default but I would need the structure of the code to recode it. <3

Unfortunately it’s not something I want to do, if one day I have the motivation, I would do it for ESX_Menu_Default

I already developed my own code, if you want I’ll give it to you so you can adapt it :smiley:

No thanks, I’ll do a UI version one day.

  • I use Quasar myself, and this script is compatible with Quasar’s inventory as shown. So normally, no problem.
  • The proof system is just a place where you have lockers, as you can see in the demo video.
  • I didn’t understand your last question.

:fr:
· Ajout de la version QBCore en plus d’ESX (donc QBCore/ESX).
· Envoi des assets via le Keymaster pour les achats du script open-source. (Envoyé pour ceux qui avait reçu le fichier par mail)

:us:
· Added the QBCore version in addition to ESX (so QBCore/ESX).
· Sending assets via the Keymaster for purchases of the open-source script. (Sent for those who received the file by email)

:fr:
· Correction d’une petite faute d’orthographe.
· Suppression d’une ligne de traduction dupliquĂ©e inutilement.
· Mise Ă  jour du fonctionnement cĂŽtĂ© server.lua pour ESX pour la crĂ©ation d’enquĂȘte.
· Optimisation du texte en 3D cÎté client.
· Ajout d’une nouvelle traduction lorsque vous essayez d’ouvrir le menu alors qu’il est dĂ©jĂ  ouvert.

:us:
· Correction of a minor spelling mistake.
· Removal of a needlessly duplicated translation line.
· Update of the functionality on the server.lua side for ESX for the creation of investigations.
· Optimization of 3D text on the client side.
· Addition of a new translation when you try to open the menu while it is already open.

Why pay for this when I can just use SONORAN CAD or google docs?

You use what you want. My script is not a text document; it’s two scripts in one. Lockers for police officers and investigation files, designed to store items rather than text. So, if you manage to store items via Google Docs, let us know.

1 Like