QBX Garages
In server/main.lua
find registerGarage
function
server/main.lua
local function registerGarage(name, config)
if not Garages[name] then
Garages[name] = config
TriggerClientEvent('qbx_garages:client:garageRegistered', -1, name, config)
TriggerEvent('qbx_garages:server:garageRegistered', name, config)
end
end
exports('RegisterGarage', registerGarage)
RegisterNetEvent('qbx_garages:server:RegisterGarage', registerGarage)
JDev QBX_Garages​
This is for this version which uses the radialmenu
Add this to your client file
client/main.lua
exports('ParkVehicle', ParkVehicle)
exports('OpenGarageMenu', OpenGarageMenu)
Comment out qb-garages:client:houseGarageConfig
event in your client file
-- RegisterNetEvent('qb-garages:client:houseGarageConfig', function(garageConfig)
-- for _, v in pairs(garageConfig) do
-- v.vehicleCategories = config.HouseGarageCategories
-- end
-- HouseGarages = garageConfig
-- end)
replace the qbx_garage part in the bcs_housing/client/garage.lua
client/garage.lua
if IsPedInAnyVehicle(PlayerPedId(), false) then
exports['qbx_garages']:ParkVehicle(cache.vehicle, identifier,
vec4(data.properties.data.garage.x, data.properties.data.garage.y,
data.properties.data.garage.z, data.properties.data.garage.w))
else
exports["qbx_garages"]:OpenGarageMenu()
end