Skip to content

Instantly share code, notes, and snippets.

@jag-dev
Created April 26, 2023 17:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jag-dev/b02af61a551ddf42f92fc20cb62cc275 to your computer and use it in GitHub Desktop.
Save jag-dev/b02af61a551ddf42f92fc20cb62cc275 to your computer and use it in GitHub Desktop.
Food Deliveries Config [QB/ESX]
Config = {}
Config.settings = {
qbEnabled = true, -- Using QBCore
esxEnabled = false, -- Using ESX
useTargeting = false, -- Using targeting system
pickupDelay = 6, -- Time in between pickups
pickupTime = 60, -- How long to pickup order
deliveryTime = 120, -- How long to deliver to customer
failDeliveryFee = 100, -- How much driver gets charged for failed delivery
stopDeliverOnIdle = false, -- Don't give another pickup if they ran out of time on the previous
requirePhone = true, -- Require them to have a phone in order to start getting orders
requireVehicle = true, -- Require them to be in a vehicle to start accepting orders
useMainRadial = true, -- Add Deliver Food option to the global ox_lib radial menu
notifyPosition = 'center-left', -- Position of ox_lib notifications
pickupBlip = 1, -- Pickup location map blip (https://docs.fivem.net/docs/game-references/blips/#blips)
deliverBlip = 480, -- Delivery location map blip (https://docs.fivem.net/docs/game-references/blips/#blips)
blipColor = 3, -- -- Pickup location map blip (https://docs.fivem.net/docs/game-references/blips/#blip-colors)
customerPeds = {`a_f_m_fatwhite_01`, `a_m_m_genfat_02`, `a_m_m_genfat_01`}, -- Possible peds for customers
}
Config.pickupLocations = {
-- name = Location Name
-- location = Actual vector location
-- alwaysStocked = Spot is always stocked and able to be picked up from
-- job.name = Name of the job associated with location
-- job.stockGrade = Job grade required to restock items
-- job.pickupGrade = Job grade required to pickup from location
-- stock = Items available to be stocked and picked up
-- { Name, Item, Limit, Restock Pay (How much job gets for restocking item) }
{
name = "Sandwich Shop",
location = vector4(-1252.92, -289.67, 37.35, 30.27),
alwaysStocked = true,
job = {
name = 'police',
stockGrade = 1,
pickupGrade = 2,
},
stock = {
{'Sandwich', 'sandwich', 10, 100},
{'Water', 'water_bottle', 500, 50},
},
},
}
Config.dropoffLocations = {
-- location = Dropoff vector location
-- pay = Pay for completing the job (adds to bank)
-- tip = A tip for the delivery (adds cash)
-- tipChance = Chance to recieve a tip
-- isAPed = If true, spawns a ped to hand bag to, if false plays door knocking animation
{
location = vector4(-949.31, 196.98, 66.39, 340.94),
pay = 1000,
tip = math.random(500, 1000),
tipChance = 75,
isAPed = false,
},
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment