From 723b03aefb6bafd2d535e5f923d206ea2db7a416 Mon Sep 17 00:00:00 2001 From: Nick Reagan <52389274+NickReagan@users.noreply.github.com> Date: Wed, 29 Jan 2025 20:00:24 -0500 Subject: [PATCH 1/3] Fix changing vehicle extra to false not working Logic switched value to true. Fixed. --- shared/main.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/shared/main.lua b/shared/main.lua index d01b93c..af21db8 100644 --- a/shared/main.lua +++ b/shared/main.lua @@ -77,7 +77,11 @@ function QBShared.SetDefaultVehicleExtras(vehicle, config) end for id, enabled in pairs(config) do - QBShared.ChangeVehicleExtra(vehicle, tonumber(id), type(enabled) == 'boolean' and enabled or true) + if type(enabled) ~= 'boolean' then + enabled = true + end + + QBShared.ChangeVehicleExtra(vehicle, tonumber(id), enabled) end end From 0d3e4648058c18d1fe1d21877a41c742a5cd1134 Mon Sep 17 00:00:00 2001 From: Cocodrulo <142546774+Cocodrulo@users.noreply.github.com> Date: Mon, 17 Feb 2025 18:48:02 +0000 Subject: [PATCH 2/3] Fix warning message by adding white color again --- shared/locale.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shared/locale.lua b/shared/locale.lua index 0491e39..71c9ee3 100644 --- a/shared/locale.lua +++ b/shared/locale.lua @@ -102,7 +102,7 @@ function Locale:t(key, subs) -- At this point we know whether the phrase does not exist for this key else if self.warnOnMissing then - print(('^3Warning: Missing phrase for key: "%s"'):format(key)) + print(('^3Warning: Missing phrase for key: "%s"^0'):format(key)) end if self.fallback then return self.fallback:t(key, subs) From 62e6a6f949da1483e7222de085e9f389732b2f35 Mon Sep 17 00:00:00 2001 From: Miguel Oppermann Date: Sun, 2 Mar 2025 00:42:27 +0100 Subject: [PATCH 3/3] Update functions.lua Fixed a bug that prevented paychecks from working forever once 0 players was hit which typically directly happens on server start. --- server/functions.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/server/functions.lua b/server/functions.lua index 8f81093..ba08307 100644 --- a/server/functions.lua +++ b/server/functions.lua @@ -395,7 +395,10 @@ function QBCore.Functions.CreateVehicle(source, model, vehtype, coords, warp) end function PaycheckInterval() - if not next(QBCore.Players) then return end + if not next(QBCore.Players) then + SetTimeout(QBCore.Config.Money.PayCheckTimeOut * (60 * 1000), PaycheckInterval) -- Prevent paychecks from stopping forever once 0 players + return + end for _, Player in pairs(QBCore.Players) do if not Player then return end local payment = QBShared.Jobs[Player.PlayerData.job.name]['grades'][tostring(Player.PlayerData.job.grade.level)].payment