BZK SellDrugs
Drug selling system with NPCs for RedM/VORP.


๐ Features
- NPC Interaction: Sell drugs directly to NPCs on the streets.
- Dynamic Pricing: Prices vary depending on the time of day.
- Modern NUI Interface: Beautiful and responsive interface.
- Inventory Integration: Compatible with VORP Inventory and RSG Inventory.
- Police Alert: NPCs may alert the police if they refuse the deal.
- Quantity System: Sold quantity varies according to the time of day.
- Spam Prevention: Each NPC can only be interacted with once per restart.
๐ฎ How to Use
For Players
- Type
/selldrugsin the chat to activate the system. - Click on an NPC to start the negotiation.
- The NPC will walk to you and start the dialog.
- Select the drug from your inventory.
- Enter the desired price (within the allowed range).
- Wait for the NPCโs response.
โ๏ธ Configuration
Edit the config.lua file to adjust prices, quantities, and available drugs.
Example: Prices by Time
prices = {
{startHour = 0, endHour = 6, minPrice = 15, maxPrice = 25}, -- Night
{startHour = 6, endHour = 12, minPrice = 20, maxPrice = 35}, -- Morning
{startHour = 12, endHour = 18, minPrice = 25, maxPrice = 40}, -- Afternoon
{startHour = 18, endHour = 23, minPrice = 30, maxPrice = 50} -- Evening
}
Example: Quantities by Time
quantities = {
{startHour = 0, endHour = 6, minQuantity = 1, maxQuantity = 3}, -- Night
{startHour = 6, endHour = 12, minQuantity = 2, maxQuantity = 5}, -- Morning
{startHour = 12, endHour = 18, minQuantity = 3, maxQuantity = 7}, -- Afternoon
{startHour = 18, endHour = 23, minQuantity = 5, maxQuantity = 10} -- Evening
}
Configured Drugs
drugs = {
{name = "cigar", label = "Cigar", item = "cigar"},
{name = "marijuana", label = "Marijuana", item = "marijuana"},
{name = "heroin", label = "Heroin", item = "heroin"},
{name = "meth", label = "Methamphetamine", item = "meth"},
{name = "lsd", label = "LSD", item = "lsd"}
}
๐ง Dependencies
- VORP Core or RSG Core (main framework)
- VORP Inventory or RSG Inventory (inventory system)
- Notification System (already included in the script)
๐ฏ Features Overview
- NPC Detection: Only NPCs can be interacted with.
- Duplicate Prevention: Each NPC can only be used once.
- Navigation: NPCs walk to the player using NavMesh.
- Camera: Focuses on the NPC during dialog.
- Freeze: Player and NPC are frozen during negotiation.
- Dynamic Prices: Vary according to the time of day.
- Validation: Prices and quantities must be within the configured range.
- Acceptance Chance: 50% chance the NPC will accept.
- Police Alert: 50% chance to alert the police if refused.
- Notification: Police receive an alert on the server.
๐ Installation
- Download the resource.
- Place it in your serverโs
resourcesfolder. - Configure the framework and drugs in
config.lua. - Add
ensure bzk_selldrugsto yourserver.cfg. - Restart your server.
๐ Compatibility
- Supported Frameworks: VORP Core and RSG Core
- The script automatically detects the framework and adapts all functions.
Quick setup:
Config.Framework = 'VORP' -- or 'RSG'
๐ Support
For questions or support, contact us via Discord.
๐ License
This project is under the MIT license. See the LICENSE file for more details.