qb-garages
Navigate to the qb-garages/client/main.lua
Find the
qb-garages:client:setHouseGarageevent and replace:
RegisterNetEvent('qb-garages:client:setHouseGarage', function(house) -- event sent periodically from housing
if not house then return end
local formattedHouseName = string.gsub(string.lower(house), ' ', '')
local zoneName = 'house_' .. formattedHouseName
local hasKey = exports['vms_housing']:HasPermissions(house, 'garage')
if Config.Garages[formattedHouseName] then
if hasKey and not ZoneExists(zoneName) then
CreateHouseZone(formattedHouseName, Config.Garages[formattedHouseName], 'house')
elseif not hasKey and ZoneExists(zoneName) then
RemoveHouseZone(zoneName)
end
else
if not hasKey then
return
end
local property = exports['vms_housing']:GetProperty(house)
if not property or not property.metadata or not property.metadata.garage then return end
local garageCoords = property.metadata.garage
Config.Garages[formattedHouseName] = {
houseName = house,
takeVehicle = vector3(garageCoords.x, garageCoords.y, garageCoords.z),
spawnPoint = {
vector4(garageCoords.x, garageCoords.y, garageCoords.z, garageCoords.w)
},
label = property.name,
type = 'house',
category = Config.VehicleClass['all']
}
CreateHouseZone(formattedHouseName, Config.Garages[formattedHouseName], 'house')
end
end)Navigate to the qb-garages/server/main.lua
Find the
qb-garages:server:getHouseGaragecallback and replace:
Find the
qb-garages:server:GetGarageVehiclescallback and replace:
Find the
qb-garages:server:canDepositcallback and replace:
Last updated
Was this helpful?