Skip to content

Commit

Permalink
fix: 0 is not a falsy value
Browse files Browse the repository at this point in the history
  • Loading branch information
TonybynMp4 authored Mar 4, 2024
1 parent 9f95f8f commit e1cfd66
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion client/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ end)

AddStateBagChangeHandler('alcohol', ('player:%s'):format(cache.serverId), function(_, _, value)
if type(value) ~= 'number' then return end
if (not alcoholLevel or alcoholLevel < 0) and value > 0 then
if (not alcoholLevel or alcoholLevel <= 0) and value > 0 then
alcoholLevel = value
SetTimeout(config.delayEffect, drunkLoop)
return
Expand Down

0 comments on commit e1cfd66

Please sign in to comment.