diff --git a/server/consumables.lua b/server/consumables.lua index 882fdfa..f817db4 100644 --- a/server/consumables.lua +++ b/server/consumables.lua @@ -11,7 +11,8 @@ for alcohol, params in pairs(sharedConfig.consumables.alcohol) do local sustenance = player.PlayerData.metadata.thirst + math.random(params.min, params.max) player.Functions.SetMetaData('thirst', sustenance) - Player(source).state:set('alcohol', (Player(source).state.alcohol or 0) + params.alcoholLevel, true) + local playerState = Player(source).state + playerState:set('alcohol', (playerState.alcohol or 0) + params.alcoholLevel, true) TriggerClientEvent('hud:client:UpdateNeeds', source, player.PlayerData.metadata.thirst, sustenance) end)