From 619ce7602418665d6677e2922dab54d407516408 Mon Sep 17 00:00:00 2001
From: Taavi <97351942+Taavi-AU@users.noreply.github.com>
Date: Fri, 18 Nov 2022 17:58:55 +0800
Subject: [PATCH 1/2] fixed for spawning unlimited job vehicles
---
[esx_addons]/esx_policejob/client/vehicle.lua | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/[esx_addons]/esx_policejob/client/vehicle.lua b/[esx_addons]/esx_policejob/client/vehicle.lua
index 617b9dc5..34b19e5e 100644
--- a/[esx_addons]/esx_policejob/client/vehicle.lua
+++ b/[esx_addons]/esx_policejob/client/vehicle.lua
@@ -59,9 +59,9 @@ function OpenVehicleSpawnerMenu(type, station, part, partNum)
local vehicleName = GetLabelText(GetDisplayNameFromVehicleModel(props.model))
local label = ('%s - %s: '):format(vehicleName, props.plate)
- if v.stored then
+ if v.stored == 1 then
label = label .. ('%s'):format(TranslateCap('garage_stored'))
- else
+ elseif v.stored == 0 then
label = label .. ('%s'):format(TranslateCap('garage_notstored'))
end
@@ -82,7 +82,7 @@ function OpenVehicleSpawnerMenu(type, station, part, partNum)
align = 'top-left',
elements = garage
}, function(data2, menu2)
- if data2.current.stored then
+ if data2.current.stored == 1 then
local foundSpawn, spawnPoint = GetAvailableVehicleSpawnPoint(station, part, partNum)
if foundSpawn then
From 50755fb90799b94234d3f8b252a051bcc3561822 Mon Sep 17 00:00:00 2001
From: Taavi <97351942+Taavi-AU@users.noreply.github.com>
Date: Fri, 18 Nov 2022 18:01:57 +0800
Subject: [PATCH 2/2] fix for unlimited vehicle spawning
---
[esx_addons]/esx_ambulancejob/client/vehicle.lua | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/[esx_addons]/esx_ambulancejob/client/vehicle.lua b/[esx_addons]/esx_ambulancejob/client/vehicle.lua
index e2c9f412..05ea2719 100644
--- a/[esx_addons]/esx_ambulancejob/client/vehicle.lua
+++ b/[esx_addons]/esx_ambulancejob/client/vehicle.lua
@@ -50,9 +50,9 @@ function OpenVehicleSpawnerMenu(type, hospital, part, partNum)
local vehicleName = GetLabelText(GetDisplayNameFromVehicleModel(props.model))
local label = ('%s - %s: '):format(vehicleName, props.plate)
- if v.stored then
+ if v.stored == 1 then
label = label .. ('%s'):format(TranslateCap('garage_stored'))
- else
+ elseif v.stored == 0 then
label = label .. ('%s'):format(TranslateCap('garage_notstored'))
end
@@ -73,7 +73,7 @@ function OpenVehicleSpawnerMenu(type, hospital, part, partNum)
align = 'top-left',
elements = garage
}, function(data2, menu2)
- if data2.current.stored then
+ if data2.current.stored == 1 then
local foundSpawn, spawnPoint = GetAvailableVehicleSpawnPoint(hospital, part, partNum)
if foundSpawn then