Skip to content
This repository has been archived by the owner on Nov 15, 2022. It is now read-only.

Commit

Permalink
fix(client): don't use keys as vehicle titles for menus
Browse files Browse the repository at this point in the history
Fixes an issue where you could only see one of multiple same vehicles in your garage or impound
  • Loading branch information
LukeWasTakenn committed May 16, 2022
1 parent 1e82a61 commit fe4b857
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions client/client.lua
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,8 @@ RegisterNetEvent('luke_garages:GetImpoundedVehicles', function()
local vehicleModel = GetLabelText(GetDisplayNameFromVehicleModel(data.vehicle.model))
local vehicleTitle = vehicleMake .. ' ' .. vehicleModel

options[vehicleTitle] = {
options[i] = {
title = vehicleTitle,
event = 'luke_garages:ImpoundVehicleMenu',
arrow = true,
description = Locale('plate') .. ': ' .. data.plate, -- Single item so no need to use metadata
Expand Down Expand Up @@ -328,7 +329,8 @@ RegisterNetEvent('luke_garages:GetOwnedVehicles', function()
local vehicleMake = GetLabelText(GetMakeNameFromVehicleModel(data.vehicle.model))
local vehicleModel = GetLabelText(GetDisplayNameFromVehicleModel(data.vehicle.model))
local vehicleTitle = vehicleMake .. ' ' .. vehicleModel
options[vehicleTitle] = {
options[i] = {
title = vehicleTitle,
event = (data.stored == 1 or data.stored == true) and 'luke_garages:VehicleMenu' or nil,
arrow = (data.stored == 1 or data.stored == true) and 'luke_garages:VehicleMenu' or false,
args = {name = vehicleTitle, plate = data.plate, model = vehicleModel, vehicle = data.vehicle},
Expand Down

0 comments on commit fe4b857

Please sign in to comment.