Skip to content

Commit

Permalink
fix: unused argument
Browse files Browse the repository at this point in the history
  • Loading branch information
bitpredator committed Nov 18, 2023
1 parent 6e3962a commit 4f31f77
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .github/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
25. [esx_status]: refactor: remove jquery + Remove some shitty lines @bitpredator
26. [esx_status/server]: fix: unused argument @bitpredator
6 changes: 3 additions & 3 deletions server-data/resources/[esx_addons]/esx_status/server/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ end

AddEventHandler('onResourceStart', function(resourceName)
if (GetCurrentResourceName() ~= resourceName) then
return
return
end

for _, xPlayer in pairs(ESX.Players) do
Expand All @@ -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]

Expand Down

0 comments on commit 4f31f77

Please sign in to comment.