noclip_drugs

A comprehensive drug manufacturing and distribution script for FiveM servers using QBCore framework with ox_lib and ox_inventory support, featuring addiction mechanics, dynamic pricing, and comprehensive drug effects.

Harvesting System

Configurable harvest locations for different types of drugs

Dealer System

NPC dealers with configurable inventory and dynamic pricing

Processing

Dedicated areas for crafting drugs with specific recipes

Addiction System

Comprehensive addiction mechanics with withdrawal effects

Features

  • Configurable Harvest Locations: Set up multiple locations for harvesting different types of drugs
  • Dealer Peds: NPC dealers with configurable inventory and pricing
  • Processing Locations: Dedicated areas for crafting drugs with specific recipes
  • Recipe System: Complex recipes requiring specific ingredients and tools
  • Inventory Integration: Full support for ox_inventory with fallback to QBCore inventory
  • Target System: Uses ox_target for intuitive player interactions
  • Blip System: Automatic map markers for all locations
  • Admin Commands: Built-in admin tools for managing items
  • Drug Selling System: Sell drugs to peds with dynamic reactions
  • Consumables System: Drug effects, addiction mechanics, and cure items
  • Drug Influence Persistence: Active drug effects persist across server restarts
  • Dynamic Pricing: Market-based pricing system with supply and demand
  • Multi-Language Support: Localization system for different languages
  • Comprehensive Logging: Detailed activity logging for administration
  • Police Integration: Built-in support for police alerts and dispatch

Dependencies

  • qb-core - QBCore Framework
  • ox_lib - Modern UI library
  • ox_target - Advanced targeting system
  • ox_inventory - Modern inventory system (optional, has fallback)

Quick Start

  1. Place the noclip_drugs folder in your resources directory
  2. Add ensure noclip_drugs to your server.cfg
  3. Configure the script in shared/config.lua
  4. If using ox_inventory: Add the items to ox_inventory/data/items.lua
  5. Restart your server
Note: If you're using ox_inventory, make sure to add all required items. See the Installation Guide for detailed instructions.

Core Systems

Drug Selling System

The script includes a comprehensive drug selling system where players can sell drugs to NPCs (peds) with various outcomes:

  • Toggle Mode: Use /selldrugs command to toggle selling mode
  • Automatic Detection: Automatically detects available drugs in inventory
  • Dynamic Reactions: Configurable chances for different ped reactions
  • Police Integration: Built-in support for ps-dispatch alerts
  • Drug Recovery: System for recovering drugs from dead peds

Ped Reactions

  • Accept (35%): Ped buys drugs and gives money
  • Deny (25%): Ped refuses and walks away
  • Call Cops (20%): Ped calls police (ps-dispatch alert)
  • Attack (20%): Ped attacks player and steals drugs

Consumables System

Advanced drug consumption system with realistic effects and addiction mechanics:

  • Drug Effects: Each drug has configurable effects on player stats
  • Addiction System: Players can become addicted with withdrawal effects
  • Cure Items: Items to cure addictions (general and specific)
  • Animations & Effects: Custom animations and visual effects
  • Progress Bars: Visual feedback during drug consumption

Drug Types

  • Weed Joint: Heals health, reduces stress, boosts stamina
  • Cocaine Powder: Boosts stamina, reduces stress, increases speed
  • Meth Crystal: Maximum effects with high addiction risk

Drug Influence Persistence

Comprehensive drug influence tracking that persists across server restarts:

  • Influence Tracking: Active drug effects are tracked and saved
  • Persistence: Data persists across server restarts and disconnects
  • Automatic Restoration: Effects are restored when players reconnect
  • Expiration Handling: Expired influences are automatically cleaned up
  • Admin Management: Comprehensive admin commands for management

Configuration Overview

The script is highly configurable with options for:

  • Debug Mode: Enable detailed logging for troubleshooting
  • Language Settings: Multi-language support with easy customization
  • Harvest Locations: Configure multiple harvest spots for different drugs
  • Dealer Configuration: Set up NPC dealers with custom inventories
  • Processing Locations: Configure drug processing areas
  • Drug Effects: Customize effects for each drug type
  • Addiction Settings: Configure addiction thresholds and withdrawal effects
  • Market Pricing: Set up dynamic pricing system