diff --git a/README.md b/README.md index 6b24187..5da8d5e 100644 --- a/README.md +++ b/README.md @@ -10,8 +10,8 @@ International License][cc-by-nc-sa]. # qb-simplefarming Farming script for QBCore -Included -- Easy to use config +Included +- Easy to use config - The ability to change notification language - Icons (100x100) - Map (ymap) diff --git a/client/farms.lua b/client/farms.lua index fbd157f..2f778cf 100644 --- a/client/farms.lua +++ b/client/farms.lua @@ -3,7 +3,7 @@ AppleField = { label = "Apple Farm", BlipCoord = vector3(2395.57, 4704.02, 33.65), Blip = 1, - BlipColor = 2, + BlipColor = 2, zones = { vector2(2452.8928222656, 4672.4086914062), vector2(2439.8227539062, 4687.1166992188), @@ -29,7 +29,7 @@ AppleField = { label = "Apple Farm", BlipCoord = vector3(229.14, 6511.47, 31.3), Blip = 1, - BlipColor = 2, + BlipColor = 2, zones = { vector2(289.20321655273, 6502.2163085938), vector2(287.77514648438, 6536.603515625), @@ -44,7 +44,7 @@ AppleField = { label = "Apple Farm", BlipCoord = vector3(344.48, 6516.05, 28.98), Blip = 1, - BlipColor = 2, + BlipColor = 2, zones = { vector2(382.51480102539, 6501.0625), vector2(381.90463256836, 6536.7026367188), @@ -58,7 +58,7 @@ AppleField = { label = "Apple Farm", BlipCoord = vector3(2360.18, 5001.98, 43.37), Blip = 1, - BlipColor = 2, + BlipColor = 2, zones = { vector2(2399.5366210938, 4999.3530273438), vector2(2366.2536621094, 5033.7846679688), @@ -77,7 +77,7 @@ AppleField = { label = "Apple Farm", BlipCoord = vector3(2067.21, 4830.06, 43.28), Blip = 1, - BlipColor = 2, + BlipColor = 2, zones = { vector2(2152.3620605469, 4867.8896484375), vector2(2121.8264160156, 4895.2124023438), @@ -100,7 +100,7 @@ Barns = { label = "Barn", BlipCoord = vector3(427.27, 6467.9, 33.06), Blip = 569, - BlipColor = 1, + BlipColor = 1, zones = { vector2(427.27011108398, 6482.0576171875), vector2(414.93353271484, 6467.5634765625), @@ -163,7 +163,7 @@ Garden = { vector2(368.35971069336, 6457.5698242188) }, minZ = 28.7, - maxZ = 31.1 + maxZ = 31.1 }, [2] = { label = "Tomatoe Garden", diff --git a/client/fields.lua b/client/fields.lua index 8377d69..12f40a7 100644 --- a/client/fields.lua +++ b/client/fields.lua @@ -984,7 +984,7 @@ CowFarming2 = { maxZ=29.37, distance = 1.2, }, -} +} CowFarming3 = { { Name = math.random(1,99999999999999999999999), @@ -1118,12 +1118,12 @@ GrapeFields = { maxZ=30.36, distance = 5, }, -} +} GPeppersFields = { { - Name = math.random(1,99999999999999999999999), + Name = math.random(1,99999999999999999999999), Coords = vector3(356.92, 6473.85, 29.87), length = 2.0, width = 23.0, @@ -1133,7 +1133,7 @@ GPeppersFields = { distance = 5, }, { - Name = math.random(1,99999999999999999999999), + Name = math.random(1,99999999999999999999999), Coords = vector3(329.02, 6473.51, 29.91), length = 2.0, width = 23.0, @@ -1142,11 +1142,11 @@ GPeppersFields = { maxZ=31.36, distance = 5, }, -} +} CPeppersFields = { { - Name = math.random(1,99999999999999999999999), + Name = math.random(1,99999999999999999999999), Coords = vector3(350.2, 6473.89, 29.9), length = 2.0, width = 23.0, @@ -1160,7 +1160,7 @@ CPeppersFields = { TomatoesField = { { - Name = math.random(1,99999999999999999999999), + Name = math.random(1,99999999999999999999999), Coords = vector3(322.17, 6472.49, 29.96), length = 2.0, width = 23.0, @@ -1170,7 +1170,7 @@ TomatoesField = { distance = 5, }, { - Name = math.random(1,99999999999999999999999), + Name = math.random(1,99999999999999999999999), Coords = vector3(2290.14, 4760.52, 38.45), length = 11.8, width = 2.0, @@ -1180,7 +1180,7 @@ TomatoesField = { distance = 5, }, { - Name = math.random(1,99999999999999999999999), + Name = math.random(1,99999999999999999999999), Coords = vector3(2284.07, 4766.46, 38.62), length = 20.8, width = 2.0, @@ -1303,12 +1303,12 @@ BigGrapeFields = { maxZ=45.81, distance = 5, }, -} +} BigGreenPepperFields = { { - Name = math.random(1,99999999999999999999999), + Name = math.random(1,99999999999999999999999), Coords = vector3(2005.03, 4832.2, 42.39), length = 2.0, width = 11.0, @@ -1318,7 +1318,7 @@ BigGreenPepperFields = { distance = 5, }, { - Name = math.random(1,99999999999999999999999), + Name = math.random(1,99999999999999999999999), Coords = vector3(1990.39, 4847.37, 43.93), length = 2.0, width = 11.0, @@ -1328,7 +1328,7 @@ BigGreenPepperFields = { distance = 5, }, { - Name = math.random(1,99999999999999999999999), + Name = math.random(1,99999999999999999999999), Coords = vector3(1950.36, 4899.32, 45.31), length = 2.0, width = 11.0, @@ -1338,7 +1338,7 @@ BigGreenPepperFields = { distance = 5, }, { - Name = math.random(1,99999999999999999999999), + Name = math.random(1,99999999999999999999999), Coords = vector3(1940.63, 4908.97, 45.63), length = 2.0, width = 11.0, @@ -1348,7 +1348,7 @@ BigGreenPepperFields = { distance = 5, }, { - Name = math.random(1,99999999999999999999999), + Name = math.random(1,99999999999999999999999), Coords = vector3(1909.42, 4850.82, 46.83), length = 2.0, width = 11.0, @@ -1358,7 +1358,7 @@ BigGreenPepperFields = { distance = 5, }, { - Name = math.random(1,99999999999999999999999), + Name = math.random(1,99999999999999999999999), Coords = vector3(1895.87, 4864.11, 46.54), length = 2.0, width = 11.0, @@ -1368,7 +1368,7 @@ BigGreenPepperFields = { distance = 5, }, { - Name = math.random(1,99999999999999999999999), + Name = math.random(1,99999999999999999999999), Coords = vector3(1889.45, 4856.51, 45.63), length = 2.0, width = 11.0, @@ -1378,7 +1378,7 @@ BigGreenPepperFields = { distance = 5, }, { - Name = math.random(1,99999999999999999999999), + Name = math.random(1,99999999999999999999999), Coords = vector3(1902.78, 4843.23, 46.35), length = 2.0, width = 11.0, @@ -1387,7 +1387,7 @@ BigGreenPepperFields = { maxZ=46.55, distance = 5, }, -} +} BigChillyPepperFields = { { @@ -1455,7 +1455,7 @@ BigChillyPepperFields = { BigTomatoesFields = { { - Name = math.random(1,99999999999999999999999), + Name = math.random(1,99999999999999999999999), Coords = vector3(1984.67, 4806.66, 42.52), length = 2.0, width = 11.0, @@ -1465,7 +1465,7 @@ BigTomatoesFields = { distance = 5, }, { - Name = math.random(1,99999999999999999999999), + Name = math.random(1,99999999999999999999999), Coords = vector3(1966.44, 4825.11, 43.55), length = 2.0, width = 11.0, @@ -1475,7 +1475,7 @@ BigTomatoesFields = { distance = 5, }, { - Name = math.random(1,99999999999999999999999), + Name = math.random(1,99999999999999999999999), Coords = vector3(1926.41, 4867.16, 47.09), length = 2.0, width = 11.0, @@ -1485,7 +1485,7 @@ BigTomatoesFields = { distance = 5, }, { - Name = math.random(1,99999999999999999999999), + Name = math.random(1,99999999999999999999999), Coords = vector3(1906.03, 4887.31, 47.25), length = 2.0, width = 11.0, @@ -1495,7 +1495,7 @@ BigTomatoesFields = { distance = 5, }, { - Name = math.random(1,99999999999999999999999), + Name = math.random(1,99999999999999999999999), Coords = vector3(1879.68, 4847.43, 45.3), length = 2.0, width = 11.0, @@ -1505,7 +1505,7 @@ BigTomatoesFields = { distance = 5, }, { - Name = math.random(1,99999999999999999999999), + Name = math.random(1,99999999999999999999999), Coords = vector3(1893.68, 4834.01, 45.89), length = 2.0, width = 11.0, @@ -1515,7 +1515,7 @@ BigTomatoesFields = { distance = 5, }, { - Name = math.random(1,99999999999999999999999), + Name = math.random(1,99999999999999999999999), Coords = vector3(1931.77, 4818.85, 44.46), length = 2.0, width = 11.0, @@ -1528,7 +1528,7 @@ BigTomatoesFields = { PigPens1 = { { - Name = math.random(1,99999999999999999999999), + Name = math.random(1,99999999999999999999999), Coords = vector3(2149.72, 5013.18, 41.42), length = 9.8, width = 9.6, @@ -1541,7 +1541,7 @@ PigPens1 = { PigPens2 = { { - Name = math.random(1,99999999999999999999999), + Name = math.random(1,99999999999999999999999), Coords = vector3(2142.85, 5006.39, 41.38), length = 9.8, width = 9.0, @@ -1554,7 +1554,7 @@ PigPens2 = { PigPens3 = { { - Name = math.random(1,99999999999999999999999), + Name = math.random(1,99999999999999999999999), Coords = vector3(2135.11, 4998.56, 41.41), length = 9.8, width = 9.3, @@ -1567,8 +1567,8 @@ PigPens3 = { PigPens4 = { { - Name = math.random(1,99999999999999999999999), - Coords = vector3(2128.18, 4991.77, 41.46), + Name = math.random(1,99999999999999999999999), + Coords = vector3(2128.18, 4991.77, 41.46), length = 9.8, width = 9.3, heading = 45, @@ -1580,8 +1580,8 @@ PigPens4 = { PigPens5 = { { - Name = math.random(1,99999999999999999999999), - Coords = vector3(2144.2, 4974.91, 41.5), + Name = math.random(1,99999999999999999999999), + Coords = vector3(2144.2, 4974.91, 41.5), length = 9.8, width = 9.3, heading = 45, @@ -1593,8 +1593,8 @@ PigPens5 = { PigPens6 = { { - Name = math.random(1,99999999999999999999999), - Coords = vector3(2151.32, 4982.25, 41.41), + Name = math.random(1,99999999999999999999999), + Coords = vector3(2151.32, 4982.25, 41.41), length = 9.2, width = 9.3, heading = 45, @@ -1606,8 +1606,8 @@ PigPens6 = { PigPens7 = { { - Name = math.random(1,99999999999999999999999), - Coords = vector3(2158.47, 4989.62, 41.39), + Name = math.random(1,99999999999999999999999), + Coords = vector3(2158.47, 4989.62, 41.39), length = 8.4, width = 9.8, heading = 45, @@ -1619,8 +1619,8 @@ PigPens7 = { PigPens8 = { { - Name = math.random(1,99999999999999999999999), - Coords = vector3(2165.78, 4996.3, 41.43), + Name = math.random(1,99999999999999999999999), + Coords = vector3(2165.78, 4996.3, 41.43), length = 9.6, width = 9.4, heading = 45, @@ -1632,8 +1632,8 @@ PigPens8 = { PigPens9 = { { - Name = math.random(1,99999999999999999999999), - Coords = vector3(2176.93, 4986.21, 41.32), + Name = math.random(1,99999999999999999999999), + Coords = vector3(2176.93, 4986.21, 41.32), length = 7.2, width = 9.6, heading = 45, @@ -1645,8 +1645,8 @@ PigPens9 = { PigPens10 = { { - Name = math.random(1,99999999999999999999999), - Coords = vector3(2169.45, 4980.47, 41.43), + Name = math.random(1,99999999999999999999999), + Coords = vector3(2169.45, 4980.47, 41.43), length = 9.6, width = 8.0, heading = 45, @@ -1658,8 +1658,8 @@ PigPens10 = { PigPens11 = { { - Name = math.random(1,99999999999999999999999), - Coords = vector3(2162.13, 4972.63, 41.39), + Name = math.random(1,99999999999999999999999), + Coords = vector3(2162.13, 4972.63, 41.39), length = 9.6, width = 9.0, heading = 45, @@ -1671,8 +1671,8 @@ PigPens11 = { PigPens12 = { { - Name = math.random(1,99999999999999999999999), - Coords = vector3(2154.96, 4965.7, 41.47), + Name = math.random(1,99999999999999999999999), + Coords = vector3(2154.96, 4965.7, 41.47), length = 9.8, width = 8.2, heading = 45, @@ -1684,8 +1684,8 @@ PigPens12 = { PigPens13 = { { - Name = math.random(1,99999999999999999999999), - Coords = vector3(2171.78, 4943.27, 41.41), + Name = math.random(1,99999999999999999999999), + Coords = vector3(2171.78, 4943.27, 41.41), length = 8.6, width = 4.2, heading = 45, @@ -1697,8 +1697,8 @@ PigPens13 = { PigPens14 = { { - Name = math.random(1,99999999999999999999999), - Coords = vector3(2182.41, 4954.25, 41.38), + Name = math.random(1,99999999999999999999999), + Coords = vector3(2182.41, 4954.25, 41.38), length = 9.4, width = 4.6, heading = 45, @@ -1710,8 +1710,8 @@ PigPens14 = { PigPens15 = { { - Name = math.random(1,99999999999999999999999), - Coords = vector3(2189.74, 4961.19, 41.36), + Name = math.random(1,99999999999999999999999), + Coords = vector3(2189.74, 4961.19, 41.36), length = 8.8, width = 4.8, heading = 45, @@ -1723,8 +1723,8 @@ PigPens15 = { PigPens16 = { { - Name = math.random(1,99999999999999999999999), - Coords = vector3(2192.86, 4965.4, 41.39), + Name = math.random(1,99999999999999999999999), + Coords = vector3(2192.86, 4965.4, 41.39), length = 9.0, width = 4.2, heading = 45, diff --git a/client/main.lua b/client/main.lua index d8d65ba..6b0501d 100644 --- a/client/main.lua +++ b/client/main.lua @@ -27,7 +27,7 @@ if Config.UseBlips then inZone = true TriggerEvent('AppleTrees') else - for k, v in pairs(ATreeZones) do + for k, v in pairs(ATreeZones) do exports['qb-target']:RemoveZone(v.Name) inZone = false end @@ -50,7 +50,7 @@ else inZone = true TriggerEvent('AppleTrees') else - for k, v in pairs(ATreeZones) do + for k, v in pairs(ATreeZones) do exports['qb-target']:RemoveZone(v.Name) inZone = false end @@ -69,10 +69,10 @@ RegisterNetEvent('qb-simplefarming:processapples', function() disableCarMovement = true, disableMouse = false, disableCombat = true, - }, {}, {}, {}, function() + }, {}, {}, {}, function() TriggerEvent('animations:client:EmoteCommandStart', {"c"}) TriggerServerEvent("qb-simplefarming:appleprocess") - end, function() + end, function() QBCore.Functions.Notify(Config.Alerts['cancel'], "error") end) elseif not apples then @@ -91,22 +91,22 @@ RegisterNetEvent('qb-simplefarming:appletree', function() animDict = 'missmechanic', anim = 'work_base', flags = 16, - }, {}, {}, function() + }, {}, {}, function() TriggerServerEvent('qb-simplefarming:applepicking') - end, function() + end, function() QBCore.Functions.Notify(Config.Alerts['cancel'], "error") end) end) CreateThread(function() - for k, v in pairs(ATreeZones) do + for k, v in pairs(ATreeZones) do end end) RegisterNetEvent('AppleTrees', function() - for k, v in pairs(ATreeZones) do + for k, v in pairs(ATreeZones) do exports['qb-target']:AddBoxZone(v.Name, vector3(v.Coords.x, v.Coords.y, v.Coords.z), 1, 1, { name=v.Name, heading= v.heading, @@ -157,19 +157,19 @@ if Config.UseBlips then TriggerEvent('AnimalFraming3') TriggerEvent('AnimalFraming4') else - for k, v in pairs(CowFarming1) do + for k, v in pairs(CowFarming1) do exports['qb-target']:RemoveZone(v.Name) inZone = false end - for k, v in pairs(CowFarming2) do + for k, v in pairs(CowFarming2) do exports['qb-target']:RemoveZone(v.Name) inZone = false end - for k, v in pairs(CowFarming3) do + for k, v in pairs(CowFarming3) do exports['qb-target']:RemoveZone(v.Name) inZone = false end - for k, v in pairs(CowFarming4) do + for k, v in pairs(CowFarming4) do exports['qb-target']:RemoveZone(v.Name) inZone = false end @@ -195,19 +195,19 @@ else TriggerEvent('AnimalFraming3') TriggerEvent('AnimalFraming4') else - for k, v in pairs(CowFarming1) do + for k, v in pairs(CowFarming1) do exports['qb-target']:RemoveZone(v.Name) inZone = false end - for k, v in pairs(CowFarming2) do + for k, v in pairs(CowFarming2) do exports['qb-target']:RemoveZone(v.Name) inZone = false end - for k, v in pairs(CowFarming3) do + for k, v in pairs(CowFarming3) do exports['qb-target']:RemoveZone(v.Name) inZone = false end - for k, v in pairs(CowFarming4) do + for k, v in pairs(CowFarming4) do exports['qb-target']:RemoveZone(v.Name) inZone = false end @@ -226,10 +226,10 @@ RegisterNetEvent('qb-simplefarming:beefprocessing', function() disableCarMovement = true, disableMouse = false, disableCombat = true, - }, {}, {}, {}, function() + }, {}, {}, {}, function() TriggerEvent('animations:client:EmoteCommandStart', {"c"}) TriggerServerEvent("qb-simplefarming:beefprocess") - end, function() + end, function() QBCore.Functions.Notify(Config.Alerts['cancel'], "error") end) elseif not rawbeef then @@ -247,10 +247,10 @@ RegisterNetEvent('qb-simplefarming:diaryprocessor', function() disableCarMovement = true, disableMouse = false, disableCombat = true, - }, {}, {}, {}, function() + }, {}, {}, {}, function() TriggerEvent('animations:client:EmoteCommandStart', {"c"}) TriggerServerEvent("qb-simplefarming:diarymilk") - end, function() + end, function() QBCore.Functions.Notify(Config.Alerts['cancel'], "error") end) elseif not milkbucket then @@ -273,10 +273,10 @@ RegisterNetEvent('qb-simplefarming:milkcow', function() disableMouse = false, disableCombat = true, }, { - }, {}, {}, function() + }, {}, {}, function() ClearPedTasks(PlayerPedId()) TriggerServerEvent("qb-simplefarming:cowmilking") - end, function() + end, function() QBCore.Functions.Notify(Config.Alerts['cancel'], "error") end) elseif not emptybucket then @@ -287,10 +287,10 @@ RegisterNetEvent('qb-simplefarming:milkcow', function() end) RegisterNetEvent('qb-getcowbucket', function() - local ped = PlayerPedId() + local ped = PlayerPedId() RequestAnimDict("anim@heists@box_carry@") Citizen.Wait(100) - milkprop = CreateObject(GetHashKey("prop_old_churn_01"), 0, 0, 0, true, true, true) + milkprop = CreateObject(GetHashKey("prop_old_churn_01"), 0, 0, 0, true, true, true) AttachEntityToEntity(milkprop, PlayerPedId(), GetPedBoneIndex(PlayerPedId(), 60309), 0.12, 0, 0.30, -145.0, 100.0, 0.0, true, true, false, true, 1, true) TaskPlayAnim(PlayerPedId(), "anim@heists@box_carry@", "idle", 2.0, 2.0, 2500, 51, 0, false, false, false) Citizen.Wait(2500) @@ -301,7 +301,7 @@ RegisterNetEvent('qb-getcowbucket', function() end) RegisterNetEvent('AnimalFraming', function() - for k, v in pairs(CowFarming1) do + for k, v in pairs(CowFarming1) do exports['qb-target']:AddBoxZone(v.Name, vector3(v.Coords.x, v.Coords.y, v.Coords.z), v.length, v.width, { name=v.Name, heading= v.heading, @@ -313,7 +313,7 @@ RegisterNetEvent('AnimalFraming', function() { type = "client", event = "qb-simplefarming:milkcow", - icon = "fa fa-tint", + icon = "fa fa-tint", label = "Milk Cow", }, { @@ -324,12 +324,12 @@ RegisterNetEvent('AnimalFraming', function() }, }, distance = v.distance, - }) + }) end end) RegisterNetEvent('AnimalFraming2', function() - for k, v in pairs(CowFarming2) do + for k, v in pairs(CowFarming2) do exports['qb-target']:AddBoxZone(v.Name, vector3(v.Coords.x, v.Coords.y, v.Coords.z), v.length, v.width, { name=v.Name, heading= v.heading, @@ -341,7 +341,7 @@ RegisterNetEvent('AnimalFraming2', function() { type = "client", event = "qb-simplefarming:milkcow", - icon = "fa fa-tint", + icon = "fa fa-tint", label = "Milk Cow", }, { @@ -352,13 +352,13 @@ RegisterNetEvent('AnimalFraming2', function() }, }, distance = v.distance, - }) + }) end end) RegisterNetEvent('AnimalFraming3', function() - for k, v in pairs(CowFarming3) do + for k, v in pairs(CowFarming3) do exports['qb-target']:AddBoxZone(v.Name, vector3(v.Coords.x, v.Coords.y, v.Coords.z), v.length, v.width, { name=v.Name, heading= v.heading, @@ -370,7 +370,7 @@ RegisterNetEvent('AnimalFraming3', function() { type = "client", event = "qb-simplefarming:milkcow", - icon = "fa fa-tint", + icon = "fa fa-tint", label = "Milk Cow", }, { @@ -381,13 +381,13 @@ RegisterNetEvent('AnimalFraming3', function() }, }, distance = v.distance, - }) + }) end end) RegisterNetEvent('AnimalFraming4', function() - for k, v in pairs(CowFarming4) do + for k, v in pairs(CowFarming4) do exports['qb-target']:AddBoxZone(v.Name, vector3(v.Coords.x, v.Coords.y, v.Coords.z), v.length, v.width, { name=v.Name, heading= v.heading, @@ -399,7 +399,7 @@ RegisterNetEvent('AnimalFraming4', function() { type = "client", event = "qb-simplefarming:milkcow", - icon = "fa fa-tint", + icon = "fa fa-tint", label = "Milk Cow", }, { @@ -410,7 +410,7 @@ RegisterNetEvent('AnimalFraming4', function() }, }, distance = v.distance, - }) + }) end end) @@ -430,7 +430,7 @@ exports['qb-target']:AddBoxZone("GetCowBucket", vector3(419.13, 6470.74, 28.82), label = "Grab A Bucket", }, }, - distance = 1.2 + distance = 1.2 }) @@ -459,7 +459,7 @@ if Config.UseBlips then inZone = true TriggerEvent('qb-simplefarming:pumpkin') else - for k, v in pairs(PumpkinFarming1) do + for k, v in pairs(PumpkinFarming1) do exports['qb-target']:RemoveZone(v.Name) inZone = false end @@ -482,7 +482,7 @@ else inZone = true TriggerEvent('qb-simplefarming:pumpkin') else - for k, v in pairs(PumpkinFarming1) do + for k, v in pairs(PumpkinFarming1) do exports['qb-target']:RemoveZone(v.Name) inZone = false end @@ -507,7 +507,7 @@ RegisterNetEvent('qb-simplefarming:pumpkinfarming', function() ClearPedTasks(PlayerPedId()) RequestAnimDict("anim@heists@box_carry@") Citizen.Wait(100) - pumpkinprop = CreateObject(GetHashKey("prop_veg_crop_03_pump"), 0, 0, 0, true, true, true) + pumpkinprop = CreateObject(GetHashKey("prop_veg_crop_03_pump"), 0, 0, 0, true, true, true) AttachEntityToEntity(pumpkinprop, PlayerPedId(), GetPedBoneIndex(PlayerPedId(), 60309), 0.12, 0, 0.30, -145.0, 100.0, 0.0, true, true, false, true, 1, true) TaskPlayAnim(PlayerPedId(), "anim@heists@box_carry@", "idle", 2.0, 2.0, 2500, 51, 0, false, false, false) Citizen.Wait(3500) @@ -515,7 +515,7 @@ RegisterNetEvent('qb-simplefarming:pumpkinfarming', function() DeleteEntity(pumpkinprop) DeleteObject(pumpkinprop) TriggerServerEvent('qb-simplefarming:pumpkinpicking') - end, function() + end, function() ClearPedTasks(PlayerPedId()) QBCore.Functions.Notify(Config.Alerts['cancel'], "error") end) @@ -530,10 +530,10 @@ RegisterNetEvent('qb-simplefarming:pumpkinpie', function() disableCarMovement = true, disableMouse = false, disableCombat = true, - }, {}, {}, {}, function() + }, {}, {}, {}, function() TriggerEvent('animations:client:EmoteCommandStart', {"c"}) TriggerServerEvent("qb-simplefarming:pumpkinprocessing") - end, function() + end, function() QBCore.Functions.Notify(Config.Alerts['cancel'], "error") end) elseif not pumpkin then @@ -543,7 +543,7 @@ RegisterNetEvent('qb-simplefarming:pumpkinpie', function() end) RegisterNetEvent('qb-simplefarming:pumpkin', function() - for k, v in pairs(PumpkinFarming1) do + for k, v in pairs(PumpkinFarming1) do exports['qb-target']:AddBoxZone(v.Name, vector3(v.Coords.x, v.Coords.y, v.Coords.z), v.length, v.width, { name=v.Name, heading= v.heading, @@ -555,12 +555,12 @@ RegisterNetEvent('qb-simplefarming:pumpkin', function() { type = "client", event = "qb-simplefarming:pumpkinfarming", - icon = "fa fa-sign-language", + icon = "fa fa-sign-language", label = "Pick Pumpkin", }, }, distance = v.distance, - }) + }) end end) @@ -589,7 +589,7 @@ if Config.UseBlips then inZone = true TriggerEvent('CornField') else - for k, v in pairs(CornField1) do + for k, v in pairs(CornField1) do exports['qb-target']:RemoveZone(v.Name) inZone = false end @@ -612,7 +612,7 @@ else inZone = true TriggerEvent('CornField') else - for k, v in pairs(CornField1) do + for k, v in pairs(CornField1) do exports['qb-target']:RemoveZone(v.Name) inZone = false end @@ -635,7 +635,7 @@ RegisterNetEvent('qb-simplefarming:cornfield', function() flags = 16, }, {}, {}, function() TriggerServerEvent('qb-simplefarming:cornpicking') - end, function() + end, function() ClearPedTasks(PlayerPedId()) QBCore.Functions.Notify(Config.Alerts['cancel'], "error") end) @@ -651,10 +651,10 @@ RegisterNetEvent('qb-simplefarming:makecancorn', function() disableCarMovement = true, disableMouse = false, disableCombat = true, - }, {}, {}, {}, function() + }, {}, {}, {}, function() TriggerEvent('animations:client:EmoteCommandStart', {"c"}) TriggerServerEvent("qb-simplefarming:cornprocessing") - end, function() + end, function() QBCore.Functions.Notify(Config.Alerts['cancel'], "error") end) elseif not corncob then @@ -665,7 +665,7 @@ end) RegisterNetEvent('CornField', function() - for k, v in pairs(CornField1) do + for k, v in pairs(CornField1) do exports['qb-target']:AddBoxZone(v.Name, vector3(v.Coords.x, v.Coords.y, v.Coords.z), v.length, v.width, { name=v.Name, heading= v.heading, @@ -677,12 +677,12 @@ RegisterNetEvent('CornField', function() { type = "client", event = "qb-simplefarming:cornfield", - icon = "fa fa-sign-language", + icon = "fa fa-sign-language", label = "Grather Corn", }, }, distance = v.distance, - }) + }) end end) @@ -716,19 +716,19 @@ if Config.UseBlips then TriggerEvent('ChillPeppers') TriggerEvent('Tomatoes') else - for k, v in pairs(GrapeFields) do + for k, v in pairs(GrapeFields) do exports['qb-target']:RemoveZone(v.Name) inZone = false end - for k, v in pairs(GPeppersFields) do + for k, v in pairs(GPeppersFields) do exports['qb-target']:RemoveZone(v.Name) inZone = false end - for k, v in pairs(CPeppersFields) do + for k, v in pairs(CPeppersFields) do exports['qb-target']:RemoveZone(v.Name) inZone = false end - for k, v in pairs(TomatoesField) do + for k, v in pairs(TomatoesField) do exports['qb-target']:RemoveZone(v.Name) inZone = false end @@ -754,19 +754,19 @@ else TriggerEvent('ChillPeppers') TriggerEvent('Tomatoes') else - for k, v in pairs(GrapeFields) do + for k, v in pairs(GrapeFields) do exports['qb-target']:RemoveZone(v.Name) inZone = false end - for k, v in pairs(GPeppersFields) do + for k, v in pairs(GPeppersFields) do exports['qb-target']:RemoveZone(v.Name) inZone = false end - for k, v in pairs(CPeppersFields) do + for k, v in pairs(CPeppersFields) do exports['qb-target']:RemoveZone(v.Name) inZone = false end - for k, v in pairs(TomatoesField) do + for k, v in pairs(TomatoesField) do exports['qb-target']:RemoveZone(v.Name) inZone = false end @@ -787,7 +787,7 @@ RegisterNetEvent('qb-simplefarming:grapefield', function() }, {}, {}, {}, function() TriggerEvent('animations:client:EmoteCommandStart', {"C"}) TriggerServerEvent('qb-simplefarming:grapepicking') - end, function() + end, function() ClearPedTasks(PlayerPedId()) QBCore.Functions.Notify(Config.Alerts['cancel'], "error") end) @@ -804,7 +804,7 @@ RegisterNetEvent('qb-simplefarming:greenpepperfield', function() }, {}, {}, {}, function() TriggerEvent('animations:client:EmoteCommandStart', {"C"}) TriggerServerEvent('qb-simplefarming:gpepperpicking') - end, function() + end, function() ClearPedTasks(PlayerPedId()) QBCore.Functions.Notify(Config.Alerts['cancel'], "error") end) @@ -821,7 +821,7 @@ RegisterNetEvent('qb-simplefarming:chillfield', function() }, {}, {}, {}, function() TriggerEvent('animations:client:EmoteCommandStart', {"C"}) TriggerServerEvent('qb-simplefarming:chypepperpicking') - end, function() + end, function() ClearPedTasks(PlayerPedId()) QBCore.Functions.Notify(Config.Alerts['cancel'], "error") end) @@ -838,7 +838,7 @@ RegisterNetEvent('qb-simplefarming:tomatoefields', function() }, {}, {}, {}, function() TriggerEvent('animations:client:EmoteCommandStart', {"C"}) TriggerServerEvent('qb-simplefarming:tomatoespicking') - end, function() + end, function() ClearPedTasks(PlayerPedId()) QBCore.Functions.Notify(Config.Alerts['cancel'], "error") end) @@ -853,10 +853,10 @@ RegisterNetEvent('qb-simplefarming:makingragu', function() disableCarMovement = true, disableMouse = false, disableCombat = true, - }, {}, {}, {}, function() + }, {}, {}, {}, function() TriggerEvent('animations:client:EmoteCommandStart', {"c"}) TriggerServerEvent("qb-simplefarming:tomatoesprocessing") - end, function() + end, function() QBCore.Functions.Notify(Config.Alerts['cancel'], "error") end) elseif not tomatoes then @@ -874,10 +874,10 @@ RegisterNetEvent('qb-simplefarming:makingchillysauce', function() disableCarMovement = true, disableMouse = false, disableCombat = true, - }, {}, {}, {}, function() + }, {}, {}, {}, function() TriggerEvent('animations:client:EmoteCommandStart', {"c"}) TriggerServerEvent("qb-simplefarming:makinghotsauce") - end, function() + end, function() QBCore.Functions.Notify(Config.Alerts['cancel'], "error") end) elseif not hotstuff then @@ -895,10 +895,10 @@ RegisterNetEvent('qb-simplefarming:makinggrapejuice', function() disableCarMovement = true, disableMouse = false, disableCombat = true, - }, {}, {}, {}, function() + }, {}, {}, {}, function() TriggerEvent('animations:client:EmoteCommandStart', {"c"}) TriggerServerEvent("qb-simplefarming:grapeprocessing") - end, function() + end, function() QBCore.Functions.Notify(Config.Alerts['cancel'], "error") end) elseif not grapes then @@ -909,7 +909,7 @@ end) RegisterNetEvent('GrapeField', function() - for k, v in pairs(GrapeFields) do + for k, v in pairs(GrapeFields) do exports['qb-target']:AddBoxZone(v.Name, vector3(v.Coords.x, v.Coords.y, v.Coords.z), v.length, v.width, { name=v.Name, heading= v.heading, @@ -921,18 +921,18 @@ RegisterNetEvent('GrapeField', function() { type = "client", event = "qb-simplefarming:grapefield", - icon = "fa fa-sign-language", + icon = "fa fa-sign-language", label = "Pick From Garden", }, }, distance = v.distance, - }) + }) end end) RegisterNetEvent('GreenPeppers', function() - for k, v in pairs(GPeppersFields) do + for k, v in pairs(GPeppersFields) do exports['qb-target']:AddBoxZone(v.Name, vector3(v.Coords.x, v.Coords.y, v.Coords.z), v.length, v.width, { name=v.Name, heading= v.heading, @@ -944,17 +944,17 @@ RegisterNetEvent('GreenPeppers', function() { type = "client", event = "qb-simplefarming:greenpepperfield", - icon = "fa fa-sign-language", + icon = "fa fa-sign-language", label = "Pick From Garden", }, }, distance = v.distance, - }) + }) end end) RegisterNetEvent('ChillPeppers', function() - for k, v in pairs(CPeppersFields) do + for k, v in pairs(CPeppersFields) do exports['qb-target']:AddBoxZone(v.Name, vector3(v.Coords.x, v.Coords.y, v.Coords.z), v.length, v.width, { name=v.Name, heading= v.heading, @@ -966,18 +966,18 @@ RegisterNetEvent('ChillPeppers', function() { type = "client", event = "qb-simplefarming:chillfield", - icon = "fa fa-sign-language", + icon = "fa fa-sign-language", label = "Pick From Garden", }, }, distance = v.distance, - }) + }) end end) RegisterNetEvent('Tomatoes', function() - for k, v in pairs(TomatoesField) do + for k, v in pairs(TomatoesField) do exports['qb-target']:AddBoxZone(v.Name, vector3(v.Coords.x, v.Coords.y, v.Coords.z), v.length, v.width, { name=v.Name, heading= v.heading, @@ -989,17 +989,17 @@ RegisterNetEvent('Tomatoes', function() { type = "client", event = "qb-simplefarming:tomatoefields", - icon = "fa fa-sign-language", + icon = "fa fa-sign-language", label = "Pick From Garden", }, }, distance = v.distance, - }) + }) end end) --- Big Garden +-- Big Garden if Config.UseBlips then CreateThread(function() for k, v in pairs(BigGarden) do @@ -1027,19 +1027,19 @@ if Config.UseBlips then TriggerEvent('BigChillyField') TriggerEvent('BigTomField') else - for k, v in pairs(BigGrapeFields) do + for k, v in pairs(BigGrapeFields) do exports['qb-target']:RemoveZone(v.Name) inZone = false end - for k, v in pairs(BigGreenPepperFields) do + for k, v in pairs(BigGreenPepperFields) do exports['qb-target']:RemoveZone(v.Name) inZone = false end - for k, v in pairs(BigChillyPepperFields) do + for k, v in pairs(BigChillyPepperFields) do exports['qb-target']:RemoveZone(v.Name) inZone = false end - for k, v in pairs(BigTomatoesFields) do + for k, v in pairs(BigTomatoesFields) do exports['qb-target']:RemoveZone(v.Name) inZone = false end @@ -1065,19 +1065,19 @@ else TriggerEvent('BigChillyField') TriggerEvent('BigTomField') else - for k, v in pairs(BigGrapeFields) do + for k, v in pairs(BigGrapeFields) do exports['qb-target']:RemoveZone(v.Name) inZone = false end - for k, v in pairs(BigGreenPepperFields) do + for k, v in pairs(BigGreenPepperFields) do exports['qb-target']:RemoveZone(v.Name) inZone = false end - for k, v in pairs(BigChillyPepperFields) do + for k, v in pairs(BigChillyPepperFields) do exports['qb-target']:RemoveZone(v.Name) inZone = false end - for k, v in pairs(BigTomatoesFields) do + for k, v in pairs(BigTomatoesFields) do exports['qb-target']:RemoveZone(v.Name) inZone = false end @@ -1088,7 +1088,7 @@ else end RegisterNetEvent('BigGrapeField', function() - for k, v in pairs(BigGrapeFields) do + for k, v in pairs(BigGrapeFields) do exports['qb-target']:AddBoxZone(v.Name, vector3(v.Coords.x, v.Coords.y, v.Coords.z), v.length, v.width, { name=v.Name, heading= v.heading, @@ -1100,18 +1100,18 @@ RegisterNetEvent('BigGrapeField', function() { type = "client", event = "qb-simplefarming:grapefield", - icon = "fa fa-sign-language", + icon = "fa fa-sign-language", label = "Pick From Garden", }, }, distance = v.distance, - }) + }) end end) RegisterNetEvent('BigGreenPField', function() - for k, v in pairs(BigGreenPepperFields) do + for k, v in pairs(BigGreenPepperFields) do exports['qb-target']:AddBoxZone(v.Name, vector3(v.Coords.x, v.Coords.y, v.Coords.z), v.length, v.width, { name=v.Name, heading= v.heading, @@ -1123,17 +1123,17 @@ RegisterNetEvent('BigGreenPField', function() { type = "client", event = "qb-simplefarming:greenpepperfield", - icon = "fa fa-sign-language", + icon = "fa fa-sign-language", label = "Pick From Garden", }, }, distance = v.distance, - }) + }) end end) RegisterNetEvent('BigChillyField', function() - for k, v in pairs(BigChillyPepperFields) do + for k, v in pairs(BigChillyPepperFields) do exports['qb-target']:AddBoxZone(v.Name, vector3(v.Coords.x, v.Coords.y, v.Coords.z), v.length, v.width, { name=v.Name, heading= v.heading, @@ -1145,18 +1145,18 @@ RegisterNetEvent('BigChillyField', function() { type = "client", event = "qb-simplefarming:chillfield", - icon = "fa fa-sign-language", + icon = "fa fa-sign-language", label = "Pick From Garden", }, }, distance = v.distance, - }) + }) end end) RegisterNetEvent('BigTomField', function() - for k, v in pairs(BigTomatoesFields) do + for k, v in pairs(BigTomatoesFields) do exports['qb-target']:AddBoxZone(v.Name, vector3(v.Coords.x, v.Coords.y, v.Coords.z), v.length, v.width, { name=v.Name, heading= v.heading, @@ -1168,12 +1168,12 @@ RegisterNetEvent('BigTomField', function() { type = "client", event = "qb-simplefarming:tomatoefields", - icon = "fa fa-sign-language", + icon = "fa fa-sign-language", label = "Pick From Garden", }, }, distance = v.distance, - }) + }) end end) @@ -1201,67 +1201,67 @@ if Config.UseBlips then inZone = true TriggerEvent('PigPens') else - for k, v in pairs(PigPens1) do + for k, v in pairs(PigPens1) do exports['qb-target']:RemoveZone(v.Name) inZone = false end - for k, v in pairs(PigPens2) do + for k, v in pairs(PigPens2) do exports['qb-target']:RemoveZone(v.Name) inZone = false end - for k, v in pairs(PigPens3) do + for k, v in pairs(PigPens3) do exports['qb-target']:RemoveZone(v.Name) inZone = false end - for k, v in pairs(PigPens4) do + for k, v in pairs(PigPens4) do exports['qb-target']:RemoveZone(v.Name) inZone = false end - for k, v in pairs(PigPens5) do + for k, v in pairs(PigPens5) do exports['qb-target']:RemoveZone(v.Name) inZone = false end - for k, v in pairs(PigPens6) do + for k, v in pairs(PigPens6) do exports['qb-target']:RemoveZone(v.Name) inZone = false end - for k, v in pairs(PigPens7) do + for k, v in pairs(PigPens7) do exports['qb-target']:RemoveZone(v.Name) inZone = false end - for k, v in pairs(PigPens8) do + for k, v in pairs(PigPens8) do exports['qb-target']:RemoveZone(v.Name) inZone = false end - for k, v in pairs(PigPens9) do + for k, v in pairs(PigPens9) do exports['qb-target']:RemoveZone(v.Name) inZone = false end - for k, v in pairs(PigPens10) do + for k, v in pairs(PigPens10) do exports['qb-target']:RemoveZone(v.Name) inZone = false end - for k, v in pairs(PigPens11) do + for k, v in pairs(PigPens11) do exports['qb-target']:RemoveZone(v.Name) inZone = false end - for k, v in pairs(PigPens12) do + for k, v in pairs(PigPens12) do exports['qb-target']:RemoveZone(v.Name) inZone = false end - for k, v in pairs(PigPens13) do + for k, v in pairs(PigPens13) do exports['qb-target']:RemoveZone(v.Name) inZone = false end - for k, v in pairs(PigPens14) do + for k, v in pairs(PigPens14) do exports['qb-target']:RemoveZone(v.Name) inZone = false end - for k, v in pairs(PigPens15) do + for k, v in pairs(PigPens15) do exports['qb-target']:RemoveZone(v.Name) inZone = false end - for k, v in pairs(PigPens16) do + for k, v in pairs(PigPens16) do exports['qb-target']:RemoveZone(v.Name) inZone = false end @@ -1284,67 +1284,67 @@ else inZone = true TriggerEvent('PigPens') else - for k, v in pairs(PigPens1) do + for k, v in pairs(PigPens1) do exports['qb-target']:RemoveZone(v.Name) inZone = false end - for k, v in pairs(PigPens2) do + for k, v in pairs(PigPens2) do exports['qb-target']:RemoveZone(v.Name) inZone = false end - for k, v in pairs(PigPens3) do + for k, v in pairs(PigPens3) do exports['qb-target']:RemoveZone(v.Name) inZone = false end - for k, v in pairs(PigPens4) do + for k, v in pairs(PigPens4) do exports['qb-target']:RemoveZone(v.Name) inZone = false end - for k, v in pairs(PigPens5) do + for k, v in pairs(PigPens5) do exports['qb-target']:RemoveZone(v.Name) inZone = false end - for k, v in pairs(PigPens6) do + for k, v in pairs(PigPens6) do exports['qb-target']:RemoveZone(v.Name) inZone = false end - for k, v in pairs(PigPens7) do + for k, v in pairs(PigPens7) do exports['qb-target']:RemoveZone(v.Name) inZone = false end - for k, v in pairs(PigPens8) do + for k, v in pairs(PigPens8) do exports['qb-target']:RemoveZone(v.Name) inZone = false end - for k, v in pairs(PigPens9) do + for k, v in pairs(PigPens9) do exports['qb-target']:RemoveZone(v.Name) inZone = false end - for k, v in pairs(PigPens10) do + for k, v in pairs(PigPens10) do exports['qb-target']:RemoveZone(v.Name) inZone = false end - for k, v in pairs(PigPens11) do + for k, v in pairs(PigPens11) do exports['qb-target']:RemoveZone(v.Name) inZone = false end - for k, v in pairs(PigPens12) do + for k, v in pairs(PigPens12) do exports['qb-target']:RemoveZone(v.Name) inZone = false end - for k, v in pairs(PigPens13) do + for k, v in pairs(PigPens13) do exports['qb-target']:RemoveZone(v.Name) inZone = false end - for k, v in pairs(PigPens14) do + for k, v in pairs(PigPens14) do exports['qb-target']:RemoveZone(v.Name) inZone = false end - for k, v in pairs(PigPens15) do + for k, v in pairs(PigPens15) do exports['qb-target']:RemoveZone(v.Name) inZone = false end - for k, v in pairs(PigPens16) do + for k, v in pairs(PigPens16) do exports['qb-target']:RemoveZone(v.Name) inZone = false end @@ -1367,7 +1367,7 @@ RegisterNetEvent('qb-simplefarming:petpiggy', function() TriggerServerEvent('hud:server:RelieveStress', math.random(2, 5)) Wait(1000) QBCore.Functions.Notify(Config.Alerts['stress']) - end, function() + end, function() ClearPedTasks(PlayerPedId()) QBCore.Functions.Notify(Config.Alerts['cancel'], "error") end) @@ -1387,7 +1387,7 @@ RegisterNetEvent('qb-simplefarming:feedpig', function () TriggerEvent('animations:client:EmoteCommandStart', {"c"}) TriggerServerEvent("qb-simplefarming:feedingpiglit") Wait(2000) - end, function() + end, function() ClearPedTasks(PlayerPedId()) QBCore.Functions.Notify(Config.Alerts['cancel'], "error") end) @@ -1410,10 +1410,10 @@ RegisterNetEvent('qb-simplefarming:baconprocessing', function() disableCarMovement = true, disableMouse = false, disableCombat = true, - }, {}, {}, {}, function() + }, {}, {}, {}, function() TriggerEvent('animations:client:EmoteCommandStart', {"c"}) TriggerServerEvent("qb-simplefarming:baconprocessed") - end, function() + end, function() QBCore.Functions.Notify(Config.Alerts['cancel'], "error") end) elseif not rawbeef then @@ -1431,10 +1431,10 @@ RegisterNetEvent('qb-simplefarming:hamprocessing', function() disableCarMovement = true, disableMouse = false, disableCombat = true, - }, {}, {}, {}, function() + }, {}, {}, {}, function() TriggerEvent('animations:client:EmoteCommandStart', {"c"}) TriggerServerEvent("qb-simplefarming:hamprocessed") - end, function() + end, function() QBCore.Functions.Notify(Config.Alerts['cancel'], "error") end) elseif not rawbeef then @@ -1452,10 +1452,10 @@ RegisterNetEvent('qb-simplefarming:porkprocessing', function() disableCarMovement = true, disableMouse = false, disableCombat = true, - }, {}, {}, {}, function() + }, {}, {}, {}, function() TriggerEvent('animations:client:EmoteCommandStart', {"c"}) TriggerServerEvent("qb-simplefarming:porkprocessed") - end, function() + end, function() QBCore.Functions.Notify(Config.Alerts['cancel'], "error") end) elseif not rawbeef then @@ -1473,10 +1473,10 @@ RegisterNetEvent('qb-simplefarming:sausageprocessing', function() disableCarMovement = true, disableMouse = false, disableCombat = true, - }, {}, {}, {}, function() + }, {}, {}, {}, function() TriggerEvent('animations:client:EmoteCommandStart', {"c"}) TriggerServerEvent("qb-simplefarming:sausageprocessed") - end, function() + end, function() QBCore.Functions.Notify(Config.Alerts['cancel'], "error") end) elseif not rawbeef then @@ -1487,7 +1487,7 @@ end) RegisterNetEvent('PigPens', function() - for k, v in pairs(PigPens1) do + for k, v in pairs(PigPens1) do exports['qb-target']:AddBoxZone(v.Name, vector3(v.Coords.x, v.Coords.y, v.Coords.z), v.length, v.width, { name=v.Name, heading= v.heading, @@ -1499,26 +1499,26 @@ RegisterNetEvent('PigPens', function() { type = "client", event = "qb-simplefarming:petpiggy", - icon = "Fas Fa-Hand-Paper", + icon = "Fas Fa-Hand-Paper", label = "Pet", }, { type = "client", event = "qb-simplefarming:feedpig", - icon = "Fas Fa-Hand-Holding-Heart", + icon = "Fas Fa-Hand-Holding-Heart", label = "Feed Pig", }, { type = "client", event = "qb-simplefarming:killpig1", - icon = "Fas Fa-Piggy-Bank", + icon = "Fas Fa-Piggy-Bank", label = "Slaughter Pig", }, }, distance = v.distance, - }) + }) end - for k, v in pairs(PigPens2) do + for k, v in pairs(PigPens2) do exports['qb-target']:AddBoxZone(v.Name, vector3(v.Coords.x, v.Coords.y, v.Coords.z), v.length, v.width, { name=v.Name, heading= v.heading, @@ -1530,26 +1530,26 @@ RegisterNetEvent('PigPens', function() { type = "client", event = "qb-simplefarming:petpiggy", - icon = "Fas Fa-Hand-Paper", + icon = "Fas Fa-Hand-Paper", label = "Pet", }, { type = "client", event = "qb-simplefarming:feedpig", - icon = "Fas Fa-Hand-Holding-Heart", + icon = "Fas Fa-Hand-Holding-Heart", label = "Feed Pig", }, { type = "client", event = "qb-simplefarming:killpig2", - icon = "Fas Fa-Piggy-Bank", + icon = "Fas Fa-Piggy-Bank", label = "Slaughter Pig", }, }, distance = v.distance, - }) + }) end - for k, v in pairs(PigPens3) do + for k, v in pairs(PigPens3) do exports['qb-target']:AddBoxZone(v.Name, vector3(v.Coords.x, v.Coords.y, v.Coords.z), v.length, v.width, { name=v.Name, heading= v.heading, @@ -1561,26 +1561,26 @@ RegisterNetEvent('PigPens', function() { type = "client", event = "qb-simplefarming:petpiggy", - icon = "Fas Fa-Hand-Paper", + icon = "Fas Fa-Hand-Paper", label = "Pet", }, { type = "client", event = "qb-simplefarming:feedpig", - icon = "Fas Fa-Hand-Holding-Heart", + icon = "Fas Fa-Hand-Holding-Heart", label = "Feed Pig", }, { type = "client", event = "qb-simplefarming:killpig3", - icon = "Fas Fa-Piggy-Bank", + icon = "Fas Fa-Piggy-Bank", label = "Slaughter Pig", }, }, distance = v.distance, - }) + }) end - for k, v in pairs(PigPens4) do + for k, v in pairs(PigPens4) do exports['qb-target']:AddBoxZone(v.Name, vector3(v.Coords.x, v.Coords.y, v.Coords.z), v.length, v.width, { name=v.Name, heading= v.heading, @@ -1592,26 +1592,26 @@ RegisterNetEvent('PigPens', function() { type = "client", event = "qb-simplefarming:petpiggy", - icon = "Fas Fa-Hand-Paper", + icon = "Fas Fa-Hand-Paper", label = "Pet", }, { type = "client", event = "qb-simplefarming:feedpig", - icon = "Fas Fa-Hand-Holding-Heart", + icon = "Fas Fa-Hand-Holding-Heart", label = "Feed Pig", }, { type = "client", event = "qb-simplefarming:killpig4", - icon = "Fas Fa-Piggy-Bank", + icon = "Fas Fa-Piggy-Bank", label = "Slaughter Pig", }, }, distance = v.distance, - }) + }) end - for k, v in pairs(PigPens5) do + for k, v in pairs(PigPens5) do exports['qb-target']:AddBoxZone(v.Name, vector3(v.Coords.x, v.Coords.y, v.Coords.z), v.length, v.width, { name=v.Name, heading= v.heading, @@ -1623,26 +1623,26 @@ RegisterNetEvent('PigPens', function() { type = "client", event = "qb-simplefarming:petpiggy", - icon = "Fas Fa-Hand-Paper", + icon = "Fas Fa-Hand-Paper", label = "Pet", }, { type = "client", event = "qb-simplefarming:feedpig", - icon = "Fas Fa-Hand-Holding-Heart", + icon = "Fas Fa-Hand-Holding-Heart", label = "Feed Pig", }, { type = "client", event = "qb-simplefarming:killpig5", - icon = "Fas Fa-Piggy-Bank", + icon = "Fas Fa-Piggy-Bank", label = "Slaughter Pig", }, }, distance = v.distance, - }) + }) end - for k, v in pairs(PigPens6) do + for k, v in pairs(PigPens6) do exports['qb-target']:AddBoxZone(v.Name, vector3(v.Coords.x, v.Coords.y, v.Coords.z), v.length, v.width, { name=v.Name, heading= v.heading, @@ -1654,26 +1654,26 @@ RegisterNetEvent('PigPens', function() { type = "client", event = "qb-simplefarming:petpiggy", - icon = "Fas Fa-Hand-Paper", + icon = "Fas Fa-Hand-Paper", label = "Pet", }, { type = "client", event = "qb-simplefarming:feedpig", - icon = "Fas Fa-Hand-Holding-Heart", + icon = "Fas Fa-Hand-Holding-Heart", label = "Feed Pig", }, { type = "client", event = "qb-simplefarming:killpig6", - icon = "Fas Fa-Piggy-Bank", + icon = "Fas Fa-Piggy-Bank", label = "Slaughter Pig", }, }, distance = v.distance, - }) + }) end - for k, v in pairs(PigPens7) do + for k, v in pairs(PigPens7) do exports['qb-target']:AddBoxZone(v.Name, vector3(v.Coords.x, v.Coords.y, v.Coords.z), v.length, v.width, { name=v.Name, heading= v.heading, @@ -1685,26 +1685,26 @@ RegisterNetEvent('PigPens', function() { type = "client", event = "qb-simplefarming:petpiggy", - icon = "Fas Fa-Hand-Paper", + icon = "Fas Fa-Hand-Paper", label = "Pet", }, { type = "client", event = "qb-simplefarming:feedpig", - icon = "Fas Fa-Hand-Holding-Heart", + icon = "Fas Fa-Hand-Holding-Heart", label = "Feed Pig", }, { type = "client", event = "qb-simplefarming:killpig7", - icon = "Fas Fa-Piggy-Bank", + icon = "Fas Fa-Piggy-Bank", label = "Slaughter Pig", }, }, distance = v.distance, - }) + }) end - for k, v in pairs(PigPens8) do + for k, v in pairs(PigPens8) do exports['qb-target']:AddBoxZone(v.Name, vector3(v.Coords.x, v.Coords.y, v.Coords.z), v.length, v.width, { name=v.Name, heading= v.heading, @@ -1716,26 +1716,26 @@ RegisterNetEvent('PigPens', function() { type = "client", event = "qb-simplefarming:petpiggy", - icon = "Fas Fa-Hand-Paper", + icon = "Fas Fa-Hand-Paper", label = "Pet", }, { type = "client", event = "qb-simplefarming:feedpig", - icon = "Fas Fa-Hand-Holding-Heart", + icon = "Fas Fa-Hand-Holding-Heart", label = "Feed Pig", }, { type = "client", event = "qb-simplefarming:killpig8", - icon = "Fas Fa-Piggy-Bank", + icon = "Fas Fa-Piggy-Bank", label = "Slaughter Pig", }, }, distance = v.distance, - }) + }) end - for k, v in pairs(PigPens9) do + for k, v in pairs(PigPens9) do exports['qb-target']:AddBoxZone(v.Name, vector3(v.Coords.x, v.Coords.y, v.Coords.z), v.length, v.width, { name=v.Name, heading= v.heading, @@ -1747,26 +1747,26 @@ RegisterNetEvent('PigPens', function() { type = "client", event = "qb-simplefarming:petpiggy", - icon = "Fas Fa-Hand-Paper", + icon = "Fas Fa-Hand-Paper", label = "Pet", }, { type = "client", event = "qb-simplefarming:feedpig", - icon = "Fas Fa-Hand-Holding-Heart", + icon = "Fas Fa-Hand-Holding-Heart", label = "Feed Pig", }, { type = "client", event = "qb-simplefarming:killpig9", - icon = "Fas Fa-Piggy-Bank", + icon = "Fas Fa-Piggy-Bank", label = "Slaughter Pig", }, }, distance = v.distance, - }) + }) end - for k, v in pairs(PigPens10) do + for k, v in pairs(PigPens10) do exports['qb-target']:AddBoxZone(v.Name, vector3(v.Coords.x, v.Coords.y, v.Coords.z), v.length, v.width, { name=v.Name, heading= v.heading, @@ -1778,26 +1778,26 @@ RegisterNetEvent('PigPens', function() { type = "client", event = "qb-simplefarming:petpiggy", - icon = "Fas Fa-Hand-Paper", + icon = "Fas Fa-Hand-Paper", label = "Pet", }, { type = "client", event = "qb-simplefarming:feedpig", - icon = "Fas Fa-Hand-Holding-Heart", + icon = "Fas Fa-Hand-Holding-Heart", label = "Feed Pig", }, { type = "client", event = "qb-simplefarming:killpig10", - icon = "Fas Fa-Piggy-Bank", + icon = "Fas Fa-Piggy-Bank", label = "Slaughter Pig", }, }, distance = v.distance, - }) + }) end - for k, v in pairs(PigPens11) do + for k, v in pairs(PigPens11) do exports['qb-target']:AddBoxZone(v.Name, vector3(v.Coords.x, v.Coords.y, v.Coords.z), v.length, v.width, { name=v.Name, heading= v.heading, @@ -1809,26 +1809,26 @@ RegisterNetEvent('PigPens', function() { type = "client", event = "qb-simplefarming:petpiggy", - icon = "Fas Fa-Hand-Paper", + icon = "Fas Fa-Hand-Paper", label = "Pet", }, { type = "client", event = "qb-simplefarming:feedpig", - icon = "Fas Fa-Hand-Holding-Heart", + icon = "Fas Fa-Hand-Holding-Heart", label = "Feed Pig", }, { type = "client", event = "qb-simplefarming:killpig11", - icon = "Fas Fa-Piggy-Bank", + icon = "Fas Fa-Piggy-Bank", label = "Slaughter Pig", }, }, distance = v.distance, - }) + }) end - for k, v in pairs(PigPens12) do + for k, v in pairs(PigPens12) do exports['qb-target']:AddBoxZone(v.Name, vector3(v.Coords.x, v.Coords.y, v.Coords.z), v.length, v.width, { name=v.Name, heading= v.heading, @@ -1840,26 +1840,26 @@ RegisterNetEvent('PigPens', function() { type = "client", event = "qb-simplefarming:petpiggy", - icon = "Fas Fa-Hand-Paper", + icon = "Fas Fa-Hand-Paper", label = "Pet", }, { type = "client", event = "qb-simplefarming:feedpig", - icon = "Fas Fa-Hand-Holding-Heart", + icon = "Fas Fa-Hand-Holding-Heart", label = "Feed Pig", }, { type = "client", event = "qb-simplefarming:killpig12", - icon = "Fas Fa-Piggy-Bank", + icon = "Fas Fa-Piggy-Bank", label = "Slaughter Pig", }, }, distance = v.distance, - }) + }) end - for k, v in pairs(PigPens13) do + for k, v in pairs(PigPens13) do exports['qb-target']:AddBoxZone(v.Name, vector3(v.Coords.x, v.Coords.y, v.Coords.z), v.length, v.width, { name=v.Name, heading= v.heading, @@ -1871,26 +1871,26 @@ RegisterNetEvent('PigPens', function() { type = "client", event = "qb-simplefarming:petpiggy", - icon = "Fas Fa-Hand-Paper", + icon = "Fas Fa-Hand-Paper", label = "Pet", }, { type = "client", event = "qb-simplefarming:feedpig", - icon = "Fas Fa-Hand-Holding-Heart", + icon = "Fas Fa-Hand-Holding-Heart", label = "Feed Pig", }, { type = "client", event = "qb-simplefarming:killpig13", - icon = "Fas Fa-Piggy-Bank", + icon = "Fas Fa-Piggy-Bank", label = "Slaughter Pig", }, }, distance = v.distance, - }) + }) end - for k, v in pairs(PigPens14) do + for k, v in pairs(PigPens14) do exports['qb-target']:AddBoxZone(v.Name, vector3(v.Coords.x, v.Coords.y, v.Coords.z), v.length, v.width, { name=v.Name, heading= v.heading, @@ -1902,26 +1902,26 @@ RegisterNetEvent('PigPens', function() { type = "client", event = "qb-simplefarming:petpiggy", - icon = "Fas Fa-Hand-Paper", + icon = "Fas Fa-Hand-Paper", label = "Pet", }, { type = "client", event = "qb-simplefarming:feedpig", - icon = "Fas Fa-Hand-Holding-Heart", + icon = "Fas Fa-Hand-Holding-Heart", label = "Feed Pig", }, { type = "client", event = "qb-simplefarming:killpig14", - icon = "Fas Fa-Piggy-Bank", + icon = "Fas Fa-Piggy-Bank", label = "Slaughter Pig", }, }, distance = v.distance, - }) + }) end - for k, v in pairs(PigPens15) do + for k, v in pairs(PigPens15) do exports['qb-target']:AddBoxZone(v.Name, vector3(v.Coords.x, v.Coords.y, v.Coords.z), v.length, v.width, { name=v.Name, heading= v.heading, @@ -1933,26 +1933,26 @@ RegisterNetEvent('PigPens', function() { type = "client", event = "qb-simplefarming:petpiggy", - icon = "Fas Fa-Hand-Paper", + icon = "Fas Fa-Hand-Paper", label = "Pet", }, { type = "client", event = "qb-simplefarming:feedpig", - icon = "Fas Fa-Hand-Holding-Heart", + icon = "Fas Fa-Hand-Holding-Heart", label = "Feed Pig", }, { type = "client", event = "qb-simplefarming:killpig15", - icon = "Fas Fa-Piggy-Bank", + icon = "Fas Fa-Piggy-Bank", label = "Slaughter Pig", }, }, distance = v.distance, - }) + }) end - for k, v in pairs(PigPens16) do + for k, v in pairs(PigPens16) do exports['qb-target']:AddBoxZone(v.Name, vector3(v.Coords.x, v.Coords.y, v.Coords.z), v.length, v.width, { name=v.Name, heading= v.heading, @@ -1964,24 +1964,24 @@ RegisterNetEvent('PigPens', function() { type = "client", event = "qb-simplefarming:petpiggy", - icon = "Fas Fa-Hand-Paper", + icon = "Fas Fa-Hand-Paper", label = "Pet", }, { type = "client", event = "qb-simplefarming:feedpig", - icon = "Fas Fa-Hand-Holding-Heart", + icon = "Fas Fa-Hand-Holding-Heart", label = "Feed Pig", }, { type = "client", event = "qb-simplefarming:killpig16", - icon = "Fas Fa-Piggy-Bank", + icon = "Fas Fa-Piggy-Bank", label = "Slaughter Pig", }, }, distance = v.distance, - }) + }) end end) diff --git a/client/props.lua b/client/props.lua index 472452f..f2e7798 100644 --- a/client/props.lua +++ b/client/props.lua @@ -28,7 +28,7 @@ CreateThread(function() while ( not HasModelLoaded( GetHashKey( PedModel ) ) ) do Wait(1) end - pedcow = CreatePed(1, 0xFCFA9E1E, 434.06, 6472.8, 28.77, 77.31, false, true) + pedcow = CreatePed(1, 0xFCFA9E1E, 434.06, 6472.8, 28.77, 77.31, false, true) pedcow1 = CreatePed(1, 0xFCFA9E1E, 425.61, 6463.31, 28.78, 31.94, false, true) pedcow2 = CreatePed(1, 0xFCFA9E1E, 431.66, 6458.51, 28.75, 0, false, true) pedcow3 = CreatePed(1, 0xFCFA9E1E, 437.68, 6453.88, 28.76, 0, false, true) @@ -77,14 +77,14 @@ RegisterNetEvent('qb-simplefarming:slaughter1', function() disableMouse = false, disableCombat = true, }, { - }, {}, {}, function() + }, {}, {}, function() DeleteEntity(pedcow) TriggerEvent('animations:client:EmoteCommandStart', {"c"}) ClearPedTasks(PlayerPedId()) TriggerServerEvent('qb-simplefarming:cowkilling') TriggerServerEvent('hud:Server:GainStress', math.random(1, 2)) Wait(1200000) -- 20 minutes - pedcow = CreatePed(1, 0xFCFA9E1E, 433.68, 6473.67, 28.77, 0, false, true) + pedcow = CreatePed(1, 0xFCFA9E1E, 433.68, 6473.67, 28.77, 0, false, true) end, function() QBCore.Functions.Notify(Config.Alerts['cancel'], "error") end) @@ -106,7 +106,7 @@ RegisterNetEvent('qb-simplefarming:slaughter2', function() disableMouse = false, disableCombat = true, }, { - }, {}, {}, function() + }, {}, {}, function() DeleteEntity(pedcow1) TriggerEvent('animations:client:EmoteCommandStart', {"c"}) TriggerServerEvent('qb-simplefarming:cowkilling') @@ -135,7 +135,7 @@ RegisterNetEvent('qb-simplefarming:slaughter3', function() disableMouse = false, disableCombat = true, }, { - }, {}, {}, function() + }, {}, {}, function() DeleteEntity(pedcow2) TriggerEvent('animations:client:EmoteCommandStart', {"c"}) TriggerServerEvent('qb-simplefarming:cowkilling') @@ -163,7 +163,7 @@ RegisterNetEvent('qb-simplefarming:slaughter4', function() disableMouse = false, disableCombat = true, }, { - }, {}, {}, function() + }, {}, {}, function() DeleteEntity(pedcow3) TriggerEvent('animations:client:EmoteCommandStart', {"c"}) TriggerServerEvent('qb-simplefarming:cowkilling') @@ -190,7 +190,7 @@ RegisterNetEvent('qb-simplefarming:killpig1', function() disableCarMovement = true, disableMouse = false, disableCombat = true, - }, {}, {}, {}, function() + }, {}, {}, {}, function() DeleteEntity(pedpig1) TriggerEvent('animations:client:EmoteCommandStart', {"c"}) ClearPedTasks(PlayerPedId()) @@ -218,7 +218,7 @@ RegisterNetEvent('qb-simplefarming:killpig2', function() disableCarMovement = true, disableMouse = false, disableCombat = true, - }, {}, {}, {}, function() + }, {}, {}, {}, function() DeleteEntity(pedpig2) TriggerEvent('animations:client:EmoteCommandStart', {"c"}) ClearPedTasks(PlayerPedId()) @@ -246,7 +246,7 @@ RegisterNetEvent('qb-simplefarming:killpig3', function() disableCarMovement = true, disableMouse = false, disableCombat = true, - }, {}, {}, {}, function() + }, {}, {}, {}, function() DeleteEntity(pedpig3) TriggerEvent('animations:client:EmoteCommandStart', {"c"}) ClearPedTasks(PlayerPedId()) @@ -274,7 +274,7 @@ RegisterNetEvent('qb-simplefarming:killpig4', function() disableCarMovement = true, disableMouse = false, disableCombat = true, - }, {}, {}, {}, function() + }, {}, {}, {}, function() DeleteEntity(pedpig4) TriggerEvent('animations:client:EmoteCommandStart', {"c"}) ClearPedTasks(PlayerPedId()) @@ -302,7 +302,7 @@ RegisterNetEvent('qb-simplefarming:killpig5', function() disableCarMovement = true, disableMouse = false, disableCombat = true, - }, {}, {}, {}, function() + }, {}, {}, {}, function() DeleteEntity(pedpig5) TriggerEvent('animations:client:EmoteCommandStart', {"c"}) ClearPedTasks(PlayerPedId()) @@ -330,7 +330,7 @@ RegisterNetEvent('qb-simplefarming:killpig6', function() disableCarMovement = true, disableMouse = false, disableCombat = true, - }, {}, {}, {}, function() + }, {}, {}, {}, function() DeleteEntity(pedpig6) TriggerEvent('animations:client:EmoteCommandStart', {"c"}) ClearPedTasks(PlayerPedId()) @@ -358,7 +358,7 @@ RegisterNetEvent('qb-simplefarming:killpig7', function() disableCarMovement = true, disableMouse = false, disableCombat = true, - }, {}, {}, {}, function() + }, {}, {}, {}, function() DeleteEntity(pedpig7) TriggerEvent('animations:client:EmoteCommandStart', {"c"}) ClearPedTasks(PlayerPedId()) @@ -386,7 +386,7 @@ RegisterNetEvent('qb-simplefarming:killpig8', function() disableCarMovement = true, disableMouse = false, disableCombat = true, - }, {}, {}, {}, function() + }, {}, {}, {}, function() DeleteEntity(pedpig8) TriggerEvent('animations:client:EmoteCommandStart', {"c"}) ClearPedTasks(PlayerPedId()) @@ -414,7 +414,7 @@ RegisterNetEvent('qb-simplefarming:killpig9', function() disableCarMovement = true, disableMouse = false, disableCombat = true, - }, {}, {}, {}, function() + }, {}, {}, {}, function() DeleteEntity(pedpig9) TriggerEvent('animations:client:EmoteCommandStart', {"c"}) ClearPedTasks(PlayerPedId()) @@ -442,7 +442,7 @@ RegisterNetEvent('qb-simplefarming:killpig10', function() disableCarMovement = true, disableMouse = false, disableCombat = true, - }, {}, {}, {}, function() + }, {}, {}, {}, function() DeleteEntity(pedpig10) TriggerEvent('animations:client:EmoteCommandStart', {"c"}) ClearPedTasks(PlayerPedId()) @@ -470,7 +470,7 @@ RegisterNetEvent('qb-simplefarming:killpig11', function() disableCarMovement = true, disableMouse = false, disableCombat = true, - }, {}, {}, {}, function() + }, {}, {}, {}, function() DeleteEntity(pedpig11) TriggerEvent('animations:client:EmoteCommandStart', {"c"}) ClearPedTasks(PlayerPedId()) @@ -498,7 +498,7 @@ RegisterNetEvent('qb-simplefarming:killpig12', function() disableCarMovement = true, disableMouse = false, disableCombat = true, - }, {}, {}, {}, function() + }, {}, {}, {}, function() DeleteEntity(pedpig12) TriggerEvent('animations:client:EmoteCommandStart', {"c"}) ClearPedTasks(PlayerPedId()) @@ -526,7 +526,7 @@ RegisterNetEvent('qb-simplefarming:killpig13', function() disableCarMovement = true, disableMouse = false, disableCombat = true, - }, {}, {}, {}, function() + }, {}, {}, {}, function() DeleteEntity(pedpig13) TriggerEvent('animations:client:EmoteCommandStart', {"c"}) ClearPedTasks(PlayerPedId()) @@ -554,7 +554,7 @@ RegisterNetEvent('qb-simplefarming:killpig14', function() disableCarMovement = true, disableMouse = false, disableCombat = true, - }, {}, {}, {}, function() + }, {}, {}, {}, function() DeleteEntity(pedpig14) TriggerEvent('animations:client:EmoteCommandStart', {"c"}) ClearPedTasks(PlayerPedId()) @@ -582,7 +582,7 @@ RegisterNetEvent('qb-simplefarming:killpig15', function() disableCarMovement = true, disableMouse = false, disableCombat = true, - }, {}, {}, {}, function() + }, {}, {}, {}, function() DeleteEntity(pedpig15) TriggerEvent('animations:client:EmoteCommandStart', {"c"}) ClearPedTasks(PlayerPedId()) @@ -610,7 +610,7 @@ RegisterNetEvent('qb-simplefarming:killpig16', function() disableCarMovement = true, disableMouse = false, disableCombat = true, - }, {}, {}, {}, function() + }, {}, {}, {}, function() DeleteEntity(pedpig16) TriggerEvent('animations:client:EmoteCommandStart', {"c"}) ClearPedTasks(PlayerPedId()) diff --git a/config.lua b/config.lua index 3c9d896..8b42c79 100644 --- a/config.lua +++ b/config.lua @@ -183,7 +183,7 @@ Config.Sell = { ["cow_leather"] = { ["price"] = math.random(25, 35) } - + } diff --git a/server/server.lua b/server/server.lua index b4c9f34..0565d45 100644 --- a/server/server.lua +++ b/server/server.lua @@ -16,7 +16,7 @@ RegisterNetEvent('qb-simpefarming:sellItems', function() end Player.Functions.AddMoney("cash", price) TriggerClientEvent('QBCore:Notify', src, "You have sold your items") - else + else TriggerClientEvent('QBCore:Notify', src, "You do not have the items to sell here!") end end) @@ -35,9 +35,9 @@ RegisterServerEvent('qb-simplefarming:appleprocess', function() local source = source local Player = QBCore.Functions.GetPlayer(tonumber(source)) local apple = Player.Functions.GetItemByName('apple') - if not apple then + if not apple then TriggerClientEvent('QBCore:Notify', source, Config.Alerts['error_appleprocessor']) - return false + return false end local amount = apple.amount @@ -46,11 +46,11 @@ RegisterServerEvent('qb-simplefarming:appleprocess', function() else return false end - - if not Player.Functions.RemoveItem('apple', amount) then + + if not Player.Functions.RemoveItem('apple', amount) then print('couldnt remove item',amount) TriggerClientEvent('QBCore:Notify', source, Config.Alerts['itemamount']) - return false + return false end TriggerClientEvent('inventory:client:ItemBox', source, QBCore.Shared.Items['apple'], "remove") @@ -150,9 +150,9 @@ RegisterServerEvent('qb-simplefarming:beefprocess', function() local source = source local Player = QBCore.Functions.GetPlayer(tonumber(source)) local rawbeef = Player.Functions.GetItemByName('raw_beef') - if not rawbeef then + if not rawbeef then TriggerClientEvent('QBCore:Notify', source, Config.Alerts['error_rawmeat']) - return false + return false end local amount = rawbeef.amount @@ -161,11 +161,11 @@ RegisterServerEvent('qb-simplefarming:beefprocess', function() else return false end - - if not Player.Functions.RemoveItem('raw_beef', amount) then + + if not Player.Functions.RemoveItem('raw_beef', amount) then print('couldnt remove item',amount) TriggerClientEvent('QBCore:Notify', source, Config.Alerts['itemamount']) - return false + return false end TriggerClientEvent('inventory:client:ItemBox', source, QBCore.Shared.Items['raw_beef'], "remove") @@ -188,9 +188,9 @@ RegisterServerEvent('qb-simplefarming:diarymilk', function() local source = source local Player = QBCore.Functions.GetPlayer(tonumber(source)) local milkbucket = Player.Functions.GetItemByName('milkbucket') - if not milkbucket then + if not milkbucket then TriggerClientEvent('QBCore:Notify', source, Config.Alerts['error_milkprocessor']) - return false + return false end local amount = milkbucket.amount @@ -199,11 +199,11 @@ RegisterServerEvent('qb-simplefarming:diarymilk', function() else return false end - - if not Player.Functions.RemoveItem('milkbucket', amount) then + + if not Player.Functions.RemoveItem('milkbucket', amount) then print('couldnt remove item',amount) TriggerClientEvent('QBCore:Notify', source, Config.Alerts['itemamount']) - return false + return false end TriggerClientEvent('inventory:client:ItemBox', source, QBCore.Shared.Items['milkbucket'], "remove") @@ -230,9 +230,9 @@ RegisterServerEvent('qb-simplefarming:pumpkinprocessing', function() local source = source local Player = QBCore.Functions.GetPlayer(tonumber(source)) local pumpkin = Player.Functions.GetItemByName('rawpumpkin') - if not pumpkin then + if not pumpkin then TriggerClientEvent('QBCore:Notify', source, Config.Alerts['error_milkprocessor']) - return false + return false end local amount = pumpkin.amount @@ -241,10 +241,10 @@ RegisterServerEvent('qb-simplefarming:pumpkinprocessing', function() else return false end - - if not Player.Functions.RemoveItem('rawpumpkin', amount) then + + if not Player.Functions.RemoveItem('rawpumpkin', amount) then TriggerClientEvent('QBCore:Notify', source, Config.Alerts['itemamount']) - return false + return false end TriggerClientEvent('inventory:client:ItemBox', source, QBCore.Shared.Items['rawpumpkin'], "remove") @@ -293,9 +293,9 @@ RegisterServerEvent('qb-simplefarming:cornprocessing', function() local source = source local Player = QBCore.Functions.GetPlayer(tonumber(source)) local corn = Player.Functions.GetItemByName('corncob') - if not corn then + if not corn then TriggerClientEvent('QBCore:Notify', source, Config.Alerts['error_corncob']) - return false + return false end local amount = corn.amount @@ -304,10 +304,10 @@ RegisterServerEvent('qb-simplefarming:cornprocessing', function() else return false end - - if not Player.Functions.RemoveItem('corncob', amount) then + + if not Player.Functions.RemoveItem('corncob', amount) then TriggerClientEvent('QBCore:Notify', source, Config.Alerts['itemamount']) - return false + return false end TriggerClientEvent('inventory:client:ItemBox', source, QBCore.Shared.Items['corncob'], "remove") @@ -383,9 +383,9 @@ RegisterServerEvent('qb-simplefarming:grapeprocessing', function() local source = source local Player = QBCore.Functions.GetPlayer(tonumber(source)) local grapes = Player.Functions.GetItemByName('grapes') - if not grapes then + if not grapes then TriggerClientEvent('QBCore:Notify', source, Config.Alerts['error_grape']) - return false + return false end local amount = grapes.amount @@ -394,10 +394,10 @@ RegisterServerEvent('qb-simplefarming:grapeprocessing', function() else return false end - - if not Player.Functions.RemoveItem('grapes', amount) then + + if not Player.Functions.RemoveItem('grapes', amount) then TriggerClientEvent('QBCore:Notify', source, Config.Alerts['itemamount']) - return false + return false end TriggerClientEvent('inventory:client:ItemBox', source, QBCore.Shared.Items['grapes'], "remove") @@ -435,9 +435,9 @@ RegisterServerEvent('qb-simplefarming:makinghotsauce', function() local source = source local Player = QBCore.Functions.GetPlayer(tonumber(source)) local pepper = Player.Functions.GetItemByName('chillypepper') - if not pepper then + if not pepper then TriggerClientEvent('QBCore:Notify', source, Config.Alerts['error_chilly']) - return false + return false end local amount = pepper.amount @@ -446,10 +446,10 @@ RegisterServerEvent('qb-simplefarming:makinghotsauce', function() else return false end - - if not Player.Functions.RemoveItem('chillypepper', amount) then + + if not Player.Functions.RemoveItem('chillypepper', amount) then TriggerClientEvent('QBCore:Notify', source, Config.Alerts['itemamount']) - return false + return false end TriggerClientEvent('inventory:client:ItemBox', source, QBCore.Shared.Items['chillypepper'], "remove") @@ -475,7 +475,7 @@ RegisterServerEvent('qb-simplefarming:tomatoesprocessing', function() local source = source local Player = QBCore.Functions.GetPlayer(tonumber(source)) local tom = Player.Functions.GetItemByName('tomato') - if not tom then + if not tom then TriggerClientEvent('QBCore:Notify', source, Config.Alerts['error_tomatoes']) return false end @@ -486,10 +486,10 @@ RegisterServerEvent('qb-simplefarming:tomatoesprocessing', function() else return false end - - if not Player.Functions.RemoveItem('tomato', amount) then + + if not Player.Functions.RemoveItem('tomato', amount) then TriggerClientEvent('QBCore:Notify', source, Config.Alerts['itemamount']) - return false + return false end TriggerClientEvent('inventory:client:ItemBox', source, QBCore.Shared.Items['tomato'], "remove") @@ -562,7 +562,7 @@ RegisterServerEvent('qb-simplefarming:baconprocessed', function() local source = source local Player = QBCore.Functions.GetPlayer(tonumber(source)) local bacon = Player.Functions.GetItemByName('raw_bacon') - if not bacon then + if not bacon then TriggerClientEvent('QBCore:Notify', source, Config.Alerts['error_bacon']) return false end @@ -573,10 +573,10 @@ RegisterServerEvent('qb-simplefarming:baconprocessed', function() else return false end - - if not Player.Functions.RemoveItem('raw_bacon', amount) then + + if not Player.Functions.RemoveItem('raw_bacon', amount) then TriggerClientEvent('QBCore:Notify', source, Config.Alerts['itemamount']) - return false + return false end TriggerClientEvent('inventory:client:ItemBox', source, QBCore.Shared.Items['raw_bacon'], "remove") @@ -591,7 +591,7 @@ RegisterServerEvent('qb-simplefarming:hamprocessed', function() local source = source local Player = QBCore.Functions.GetPlayer(tonumber(source)) local ham = Player.Functions.GetItemByName('raw_ham') - if not ham then + if not ham then TriggerClientEvent('QBCore:Notify', source, Config.Alerts['error_ham']) return false end @@ -602,10 +602,10 @@ RegisterServerEvent('qb-simplefarming:hamprocessed', function() else return false end - - if not Player.Functions.RemoveItem('raw_ham', amount) then + + if not Player.Functions.RemoveItem('raw_ham', amount) then TriggerClientEvent('QBCore:Notify', source, Config.Alerts['itemamount']) - return false + return false end TriggerClientEvent('inventory:client:ItemBox', source, QBCore.Shared.Items['raw_ham'], "remove") @@ -620,7 +620,7 @@ RegisterServerEvent('qb-simplefarming:porkprocessed', function() local source = source local Player = QBCore.Functions.GetPlayer(tonumber(source)) local pork = Player.Functions.GetItemByName('raw_pork') - if not pork then + if not pork then TriggerClientEvent('QBCore:Notify', source, Config.Alerts['error_pork']) return false end @@ -631,10 +631,10 @@ RegisterServerEvent('qb-simplefarming:porkprocessed', function() else return false end - - if not Player.Functions.RemoveItem('raw_pork', amount) then + + if not Player.Functions.RemoveItem('raw_pork', amount) then TriggerClientEvent('QBCore:Notify', source, Config.Alerts['itemamount']) - return false + return false end TriggerClientEvent('inventory:client:ItemBox', source, QBCore.Shared.Items['raw_pork'], "remove") @@ -649,7 +649,7 @@ RegisterServerEvent('qb-simplefarming:sausageprocessed', function() local source = source local Player = QBCore.Functions.GetPlayer(tonumber(source)) local sausage = Player.Functions.GetItemByName('raw_sausage') - if not sausage then + if not sausage then TriggerClientEvent('QBCore:Notify', source, Config.Alerts['error_sausage']) return false end @@ -660,10 +660,10 @@ RegisterServerEvent('qb-simplefarming:sausageprocessed', function() else return false end - - if not Player.Functions.RemoveItem('raw_sausage', amount) then + + if not Player.Functions.RemoveItem('raw_sausage', amount) then TriggerClientEvent('QBCore:Notify', source, Config.Alerts['itemamount']) - return false + return false end TriggerClientEvent('inventory:client:ItemBox', source, QBCore.Shared.Items['raw_sausage'], "remove") @@ -690,7 +690,7 @@ RegisterServerEvent('qb-simplefarming:feedingpiglit', function() local source = source local Player = QBCore.Functions.GetPlayer(tonumber(source)) local soybean = Player.Functions.GetItemByName('soybeans') - if not soybean then + if not soybean then TriggerClientEvent('QBCore:Notify', source, Config.Alerts['error_soybean']) return false end @@ -701,10 +701,10 @@ RegisterServerEvent('qb-simplefarming:feedingpiglit', function() else return false end - - if not Player.Functions.RemoveItem('soybeans', amount) then + + if not Player.Functions.RemoveItem('soybeans', amount) then TriggerClientEvent('QBCore:Notify', source, Config.Alerts['error.soybean']) - return false + return false end TriggerClientEvent('inventory:client:ItemBox', source, QBCore.Shared.Items['soybeans'], "remove") TriggerClientEvent('QBCore:Notify', source, Config.Alerts['stress'])