This commit is contained in:
Nordi98 2025-07-11 12:26:43 +02:00
parent dd9fcf9ecf
commit 364b3e9835
5 changed files with 164 additions and 155 deletions

View file

@ -1246,7 +1246,12 @@ CodeStudio.Products = {
itemPrice = 50,
itemInfo = "",
},
['vehicletrackertablet'] = {
itemName = "Fahrzeugtracker Tablet",
itemStock = 150,
itemPrice = 50,
itemInfo = "",
},
}
},
['police_weapons'] = {

View file

@ -1,59 +0,0 @@
local QBCore = exports['qb-core']:GetCoreObject()
Config = {}
Config.lockerProps = {'h4_prop_h4_ld_keypad_01b'} -- Props you can access storage
Config.Locations = {
[1] = {
name = 'SD',
location = vector3(1827.6656, 3680.0276, 34.4050),
radius = 8.0,
maxweight = 30000,
slots = 32.0,
},
[2] = {
name = 'Lagerhaus Sandy',
location = vector3(182.5523, 2792.6450, 45.6404),
radius = 8.0,
maxweight = 400000,
slots = 32.0,
},
}
Citizen.CreateThread(function()
exports['qb-target']:AddTargetModel(Config.lockerProps, {
options = {
{
id = 1,
icon = "fa-solid fa-lock",
label = "Open personal locker",
action = function(entity)
TriggerEvent('rj-lockers:openLocker', entity)
end,
},
},
distance = 1.5
})
end)
RegisterNetEvent('rj-lockers:openLocker', function(entity)
local PlayerData = QBCore.Functions.GetPlayerData()
local lockerLoc = GetEntityCoords(entity)
local accessGranted = false
for x, v in pairs(Config.Locations) do
if GetDistanceBetweenCoords(lockerLoc, v.location) < v.radius then
TriggerServerEvent("inventory:server:OpenInventory", "stash", v.name .. "_" .. PlayerData.citizenid, {maxweight = v.maxweight, slots = v.slots})
TriggerEvent("inventory:client:SetCurrentStash", v.name .. "_" .. PlayerData.citizenid)
accessGranted = true
break
end
end
if not accessGranted then
QBCore.Functions.Notify('You cannot access this locker', 'error', 5000)
end
end)

View file

@ -1,10 +0,0 @@
fx_version 'cerulean'
game 'gta5'
author 'RJ-Scripts'
description 'rj-lockers for QBCore'
version '1.0.0'
client_script {
'client.lua',
}