ESX Drugsale is a drug-run script for ESX servers. A dealer NPC hands out the run: the player gets a car, drives to buyers marked on the map, hands over cannabis or coke for cash and has to beat a hacking minigame along the way, or the police get alerted.
Features
- Dealer NPC at a set start point; the run is started through a qtarget option (“Start the drug run”)
- Run vehicle picked at random from a car list (
coquette4,comet2,elegy2) and spawned on the first free of three spawn points - Buyers spawn at one of 49 configurable locations, with a GPS route and a random ped model from a list of 7
- Delivery through qtarget (“Deliver drugs”) with a handshake animation and a progress bar; each delivery sells one unit of
cannabis(150) orcoke(180) for cash, checked and paid on the server - Number of deliveries per run (default 1) and the waiting time for the next buyer are set in the config
- At random intervals during the run the player has to pass a hacking minigame; on failure the client event
noveladrugsaleis fired for your police alert - All settings in
shared.lua: start point, vehicle spawn points, buyer locations, ped and car lists, item names and prices
Requirements
- ESX (es_extended), loaded through the
esx:getSharedObjectevent - qtarget, novela-taskbar and novela-thermite
- A resource that handles the client events
notification(messages) and, if you want them,keys:received(car keys) andnoveladrugsale(police alert) - The items
cannabisandcokeon your server, or your own names inshared.lua
Installation
- Extract the archive and copy the
rb-drugsale-esxfolder into your resources. - Adjust item names, prices and coordinates in
shared.lua. - Add
ensure rb-drugsale-esxto your server.cfg after its dependencies.
Notes
server.luaalso contains older money events (mission:finished,drugdelivery:server) that take the amount from the client and are not used by this script; remove them before using it on a live server.