β Garages
qb-garages/server.lua
Search this:
QBCore.Functions.CreateCallback('qb-garage:server:spawnvehicle', function (source, cb, vehInfo, coords, warp)
local plate = vehInfo.plate
local veh = QBCore.Functions.SpawnVehicle(source, vehInfo.vehicle, coords, warp)
SetEntityHeading(veh, coords.w)
SetVehicleNumberPlateText(veh, plate)
local vehProps = {}
local result = MySQL.query.await('SELECT mods FROM player_vehicles WHERE plate = ?', {plate})
if result[1] then vehProps = json.decode(result[1].mods) end
local netId = NetworkGetNetworkIdFromEntity(veh)
OutsideVehicles[plate] = {netID = netId, entity = veh}
cb(netId, vehProps)
end)Replace with:
QBCore.Functions.CreateCallback('qb-garage:server:spawnvehicle', function (source, cb, vehInfo, coords, warp)
local plate = vehInfo.plate
if exports['m-Impound_QB']:isVehicleSeized(plate) then
TriggerClientEvent('QBCore:Notify', source, "Your vehicle is seized!", 'error')
return
else
local veh = QBCore.Functions.SpawnVehicle(source, vehInfo.vehicle, coords, warp)
SetEntityHeading(veh, coords.w)
SetVehicleNumberPlateText(veh, plate)
local vehProps = {}
local result = MySQL.query.await('SELECT mods FROM player_vehicles WHERE plate = ?', {plate})
if result[1] then vehProps = json.decode(result[1].mods) end
local netId = NetworkGetNetworkIdFromEntity(veh)
OutsideVehicles[plate] = {netID = netId, entity = veh}
cb(netId, vehProps)
end
end)okokGarage/sv_utils.lua
Search this:
Replace with this:
Last updated