From d2817e319fdbbe69e2ea97ab66d7f8ec2a9caea0 Mon Sep 17 00:00:00 2001 From: Luna Date: Sat, 4 Nov 2023 22:05:13 -0500 Subject: [PATCH] fix(cb): CB returns 1 vehicle Each vehicle was previously overwriting the first vehicle, resulting in only the last vehicle result being sent to the CB --- server/main.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/main.lua b/server/main.lua index 193993b..0de5a63 100644 --- a/server/main.lua +++ b/server/main.lua @@ -220,7 +220,7 @@ QBCore.Functions.CreateCallback('qb-garages:server:GetPlayerVehicles', function( fullname = VehicleData and VehicleData['name'] or 'Unknown Vehicle' end - Vehicles[#Vehicles] = { + Vehicles[#Vehicles + 1] = { fullname = fullname, brand = VehicleData and VehicleData['brand'] or '', model = VehicleData and VehicleData['name'] or '',