Install Instructions

Automatic SQL Injection

You'll notice in your lation_selling/install directory a file named lation_selling.sql - you do not need to import this manually into your database. Upon starting your server (or just the resource) it will automatically create and setup the necessary database table for you if it doesn't exist already.

Step 1 - Install Dependencies

There are two dependencies (other resources) required to get Advanced Drug Sales installed properly & working: oxmysql & ox_lib. You may already have these installed, but please double check & ensure you have the latest version of each.

Important Notice

It is vitally important to ensure you start each resource in the correct order in your server.cfg. To begin, "oxmysql" should be one of, if not, the first resource started, followed by "ox_lib" - both of these should be started even before your framework (qb-core or es_extended).

Step 2 - Setup Config

Before you launch your server for the first time with the new resource it is best to ensure you have some general options set to your preferred options. At the top of the config you will find the following:

--        🛠️ Setup the basics below

Config.Setup = {
    -- Use only if needed, directed by support or know what you're doing
    -- Notice: enabling debug features will significantly increase resmon
    -- And should always be disabled in production
    debug = false,
    -- Set your target system below
    -- Available options are: 'ox_target', 'qb-target', 'qtarget', 'custom' & 'none'
    -- 'custom' needs to be added to client/functions.lua
    -- If 'none' then TextUI is used instead of targeting
    target = 'none',
    -- Set your notification system below
    -- Available options are: 'ox_lib', 'esx', 'qb', 'okok', 'sd-notify', 'wasabi_notify' & 'custom'
    -- 'custom' needs to be added to client/functions.lua
    notify = 'ox_lib',
    -- Set your dispatch system below
    -- Available options: cd_dispatch, ps-dispatch, qs-dispatch, core_dispatch,
    -- rcore_dispatch, aty_dispatch, op-dispatch, origen_police, emergencydispatch & 'custom'
    -- 'custom' needs to be added manually to client/functions.lua
    dispatch = 'custom',
    -- Do you want to be notified via server console if an update is available?
    -- True if yes, false if no
    versionCheck = true,
    -- The below is only used if target = 'none'
    -- This will be the key used for interactions if no target is set
    -- More options here:
    interactKey = 38,
    -- 'requestWait' option below is how long the client should wait for a model/anim to load
    -- Do not edit unless you know what you are doing or directed via support member
    requestWait = 3500,
    -- If you want to disable specific jobs from selling drugs
    -- Then put the job name(s) below
    blacklistJobs = { 'police', 'ambulance' },
    -- Do you want to enable a dymanic inventory check that verifies the player
    -- Has at least one of the drugs in their inventory before applying interactions?
    -- If false, interactions will always be available, even if the player doesn't have
    -- Any of the drugs/items in their inventory
    dymanic = true

By default, the value will be set to 'none' which means no target system will be used and instead TextUI interactions will be used. If you wish to use a targeting system instead, you must specify which target system you use from the available options listed.

Furthermore, there are countless other configurations that can be made in the config file to customize the script to your liking and fit your server's specific needs! Every option in the config is detailed with comments explaining the use & effects of each option - so please read diligently and carefully.

Step 3 - Ensure Resource

The final step is simple - drag and drop the lation_selling resource into your main resources directory or even a sub-folder. Open your server.cfg and add "ensure lation_selling" to the bottom. As mentioned above, resource start order is vitally important and you must ensure that lation_selling is started after all dependencies (and your framework).

Lastly - save, restart your server & enjoy the most advanced drug selling script on FiveM!

Last updated