From 97817a3d1c7f860eff0350efbe3d6ffc600ce160 Mon Sep 17 00:00:00 2001 From: Randolio <103154494+Randolio@users.noreply.github.com> Date: Tue, 28 Nov 2023 08:16:31 +0000 Subject: [PATCH 1/3] compat(qb): fix for qbx_admin but still supports both qb and qbx. --- compatability/qb/server.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/compatability/qb/server.lua b/compatability/qb/server.lua index af424b2..04f8815 100644 --- a/compatability/qb/server.lua +++ b/compatability/qb/server.lua @@ -75,8 +75,10 @@ RegisterNetEvent('qb-weathersync:server:setTime', function(hour, minute) if not IsPlayerAceAllowed(source, 'command.time') then return end + local h = tonumber(hour) + local m = tonumber(minute) or 00 globalState.currentTime = { - hour = hour, - minute = minute, + hour = h, + minute = m, } end) From 1db0a81f35f2bbc70254a62fd1283025cb2f6fe7 Mon Sep 17 00:00:00 2001 From: Randolio <103154494+Randolio@users.noreply.github.com> Date: Tue, 28 Nov 2023 14:22:20 +0000 Subject: [PATCH 2/3] Update server.lua --- compatability/qb/server.lua | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/compatability/qb/server.lua b/compatability/qb/server.lua index 04f8815..65c240c 100644 --- a/compatability/qb/server.lua +++ b/compatability/qb/server.lua @@ -75,10 +75,8 @@ RegisterNetEvent('qb-weathersync:server:setTime', function(hour, minute) if not IsPlayerAceAllowed(source, 'command.time') then return end - local h = tonumber(hour) - local m = tonumber(minute) or 00 globalState.currentTime = { - hour = h, - minute = m, - } + hour = tonumber(hour), + minute = tonumber(minute) or 0, + } end) From f157182e6598a2f28dda7be8dda926f9308a0768 Mon Sep 17 00:00:00 2001 From: Randolio <103154494+Randolio@users.noreply.github.com> Date: Tue, 28 Nov 2023 14:26:34 +0000 Subject: [PATCH 3/3] Update server.lua