Installation
Last updated
Last updated
Dependencies:
Only compatible with ox_inventory, qb-inventory, ps-inventory and lj-inventory.
If you are using qb-inventory, lj/ps-inventory please make sure to follow this guide before using the script: https://docs.av-scripts.com/laptop-pack/av-laptop/installation/inventory
Frameworks: ESX and QBCore.
In config/_config.lua you will find the config for every drug available in runs, it only includes meth and coke but you can add as many drugs as you want by just copy/paste and editing the fields:
Item name: This is the name of the item and is used as table index, make sure it matches the item name from your inventory.
vehicle: This is a table with a list of vehicle that will be spawned as job vehicle.
moneyAccount: The account name used to pay the player after delivering the illegal packages.
cooldown: Once the run is started, the mission will be turned off for everyone on server and added to a cooldown, make sure to keep this number higher than timeLimit.
timeLimit: The time limit before the mission gets canceled and all vehicles/gang members wiped.
minQty: This is the minimum quantity of packages the NPC will accept to start the mission, keep it interesting so not everyone farms this mission 24/7.
maxQty: The max amount of drug bags a player can use for the run.
stashWeight: If your bag weight is 1kg or more do the maths and modify this value so you can deposit the maxQty items.
purityField: The script will read the metadata from every deposited bag and it will retrieve the purity from this metadata field, if the bag doesn't have any metadata it will use 1% as purity.
basePrice: The min price you will receive per package if quality is 1%.
maxPrice: The max price you will receive per package if quality is 100%.
zones: The amount of zones and packages that will be generated for the mission.
canInteract: This is a function that needs to return booleand (true/false), it verifies who can talk to the NPC, by default cops can't interact with it.
The NPC config is located server side to prevent people from dumping the resource and get the spawn coords, to modify it go to server/framework/_config.lua.
On every server restart the script will pick a random location from the list for each NPC.
Add a new NPC for every drug run and set the exact same name for both index key names (the one that says "meth_batch" is the exact same from Config.Drugs).
There's currently 50 locations that are used randomly on every run making it pretty unique and preventing players from doing metagaming.
When a mission is generated it picks a random group from the Config.PedGroups table, you can add your more groups.
A random weapon from the Config.Weapons table is given to every gang member, feel free to add more or remove the ones you don't want to be used.