Idle - 0.01ms
While working - 0.04ms
(i7 9700k, RTX 2060S, 32GB RAM)
STORE:
PREVIEW:
FEATURES:
- Optimized script
- Working with Asset Escrow
CONFIG:
Keys = {
['ESC'] = 322, ['F1'] = 288, ['F2'] = 289, ['F3'] = 170, ['F5'] = 166, ['F6'] = 167, ['F7'] = 168, ['F8'] = 169, ['F9'] = 56, ['F10'] = 57,
['~'] = 243, ['1'] = 157, ['2'] = 158, ['3'] = 160, ['4'] = 164, ['5'] = 165, ['6'] = 159, ['7'] = 161, ['8'] = 162, ['9'] = 163, ['-'] = 84, ['='] = 83, ['BACKSPACE'] = 177,
['TAB'] = 37, ['Q'] = 44, ['W'] = 32, ['E'] = 38, ['R'] = 45, ['T'] = 245, ['Y'] = 246, ['U'] = 303, ['P'] = 199, ['['] = 39, [']'] = 40, ['ENTER'] = 18,
['CAPS'] = 137, ['A'] = 34, ['S'] = 8, ['D'] = 9, ['F'] = 23, ['G'] = 47, ['H'] = 74, ['K'] = 311, ['L'] = 182,
['LEFTSHIFT'] = 21, ['Z'] = 20, ['X'] = 73, ['C'] = 26, ['V'] = 0, ['B'] = 29, ['N'] = 249, ['M'] = 244, [','] = 82, ['.'] = 81,
['LEFTCTRL'] = 36, ['LEFTALT'] = 19, ['SPACE'] = 22, ['RIGHTCTRL'] = 70,
['HOME'] = 213, ['PAGEUP'] = 10, ['PAGEDOWN'] = 11, ['DEL'] = 178,
['LEFT'] = 174, ['RIGHT'] = 175, ['TOP'] = 27, ['DOWN'] = 173,
}
Config = {}
Config.JobRequirement = false
Config.JobName = "fruitpicker"
Config.Prefix = ESX
Config.TriggerPrefix = "esx"
Config.ClothesRequirement = true -- True to enable, False to disable
Config.CarModelName = "kalahari"
Config.BasketPositions = {
LeftCarBasket = {
xPos = -0.45,
yPos = 1.15,
zPos = 0.27,
xRot = 0.0,
yRot = 0.0,
zRot = 90.0,
},
CenterCarBasket = {
xPos = 0.0,
yPos = 0.39,
zPos = 0.27,
xRot = 0.0,
yRot = 0.0,
zRot = 90.0,
},
RightCarBasket = {
xPos = 0.45,
yPos = 1.15,
zPos = 0.27,
xRot = 0.0,
yRot = 0.0,
zRot = 90.0,
},
}
Config.DepositPrice = 500
Config.WashFruitTime = 10000 -- in miliseconds
Config.PricePerOrange = 50
Config.PricePerApple = 45
Config.PricePerStrawberry = 55
Config.Colors = {r = 78, g = 255, b = 175}
Config.Main = {
Shed = {
Pos = {x = 416.56, y = 6520.77, z = 27.71, h = 86.61},
Blip = {
Sprite = 285,
Scale = 0.6,
ShortRange = true,
Color = 51,
Label = "[~o~Fruit Picker~s~] Shed",
},
},
Garage = {
Pos = {x = 408.1, y = 6494.77, z = 28.03, h = 170.13},
SpawnPos = {x = 408.11, y = 6491.83, z = 27.65, h = 87.99},
ReturnPos = {x = 421.80, y = 6474.82, z = 28.33, h = 49.55},
Blip = {
Sprite = 50,
Scale = 0.6,
ShortRange = true,
Color = 51,
ReturnColor = 1,
Label = "[~o~Fruit Picker~s~] Garage",
},
},
Spots = {
Pos = {
Orange = {
{x = 378.01, y = 6505.87, z = 27.96, taked = false, blip},
{x = 370.15, y = 6505.94, z = 28.40, taked = false, blip},
{x = 363.17, y = 6505.76, z = 28.55, taked = false, blip},
{x = 355.34, y = 6504.96, z = 28.46, taked = false, blip},
{x = 347.85, y = 6505.26, z = 28.79, taked = false, blip},
{x = 339.75, y = 6505.46, z = 28.69, taked = false, blip},
{x = 330.85, y = 6505.57, z = 28.53, taked = false, blip},
{x = 321.80, y = 6505.41, z = 29.17, taked = false, blip},
{x = 378.12, y = 6517.59, z = 28.34, taked = false, blip},
{x = 369.95, y = 6517.66, z = 28.37, taked = false, blip},
{x = 362.66, y = 6517.78, z = 28.28, taked = false, blip},
{x = 355.31, y = 6517.28, z = 28.15, taked = false, blip},
{x = 347.49, y = 6517.67, z = 28.75, taked = false, blip},
{x = 338.83, y = 6517.19, z = 28.94, taked = false, blip},
{x = 330.32, y = 6517.73, z = 28.96, taked = false, blip},
{x = 321.81, y = 6517.49, z = 29.13, taked = false, blip},
{x = 369.41, y = 6531.76, z = 28.40, taked = false, blip},
{x = 361.48, y = 6531.42, z = 28.34, taked = false, blip},
{x = 353.77, y = 6530.86, z = 28.35, taked = false, blip},
{x = 345.96, y = 6531.36, z = 28.68, taked = false, blip},
{x = 338.38, y = 6531.29, z = 28.57, taked = false, blip},
{x = 329.54, y = 6531.06, z = 28.58, taked = false, blip},
{x = 321.78, y = 6531.20, z = 29.13, taked = false, blip},
},
Apple = {
{x = 282.10, y = 6506.62, z = 30.11, taked = false, blip},
{x = 273.48, y = 6507.36, z = 30.40, taked = false, blip},
{x = 263.92, y = 6506.15, z = 30.67, taked = false, blip},
{x = 256.14, y = 6503.98, z = 30.86, taked = false, blip},
{x = 246.79, y = 6502.95, z = 31.04, taked = false, blip},
{x = 236.75, y = 6501.89, z = 31.20, taked = false, blip},
{x = 227.88, y = 6501.57, z = 31.31, taked = false, blip},
{x = 219.93, y = 6499.42, z = 31.38, taked = false, blip},
{x = 209.94, y = 6498.27, z = 31.45, taked = false, blip},
{x = 201.66, y = 6497.21, z = 31.47, taked = false, blip},
{x = 194.02, y = 6497.31, z = 31.52, taked = false, blip},
{x = 185.14, y = 6498.13, z = 31.54, taked = false, blip},
{x = 281.29, y = 6518.87, z = 30.16, taked = false, blip},
{x = 272.47, y = 6519.19, z = 30.43, taked = false, blip},
{x = 262.27, y = 6516.63, z = 30.70, taked = false, blip},
{x = 253.51, y = 6514.20, z = 30.91, taked = false, blip},
{x = 244.69, y = 6515.29, z = 31.08, taked = false, blip},
{x = 234.39, y = 6512.71, z = 31.23, taked = false, blip},
{x = 225.89, y = 6511.67, z = 31.33, taked = false, blip},
{x = 217.95, y = 6510.20, z = 31.39, taked = false, blip},
{x = 208.51, y = 6509.89, z = 31.47, taked = false, blip},
{x = 199.64, y = 6508.94, z = 31.51, taked = false, blip},
{x = 280.47, y = 6530.85, z = 30.18, taked = false, blip},
{x = 270.46, y = 6530.62, z = 30.49, taked = false, blip},
{x = 261.59, y = 6527.68, z = 30.73, taked = false, blip},
{x = 251.92, y = 6527.55, z = 30.95, taked = false, blip},
{x = 242.94, y = 6526.37, z = 31.10, taked = false, blip},
{x = 233.33, y = 6524.71, z = 31.24, taked = false, blip},
{x = 223.84, y = 6523.71, z = 31.35, taked = false, blip},
},
Strawberry = {
{x = 285.43, y = 6482.13, z = 30.12, taked = false, blip},
{x = 270.68, y = 6480.81, z = 30.47, taked = false, blip},
{x = 259.52, y = 6479.81, z = 30.72, taked = false, blip},
{x = 248.30, y = 6478.91, z = 30.93, taked = false, blip},
{x = 238.52, y = 6478.09, z = 31.10, taked = false, blip},
{x = 227.34, y = 6477.19, z = 31.29, taked = false, blip},
{x = 215.20, y = 6476.20, z = 31.52, taked = false, blip},
{x = 285.60, y = 6479.83, z = 30.12, taked = false, blip},
{x = 270.84, y = 6478.77, z = 30.47, taked = false, blip},
{x = 259.59, y = 6477.93, z = 30.72, taked = false, blip},
{x = 248.54, y = 6477.04, z = 30.93, taked = false, blip},
{x = 238.76, y = 6476.19, z = 31.10, taked = false, blip},
{x = 227.60, y = 6475.25, z = 31.29, taked = false, blip},
{x = 215.43, y = 6474.34, z = 31.52, taked = false, blip},
{x = 285.89, y = 6478.00, z = 30.11, taked = false, blip},
{x = 271.27, y = 6476.72, z = 30.56, taked = false, blip},
{x = 259.93, y = 6475.89, z = 30.79, taked = false, blip},
{x = 248.82, y = 6474.92, z = 31.00, taked = false, blip},
{x = 239.16, y = 6474.13, z = 31.16, taked = false, blip},
{x = 227.82, y = 6473.26, z = 31.33, taked = false, blip},
{x = 215.67, y = 6472.29, z = 31.56, taked = false, blip},
},
},
Blip = {
Orange = {
Sprite = 285,
Scale = 0.4,
ShortRange = true,
Color = 51,
Label = "[~o~Fruit Picker~s~] Orange",
},
Apple = {
Sprite = 285,
Scale = 0.4,
ShortRange = true,
Color = 59,
Label = "[~o~Fruit Picker~s~] Apple",
},
Strawberry = {
Sprite = 285,
Scale = 0.4,
ShortRange = true,
Color = 1,
Label = "[~o~Fruit Picker~s~] Strawberry",
},
},
},
WashingPlace = {
Pos = {x = 1785.75, y = 4610.43, z = 37.18, h = 281.88},
Blip = {
Sprite = 285,
Scale = 0.4,
ShortRange = true,
Color = 51,
Label = "[~o~Fruit Picker~s~] Washing Place",
},
},
SalePlace = {
PedPos = {x = 1785.65, y = 4594.25, z = 37.68, h = 179.30},
AnimPos = {x = 1785.78, y = 4593.38, z = 37.69, h = 8.70},
Pos = {x = 1785.77, y = 4592.88, z = 37.68, h = 6.65},
Blip = {
Sprite = 285,
Scale = 0.4,
ShortRange = true,
Color = 51,
Label = "[~o~Fruit Picker~s~] Place of Sale",
},
},
}
function LoadClothes()
Config.Prefix.TriggerServerCallback('esx_skin:getPlayerSkin', function(skin, jobSkin)
if skin.sex == 0 then
TriggerEvent('skinchanger:loadClothes', skin, Config.Clothes.Male)
elseif skin.sex == 1 then
TriggerEvent('skinchanger:loadClothes', skin, Config.Clothes.Female)
end
end)
end
function LoadSkin()
Config.Prefix.TriggerServerCallback('esx_skin:getPlayerSkin', function(skin)
TriggerEvent('skinchanger:loadSkin', skin)
end)
end
Config.Clothes = {
Male = {
['tshirt_1'] = 15, ['tshirt_2'] = 0,
['torso_1'] = 5, ['torso_2'] = 2,
['arms'] = 5,
['pants_1'] = 6, ['pants_2'] = 1,
['shoes_1'] = 16, ['shoes_2'] = 7,
['helmet_1'] = 44, ['helmet_2'] = 7,
},
Female = {
['tshirt_1'] = 15, ['tshirt_2'] = 0,
['torso_1'] = 4, ['torso_2'] = 14,
['arms'] = 4,
['pants_1'] = 25, ['pants_2'] = 1,
['shoes_1'] = 16, ['shoes_2'] = 4,
}
}
function noti(type, msg, duration)
exports['mythic_notify']:DoCustomHudText(type, msg, duration)
end
function Notifications(name)
if name == "StartWork" then
noti("success", "You started work as Fruit Picker!", 2500)
elseif name == "GoToGarage" then
noti("inform", "Go to the Garage and get Company Vehicle", 5000)
elseif name == "FinishWork" then
noti("error", "You finished work as Fruit Picker!", 2500)
elseif name == "ReturnVehFirst" then
noti("error", "You must return Vehicle first!", 2500)
elseif name == "PaidDeposit" then
noti("success", "You paid "..Config.DepositPrice.."$ for Deposit Vehicle", 2500)
elseif name == "DriveToOrchard" then
noti("inform", "Drive to the Orchard, take the appropriate Basket out of the Trunk and Start Picking the fruits", 7500)
elseif name == "DontHaveEnoughMoney" then
noti("error", "You don't have enough Money to pay for the Vehicle Deposit! Expense: "..Config.DepositPrice.."$", 2500)
elseif name == "ReturnDeposit" then
noti("error", Config.DepositPrice.."$ has been returned to your Bank Account", 2500)
elseif name == "NotYourVehicle" then
noti("error", "This is not the Vehicle for which you have paid a Deposit", 2500)
elseif name == "PickedAllOranges" then
noti("success", "You picked up all Oranges from the Orchard", 5000)
elseif name == "PickedAllApples" then
noti("success", "You picked up all Apples from the Orchard", 5000)
elseif name == "PickedAllStrawberries" then
noti("success", "You picked up all Strawberries from the Orchard", 5000)
elseif name == "PickedAllFruits" then
noti("success", "Excellently! You picked up all the fruit from the orchard. Go to the marked place on GPS!", 7500)
elseif name == "StartWashingOranges" then
noti("inform", "You started washing Oranges", 5000)
elseif name == "WashedAllOranges" then
noti("success", "You washed all Oranges", 2500)
elseif name == "StartWashingApples" then
noti("inform", "You started washing Apples", 5000)
elseif name == "WashedAllApples" then
noti("success", "You washed all Apples", 2500)
elseif name == "StartWashingStrawberries" then
noti("inform", "You started washing Strawberries", 5000)
elseif name == "WashedAllStrawberries" then
noti("success", "You washed all Strawberries", 2500)
elseif name == "WashedAllFruits" then
noti("success", "You washed all Fruits, go to the Front Door of the Store and sell Fruits", 5000)
elseif name == "SelledOrange" then
SelledOrangeFor = Config.PricePerOrange * #Config.Main.Spots.Pos.Orange
noti("success", "You selled "..#Config.Main.Spots.Pos.Orange.." Oranges for "..SelledOrangeFor.."$!", 5000)
elseif name == "SelledApple" then
SelledAppleFor = Config.PricePerApple * #Config.Main.Spots.Pos.Apple
noti("success", "You selled "..#Config.Main.Spots.Pos.Apple.." Apples for "..SelledAppleFor.."$!", 5000)
elseif name == "SelledStrawberry" then
SelledStrawberryFor = Config.PricePerStrawberry * #Config.Main.Spots.Pos.Strawberry
noti("success", "You selled "..#Config.Main.Spots.Pos.Strawberry.." Strawberries for "..SelledStrawberryFor.."$!", 5000)
elseif name == "BackToOrchard" then
noti("inform", "Go back to the Orchard to continue working or finish work!", 5000)
end
end
Config.UseCustomDrawTextMessage = false -- if value are set to false, script using default Messages from client.lua (better optimisation)
Config.DrawText = {
StartWork = "~w~Press [~s~E~w~] to Start Work~s~",
FinishWork = "~w~Press [~s~~r~E~s~~w~] to Finish Work~s~",
SpawnVehicle = "~w~Press [~s~E~w~] to Spawn Vehicle~s~",
ReturnVehicle = "~w~Press [~s~~r~G~s~~w~] to Return Vehicle~s~",
TrunkBasketOrange = "[~s~7~w~] - Oranges",
TrunkBasketApple = "[~s~8~w~] - Apples",
TrunkBasketStrawberry = "[~s~9~w~] - Strawberries",
PutInBasket = "~w~Press [~s~G~w~] to put in Basket",
PickOrange = "~w~Press [~s~E~w~] to Pick Orange~s~",
PickApple = "~w~Press [~s~E~w~] to Pick Apple~s~",
PickStrawberry = "~w~Press [~s~E~w~] to Pick Strawberry~s~",
WashOranges = "~w~Press [~s~E~w~] to Wash ~s~~o~Oranges~s~",
WashedOranges = "~w~Your ~s~~o~Oranges~s~ ~w~are already Washed~s~",
WashApples = "~w~Press [~s~E~w~] to Wash ~s~~r~Apples~s~",
WashedApples = "~w~Your ~s~~r~Apples~s~ ~w~are already Washed~s~",
WashStrawberries = "~w~Press [~s~E~w~] to Wash ~s~~r~Strawberries~s~",
WashedStrawberries = "~w~Your ~s~~r~Strawberries~s~ ~w~are already Washed~s~",
DontHaveBasketWithYou = "~w~You don't have a ~s~Basket~w~ with you~s~",
SellOranges = "~w~Press [~s~E~w~] to sell ~s~~o~Oranges~s~",
SellApples = "~w~Press [~s~E~w~] to sell ~s~~r~Apples~s~",
SellStrawberries = "~w~Press [~s~E~w~] to sell ~s~~r~Strawberries~s~",
SellerBusy = "Seller ~w~are actually Busy~s~",
BasketWithOranges = "~w~Basket with Oranges: ~s~",
BasketWithApples = "~w~Basket with Apples: ~s~",
BasketWithStrawberries = "~w~Basket with Strawberries: ~s~",
}