Skip to content

Commit

Permalink
Merge pull request #4 from ITSJORDAN-TFA/patch-2
Browse files Browse the repository at this point in the history
Fix wine processing removing grapes rather than grapejuice
  • Loading branch information
GhzGarage authored Nov 3, 2021
2 parents ecf3e74 + ae56fc6 commit 514cc27
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions server.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ end)
RegisterServerEvent('qb-vineyard:server:loadIngredients')
AddEventHandler('qb-vineyard:server:loadIngredients', function()
local xPlayer = QBCore.Functions.GetPlayer(tonumber(source))
local grape = xPlayer.Functions.GetItemByName('grape')
local grape = xPlayer.Functions.GetItemByName('grapejuice')

if xPlayer.PlayerData.items ~= nil then
if grape ~= nil then
if grape.amount >= 23 then

xPlayer.Functions.RemoveItem("grape", 23, false)
TriggerClientEvent('inventory:client:ItemBox', source, QBCore.Shared.Items['grape'], "remove")
xPlayer.Functions.RemoveItem("grapejuice", 23, false)
TriggerClientEvent('inventory:client:ItemBox', source, QBCore.Shared.Items['grapejuice'], "remove")

TriggerClientEvent("qb-vineyard:client:loadIngredients", source)

Expand Down Expand Up @@ -95,4 +95,4 @@ QBCore.Commands.Add("firevineyard", "Fire a player to the Vineyard!", {{name="id
Player.Functions.SetJob("unemployed")
end
end
end) ]]
end) ]]

0 comments on commit 514cc27

Please sign in to comment.