From 9a4ba06232cd427616b38812f8b4a9b108a46569 Mon Sep 17 00:00:00 2001 From: Gellipapa Date: Thu, 29 Feb 2024 21:25:48 +0100 Subject: [PATCH] :bug: Fixed invalid model name in context menu --- client/main.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/client/main.lua b/client/main.lua index b95ba90..7259561 100644 --- a/client/main.lua +++ b/client/main.lua @@ -216,11 +216,11 @@ function DeleteSpawnedVehicles() end end -function getVehicleLabelFromHash(hash) - local model = string.lower(GetDisplayNameFromVehicleModel(hash)) - +function getVehicleLabelFromHash(modelHash) + local model = string.lower(GetDisplayNameFromVehicleModel(modelHash)) + for i=1, #Config.Vehicles, 1 do - if Config.Vehicles[i].model == model then + if joaat(Config.Vehicles[i].model) == modelHash then return Config.Vehicles[i].label end end