📖
AdminPlus Development Documentation
  • AdminPlus Documentation
  • Support
  • 📍Information
    • You lack the required entitlement.
  • 💰Paid Scripts
    • [QB/ESX] Admin Jail [PAID]
    • [QB/ESX] Wigs & Bundles [PAID]
    • [QB/ESX] Bus Travel [PAID]
    • [QB/ESX] Business Promotion [PAID]
    • [QB/QBOX/ESX] Discord Presence [PAID]
    • [QB/ESX] Character Attributes [PAID]
    • [QB/ESX] Server Essentials [PAID]
    • [QB/ESX] Typing Indicator [PAID]
    • [QB/ESX] Anti-Fall [FREE]
    • ESX | Faction Chat [PAID]
    • ESX | Gym [PAID]
    • [STANDALONE] 65+ Car Pack [PAID]
  • 🆓Free Scripts
    • Anti Collision
    • Lost Items
    • Sell Drugs
    • Med System
Powered by GitBook
On this page
  1. Free Scripts

Sell Drugs

(fork of stasiek_selldrugsv2)

PreviousLost ItemsNextMed System

Last updated 1 year ago

This script allows you to do /dealer & sell drugs to locals with a random chance of it calling the cops.

  • Configurable city point locations.

  • Configurable locales to change the language.

  • Configurable items & prices.

  • Configurable required cops.

  • Configurable option for NPCs to fight if they reject your drug.

  • Configurable ped list.

  • Configurable account option 'bank' or 'money'.

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
  • This resource is drag/drop. You will just need to add the following inside of your server.cfg after you've dropped the file into your resources.

ensure adminplus-selldrugs

Feel free to check the config.lua & customise to what you'd like.

Config = {
    requiredCops = 0,
    npcFightOnReject = true,
    account = 'money', --change to 'money' if you want
    drugs = {
        ['coke_pooch'] = 150,
        --add as much as you want
    },
    cityPoint = vector3(0.0, -1509.0, 150.0), --set cityPoint to false to disable
    notify = {
        title = 'Drugs',
        nodrugs = 'You don\'t have any drugs to sell.',
        cooldown = 'Please wait some time!',
        toofar = 'You\'re too far from the city.',
        cops = 'There\'s no cops in the city.',
        searching = 'You\'re searching for clients for ',
        abort = 'Client has resigned from the order.',
        notfound = 'There\'s no nearby clients.',
        approach = 'Your client is approaching..',
        found = 'You\'ve found client on ',
        press = 'Press ~INPUT_PICKUP~ to sell',
        reject = 'This stuff is horrible!',
        vehicle = 'You\'ve got to leave vehicle to sell',
        sold = 'You\'ve sold x%s of %s for $%s',
        client = 'Your client want\'s to buy x%s %s',
        police_notify_title = 'Police Dispatch',
        police_notify_subtitle = 'Drugs sell',
    },
    pedlist = {
    }
}
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Codesign CD_Dispatch Compatability

Client (adminplus-selldrugs/client.lua)

-- for cd_dispatch integration add this under line 83 in client.lua & remove
ESX.ShowAdvancedNotification(Config.notify.title, '', Config.notify.cops, 'DIA_CLIFFORD', 1)

local data = exports['cd_dispatch']:GetPlayerInfo()
	TriggerServerEvent('cd_dispatch:AddNotification', {
	job_table = {'police'}, 
	coords = npc.ped,
	title = '10-15 - Drug Sale',
	message = 'A '..data.sex..' is selling drugs near '..data.street, 
	flash = 0,
	unique_id = tostring(math.random(0000000,9999999)),
	blip = {
		sprite = 431, 
		scale = 1.2, 
		colour = 3,
		flashes = false, 
		text = '911 - Drug Sales',
		time = (5*60*1000),
		sound = 1,
	}
})

Server (adminplus-selldrugs/server.lua)

-- for cd_dispatch integration add this under line 55 in server.lua & remove
TriggerClientEvent('stasiek_selldrugsv2:notifyPolice', -1, drugToSell.coords)

TriggerClientEvent('cd_dispatch:AddNotification', -1, {
        job_table = {'police'},
        coords = drugToSell.coords,
        title = '10-15 - Drug Sale',
        message = 'Someone is selling drugs',
        flash = 0,
        unique_id = tostring(math.random(0000000,9999999)),
        blip = {
            sprite = 403,
            scale = 1.2,
            colour = 1,
            flashes = false,
            text = '911 - Drug Sale',
            time = (5*60*1000),
            sound = 1,
        }
})
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
V 1.0.0
  • Original Release

V 1.0.1

Fixed bug where you couldn't get into vehicles mid sales. (clicking F / X will cancel sale).

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
🆓
https://github.com/itsAdminPlus/adminplus-anticollision