From 467590d56ef2aa3e064943a10d1c335d486d2925 Mon Sep 17 00:00:00 2001 From: Gellipapa Date: Mon, 4 Sep 2023 22:40:27 +0200 Subject: [PATCH 1/2] :rotating_light: Solving backwards compatibility --- [core]/es_extended/server/functions.lua | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/[core]/es_extended/server/functions.lua b/[core]/es_extended/server/functions.lua index d70369a1..6f8f309d 100644 --- a/[core]/es_extended/server/functions.lua +++ b/[core]/es_extended/server/functions.lua @@ -241,8 +241,6 @@ local function checkTable(key, val, player, xPlayers) end function ESX.GetExtendedPlayers(key, val) - if not key then return ESX.Players end - local xPlayers = {} if type(val) == "table" then for _, v in pairs(ESX.Players) do @@ -250,7 +248,11 @@ function ESX.GetExtendedPlayers(key, val) end else for _, v in pairs(ESX.Players) do - if (key == 'job' and v.job.name == val) or v[key] == val then + if key then + if (key == 'job' and v.job.name == val) or v[key] == val then + xPlayers[#xPlayers + 1] = v + end + else xPlayers[#xPlayers + 1] = v end end From 62bf3ddfd0724fb8596f26558713fd4494bfc106 Mon Sep 17 00:00:00 2001 From: Satria Adhi Date: Fri, 29 Dec 2023 12:16:49 +0700 Subject: [PATCH 2/2] Fix checkDOBFormat --- [core]/esx_identity/server/main.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/[core]/esx_identity/server/main.lua b/[core]/esx_identity/server/main.lua index a2884c76..5c638400 100644 --- a/[core]/esx_identity/server/main.lua +++ b/[core]/esx_identity/server/main.lua @@ -45,15 +45,15 @@ local function checkDOBFormat(str) if ((d <= 0) or (d > 31)) or ((m <= 0) or (m > 12)) or ((y <= Config.LowestYear) or (y > Config.HighestYear)) then return false elseif m == 4 or m == 6 or m == 9 or m == 11 then - return d < 30 + return d <= 30 elseif m == 2 then if y % 400 == 0 or (y % 100 ~= 0 and y % 4 == 0) then - return d < 29 + return d <= 29 else - return d < 28 + return d <= 28 end else - return d < 31 + return d <= 31 end end