Skip to content

Commit

Permalink
fix: esx_basicneeds\client\main.lua fix lint error
Browse files Browse the repository at this point in the history
  • Loading branch information
bitpredator committed Sep 21, 2023
1 parent 616e6ef commit 4825ae8
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,22 +21,22 @@ AddEventHandler('esx:onPlayerDeath', function()
IsDead = true
end)

AddEventHandler('esx:onPlayerSpawn', function(spawn)
AddEventHandler('esx:onPlayerSpawn', function()
if IsDead then
TriggerEvent('esx_basicneeds:resetStatus')
end

IsDead = false
end)

AddEventHandler('esx_status:loaded', function(status)
TriggerEvent('esx_status:registerStatus', 'hunger', 1000000, '#CFAD0F', function(status)
AddEventHandler('esx_status:loaded', function()
TriggerEvent('esx_status:registerStatus', 'hunger', 1000000, '#CFAD0F', function()
return Config.Visible
end, function(status)
status.remove(100)
end)

TriggerEvent('esx_status:registerStatus', 'thirst', 1000000, '#0C98F1', function(status)
TriggerEvent('esx_status:registerStatus', 'thirst', 1000000, '#0C98F1', function()
return Config.Visible
end, function(status)
status.remove(75)
Expand All @@ -48,7 +48,7 @@ AddEventHandler('esx_status:onTick', function(data)
local prevHealth = GetEntityHealth(playerPed)
local health = prevHealth

for k, v in pairs(data) do
for _, v in pairs(data) do
if v.name == 'hunger' and v.percent == 0 then
if prevHealth <= 150 then
health = health - 5
Expand Down

0 comments on commit 4825ae8

Please sign in to comment.