[RELEASE] ESX TREW EasyDelivery

Here it is! My first contribution to the Community! :slight_smile:

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! :smiley:

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! :smiley:

11 Likes

Hi Its a nice script , What is the name of the speedometer? that you have

I created it. It isn’t available yet. It’s a part of my new HUD UI.

Nice job! thanks for share it!

ESX needs more new jobs…

1 Like

Nice little script! You should be careful of defining the money amount and type on clientside. Would really recommend to move everything with payouts over to serverside. This can easily be exploited with injectors and cheat engine.

2 Likes

Like he said. By having it clientsided makes it vulnerable by cheat engine etc. Players will get how much money then want if they use cheat engine

@stianhje @LifeGoal I didn’t notice that. My goal was to make as smooth as possible. But I’ll take those advices into the next update. Thank you! :smiley:

3 Likes

lol there is one the same as that on GitHub lol

Can you tell me which one is it?

it called car hud 2 I have it on my server

Well, the hud isn’t what It’s being released or talked about here, but thanks for answering that :smiley:

I that coded from stratch. It’s a part of my hud ui (on which you can see). And, well, you’ll see a bunch of svg/css speedometers over the internet. :slight_smile: I got mine from a codpen snippet and upgraded it.

im just saying you said you made it and its not been released the one I have is the same as your lol …. anyway nice release keep up the good work dude

I know :smiley: … I didn’t imply that you said I ripped the hud off. I was just saying! :smiley: :smiley:

taking other people work and calling it your own tut tut (im joking dude)

@stianhje @LifeGoal Looking at my code, I have a question:

The user can set a TriggerServerEvent from his client.lua and, on the server.lua, he creates an event which can set all the variables and call the event from server side, using TriggerClientEvent.

Will it be safer that way?

That was not epic! :stuck_out_tongue:

You didn’t created it, it is part of enhanced hud

I won’t paste the code here, bud. Nice taunting. :slight_smile:

Nice HUD, is this in the community?

I’m working on a HUD ui. There are details here: [PREVIEW] [WIP] ESX Trew UI - A new NUI HUD