Skip to content

Commit

Permalink
fix: use the right table..
Browse files Browse the repository at this point in the history
  • Loading branch information
TonybynMp4 authored Apr 2, 2024
1 parent b308608 commit a0bb405
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions server/consumables.lua
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ for alcohol, params in pairs(config.consumables.alcohol) do
local player = exports.qbx_core:GetPlayer(source)
if not player then return end

local drank = lib.callback.await('consumables:client:DrinkAlcohol', source, item.alcoholLevel, item.anim, item.prop)
local drank = lib.callback.await('consumables:client:DrinkAlcohol', source, params.alcoholLevel, params.anim, params.prop)
if not drank then return end
if not exports.ox_inventory:RemoveItem(source, item.name, 1, nil, item.slot) then return end
local playerState = Player(source).state
Expand All @@ -51,7 +51,7 @@ for drink, params in pairs(config.consumables.drink) do
local player = exports.qbx_core:GetPlayer(source)
if not player then return end

local drank = lib.callback.await('consumables:client:Drink', source, item.anim, item.prop)
local drank = lib.callback.await('consumables:client:Drink', source, params.anim, params.prop)
if not drank then return end
if not exports.ox_inventory:RemoveItem(source, item.name, 1, nil, item.slot) then return end
local playerState = Player(source).state
Expand All @@ -67,7 +67,7 @@ for food, params in pairs(config.consumables.food) do
local player = exports.qbx_core:GetPlayer(source)
if not player then return end

local ate = lib.callback.await('consumables:client:Eat', source, item.anim, item.prop)
local ate = lib.callback.await('consumables:client:Eat', source, params.anim, params.prop)
if not ate then return end
if not exports.ox_inventory:RemoveItem(source, item.name, 1, nil, item.slot) then return end
local playerState = Player(source).state
Expand Down

0 comments on commit a0bb405

Please sign in to comment.