- push for ready

This commit is contained in:
Mustache Dom committed 2026-03-05 00:00:34 -08:00
1 parent c3084abc78
commit 4e48857437
39 files changed
+167 -138

No files matched your search

+1 -1
View File
@@ -1,4 +1,4 @@
if not Config.Drugs['TravellingMerchant'] then return end
local function spawn() local function spawn()
local data = Bridge.Callback.Trigger('md-drugs:server:GetMerchant') local data = Bridge.Callback.Trigger('md-drugs:server:GetMerchant')
local model = 's_m_m_trucker_01' local model = 's_m_m_trucker_01'
+1 -1
View File
@@ -1,4 +1,4 @@
if not Config.Drugs['consumables'] then return end
Bridge.Callback.Register('md-drugs:client:consumedrugs', function(time, effect, anim, progresstext, status, item) Bridge.Callback.Register('md-drugs:client:consumedrugs', function(time, effect, anim, progresstext, status, item)
Bridge.Anim.RequestDict(anim.dict) Bridge.Anim.RequestDict(anim.dict)
+1 -1
View File
@@ -1,4 +1,4 @@
if not Config.Drugs['deliveries'] then return end
local dealer = {} local dealer = {}
local buyer = nil local buyer = nil
+42 -4
View File
@@ -304,9 +304,43 @@ else
end end
end end
if Config.Emotes == 'scully' then
function playEmote(emote)
exports.scully_emotemenu:playEmoteByCommand(emote, 0)
end
function stopEmote()
exports.scully_emotemenu:cancelEmote()
end
end
if Config.Emotes == 'dpemotes' then
function playEmote(emote)
TriggerEvent('animations:client:EmoteCommandStart', {emote})
end
function stopEmote()
TriggerEvent('animations:client:EmoteCommandStart', {"c"})
end
end
if Config.Emotes == 'rpemotes' then
function playEmote(emote)
exports["rpemotes"]:EmoteCommandStart(emote, 0)
end
function stopEmote()
exports["rpemotes"]:EmoteCancel()
end
end
local animation = nil
function progressbar(text, time, emote, cancel) function progressbar(text, time, emote, cancel)
if emote and emote.prop then local animData
if not emote.prop.model then if type(emote) == 'string' then
playEmote(emote)
animation = emote
elseif type(emote) == 'table' then
animData = emote
if emote.prop and not emote.prop.model then
emote.prop = nil emote.prop = nil
end end
end end
@@ -315,9 +349,13 @@ function progressbar(text, time, emote, cancel)
label = text or 'LAZY AF DEVS', label = text or 'LAZY AF DEVS',
canCancel = true, canCancel = true,
disable = cancel or Config.ProgressBar.Disables, disable = cancel or Config.ProgressBar.Disables,
anim = emote or Config.DefaultAnimation, anim = animData,
prop = emote and emote.prop or nil prop = animData and animData.prop or nil
}) })
if animation then
animation = nil
stopEmote()
end
return success return success
end end
+1 -1
View File
@@ -1,4 +1,4 @@
if not Config.Drugs['heroin'] then return end
local herointable = false local herointable = false
local dirty = false local dirty = false
+1 -1
View File
@@ -1,4 +1,4 @@
if not Config.Drugs['lean'] then return end
local started = false local started = false
local leanCar = nil local leanCar = nil
+1
View File
@@ -1,3 +1,4 @@
if not Config.Drugs['lsd'] then return end
local tableout = false local tableout = false
local dirtylsd = false local dirtylsd = false
local locations = Config.LSD.Locations local locations = Config.LSD.Locations
+1 -1
View File
@@ -1,4 +1,4 @@
if not Config.Drugs['mescaline'] then return end
local badTrip = 100 local badTrip = 100
local locations = Config.Mescaline.Locations local locations = Config.Mescaline.Locations
local function AlienEffect() local function AlienEffect()
+1
View File
@@ -1,3 +1,4 @@
if not Config.Drugs['meth'] then return end
local amonia, tray, heated, active, trays, startedmeth, methVan = false, false, false, false, nil, false, nil local amonia, tray, heated, active, trays, startedmeth, methVan = false, false, false, false, nil, false, nil
local locations = Config.Meth.Locations local locations = Config.Meth.Locations
--- meth heist --- meth heist
+1
View File
@@ -1,3 +1,4 @@
if not Config.Drugs['oxyruns'] then return end
local carryPackage = nil local carryPackage = nil
local onMission = false local onMission = false
local locations = Config.Oxy.Locations local locations = Config.Oxy.Locations
+2
View File
@@ -1,3 +1,5 @@
if not Config.Drugs['pharma'] then return end
local locations = Config.Pharma.Locations local locations = Config.Pharma.Locations
Bridge.Callback.Register("md-drugs:client:prescriptionpad", function( data, op) Bridge.Callback.Register("md-drugs:client:prescriptionpad", function( data, op)
+2
View File
@@ -1,3 +1,5 @@
if not Config.Drugs['shrooms'] then return end
local function EcstasyEffect() local function EcstasyEffect()
local startStamina = 50 local startStamina = 50
SetFlash(0, 0, 500, 20000, 500) SetFlash(0, 0, 500, 20000, 500)
+1
View File
@@ -1,3 +1,4 @@
if not Config.Drugs['weed'] then return end
local exploded, drying = false, false local exploded, drying = false, false
local locations, recipes = Config.Weed.Locations, Config.Weed.Recipes local locations, recipes = Config.Weed.Locations, Config.Weed.Recipes
for k, v in pairs (locations.WeedDry) do for k, v in pairs (locations.WeedDry) do
+1
View File
@@ -1,3 +1,4 @@
if not Config.Drugs['whippit'] then return end
local prop = nil local prop = nil
local function animation(color) local function animation(color)
+1 -1
View File
@@ -1,4 +1,4 @@
local active = false if not Config.Drugs['wholesale'] then return end
local active, ped, peds = false, nil, {} local active, ped, peds = false, nil, {}
local function loop(wholesaleData) local function loop(wholesaleData)
+1
View File
@@ -1,3 +1,4 @@
if not Config.Drugs['xtc'] then return end
local xtcpress = false local xtcpress = false
local locations = Config.XTC.Locations local locations = Config.XTC.Locations
-27
View File
@@ -1,27 +0,0 @@
function loadFile(filePath)
local resourceName = 'md-drugs'
local fullScript = LoadResourceFile(resourceName, filePath)
if not fullScript then
Bridge.Prints.Error("Error: Failed to load module '" .. filePath .. "' from resource '" .. resourceName .. "'.")
return false
end
local chunk, err = load(fullScript, filePath, "t")
if not chunk then
Bridge.Prints.Error("Error loading Lua chunk from '" .. filePath .. "': " .. tostring(err))
return false
end
local success, execErr = pcall(chunk)
if not success then
Bridge.Prints.Error("Error executing Lua chunk from '" .. filePath .. "': " .. tostring(execErr))
return false
end
return true
end
for scriptName, toggle in pairs(Config.Drugs) do
if not toggle then goto continue end
loadFile('client/' .. scriptName .. '.lua')
::continue::
end
+2 -5
View File
@@ -6,16 +6,13 @@ game "gta5"
version '4.0.8' version '4.0.8'
client_scripts { client_scripts {
'client/functions.lua', 'client/functions.lua',
'client/plantSpawns.lua', 'client/**.lua',
'clientRun.lua',
} }
server_scripts { server_scripts {
'@oxmysql/lib/MySQL.lua', '@oxmysql/lib/MySQL.lua',
'server/functions.lua', 'server/functions.lua',
'server/plantSpawns.lua', 'server/**.lua',
'serverRun.lua',
} }
shared_scripts { shared_scripts {
+78 -50
View File
@@ -1,72 +1,101 @@
# 🌿 MD-Drugs – Advanced Drug System for FiveM # 🌿 MD-Drugs – Advanced Drug System for FiveM
A fully customizable, immersive drug system for FiveM servers. > ✨ A fully customizable, immersive, and performance-optimized drug system built for serious FiveM roleplay servers.
<div align="center"> <div align="center">
<a href="https://discord.gg/sAMzrB4DDx"> <a href="https://discord.gg/sAMzrB4DDx" >
<img src="https://i.imgur.com/t65G9Z0.png" width="200" alt="Mustache Scripts Logo"> <img style="width:200px;", src="https://i.imgur.com/t65G9Z0.png"></img>
</a> </a>
<br>
<a href="https://discord.gg/sAMzrB4DDx"><strong>Join Mustache Scripts Discord</strong></a> **[Join Mustache Scripts Discord](https://discord.gg/sAMzrB4DDx)**
</div>
---
## 📦 Dependencies
> ⚠️ **Important:** Ensure all dependencies are installed, started **before** `md-drugs`, and kept up to date.
| Dependency | Requirement | Link |
|-----------|-------------|------|
| `Community_bridge` | Required | [GitHub](https://github.com/TheOrderFivem/community_bridge) |
| `Read` | Required | [Documentation](https://letters.hookedonphonics.com/us/read-guaranteed-G14.html) |
| **Game Build** | **2944 or later** | - |
---
## 🙏 Credits
A huge thank you to everyone who made this possible:
| Contributor | Contribution | Link |
|------------|--------------|------|
| **Samuel's Development** | Christmas script global states & prop spawning | [Visit](https://fivem.samueldev.shop/) |
| **STACHY225** | Meth network animations | [Visit](https://babiczind.tebex.io/category/2103836) |
| **Bostra** | Free scripts, sanity checks & mushrooms | [Discord](https://discord.gg/5ncbwMNq) |
| **Feisty** | Stunning visuals & effects | - |
| **Athena** | Balloon props | [Discord](https://discord.gg/mam8Nmg49d) |
| **Kamaryn** | Installation guide video | [Watch](https://youtu.be/zvuYnUfrqaA?si=FGJuBO5krZMC14Nd) |
| **1of1 Servers** | Hosting & support | [Website](https://1of1servers.com/) \| [Discord](https://discord.gg/1of1servers) |
| **Beta Testers** | Invaluable feedback & testing | - |
---
## 🎬 Preview
<div align="center">
[![Watch Full Preview](https://img.youtube.com/vi/I_x7_oz_SAU/maxresdefault.jpg)](https://www.youtube.com/watch?v=I_x7_oz_SAU)
**[📺 Watch Full Preview Video](https://www.youtube.com/watch?v=I_x7_oz_SAU)**
</div> </div>
--- ---
- **[Samuel's Development](https://fivem.samueldev.shop/ ):** Used their Christmas script global states and prop spawning (with permission).
- **[STACHY225](https://babiczind.tebex.io/category/2103836 ):** Meth network animations.
- **[Bostra](https://discord.gg/5ncbwMNq ):** Free scripts, sanity checks, and those cute mushrooms!
- **[Feisty]():** Stunning visuals that make everything look amazing.
- **Beta Testers:** Your invaluable feedback made this possible.
- **[1of1 Servers](https://1of1servers.com/ ):** Top-notch hosting and support. Join their [Discord](https://discord.gg/1of1servers ).
- **[Kamaryn](https://discord.gg/KPRmZqFS ):** For the [installation guide video](https://youtu.be/zvuYnUfrqaA?si=FGJuBO5krZMC14Nd).
- **[Athena](https://discord.gg/mam8Nmg49d):** For the Balloon props :)
## 🎬 Preview
🎥 **[Watch Full Preview Video](https://www.youtube.com/watch?v=I_x7_oz_SAU)**
---
## 📦 Dependencies
| Dependency | Link |
|----------|------|
| `Community_bridge` | [GitHub - Community Bridge Repo](https://github.com/TheOrderFivem/community_bridge) |
| `Read` | [Read Docs](https://letters.hookedonphonics.com/us/read-guaranteed-G14.html) |
| Game Build | **2944 or later** required |
> ⚠️ Ensure all dependencies are installed, started before md-drugs and up to date.
## 🛠️ Installation ## 🛠️ Installation
### Step 1: Inventory Integration ### Step 1: Inventory Integration
#### For QBCore (`qb-inventory`) #### 📦 For QBCore (`qb-inventory`)
1. Copy items from `md-drugs/items_install/qb-inventory` into `qb-core/shared/items.lua`.
2. Add item images from `md-drugs/items_install/images` to `qb-inventory/html/images`.
#### For OX_Inventory 1. **Copy Items:**
1. Copy items from `md-drugs/items_install/ox_inventory` into `ox_inventory/data/items.lua`. - Copy items from `md-drugs/items_install/qb-inventory` into `qb-core/shared/items.lua`
2. Add item images to `ox_inventory/web/images`.
2. **Add Images:**
- Add item images from `md-drugs/items_install/images` to `qb-inventory/html/images`
#### 📦 For OX_Inventory
1. **Copy Items:**
- Copy items from `md-drugs/items_install/ox_inventory` into `ox_inventory/data/items.lua`
2. **Add Images:**
- Add item images to `ox_inventory/web/images`
---
### Step 2: Configure Drug Locations & Recipes ### Step 2: Configure Drug Locations & Recipes
- All **processing locations and recipes** are located in their respective drug type files: All drug data is now organized in: `shared/DrugData/{drugname}.lua`
- `cocaine.lua`,
- `meth.lua`,
- `weed.lua`,
- etc.
- **Plant spawns** are managed in `server/plantSpawns.lua`.
> ✏️ Modify these files to customize spawn points, yields, and processing times. > ✏️ **Tip:** Modify these files to customize:
> - Spawn points
> - Yields
> - Processing times
> - And more!
### STEP 3 (IF QBCore) *Note: Some data is also located in the server files.*
- check `qb-smallresources/config.lua` and if this exists, delete it
- look for this code ---
```lua
[2] = { --Coke Processing Enter/Exit ### Step 3: QBCore Users Only! ⚠️
If you're using QBCore, check `qb-smallresources/config.lua`:
1. Look for this code block:
```lua
[2] = { --Coke Processing Enter/Exit
[1] = { [1] = {
poly = { coords = vector3(909.49, -1589.22, 30.51), heading = 92.24, length = 2, width = 2 }, poly = { coords = vector3(909.49, -1589.22, 30.51), heading = 92.24, length = 2, width = 2 },
allowVeh = false, allowVeh = false,
@@ -77,9 +106,8 @@ A fully customizable, immersive drug system for FiveM servers.
allowVeh = false, allowVeh = false,
label = '[E] Leave' label = '[E] Leave'
} }
} }
``` ```
### STEP 4 ### STEP 4
- Run SQL - Run SQL
- if you dont know how, click this image below - if you dont know how, click this image below
+1 -1
View File
@@ -1,4 +1,4 @@
if not Config.Drugs['TravellingMerchant'] then return end
local loc = Config.Merchant.Locations.Travellingmerchant[math.random(1, #Config.Merchant.Locations.Travellingmerchant)] local loc = Config.Merchant.Locations.Travellingmerchant[math.random(1, #Config.Merchant.Locations.Travellingmerchant)]
Bridge.Callback.Register('md-drugs:server:GetMerchant', function(source) Bridge.Callback.Register('md-drugs:server:GetMerchant', function(source)
+1
View File
@@ -1,3 +1,4 @@
if not Config.Drugs['cocaine'] then return end
local Locations = Config.Cocaine.Locations local Locations = Config.Cocaine.Locations
local Recipes = Config.Cocaine.Recipes local Recipes = Config.Cocaine.Recipes
+1 -1
View File
@@ -1,4 +1,4 @@
if not Config.Drugs['consumables'] then return end
for k, v in pairs(Config.Consumables.Consume) do for k, v in pairs(Config.Consumables.Consume) do
Bridge.Framework.RegisterUsableItem(k, function(source, item) Bridge.Framework.RegisterUsableItem(k, function(source, item)
if not Bridge.Inventory.HasItem(source, k, 1) then return end if not Bridge.Inventory.HasItem(source, k, 1) then return end
+1 -1
View File
@@ -1,4 +1,4 @@
if not Config.Drugs['crack'] then return end
RegisterServerEvent('md-drugs:server:makecrackone', function(num) RegisterServerEvent('md-drugs:server:makecrackone', function(num)
local src = source local src = source
+9 -2
View File
@@ -1,4 +1,4 @@
if not Config.Drugs['deliveries'] then return end
local drugDeliveryItem = { local drugDeliveryItem = {
{item = 'coke_brick', amount = 1}, {item = 'coke_brick', amount = 1},
@@ -12,11 +12,18 @@ CreateThread(function()
for i = 1, #dealers do for i = 1, #dealers do
local coords = json.decode(dealers[i].coords) local coords = json.decode(dealers[i].coords)
Dealers[#Dealers + 1] = { Dealers[#Dealers + 1] = {
coords = vector4(coords.x, coords.y, coords.z, coords.w), coords = vector4(coords.x, coords.y, coords.z, coords.w or 180.0),
model = dealers[i].model or 'a_m_m_skater_01', model = dealers[i].model or 'a_m_m_skater_01',
} }
end end
GlobalState.MDDrugDealers = Dealers GlobalState.MDDrugDealers = Dealers
else
MySQL.insert('INSERT INTO dealers (model, coords, createdby) VALUES (?, ?, ?)', {'a_m_m_skater_01', json.encode(vector4(1915.68, 154.22, 155.41, 6.88)), 'default'})
Dealers[#Dealers + 1] = {
coords = vector4(1915.68, 154.22, 155.41, 6.88),
model = 'a_m_m_skater_01',
}
GlobalState.MDDrugDealers = Dealers
end end
end) end)
+1 -1
View File
@@ -1,4 +1,4 @@
if not Config.Drugs['heroin'] then return end
local heroinLabKits = {} local heroinLabKits = {}
+1 -1
View File
@@ -1,4 +1,4 @@
if not Config.Drugs['lean'] then return end
local onRun = {} local onRun = {}
local function setTimeout(identifier) local function setTimeout(identifier)
+1 -1
View File
@@ -1,4 +1,4 @@
if not Config.Drugs['lsd'] then return end
local lsdTables = {} local lsdTables = {}
RegisterServerEvent('md-drugs:server:getlysergic', function(num) RegisterServerEvent('md-drugs:server:getlysergic', function(num)
+1 -1
View File
@@ -1,4 +1,4 @@
if not Config.Drugs['mescaline'] then return end
RegisterNetEvent("md-drugs:server:drymescaline", function(num) RegisterNetEvent("md-drugs:server:drymescaline", function(num)
local src = source local src = source
+1
View File
@@ -1,3 +1,4 @@
if not Config.Drugs['meth'] then return end
local onRun = {} local onRun = {}
local vehicles = {} local vehicles = {}
+1 -1
View File
@@ -1,4 +1,4 @@
if not Config.Drugs['oxyruns'] then return end
local onRoute = {} local onRoute = {}
local vehicles = {} local vehicles = {}
+1 -1
View File
@@ -1,4 +1,4 @@
if not Config.Drugs['deliveries'] then return end
local function GetJob(source) local function GetJob(source)
local src = source local src = source
+1 -1
View File
@@ -1,4 +1,4 @@
if not Config.Drugs['shrooms'] then return end
Bridge.Framework.RegisterUsableItem('shrooms', function(source, item) Bridge.Framework.RegisterUsableItem('shrooms', function(source, item)
local src = source local src = source
if not Bridge.Callback.Trigger("md-drugs:client:shrooms", src) then if not Bridge.Callback.Trigger("md-drugs:client:shrooms", src) then
+1 -1
View File
@@ -1,4 +1,4 @@
if not Config.Drugs['weed'] then return end
RegisterNetEvent('md-drugs:server:buyWeedItem', function(loc, name, amount) RegisterNetEvent('md-drugs:server:buyWeedItem', function(loc, name, amount)
local src = source local src = source
if not checkDistance(src, Config.Weed.Locations.WeedSalesman[loc].loc, 3.5, 'md-drugs:server:buyWeedItem') then if not checkDistance(src, Config.Weed.Locations.WeedSalesman[loc].loc, 3.5, 'md-drugs:server:buyWeedItem') then
+1 -1
View File
@@ -1,4 +1,4 @@
if not Config.Drugs['whippit'] then return end
RegisterServerEvent('md-drugs:server:buyWhippitItem', function(loc, item,amount) RegisterServerEvent('md-drugs:server:buyWhippitItem', function(loc, item,amount)
local src = source local src = source
+1 -1
View File
@@ -1,4 +1,4 @@
if not Config.Drugs['wholesale'] then return end
local burners = { local burners = {
cokeburner = { "cokebaggy", "cokebaggystagethree", "cokebaggystagetwo"}, cokeburner = { "cokebaggy", "cokebaggystagethree", "cokebaggystagetwo"},
crackburner = {"baggedcracked", "baggedcrackedstagetwo", "baggedcrackedstagethree"}, crackburner = {"baggedcracked", "baggedcrackedstagetwo", "baggedcrackedstagethree"},
+1 -1
View File
@@ -1,4 +1,4 @@
if not Config.Drugs['xtc'] then return end
local activePresses = {} local activePresses = {}
RegisterServerEvent('md-drugs:server:stealisosafrole', function(num) RegisterServerEvent('md-drugs:server:stealisosafrole', function(num)
-26
View File
@@ -1,26 +0,0 @@
function loadFile(filePath)
local resourceName = 'md-drugs'
local fullScript = LoadResourceFile(resourceName, filePath)
if not fullScript then
Bridge.Prints.Error("Error: Failed to load module '" .. filePath .. "' from resource '" .. resourceName .. "'.")
return false
end
local chunk, err = load(fullScript, filePath, "t")
if not chunk then
Bridge.Prints.Error("Error loading Lua chunk from '" .. filePath .. "': " .. tostring(err))
return false
end
local success, execErr = pcall(chunk)
if not success then
Bridge.Prints.Error("Error executing Lua chunk from '" .. filePath .. "': " .. tostring(execErr))
return false
end
return true
end
for scriptName, toggle in pairs(Config.Drugs) do
if not toggle then goto continue end
loadFile('server/' .. scriptName .. '.lua')
::continue::
end
+1 -1
View File
@@ -32,7 +32,7 @@ local emotes = {
drink = { drink = {
dict = "mp_player_intdrink", dict = "mp_player_intdrink",
clip = "loop_bottle", clip = "loop_bottle",
} },
} }
Config.Consumables = { Config.Consumables = {
+2 -2
View File
@@ -26,8 +26,8 @@ Config.Minigames = {
glspot = {gridSize = 6, timeLimit = 999999, charSet = "alphabet", required = 10}, glspot = {gridSize = 6, timeLimit = 999999, charSet = "alphabet", required = 10},
glmath = {timeLimit = 300000}, glmath = {timeLimit = 300000},
} }
Config.minigametype = 'ps_circle' -- look above for options or choose none if you dont want any minigames Config.minigametype = 'ox' -- look above for options or choose none if you dont want any minigames
Config.Emotes = 'rpemotes' -- this is if you want to use emotes, you can pass the string of the emote name instead of the animDict and animClip like below
Config.DefaultAnimation = { Config.DefaultAnimation = {
dict = "mp_arresting", dict = "mp_arresting",
clip = "a_uncuff", clip = "a_uncuff",