diff --git a/client/client.lua b/client/client.lua new file mode 100644 index 0000000..80b68fe --- /dev/null +++ b/client/client.lua @@ -0,0 +1,90 @@ +local QBCore = exports['qb-core']:GetCoreObject() + +-- Target Exports + +exports['qb-target']:AddBoxZone("BurgerShotRecipie", Config.CookingLocation, 1.5, 1.6, { + name = "BurgerShotRecipie", -- This is the name of the zone recognized by PolyZone, this has to be unique so it doesn't mess up with other zones + debugPoly = false, -- This is for enabling/disabling the drawing of the box, it accepts only a boolean value (true or false), when true it will draw the polyzone in green + minZ = Config.CookingLocation.z - 1, -- This is the bottom of the polyzone, this can be different from the Z value in the coords, this has to be a float value + maxZ = Config.CookingLocation.z + 1, -- This is the top of the polyzone, this can be different from the Z value in the coords, this has to be a float value + },{ + options = { + { + + action = function() + lib.showContext('bs_recipies') + end, + icon = "fas fa-burger", + label = "Cook Food", + job = Config.JobName, + }, + }, + distance = 2.5 +}) + +exports['qb-target']:AddBoxZone("BurgerShotShop", Config.ShopLocation, 1.5, 1.6, { + name = "BurgerShotShop", -- This is the name of the zone recognized by PolyZone, this has to be unique so it doesn't mess up with other zones + debugPoly = false, -- This is for enabling/disabling the drawing of the box, it accepts only a boolean value (true or false), when true it will draw the polyzone in green + minZ = Config.ShopLocation.z - 1, -- This is the bottom of the polyzone, this can be different from the Z value in the coords, this has to be a float value + maxZ = Config.ShopLocation.z + 1, -- This is the top of the polyzone, this can be different from the Z value in the coords, this has to be a float value + },{ + options = { + { + action = function() + lib.showContext('bs_shop') + end, + icon = "fas fa-shop", + label = "Check Stock", + job = Config.JobName, + }, + }, + distance = 2.5 +}) + +exports['qb-target']:AddBoxZone("BurgerShotStash", Config.StashLocation, 1.5, 1.6, { + name = "BurgerShotStash", -- This is the name of the zone recognized by PolyZone, this has to be unique so it doesn't mess up with other zones + debugPoly = false, -- This is for enabling/disabling the drawing of the box, it accepts only a boolean value (true or false), when true it will draw the polyzone in green + minZ = Config.StashLocation.z - 1, -- This is the bottom of the polyzone, this can be different from the Z value in the coords, this has to be a float value + maxZ = Config.StashLocation.z + 1, -- This is the top of the polyzone, this can be different from the Z value in the coords, this has to be a float value + },{ + options = { + { + type = "client", + event = "tfc-bs-job:client:openStash", + icon = "fas fa-vault", + label = "Check Fridge", + job = Config.JobName, + }, + }, + distance = 2.5 +}) +exports['qb-target']:AddBoxZone("BurgerShotDrink", Config.DrinkLocation, 1, 1, { + name = "BurgerShotDrink", -- This is the name of the zone recognized by PolyZone, this has to be unique so it doesn't mess up with other zones + debugPoly = false, -- This is for enabling/disabling the drawing of the box, it accepts only a boolean value (true or false), when true it will draw the polyzone in green + minZ = Config.DrinkLocation.z - 1, -- This is the bottom of the polyzone, this can be different from the Z value in the coords, this has to be a float value + maxZ = Config.DrinkLocation.z + 1, -- This is the top of the polyzone, this can be different from the Z value in the coords, this has to be a float value + },{ + options = { + { + action = function() + lib.showContext('bs_drinks') + end, + icon = "fas fa-shop", + label = "Get Drink", + job = Config.JobName, + }, + }, + distance = 2.5 +}) +RegisterNetEvent('tfc-bs-job:client:openStash', function() + local PlayerData = QBCore.Functions.GetPlayerData() + + if PlayerData.job.name == Config.JobName then + TriggerServerEvent("ps-inventory:server:OpenInventory", "stash", "BurgerShotStash", {maxweight = 40000, slots = 100}) + TriggerEvent("ps-inventory:client:SetCurrentStash", "BurgerShotStash") + else + QBCore.Functions.Notify('You dont work here!', 'error') + end +end) + + diff --git a/client/drinks.lua b/client/drinks.lua new file mode 100644 index 0000000..b91bf75 --- /dev/null +++ b/client/drinks.lua @@ -0,0 +1,99 @@ +local QBCore = exports['qb-core']:GetCoreObject() +lib.registerContext({ + id = 'bs_drinks', + title = 'Drinks', + options = { + { + title = 'eCola', + description = '$50', + event = 'tfc-bs-job:client:drinkmenu', + arrow = true, + args = { + item = "ecola", + label = "eCola", + price = 50, + } + }, + { + title = 'eCola Light', + description = '$50', + event = 'tfc-bs-job:client:drinkmenu', + arrow = true, + args = { + item = "ecolalight", + label = "eCola Light", + price = 50, + } + }, + { + title = 'Sprunk', + description = '$50', + event = 'tfc-bs-job:client:drinkmenu', + arrow = true, + args = { + item = "sprunk", + label = "Sprunk", + price = 50, + } + }, + { + title = 'Sprunk Light', + description = '$50', + event = 'tfc-bs-job:client:drinkmenu', + arrow = true, + args = { + item = "sprunklight", + label = "Sprunk Light", + price = 50, + } + }, + }, +}) +RegisterNetEvent('tfc-bs-job:client:drinkmenu', function(args) + lib.registerContext({ + id = 'bs_drinkpayment', + title = 'Payment for '..args.label, + options = { + { + title = 'You Owe $'..args.price, + readOnly = true + }, + { + title = 'Cash', + serverEvent = 'tfc-bs-job:server:buy', + args = { + item = args.item, + price = args.price, + label = args.label, + payment = "cash" + } + }, + { + title = 'Bank', + serverEvent = 'tfc-bs-job:server:buy', + args = { + item = args.item, + price = args.price, + label = args.label, + payment = "bank" + } + }, + { + title = 'Back', + icon = 'fas fa-backward', + menu = 'bs_shop', + arrow = false + } + } + }) + lib.showContext('bs_drinkpayment') +end) + +RegisterNetEvent('tfc-bs-job:client:drinkfinished', function() + QBCore.Functions.Notify('Purchase Successful', 'success') + lib.showContext('bs_shop') +end) + +RegisterNetEvent('tfc-bs-job:client:drinkfailed', function() + QBCore.Functions.Notify('You need more money', 'error', 5000) +end) diff --git a/client/recipies.lua b/client/recipies.lua new file mode 100644 index 0000000..d830350 --- /dev/null +++ b/client/recipies.lua @@ -0,0 +1,326 @@ +local QBCore = exports['qb-core']:GetCoreObject() + +local function updatetime() + local level = exports["mz-skills"]:GetCurrentSkill("Cooking").Current + local time + print(level) + if level <= 100 then + time = Config.CookTime + elseif level <=200 then + time = Config.CookTime * 0.9 + elseif level <=400 then + time = Config.CookTime * 0.8 + elseif level <=600 then + time = Config.CookTime * 0.7 + elseif level <=800 then + time = Config.CookTime * 0.6 + else + time = Config.CookTime * 0.5 + end + return time +end + +local function progresscircle() + local ped = PlayerPedId() + TaskTurnPedToFaceCoord(ped, -1196.35, -901.42, 13.89 , 1000) + if lib.progressCircle({ + label = "Cooking", + duration = updatetime(), + position = 'middle', + useWhileDead = false, + canCancel = true, + anim = { + dict = 'amb@prop_human_bbq@male@idle_a', + clip = 'idle_b' + }, + disable = { car = true, move = true, combat = true }, + }) + then + return true + else + return false + end +end + +lib.registerContext({ + id = 'bs_recipies', + title = 'Recipies', + options = { + { + title = 'Burgers', + icon = 'fas fa-burger', + menu = 'bs_burgers', + arrow = true, + }, + { + title = 'Mains', + icon = 'fas fa-bowl-food', + menu = 'bs_mains', + arrow = true, + }, + { + title = 'Sides', + icon = 'fas fa-apple-whole', + menu = 'bs_sides', + arrow = true, + } + } +}) +lib.registerContext({ + id = 'bs_burgers', + title = 'Burgers', + options = { + { + title = 'Burger', + description = '2 bread and 1 Beef', + icon = 'fas fa-burger', + event = 'tfc-bs-job:client:burger', + }, + { + title = 'Cheese Burger', + description = '2 bread, 1 cheddar and 1 Beef', + icon = 'fas fa-burger', + event = 'tfc-bs-job:client:cheddarburger', + }, + { + title = 'Bacon Burger', + description = '2 bread, 1 Pig Meat and 1 Beef', + icon = 'fas fa-burger', + event = 'tfc-bs-job:client:baconburger', + }, + { + title = 'Bacon Cheese Burger', + description = '2 bread, 1 cheddar, 1 Pig Meat and 1 Beef', + icon = 'fas fa-burger', + event = 'tfc-bs-job:client:baconcheddarburger', + }, + { + title = 'Heartstopper Burger', + description = '4 bread, 3 cheddar, 4 Pig Meat and 5 Beef', + icon = 'fas fa-burger', + event = 'tfc-bs-job:client:heartstopperburger', + }, + { + title = 'Back', + icon = 'fas fa-backward', + menu = 'bs_recipies', + arrow = false + } + } +}) +lib.registerContext({ + id = 'bs_mains', + title = 'Mains', + options = { + { + title = 'Chief Salad', + description = '2 tomato, 1 broccoli, 1 pig meat and 3 carrots', + icon = 'fas fa-leaf', + event = 'tfc-bs-job:client:salad', + }, + { + title = 'Pulled Pork Sandwich', + description = '2 bread, 3 pig meat and 5 onion', + icon = 'fas fa-bread-slice', + event = 'tfc-bs-job:client:pulledpork', + }, + { + title = 'Hotdog', + description = '1 pig meat and 1 bread', + icon = 'fas fa-hotdog', + event = 'tfc-bs-job:client:hotdog', + }, + { + title = 'Back', + icon = 'fas fa-backward', + menu = 'bs_recipies', + arrow = false + } + } +}) +lib.registerContext({ + id = 'bs_sides', + title = 'Sides', + options = { + { + title = 'Fries', + description = '4 Potatoes', + icon = 'fas fa-bowl-rice', + event = 'tfc-bs-job:client:fries', + }, + { + title = 'Tits or Tots', + description = '6 Potatoes', + icon = 'fas fa-cubes-stacked', + event = 'tfc-bs-job:client:tots', + }, + { + title = 'Pickle Spears', + description = '6 Pickles', + icon = 'fas fa-cubes-stacked', + event = 'tfc-bs-job:client:spears', + }, + { + title = 'Back', + icon = 'fas fa-backward', + menu = 'bs_recipies', + arrow = false + } + } +}) + +RegisterNetEvent('tfc-bs-job:client:burger', function() + if QBCore.Functions.HasItem('bread', 2) and QBCore.Functions.HasItem('meat_cow', 1) then + if progresscircle() then + TriggerServerEvent('tfc-bs-job:server:MadeBurger') + QBCore.Functions.Notify("You recieved a Burger", "success") + local gain = math.random(1, 3) + exports["mz-skills"]:UpdateSkill("Cooking", gain) + else + QBCore.Functions.Notify("Canceled..", "error") + end + else + QBCore.Functions.Notify("You need some more ingredients!", "error") + end +end) +RegisterNetEvent('tfc-bs-job:client:cheddarburger', function() + if QBCore.Functions.HasItem('bread', 2) and QBCore.Functions.HasItem('meat_cow', 1) and QBCore.Functions.HasItem('cheddar', 1) then + if progresscircle() then + TriggerServerEvent('tfc-bs-job:server:MadeCheeseBurger') + QBCore.Functions.Notify("You recieved a Cheese Burger", "success") + local gain = math.random(1, 4) + exports["mz-skills"]:UpdateSkill("Cooking", gain) + else + QBCore.Functions.Notify("Canceled..", "error") + end + else + QBCore.Functions.Notify("You need some more ingredients!", "error") + end +end) + +RegisterNetEvent('tfc-bs-job:client:baconburger', function() + if QBCore.Functions.HasItem('bread', 2) and QBCore.Functions.HasItem('meat_cow', 1) and QBCore.Functions.HasItem('meat_pig', 1) then + if progresscircle() then + TriggerServerEvent('tfc-bs-job:server:MadeBaconBurger') + QBCore.Functions.Notify("You recieved a Bacon Burger", "success") + local gain = math.random(1, 4) + exports["mz-skills"]:UpdateSkill("Cooking", gain) + else + QBCore.Functions.Notify("Canceled..", "error") + end + else + QBCore.Functions.Notify("You need some more ingredients!", "error") + end +end) +RegisterNetEvent('tfc-bs-job:client:baconcheddarburger', function() + if QBCore.Functions.HasItem('bread', 2) and QBCore.Functions.HasItem('cheddar', 1) and QBCore.Functions.HasItem('meat_cow', 1) and QBCore.Functions.HasItem('meat_pig', 1) then + if progresscircle() then + TriggerServerEvent('tfc-bs-job:server:MadeBaconCheeseBurger') + QBCore.Functions.Notify("You recieved a Bacon Cheese Burger", "success") + local gain = math.random(1, 5) + exports["mz-skills"]:UpdateSkill("Cooking", gain) + else + QBCore.Functions.Notify("Canceled..", "error") + end + else + QBCore.Functions.Notify("You need some more ingredients!", "error") + end +end) +RegisterNetEvent('tfc-bs-job:client:heartstopperburger', function() + if QBCore.Functions.HasItem('bread', 4) and QBCore.Functions.HasItem('cheddar', 4) and QBCore.Functions.HasItem('meat_cow', 5) and QBCore.Functions.HasItem('meat_pig', 4) then + if progresscircle() then + TriggerServerEvent('tfc-bs-job:server:MadeHeartstopperBurger') + QBCore.Functions.Notify("You recieved a Heartstopper Burger", "success") + local gain = math.random(2, 7) + exports["mz-skills"]:UpdateSkill("Cooking", gain) + else + QBCore.Functions.Notify("Canceled..", "error") + end + else + QBCore.Functions.Notify("You need some more ingredients!", "error") + end +end) +RegisterNetEvent('tfc-bs-job:client:salad', function() + if QBCore.Functions.HasItem('tomato', 2) and QBCore.Functions.HasItem('broccoli', 1) and QBCore.Functions.HasItem('meat_pig', 1) and QBCore.Functions.HasItem('carrot', 3) then + if progresscircle() then + TriggerServerEvent('tfc-bs-job:server:MadeSalad') + QBCore.Functions.Notify("You recieved a Salad", "success") + local gain = math.random(1, 5) + exports["mz-skills"]:UpdateSkill("Cooking", gain) + else + QBCore.Functions.Notify("Canceled..", "error") + end + else + QBCore.Functions.Notify("You need some more ingredients!", "error") + end +end) +RegisterNetEvent('tfc-bs-job:client:pulledpork', function() + if QBCore.Functions.HasItem('meat_pig', 3) and QBCore.Functions.HasItem('bread', 2) and QBCore.Functions.HasItem('onion', 5) then + if progresscircle() then + TriggerServerEvent('tfc-bs-job:server:MadePulledPork') + QBCore.Functions.Notify("You recieved a Pulled Pork Sandwich", "success") + local gain = math.random(1, 4) + exports["mz-skills"]:UpdateSkill("Cooking", gain) + else + QBCore.Functions.Notify("Canceled..", "error") + end + else + QBCore.Functions.Notify("You need some more ingredients!", "error") + end +end) +RegisterNetEvent('tfc-bs-job:client:hotdog', function() + if QBCore.Functions.HasItem('meat_pig', 1) and QBCore.Functions.HasItem('bread', 1) then + if progresscircle() then + TriggerServerEvent('tfc-bs-job:server:MadeHotdog') + QBCore.Functions.Notify("You recieved a Hotdog", "success") + local gain = math.random(1, 2) + exports["mz-skills"]:UpdateSkill("Cooking", gain) + else + QBCore.Functions.Notify("Canceled..", "error") + end + else + QBCore.Functions.Notify("You need some more ingredients!", "error") + end +end) +RegisterNetEvent('tfc-bs-job:client:fries', function() + if QBCore.Functions.HasItem('potato', 4) then + if progresscircle() then + TriggerServerEvent('tfc-bs-job:server:MadeFries') + QBCore.Functions.Notify("You recieved Fries", "success") + local gain = math.random(1, 3) + exports["mz-skills"]:UpdateSkill("Cooking", gain) + else + QBCore.Functions.Notify("Canceled..", "error") + end + else + QBCore.Functions.Notify("You need some more ingredients!", "error") + end +end) +RegisterNetEvent('tfc-bs-job:client:tots', function() + if QBCore.Functions.HasItem('potato', 6) then + if progresscircle() then + TriggerServerEvent('tfc-bs-job:server:MadeTots') + QBCore.Functions.Notify("You recieved Tits or Tots", "success") + local gain = math.random(1, 3) + exports["mz-skills"]:UpdateSkill("Cooking", gain) + else + QBCore.Functions.Notify("Canceled..", "error") + end + else + QBCore.Functions.Notify("You need some more ingredients!", "error") + end +end) +RegisterNetEvent('tfc-bs-job:client:spears', function() + if QBCore.Functions.HasItem('pickle', 6) then + if progresscircle() then + TriggerServerEvent('tfc-bs-job:server:MadeSpears') + QBCore.Functions.Notify("You recieved Pickle Spears", "success") + local gain = math.random(1, 3) + exports["mz-skills"]:UpdateSkill("Cooking", gain) + else + QBCore.Functions.Notify("Canceled..", "error") + end + else + QBCore.Functions.Notify("You need some more ingredients!", "error") + end +end) diff --git a/client/shop.lua b/client/shop.lua new file mode 100644 index 0000000..4cbbdc3 --- /dev/null +++ b/client/shop.lua @@ -0,0 +1,191 @@ +local QBCore = exports['qb-core']:GetCoreObject() +lib.registerContext({ + id = 'bs_shop', + title = 'Shop', + options = { + { + title = 'Bread', + description = '$100', + event = 'tfc-bs-job:client:buymenu', + arrow = true, + args = { + item = "bread", + label = "Bread", + price = 100, + } + }, + { + title = 'Cheddar', + description = '$100', + event = 'tfc-bs-job:client:buymenu', + arrow = true, + args = { + item = "cheddar", + label = "Cheddar", + price = 100, + } + }, + { + title = 'Fruits & Veg', + icon = 'fas fa-apple-whole', + menu = 'bs_shop_fruits_veg', + arrow = true, + }, + { + title = 'Meat', + icon = 'fas fa-drumstick-bite', + menu = 'bs_shop_meat', + arrow = true, + } + + } +}) +lib.registerContext({ + id = 'bs_shop_fruits_veg', + title = 'Shop', + options = { + { + title = 'Tomato', + description = '$100', + event = 'tfc-bs-job:client:buymenu', + arrow = true, + args = { + item = "tomato", + label = "Tomato", + price = 100, + } + }, + { + title = 'Broccoli', + description = '$100', + event = 'tfc-bs-job:client:buymenu', + arrow = true, + args = { + item = "broccoli", + label = "Broccoli", + price = 100, + } + }, + { + title = 'Onion', + description = '$100', + event = 'tfc-bs-job:client:buymenu', + arrow = true, + args = { + item = "onion", + label = "Onion", + price = 100, + } + }, + { + title = 'Potato', + description = '$100', + event = 'tfc-bs-job:client:buymenu', + arrow = true, + args = { + item = "potato", + label = "Potato", + price = 100, + } + }, + { + title = 'Pickle', + description = '$100', + event = 'tfc-bs-job:client:buymenu', + arrow = true, + args = { + item = "pickle", + label = "Pickle", + price = 100, + } + }, + { + title = 'Back', + icon = 'fas fa-backward', + menu = 'bs_shop', + arrow = false + } + } +}) +lib.registerContext({ + id = 'bs_shop_meat', + title = 'Shop', + options = { + { + title = 'Pig Meat', + description = '$100', + event = 'tfc-bs-job:client:buymenu', + arrow = true, + args = { + item = "meat_pig", + label = "Pig Meat", + price = 100, + } + }, + { + title = 'Beef', + description = '$100', + event = 'tfc-bs-job:client:buymenu', + arrow = true, + args = { + item = "meat_cow", + label = "Beef", + price = 100, + } + }, + { + title = 'Back', + icon = 'fas fa-backward', + menu = 'bs_shop', + arrow = false + } + } +}) +RegisterNetEvent('tfc-bs-job:client:buymenu', function(args) + lib.registerContext({ + id = 'bs_payment', + title = 'Payment for '..args.label, + options = { + { + title = 'You Owe $'..args.price, + readOnly = true + }, + { + title = 'Cash', + serverEvent = 'tfc-bs-job:server:buy', + args = { + item = args.item, + price = args.price, + label = args.label, + payment = "cash" + } + }, + { + title = 'Bank', + serverEvent = 'tfc-bs-job:server:buy', + args = { + item = args.item, + price = args.price, + label = args.label, + payment = "bank" + } + }, + { + title = 'Back', + icon = 'fas fa-backward', + menu = 'bs_shop', + arrow = false + } + } + }) + lib.showContext('bs_payment') +end) + +RegisterNetEvent('tfc-bs-job:client:buyfinished', function() + QBCore.Functions.Notify('Purchase Successful', 'success') + lib.showContext('bs_shop') +end) + +RegisterNetEvent('tfc-bs-job:client:buyfailed', function() + QBCore.Functions.Notify('You need more money', 'error', 5000) +end) diff --git a/config.lua b/config.lua new file mode 100644 index 0000000..3a07e17 --- /dev/null +++ b/config.lua @@ -0,0 +1,9 @@ +Config = {} + +Config.JobName = "burgershot" +Config.CookTime = 10000 + +Config.CookingLocation = vector3(-1195.90, -899.60, 13.89) +Config.ShopLocation = vector3(-1201.37, -895.90, 14.55) +Config.DrinkLocation = vector3(-1190.76, -899.31, 13.54) +Config.StashLocation = vector3(-1195.46, -902.38, 13.86) diff --git a/fxmanifest.lua b/fxmanifest.lua new file mode 100644 index 0000000..f00bfd0 --- /dev/null +++ b/fxmanifest.lua @@ -0,0 +1,18 @@ +fx_version 'cerulean' +game 'gta5' + +description 'TFC Burgershot Job' +version '1.0.0' +lua54 'yes' + +shared_script { + 'config.lua', + '@ox_lib/init.lua' +} +server_script 'server/*.lua' +client_script 'client/*.lua' + +dependencies { + 'qb-core', + 'qb-target' +} \ No newline at end of file diff --git a/server/server.lua b/server/server.lua new file mode 100644 index 0000000..b187621 --- /dev/null +++ b/server/server.lua @@ -0,0 +1,128 @@ +local QBCore = exports['qb-core']:GetCoreObject() + +RegisterNetEvent("tfc-bs-job:server:buy", function (args) + if not source then return end + local player = QBCore.Functions.GetPlayer(source) + if not player then return end + if player.Functions.GetMoney(args.payment) < args.price then TriggerClientEvent('tfc-bs-job:client:buyfailed', source) else + player.Functions.AddItem(args.item, 1) + player.Functions.RemoveMoney(args.payment, args.price) + TriggerClientEvent('ps-inventory:client:ItemBox', source, QBCore.Shared.Items[args.item], "add") + TriggerClientEvent('tfc-bs-job:client:buyfinished', source) + end +end) + +RegisterNetEvent('tfc-bs-job:server:MadeBurger', function() + local Player = QBCore.Functions.GetPlayer(source) + Player.Functions.AddItem("burger", 1) + Player.Functions.RemoveItem("bread", 2) + Player.Functions.RemoveItem("meat_cow", 1) + TriggerClientEvent('ps-inventory:client:ItemBox', source, QBCore.Shared.Items['burger'], "add") + TriggerClientEvent('ps-inventory:client:ItemBox', source, QBCore.Shared.Items['bread'], "removed", 2) + TriggerClientEvent('ps-inventory:client:ItemBox', source, QBCore.Shared.Items['meat_cow'], "removed") +end) + +RegisterNetEvent('tfc-bs-job:server:MadeCheeseBurger', function() + local Player = QBCore.Functions.GetPlayer(source) + Player.Functions.AddItem("cheeseburger", 1) + Player.Functions.RemoveItem("bread", 2) + Player.Functions.RemoveItem("meat_cow", 1) + Player.Functions.RemoveItem("cheddar", 1) + TriggerClientEvent('ps-inventory:client:ItemBox', source, QBCore.Shared.Items['cheeseburger'], "add") + TriggerClientEvent('ps-inventory:client:ItemBox', source, QBCore.Shared.Items['bread'], "removed", 2) + TriggerClientEvent('ps-inventory:client:ItemBox', source, QBCore.Shared.Items['meat_cow'], "removed") + TriggerClientEvent('ps-inventory:client:ItemBox', source, QBCore.Shared.Items['cheddar'], "removed") +end) + +RegisterNetEvent('tfc-bs-job:server:MadeBaconBurger', function() + local Player = QBCore.Functions.GetPlayer(source) + Player.Functions.AddItem("baconburger", 1) + Player.Functions.RemoveItem("bread", 2) + Player.Functions.RemoveItem("meat_cow", 1) + Player.Functions.RemoveItem("meat_pig", 1) + TriggerClientEvent('ps-inventory:client:ItemBox', source, QBCore.Shared.Items['baconburger'], "add") + TriggerClientEvent('ps-inventory:client:ItemBox', source, QBCore.Shared.Items['bread'], "removed", 2) + TriggerClientEvent('ps-inventory:client:ItemBox', source, QBCore.Shared.Items['meat_cow'], "removed") + TriggerClientEvent('ps-inventory:client:ItemBox', source, QBCore.Shared.Items['meat_pig'], "removed") +end) + +RegisterNetEvent('tfc-bs-job:server:MadeBaconCheeseBurger', function() + local Player = QBCore.Functions.GetPlayer(source) + Player.Functions.AddItem("baconcheeseburger", 1) + Player.Functions.RemoveItem("bread", 2) + Player.Functions.RemoveItem("meat_cow", 1) + Player.Functions.RemoveItem("meat_pig", 1) + Player.Functions.RemoveItem("cheddar", 1) + TriggerClientEvent('ps-inventory:client:ItemBox', source, QBCore.Shared.Items['baconcheeseburger'], "add") + TriggerClientEvent('ps-inventory:client:ItemBox', source, QBCore.Shared.Items['bread'], "removed", 2) + TriggerClientEvent('ps-inventory:client:ItemBox', source, QBCore.Shared.Items['meat_cow'], "removed") + TriggerClientEvent('ps-inventory:client:ItemBox', source, QBCore.Shared.Items['meat_pig'], "removed") + TriggerClientEvent('ps-inventory:client:ItemBox', source, QBCore.Shared.Items['cheddar'], "removed") +end) +RegisterNetEvent('tfc-bs-job:server:MadeHeartstopperBurger', function() + local Player = QBCore.Functions.GetPlayer(source) + Player.Functions.AddItem("heartstopperburger", 1) + Player.Functions.RemoveItem("bread", 4) + Player.Functions.RemoveItem("meat_cow", 5) + Player.Functions.RemoveItem("meat_pig", 4) + Player.Functions.RemoveItem("cheddar", 3) + TriggerClientEvent('ps-inventory:client:ItemBox', source, QBCore.Shared.Items['heartstopperburger'], "add") + TriggerClientEvent('ps-inventory:client:ItemBox', source, QBCore.Shared.Items['bread'], "removed", 4) + TriggerClientEvent('ps-inventory:client:ItemBox', source, QBCore.Shared.Items['meat_cow'], "removed", 5) + TriggerClientEvent('ps-inventory:client:ItemBox', source, QBCore.Shared.Items['meat_pig'], "removed", 4) + TriggerClientEvent('ps-inventory:client:ItemBox', source, QBCore.Shared.Items['cheddar'], "removed", 3) +end) +RegisterNetEvent('tfc-bs-job:server:MadeSalad', function() + local Player = QBCore.Functions.GetPlayer(source) + Player.Functions.AddItem("salad", 1) + Player.Functions.RemoveItem("tomato", 2) + Player.Functions.RemoveItem("broccoli", 1) + Player.Functions.RemoveItem("meat_pig", 1) + Player.Functions.RemoveItem("carrots", 3) + TriggerClientEvent('ps-inventory:client:ItemBox', source, QBCore.Shared.Items['salad'], "add") + TriggerClientEvent('ps-inventory:client:ItemBox', source, QBCore.Shared.Items['tomato'], "removed",2) + TriggerClientEvent('ps-inventory:client:ItemBox', source, QBCore.Shared.Items['broccoli'], "removed") + TriggerClientEvent('ps-inventory:client:ItemBox', source, QBCore.Shared.Items['meat_pig'], "removed") + TriggerClientEvent('ps-inventory:client:ItemBox', source, QBCore.Shared.Items['carrots'], "removed", 3) +end) +RegisterNetEvent('tfc-bs-job:server:MadePulledPork', function() + local Player = QBCore.Functions.GetPlayer(source) + Player.Functions.AddItem("pulledpork", 1) + Player.Functions.RemoveItem("bread", 2) + Player.Functions.RemoveItem("meat_pig", 3) + Player.Functions.RemoveItem("onion", 5) + TriggerClientEvent('ps-inventory:client:ItemBox', source, QBCore.Shared.Items['pulledpork'], "add") + TriggerClientEvent('ps-inventory:client:ItemBox', source, QBCore.Shared.Items['bread'], "removed", 2) + TriggerClientEvent('ps-inventory:client:ItemBox', source, QBCore.Shared.Items['meat_pig'], "removed", 3) + TriggerClientEvent('ps-inventory:client:ItemBox', source, QBCore.Shared.Items['onion'], "removed", 5) +end) +RegisterNetEvent('tfc-bs-job:server:MadeHotdog', function() + local Player = QBCore.Functions.GetPlayer(source) + Player.Functions.AddItem("hotdog", 1) + Player.Functions.RemoveItem("meat_pig", 1) + Player.Functions.RemoveItem("bread", 1) + TriggerClientEvent('ps-inventory:client:ItemBox', source, QBCore.Shared.Items['hotdog'], "add") + TriggerClientEvent('ps-inventory:client:ItemBox', source, QBCore.Shared.Items['meat_pig'], "removed") + TriggerClientEvent('ps-inventory:client:ItemBox', source, QBCore.Shared.Items['bread'], "removed") +end) +RegisterNetEvent('tfc-bs-job:server:MadeFries', function() + local Player = QBCore.Functions.GetPlayer(source) + Player.Functions.AddItem("fries", 1) + Player.Functions.RemoveItem("potato", 4) + TriggerClientEvent('ps-inventory:client:ItemBox', source, QBCore.Shared.Items['fries'], "add") + TriggerClientEvent('ps-inventory:client:ItemBox', source, QBCore.Shared.Items['potato'], "removed", 4) +end) +RegisterNetEvent('tfc-bs-job:server:MadeTots', function() + local Player = QBCore.Functions.GetPlayer(source) + Player.Functions.AddItem("tots", 1) + Player.Functions.RemoveItem("potato", 6) + TriggerClientEvent('ps-inventory:client:ItemBox', source, QBCore.Shared.Items['tots'], "add") + TriggerClientEvent('ps-inventory:client:ItemBox', source, QBCore.Shared.Items['potato'], "removed", 6) +end) +RegisterNetEvent('tfc-bs-job:server:MadeSpears', function() + local Player = QBCore.Functions.GetPlayer(source) + Player.Functions.AddItem("picklespears", 1) + Player.Functions.RemoveItem("pickle", 6) + TriggerClientEvent('ps-inventory:client:ItemBox', source, QBCore.Shared.Items['picklespears'], "add") + TriggerClientEvent('ps-inventory:client:ItemBox', source, QBCore.Shared.Items['pickle'], "removed", 6) +end) \ No newline at end of file