Open Functions
The script has files open for configure garages/inventory/wardrobes
Open Client (client/open_functions.lua)
--Add your inventory statsh here
function OpenStorage(entity, houseId, furniId, isExterior, hasKey)
if Config.ox_inventory then
if isExterior then
if hasKey then
Config.FrameworkFunctions.TriggerCallback("artz_housing:registerStash", function()
exports.ox_inventory:openInventory('stash', "ExtHouse_" .. houseId .. "_" .. furniId)
end, "ExtHouse_" .. houseId .. "_" .. furniId)
end
else
Config.FrameworkFunctions.TriggerCallback("artz_housing:registerStash", function()
exports.ox_inventory:openInventory('stash', "House_" .. houseId .. "_" .. furniId)
end, "House_" .. houseId .. "_" .. furniId)
end
else
if isExterior then
if hasKey then
TriggerServerEvent("inventory:server:OpenInventory", "stash", "ExtHouse_" .. houseId .. "_" .. furniId, {
maxweight = 20000,
slots = 30,
})
TriggerEvent("inventory:client:SetCurrentStash", "ExtHouse_" .. houseId .. "_" .. furniId)
end
else
TriggerServerEvent("inventory:server:OpenInventory", "stash", "House_" .. houseId .. "_" .. furniId, {
maxweight = 20000,
slots = 30,
})
TriggerEvent("inventory:client:SetCurrentStash", "House_" .. houseId .. "_" .. furniId)
end
end
end
--Add your outfit menu script here
function OpenWardrobe(entity, houseId, furniId, isExterior, hasKey)
if isExterior then
if hasKey then
TriggerEvent('qb-clothing:client:openOutfitMenu')
end
else
TriggerEvent('qb-clothing:client:openOutfitMenu')
end
end
-- Core init Functions IMPORTANT: ADD THIS IF YOU HAVE ANY CUSTOM LOAD CHARACTER EVENT
-- QBCORE
RegisterNetEvent("QBCore:Client:OnPlayerLoaded",function()
LoadInitFunctions()
end)
-- ESX
RegisterNetEvent('esx:playerLoaded',function(xPlayer, isNew, skin)
LoadInitFunctions()
end)
-- Citizen.CreateThread(function () -- ONLY IF YOU NEED RESTART SCRIPT EVENLY
-- Wait(10000)
-- LoadInitFunctions()
-- end)Garage Client (client/garage.lua)
Open Server (server/open_functions.lua)
Garage Server (server/garage.lua)
If you need check is owner vehicle un-comment the lines commented and remove if true then
Last updated