Here it is! My first contribution to the Community!
A delivery system for ESX that you can use to create any delivery job or bind delivery missions to a pre-existing job.
I looked for gang jobs that had a drug delivery system enabled (like a mission). Since I didn’t find any, I decided to code my own. And when I was coding it, I expanded it.
Requirements
Demo
I created a marker at the Ballas location and made an event that when you press E, it starts a delivery mission with 2 locations. If the player below doesn’t work, the demonstration can be found here
Download
Usage and example code
Check the README.MD for a more detailed example about it. It’s quite extensive, but it’s worth it!
Exported Functions
exports.trew_easydeliveries:deliveryStatus()
It tells you if the delivery is active or not
Variables
job
The job you want to create the delivery. Ex: ballas, losvagos, baker, pizzaman, etc.
Must be the same identifier as in the database
product
The job you want to create the delivery. Ex: cocain_pouch, bread, pizza, etc.
Must be the same identifier as in the database
howmany
The amount of deliveries you want to make. It’s important for it to be equal or bigger than the amount of blips.
label
Blip label on the map
title
The title of the delivery action
reward
The amount of money you receive each delivery made
rewardtype
The type of money you receive. If it’s set to cash it goes to your wallet, black it goes as black money and bank if you want it to go straight to your bank account.
anim
If you want animations, you need to specify this variable as a table, using the following options:
- dict: The animation dictionary
- anim: The animation id
More info on animations here.
There’s a YouTube channel containing video on a bunch of animations and it’s IDs. Take a look.
blipcolor
The color of the blip and the route on the map. Here’s a list of blip color codes.
markercolor
The RGB color code, on where:
- r: The amount of RED
- g: The amount of GREEN
- b: The amount of BLUE
markervisibility
It defines how many meters your blip will be visible for you
blips
The delivery locations identifiers. You should use the pattern
- x: the X axis
- y: the Y axis
- z: the Z axis
Changelog
Aug 30th, 2019
- Item consumption and rewarding were moved to server-side;
- Item consumption is now random from 1 to a maximum of 5 (default), acting as a multiplier for the reward. You can change the maximum value in config.lua;
- The locations are now randomly selected.
–
I hope you guys like it!