From 4f31f775b0106c38ef790c894293b7dc87a6e07d Mon Sep 17 00:00:00 2001 From: bitpredator <67551273+bitpredator@users.noreply.github.com> Date: Sat, 18 Nov 2023 17:30:11 +0100 Subject: [PATCH] fix: unused argument --- .github/CHANGELOG.md | 3 ++- .../resources/[esx_addons]/esx_status/server/main.lua | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/CHANGELOG.md b/.github/CHANGELOG.md index 68cfcc761..b8b5f8018 100644 --- a/.github/CHANGELOG.md +++ b/.github/CHANGELOG.md @@ -47,4 +47,5 @@ 22. [bpt_farmer]: chore: clean up the code @bitpredator 23. [bpt_teleport]: chore: clean up the code @bitpredator 24. [mythic_notify]: fix: removed unused variables @bitpredator -25. [esx_status]: refactor: remove jquery + Remove some shitty lines @bitpredator \ No newline at end of file +25. [esx_status]: refactor: remove jquery + Remove some shitty lines @bitpredator +26. [esx_status/server]: fix: unused argument @bitpredator \ No newline at end of file diff --git a/server-data/resources/[esx_addons]/esx_status/server/main.lua b/server-data/resources/[esx_addons]/esx_status/server/main.lua index 8ae24e21a..d7a087505 100644 --- a/server-data/resources/[esx_addons]/esx_status/server/main.lua +++ b/server-data/resources/[esx_addons]/esx_status/server/main.lua @@ -8,7 +8,7 @@ end AddEventHandler('onResourceStart', function(resourceName) if (GetCurrentResourceName() ~= resourceName) then - return + return end for _, xPlayer in pairs(ESX.Players) do @@ -18,13 +18,13 @@ AddEventHandler('onResourceStart', function(resourceName) end end) -AddEventHandler('esx:playerLoaded', function(playerId, xPlayer) +AddEventHandler('esx:playerLoaded', function(_, xPlayer) MySQL.scalar('SELECT status FROM users WHERE identifier = ?', { xPlayer.identifier }, function(result) setPlayerStatus(xPlayer, result) end) end) -AddEventHandler('esx:playerDropped', function(playerId, reason) +AddEventHandler('esx:playerDropped', function(playerId) local xPlayer = ESX.GetPlayerFromId(playerId) local status = ESX.Players[xPlayer.source]