From b692a11a399141e742aa919ecbd9de6d6faf84ef Mon Sep 17 00:00:00 2001 From: ElPumpo Date: Sun, 5 Aug 2018 20:05:00 +0200 Subject: [PATCH] Fixed #6, vehicle label not model name --- client/main.lua | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/client/main.lua b/client/main.lua index 9c05b436..fd89d907 100644 --- a/client/main.lua +++ b/client/main.lua @@ -75,6 +75,7 @@ function OpenBoatShop(shop) ESX.ShowNotification(_U('boat_shop_bought', data.current.model, data.current.price)) DeleteSpawnedVehicles() + isInShopMenu = false ESX.UI.Menu.CloseAll() CurrentAction = 'boat_shop' @@ -100,7 +101,7 @@ function OpenBoatShop(shop) end, function (data, menu) menu.close() - + isInShopMenu = false DeleteSpawnedVehicles() CurrentAction = 'boat_shop' @@ -141,7 +142,7 @@ function OpenBoatGarage(garage) local elements = {} for i=1, #ownedBoats, 1 do table.insert(elements, { - label = getVehicleModelFromHash(ownedBoats[i].model), + label = getVehicleLabelFromHash(ownedBoats[i].model), vehicleProps = ownedBoats[i] }) end @@ -254,10 +255,10 @@ function DeleteSpawnedVehicles() end end -function getVehicleModelFromHash(hash) +function getVehicleLabelFromHash(hash) for i=1, #Config.Vehicles, 1 do if Config.Vehicles[i].hash == hash then - return Config.Vehicles[i].model + return Config.Vehicles[i].label end end