From 0426e760859f0d73213b499801165e6ad392ca38 Mon Sep 17 00:00:00 2001 From: Arctos2win <116841243+Arctos2win@users.noreply.github.com> Date: Sun, 12 Jan 2025 14:51:20 +0100 Subject: [PATCH 01/10] Update issue templates --- .github/ISSUE_TEMPLATE/bug_report.md | 6 ++---- .github/ISSUE_TEMPLATE/feature_request.md | 4 +--- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index db7c127d..c31700d9 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -2,10 +2,8 @@ name: Bug report about: Create a report to help us improve title: "[Bug] - esx_script - Issue" -labels: bug -assignees: - - TheFantomas - - Gellipapa +labels: bug, enhancement +assignees: Kenshiin13, Arctos2win --- diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index bc4eaaba..bca7278b 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -3,9 +3,7 @@ name: Feature Request about: Help us improve esx with your ideas title: "[Feature Request] - esx_script - Add better configuration" labels: enhancement -assignees: - - TheFantomas - - Gellipapa +assignees: Kenshiin13, Arctos2win --- From 11d3c72b2b883f624077cadcba684048ed1c54c1 Mon Sep 17 00:00:00 2001 From: Arctos2win <116841243+Arctos2win@users.noreply.github.com> Date: Sun, 12 Jan 2025 14:53:05 +0100 Subject: [PATCH 02/10] fix(esx_core): remove enhancement from bug report --- .github/ISSUE_TEMPLATE/bug_report.md | 4 ++-- .github/ISSUE_TEMPLATE/feature_request.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index c31700d9..58408965 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -2,8 +2,8 @@ name: Bug report about: Create a report to help us improve title: "[Bug] - esx_script - Issue" -labels: bug, enhancement -assignees: Kenshiin13, Arctos2win +labels: bug +assignees: Arctos2win, Kenshiin13 --- diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index bca7278b..305b3f1b 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -3,7 +3,7 @@ name: Feature Request about: Help us improve esx with your ideas title: "[Feature Request] - esx_script - Add better configuration" labels: enhancement -assignees: Kenshiin13, Arctos2win +assignees: Arctos2win, Kenshiin13 --- From 4c4dc4496b968cca45bf7c8f2321335689b7b615 Mon Sep 17 00:00:00 2001 From: Kenshin13 <63159154+Kenshiin13@users.noreply.github.com> Date: Fri, 10 Jan 2025 22:20:09 +0100 Subject: [PATCH 03/10] fix(es_extended/client/modules/death): fix death thread on first spawn --- [core]/es_extended/client/modules/death.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/[core]/es_extended/client/modules/death.lua b/[core]/es_extended/client/modules/death.lua index ba3fb846..346c3ce4 100644 --- a/[core]/es_extended/client/modules/death.lua +++ b/[core]/es_extended/client/modules/death.lua @@ -62,6 +62,8 @@ end AddEventHandler("esx:onPlayerSpawn", function() Citizen.CreateThreadNow(function() + while not ESX.PlayerLoaded do Wait(0) end + while ESX.PlayerLoaded and not ESX.PlayerData.dead do if DoesEntityExist(ESX.PlayerData.ped) and (IsPedDeadOrDying(ESX.PlayerData.ped, true) or IsPedFatallyInjured(ESX.PlayerData.ped)) then Death:Died() From 1b40b2cd6091ebe6c09bd8458cc3abb4cd02753a Mon Sep 17 00:00:00 2001 From: Kenshin13 <63159154+Kenshiin13@users.noreply.github.com> Date: Fri, 10 Jan 2025 22:39:23 +0100 Subject: [PATCH 04/10] Merge pull request #1592 from Kenshiin13/fix-death fix(es_extended/client/modules/death): fix death thread on first spawn From 74e76ed6137942b5aa826b9c0031a8cde84f3b23 Mon Sep 17 00:00:00 2001 From: Manifest Bumper <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 23 Jan 2025 21:29:23 +0000 Subject: [PATCH 05/10] chore: bump manifest version to 1.12.4 --- [core]/cron/fxmanifest.lua | 2 +- [core]/es_extended/fxmanifest.lua | 2 +- [core]/esx_chat_theme/fxmanifest.lua | 2 +- [core]/esx_context/fxmanifest.lua | 2 +- [core]/esx_identity/fxmanifest.lua | 2 +- [core]/esx_loadingscreen/fxmanifest.lua | 2 +- [core]/esx_menu_default/fxmanifest.lua | 2 +- [core]/esx_menu_dialog/fxmanifest.lua | 2 +- [core]/esx_menu_list/fxmanifest.lua | 2 +- [core]/esx_multicharacter/fxmanifest.lua | 2 +- [core]/esx_notify/fxmanifest.lua | 2 +- [core]/esx_progressbar/fxmanifest.lua | 2 +- [core]/esx_skin/fxmanifest.lua | 2 +- [core]/esx_textui/fxmanifest.lua | 2 +- [core]/skinchanger/fxmanifest.lua | 2 +- 15 files changed, 15 insertions(+), 15 deletions(-) diff --git a/[core]/cron/fxmanifest.lua b/[core]/cron/fxmanifest.lua index db502695..fef53dc8 100644 --- a/[core]/cron/fxmanifest.lua +++ b/[core]/cron/fxmanifest.lua @@ -4,6 +4,6 @@ game 'gta5' author 'ESX-Framework' description 'Allows resources to Run tasks at specific intervals.' lua54 'yes' -version '1.12.3' +version '1.12.4' server_script 'server/main.lua' diff --git a/[core]/es_extended/fxmanifest.lua b/[core]/es_extended/fxmanifest.lua index a579d4ee..28140c36 100644 --- a/[core]/es_extended/fxmanifest.lua +++ b/[core]/es_extended/fxmanifest.lua @@ -3,7 +3,7 @@ fx_version 'cerulean' game 'gta5' description 'The Core resource that provides the functionalities for all other resources.' lua54 'yes' -version '1.12.3' +version '1.12.4' shared_scripts { 'locale.lua', diff --git a/[core]/esx_chat_theme/fxmanifest.lua b/[core]/esx_chat_theme/fxmanifest.lua index 704c76b3..a907d6cb 100644 --- a/[core]/esx_chat_theme/fxmanifest.lua +++ b/[core]/esx_chat_theme/fxmanifest.lua @@ -1,4 +1,4 @@ -version '1.12.3' +version '1.12.4' author 'ESX-Framework' description 'A ESX Stylised theme for the chat resource.' diff --git a/[core]/esx_context/fxmanifest.lua b/[core]/esx_context/fxmanifest.lua index 4be9c618..b7ddfaa7 100644 --- a/[core]/esx_context/fxmanifest.lua +++ b/[core]/esx_context/fxmanifest.lua @@ -4,7 +4,7 @@ game 'gta5' author 'ESX-Framework & Brayden' description 'A simplistic context menu for ESX.' lua54 'yes' -version '1.12.3' +version '1.12.4' ui_page 'index.html' diff --git a/[core]/esx_identity/fxmanifest.lua b/[core]/esx_identity/fxmanifest.lua index 1ff5e2de..bc380fc8 100644 --- a/[core]/esx_identity/fxmanifest.lua +++ b/[core]/esx_identity/fxmanifest.lua @@ -3,7 +3,7 @@ fx_version 'adamant' game 'gta5' description 'Allows the player to Pick their characters: Name, Gender, Height and Date-of-birth.' lua54 'yes' -version '1.12.3' +version '1.12.4' shared_scripts { '@es_extended/imports.lua', diff --git a/[core]/esx_loadingscreen/fxmanifest.lua b/[core]/esx_loadingscreen/fxmanifest.lua index 9c5eba20..72130911 100644 --- a/[core]/esx_loadingscreen/fxmanifest.lua +++ b/[core]/esx_loadingscreen/fxmanifest.lua @@ -3,7 +3,7 @@ game 'common' fx_version 'cerulean' author 'ESX-Framework' description 'Allows resources to Run tasks at specific intervals.' -version '1.12.3' +version '1.12.4' lua54 'yes' loadscreen 'index.html' diff --git a/[core]/esx_menu_default/fxmanifest.lua b/[core]/esx_menu_default/fxmanifest.lua index fc171998..2dc064e6 100644 --- a/[core]/esx_menu_default/fxmanifest.lua +++ b/[core]/esx_menu_default/fxmanifest.lua @@ -3,7 +3,7 @@ fx_version 'adamant' game 'gta5' description 'A basic menu system for ESX Legacy.' lua54 'yes' -version '1.12.3' +version '1.12.4' client_scripts { '@es_extended/imports.lua', 'client/main.lua' } diff --git a/[core]/esx_menu_dialog/fxmanifest.lua b/[core]/esx_menu_dialog/fxmanifest.lua index 09350575..a1d41f8e 100644 --- a/[core]/esx_menu_dialog/fxmanifest.lua +++ b/[core]/esx_menu_dialog/fxmanifest.lua @@ -3,7 +3,7 @@ fx_version 'adamant' game 'gta5' description 'A basic input dialog for ESX Legacy.' lua54 'yes' -version '1.12.3' +version '1.12.4' client_scripts { '@es_extended/imports.lua', diff --git a/[core]/esx_menu_list/fxmanifest.lua b/[core]/esx_menu_list/fxmanifest.lua index f0f4b534..ddb7b53f 100644 --- a/[core]/esx_menu_list/fxmanifest.lua +++ b/[core]/esx_menu_list/fxmanifest.lua @@ -3,7 +3,7 @@ fx_version 'adamant' game 'gta5' description 'A basic table-based menu system for ESX Legacy.' lua54 'yes' -version '1.12.3' +version '1.12.4' client_scripts { diff --git a/[core]/esx_multicharacter/fxmanifest.lua b/[core]/esx_multicharacter/fxmanifest.lua index 670945b9..3f0e7c09 100644 --- a/[core]/esx_multicharacter/fxmanifest.lua +++ b/[core]/esx_multicharacter/fxmanifest.lua @@ -3,7 +3,7 @@ fx_version 'cerulean' game 'gta5' author 'ESX-Framework - Linden - KASH' description 'Allows players to have multiple characters on the same account.' -version '1.12.3' +version '1.12.4' lua54 'yes' dependencies { 'es_extended', 'esx_context', 'esx_identity', 'esx_skin' } diff --git a/[core]/esx_notify/fxmanifest.lua b/[core]/esx_notify/fxmanifest.lua index dd554681..a7e1b45d 100644 --- a/[core]/esx_notify/fxmanifest.lua +++ b/[core]/esx_notify/fxmanifest.lua @@ -2,7 +2,7 @@ fx_version 'adamant' lua54 'yes' game 'gta5' -version '1.12.3' +version '1.12.4' author 'ESX-Framework' description 'A beautiful and simple NUI notification system for ESX' diff --git a/[core]/esx_progressbar/fxmanifest.lua b/[core]/esx_progressbar/fxmanifest.lua index 2180b57f..d4a43ac3 100644 --- a/[core]/esx_progressbar/fxmanifest.lua +++ b/[core]/esx_progressbar/fxmanifest.lua @@ -3,7 +3,7 @@ fx_version 'adamant' game 'gta5' author 'ESX-Framework' description 'A beautiful and simple NUI progress bar for ESX' -version '1.12.3' +version '1.12.4' lua54 'yes' client_scripts { 'Progress.lua' } diff --git a/[core]/esx_skin/fxmanifest.lua b/[core]/esx_skin/fxmanifest.lua index 25569210..2ff7a368 100644 --- a/[core]/esx_skin/fxmanifest.lua +++ b/[core]/esx_skin/fxmanifest.lua @@ -2,7 +2,7 @@ fx_version 'adamant' game 'gta5' description 'Allows players to customise their character\'s appearance' -version '1.12.3' +version '1.12.4' lua54 'yes' shared_scripts { diff --git a/[core]/esx_textui/fxmanifest.lua b/[core]/esx_textui/fxmanifest.lua index 0fdd5605..69effe80 100644 --- a/[core]/esx_textui/fxmanifest.lua +++ b/[core]/esx_textui/fxmanifest.lua @@ -3,7 +3,7 @@ fx_version 'adamant' game 'gta5' author 'ESX-Framework' description 'A beautiful and simple Persistent Notification system for ESX.' -version '1.12.3' +version '1.12.4' lua54 'yes' client_scripts { 'TextUI.lua' } diff --git a/[core]/skinchanger/fxmanifest.lua b/[core]/skinchanger/fxmanifest.lua index 288bd751..d3ea6cb3 100644 --- a/[core]/skinchanger/fxmanifest.lua +++ b/[core]/skinchanger/fxmanifest.lua @@ -2,7 +2,7 @@ fx_version 'adamant' game 'gta5' description 'Saves/loads character appearances for ESX Legacy.' -version '1.12.3' +version '1.12.4' lua54 'yes' client_scripts { From 9083a7152645632cb2e84616e2a300d5aa3dabfb Mon Sep 17 00:00:00 2001 From: iSentrie Date: Sun, 2 Mar 2025 11:49:04 +0200 Subject: [PATCH 06/10] fix(functions.lua): IsPlayerAdmin group fix Function failed to properly detect is player admin or not, while GetPlayerFromId function was receiving a string instead of number. --- [core]/es_extended/server/functions.lua | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/[core]/es_extended/server/functions.lua b/[core]/es_extended/server/functions.lua index 12417065..2a57fc0f 100644 --- a/[core]/es_extended/server/functions.lua +++ b/[core]/es_extended/server/functions.lua @@ -612,11 +612,14 @@ end ---@param playerId string | number ---@return boolean function Core.IsPlayerAdmin(playerId) - playerId = tostring(playerId) - if (IsPlayerAceAllowed(playerId, "command") or GetConvar("sv_lan", "") == "true") then + local playerSrc = tostring(playerId) + + if IsPlayerAceAllowed(playerSrc, "command") or GetConvar("sv_lan", "") == "true" then return true end - local xPlayer = ESX.Players[playerId] - return (xPlayer and Config.AdminGroups[xPlayer.group] and true) or false + local xPlayer = ESX.GetPlayerFromId(tonumber(playerId)) + if not xPlayer then return false end + + return Config.AdminGroups[xPlayer.getGroup()] or false end From 88a415a2b6383b86a34be76068cca54cd55972cb Mon Sep 17 00:00:00 2001 From: iSentrie Date: Sun, 9 Mar 2025 23:29:52 +0200 Subject: [PATCH 07/10] Update functions.lua --- [core]/es_extended/server/functions.lua | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/[core]/es_extended/server/functions.lua b/[core]/es_extended/server/functions.lua index 2a57fc0f..447a3e51 100644 --- a/[core]/es_extended/server/functions.lua +++ b/[core]/es_extended/server/functions.lua @@ -612,13 +612,11 @@ end ---@param playerId string | number ---@return boolean function Core.IsPlayerAdmin(playerId) - local playerSrc = tostring(playerId) - - if IsPlayerAceAllowed(playerSrc, "command") or GetConvar("sv_lan", "") == "true" then + if IsPlayerAceAllowed(playerId, "command") or GetConvar("sv_lan", "") == "true" then return true end - local xPlayer = ESX.GetPlayerFromId(tonumber(playerId)) + local xPlayer = ESX.GetPlayerFromId(playerId) if not xPlayer then return false end return Config.AdminGroups[xPlayer.getGroup()] or false From eb1a2b992371bfa4685eabeced7421f5b2e0cbfd Mon Sep 17 00:00:00 2001 From: iSentrie Date: Sun, 9 Mar 2025 23:39:57 +0200 Subject: [PATCH 08/10] Update functions.lua --- [core]/es_extended/server/functions.lua | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/[core]/es_extended/server/functions.lua b/[core]/es_extended/server/functions.lua index 447a3e51..b571501c 100644 --- a/[core]/es_extended/server/functions.lua +++ b/[core]/es_extended/server/functions.lua @@ -609,15 +609,21 @@ function ESX.DoesJobExist(job, grade) return (ESX.Jobs[job] and ESX.Jobs[job].grades[tostring(grade)] ~= nil) or false end ----@param playerId string | number +---@param playerSrc number ---@return boolean -function Core.IsPlayerAdmin(playerId) - if IsPlayerAceAllowed(playerId, "command") or GetConvar("sv_lan", "") == "true" then +function Core.IsPlayerAdmin(playerSrc) + if type(playerSrc) ~= "number" then + return false + end + + if IsPlayerAceAllowed(tostring(playerSrc), "command") or GetConvar("sv_lan", "") == "true" then return true end - local xPlayer = ESX.GetPlayerFromId(playerId) - if not xPlayer then return false end + local xPlayer = ESX.GetPlayerFromId(playerSrc) + if not xPlayer then + return false + end return Config.AdminGroups[xPlayer.getGroup()] or false end From 23915d15088e23459381137c7847106c0c2515e6 Mon Sep 17 00:00:00 2001 From: iSentrie Date: Sun, 9 Mar 2025 23:42:54 +0200 Subject: [PATCH 09/10] Update functions.lua --- [core]/es_extended/server/functions.lua | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/[core]/es_extended/server/functions.lua b/[core]/es_extended/server/functions.lua index b571501c..ccdfb584 100644 --- a/[core]/es_extended/server/functions.lua +++ b/[core]/es_extended/server/functions.lua @@ -621,9 +621,5 @@ function Core.IsPlayerAdmin(playerSrc) end local xPlayer = ESX.GetPlayerFromId(playerSrc) - if not xPlayer then - return false - end - - return Config.AdminGroups[xPlayer.getGroup()] or false + return xPlayer and Config.AdminGroups[xPlayer.getGroup()] or false end From 5bb75de78fb16ffe868e44469f1e91ef90faedc3 Mon Sep 17 00:00:00 2001 From: iSentrie Date: Mon, 10 Mar 2025 00:11:09 +0200 Subject: [PATCH 10/10] Update functions.lua --- [core]/es_extended/server/functions.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/[core]/es_extended/server/functions.lua b/[core]/es_extended/server/functions.lua index 501ff357..5ba47867 100644 --- a/[core]/es_extended/server/functions.lua +++ b/[core]/es_extended/server/functions.lua @@ -633,7 +633,7 @@ function Core.IsPlayerAdmin(playerSrc) return false end - if IsPlayerAceAllowed(tostring(playerSrc), "command") or GetConvar("sv_lan", "") == "true" then + if IsPlayerAceAllowed(playerSrc --[[@as string]], "command") or GetConvar("sv_lan", "") == "true" then return true end