#CW Gearbox not saving to garage
1 messages · Page 1 of 1 (latest)
`RegisterNetEvent('qb-garages:client:TakeOutGarage', function(data, cb)
local garageType = data.type
local vehicleModel = data.vehicleModel
local vehicle = data.vehicle
local garage = data.garage
local spawnDistance = garage.SpawnDistance and garage.SpawnDistance or Config.SpawnDistance
local parkingSpots = garage.ParkingSpots or {}
local location, heading = GetSpawnLocationAndHeading(garage, garageType, parkingSpots, vehicle, spawnDistance)
if garage.useVehicleSpawner then
SpawnVehicleSpawnerVehicle(vehicleModel, location, heading, cb)
else
if Config.SpawnVehiclesServerside then
QBCore.Functions.TriggerCallback('qb-garage:server:spawnvehicle', function(netId, properties)
local veh = NetToVeh(netId)
if not veh or not netId then
print("ISSUE HERE: ", netId)
end
UpdateSpawnedVehicle(veh, vehicle, heading, garage, properties)
if cb then cb(veh) end
end, vehicle, location, garage.WarpPlayerIntoVehicle or Config.WarpPlayerIntoVehicle and garage.WarpPlayerIntoVehicle == nil)
TriggerEvent("cw-tuning:client:handleTakeOutVehicle", veh)
else
QBCore.Functions.SpawnVehicle(vehicleModel, function(veh)
QBCore.Functions.TriggerCallback('qb-garage:server:GetVehicleProperties', function(properties)
UpdateSpawnedVehicle(veh, vehicle, heading, garage, properties)
if cb then cb(veh) end
end, vehicle.plate)
end, location, true, garage.WarpPlayerIntoVehicle or Config.WarpPlayerIntoVehicle and garage.WarpPlayerIntoVehicle == nil)
end
end
end)`
dont know where to put the event as mine is different to base qb
is it only the gearbox that doesnt save?
Try setting WarpPlayerIntoVehicle to false.
Someone else reported the warp fucks up the tuning
it already is on false
could we go in a vc and ill explain?
I'm at work rn so can't really do vc.
Answer the first question also please
It's just this one i've tested it on the manuel mode
the issue for me is i dont know where to put the event as my garage is different?
Did you try different spots?
yeah man cannot figure it out
Enable debug for cw-tuning
And enable it for gearbox also
It works when you add the transmission right? It just doesnt save?
yeah
Script works fine, just wont save to garage?
And the vehicle has advanced flag in it's handling right?
im using a gta vehicle no clue tbh its the dominator
Try with a tuner car
do u know any tuner cars spawn codes lol?
zr350
I'm fairly certain that vanilla dominator does not have advanced flags. And as mentioned in the readme, the flag existing IS REQUIRED sadly
yeah but the script works fine tho?
still same problem its not saving lol
allg bro no stress do u think later we could go in a vc?
I mean I understand your problem, but a VC wont help if the issue is the placement of the EventTrigger, I don't know that garage script you use so I can't really help there 😅
Are these prints from after you take a car out, or when you apply a part?
When i apply it
fair
Are there no prints when you take the vehicle out?
Why is it fetching a plate with a nil plate?
no clue
What if you put the event trigger at the end of the event you're calling? So just above the last end) in the code yous ent
like so?
still nothing
what do i put for where it says vehicle
i put plate coz the code didnt have a local called veh
It seems to be spawning the vehicle after calling the event? If your prints aren't in some weird order
could it to be with this
i hade it on plate before
is your SpawnVehicleServerSide true or fase?
true
please tell me u do
it needs to be inside the callback
QBCore.Functions.TriggerCallback('qb-garage:server:spawnvehicle', function(netId, properties)
local veh = NetToVeh(netId)
if not veh or not netId then
print("ISSUE HERE: ", netId)
end
So put it after the UpdateSpawnedVehicle