From 9e84111da3bc0354064077adea45cdb257f06999 Mon Sep 17 00:00:00 2001
From: Mustache Dom <123716453+Mustachedom@users.noreply.github.com>
Date: Mon, 30 Jun 2025 23:24:57 -0700
Subject: [PATCH 01/37] - added multi location for coke fancy anims
---
client/animationsandfunctions.lua | 10 ++-
client/cocaine.lua | 111 ++++++++++++++++++------------
client/functions.lua | 5 ++
server/cocaine.lua | 54 +++++++--------
server/locations.lua | 13 ++--
server/recipes.lua | 26 +------
shared/config.lua | 4 +-
7 files changed, 109 insertions(+), 114 deletions(-)
diff --git a/client/animationsandfunctions.lua b/client/animationsandfunctions.lua
index e03db4c..40f4003 100644
--- a/client/animationsandfunctions.lua
+++ b/client/animationsandfunctions.lua
@@ -159,13 +159,12 @@ function Tray()
AttachEntityToEntity(trays, PlayerPedId(), GetPedBoneIndex(PlayerPedId(), 28422), 0.01,-0.2, -0.2, 20.0, 0.0, 0.0, true, true, false, true, 1, true)
end
-function CutCoke()
+function CutCoke(coords, offset, rotation)
local animDict, animName = "anim@amb@business@coc@coc_unpack_cut_left@", "coke_cut_v5_coccutter"
lib.requestAnimDict(animDict, 500)
local animDuration = GetAnimDuration(animDict, animName) * 1000
local ped = PlayerPedId()
- local coords = GetEntityCoords(ped)
- local scenePos, sceneRot = vector3(1090.37+.9, -3193.61-1.68, -39.60), vector3(0.0, 0.0, 0.00)
+ local scenePos, sceneRot = vector3(coords.x + offset.x, coords.y + offset.y,coords.z + offset.z), rotation
local scenes = {
{
{ hash = "bkr_prop_coke_bakingsoda_o", animName = "coke_cut_v5_bakingsoda"},
@@ -214,14 +213,13 @@ CreateThread(function()
BikerCocaine.Details.Enable({BikerCocaine.Details.cokeBasic1, BikerCocaine.Details.cokeBasic2, BikerCocaine.Details.cokeBasic3}, true)
end)
-function BagCoke()
+function BagCoke(coords, offset, rotation)
local ver = ""
local animDict, animName = "anim@amb@business@meth@meth_smash_weight_check@", "break_weigh_"..ver.."char01"
lib.requestAnimDict(animDict, 500)
local animDuration = GetAnimDuration(animDict, animName) * 1000
local ped = PlayerPedId()
- local coords = GetEntityCoords(ped)
- local scenePos, sceneRot = vector3(1090.62+4.3, -3196.2+3, -38.99-1), vector3(360.0, 360.0, 180.08)
+ local scenePos, sceneRot = vector3(coords.x + offset.x, coords.y + offset.y,coords.z + offset.z), rotation
local scenes = {
{
{ hash = "bkr_prop_coke_cutblock_01", animName = "break_weigh_"..ver.."box01"},
diff --git a/client/cocaine.lua b/client/cocaine.lua
index 1c3eca9..65edee4 100644
--- a/client/cocaine.lua
+++ b/client/cocaine.lua
@@ -4,7 +4,7 @@ local baggingcoke = nil
local function pick(loc)
if not progressbar(Lang.Coke.picking, 4000, 'uncuff') then return end
- TriggerServerEvent("coke:pickupCane", loc)
+ TriggerServerEvent("coke:pickupCane", loc)
return true
end
@@ -14,7 +14,15 @@ RegisterNetEvent('coke:respawnCane', function(loc)
if not CocaPlant[loc] then
CocaPlant[loc] = CreateObject(hash, v.location, false, true, true)
Freeze(CocaPlant[loc], true, v.heading)
- AddSingleModel(CocaPlant[loc], {icon = "fa-solid fa-seedling", label = Lang.targets.coke.pick, action = function() if not pick(loc) then return end end}, loc)
+ ps.entityTarget(CocaPlant[loc], {
+ {
+ icon = "fa-solid fa-seedling",
+ label = Lang.targets.coke.pick,
+ action = function()
+ if not pick(loc) then return end
+ end
+ }
+ })
end
end)
@@ -30,7 +38,15 @@ RegisterNetEvent("coke:init", function()
if not v.taken then
CocaPlant[k] = CreateObject(hash, v.location.x, v.location.y, v.location.z, false, true, true)
Freeze(CocaPlant[k], true, v.heading)
- AddSingleModel(CocaPlant[k], {icon = "fa-solid fa-seedling", label = Lang.targets.coke.pick, action = function() if not pick(k) then return end end}, k)
+ ps.entityTarget(CocaPlant[k], {
+ {
+ icon = "fa-solid fa-seedling",
+ label = Lang.targets.coke.pick,
+ action = function()
+ if not pick(k) then return end
+ end
+ }
+ })
end
end
end)
@@ -46,45 +62,52 @@ AddEventHandler('onResourceStop', function(resourceName)
end
end)
-RegisterNetEvent("md-drugs:client:makepowder", function(data)
- if not ItemCheck('coca_leaf') then return end
- if not progressbar(Lang.Coke.makepow, 4000, 'uncuff') then return end
- TriggerServerEvent("md-drugs:server:makepowder", data.data)
-end)
+for k, v in pairs (GlobalState.MDDrugsLocs.MakePowder) do
+ ps.boxTarget('cocaplant'..k, v.loc, {length = v.l, width = v.w, height = 1.0, rotation = v.rot}, {
+ {
+ label = Lang.targets.coke.pick,
+ icon = 'fa-solid fa-seedling',
+ action = function()
+ if not ps.hasItem('coca_leaf') then return end
+ if not ps.progressbar(Lang.Coke.makepow, 4000, 'uncuff') then return end
+ TriggerServerEvent("md-drugs:server:makepowder", k)
+ end,
+ canInteract = function()
+ return handleGang(v.gang)
+ end
+ }
+ })
+end
-RegisterNetEvent("md-drugs:client:cutcokeone", function(data)
- if not ItemCheck('bakingsoda') then return end
- cuttingcoke = true
- if Config.FancyCokeAnims then
- CutCoke()
- else
- if not progressbar(Lang.Coke.cutting, 5000, 'uncuff') then cuttingcoke = nil return end
- end
- TriggerServerEvent("md-drugs:server:cutcokeone", data.data)
- cuttingcoke = nil
-end)
-
-RegisterNetEvent("md-drugs:client:bagcoke", function(data)
- if not ItemCheck('empty_weed_bag') then return end
- baggingcoke = true
- if Config.FancyCokeAnims then
- BagCoke()
- else
- if not progressbar(Lang.Coke.bagging, 5000, 'uncuff') then baggingcoke = nil return end
- end
- TriggerServerEvent("md-drugs:server:bagcoke", data.data)
- baggingcoke = nil
-end)
-
-CreateThread(function()
- local config = lib.callback.await('md-drugs:server:getLocs', false)
- if Config.FancyCokeAnims == false then
- AddBoxZoneMulti('cuttcoke', config.CuttingCoke, { type = "client",event = "md-drugs:client:cutcokeone", icon = "fa-solid fa-mortar-pestle", label = Lang.targets.coke.cut})
- AddBoxZoneMulti('baggcoke', config.BaggingCoke, { type = "client",event = "md-drugs:client:bagcoke", icon = "fa-solid fa-sack-xmark", label = Lang.targets.coke.bag})
- else
- AddBoxZoneSingle('cutcoke', config.singleSpot.cutcoke,
- { data = config.singleSpot.cutcoke, type = "client", event = "md-drugs:client:cutcokeone", icon = "fa-solid fa-mortar-pestle", label = Lang.targets.coke.cut, canInteract = function() if cuttingcoke == nil and baggingcoke == nil then return true end end })
- AddBoxZoneSingle('bagcokepowder', config.singleSpot.bagcokepowder,
- { data = config.singleSpot.bagcokepowder, type = "client", event = "md-drugs:client:bagcoke", icon = "fa-solid fa-sack-xmark", label = Lang.targets.coke.bag, canInteract = function() if baggingcoke == nil and cuttingcoke == nil then return true end end })
- end
-end)
+for k, v in pairs (GlobalState.MDDrugsLocs.CuttingCoke) do
+ ps.boxTarget('cutcoke'..k, v.loc, {length = 1.0, width = 1.0, height = 1.0, rotation = 180.0}, {
+ {
+ label = 'cutCoke',
+ icon = 'fa-solid fa-mortar-pestle',
+ action = function()
+ CutCoke(v.loc, v.offset, v.rotation)
+ end,
+ canInteract = function()
+ if not handleGang(v.gang) then return false end
+ if cuttingcoke ~= nil or baggingcoke ~= nil then return false end
+ return true
+ end,
+ }
+ })
+end
+for k, v in pairs (GlobalState.MDDrugsLocs.BaggingCoke) do
+ ps.boxTarget('bagcoke'..k, v.loc, {length = 1.0, width = 1.0, height = 1.0, rotation = 180.0}, {
+ {
+ label = 'bagCoke',
+ icon = 'fa-solid fa-sack-xmark',
+ action = function()
+ BagCoke(v.loc, v.offset, v.rotation)
+ end,
+ canInteract = function()
+ if not handleGang(v.gang) then return false end
+ if cuttingcoke ~= nil or baggingcoke ~= nil then return false end
+ return true
+ end
+ }
+ })
+end
diff --git a/client/functions.lua b/client/functions.lua
index 8204e5c..95e440d 100644
--- a/client/functions.lua
+++ b/client/functions.lua
@@ -676,3 +676,8 @@ RegisterCommand('DrugRep', function()
lib.showContext('DrugRep')
end, false)
+function handleGang(gang)
+ if gang == nil or gang == '' or gang == "" then return true end
+ if ps.getGangName() == gang or gang == 1 then return true end
+ return false
+end
\ No newline at end of file
diff --git a/server/cocaine.lua b/server/cocaine.lua
index 5ef48a2..626da99 100644
--- a/server/cocaine.lua
+++ b/server/cocaine.lua
@@ -50,7 +50,11 @@ end)
RegisterServerEvent('md-drugs:server:makepowder', function(num)
local src = source
- if not checkLoc(src, 'MakePowder', num) then return end
+ ps.debug(#(GetEntityCoords(GetPlayerPed(src)) - GlobalState.MDDrugsLocs.MakePowder[num].loc))
+ if not ps.checkDistance(src, GlobalState.MDDrugsLocs.MakePowder[num].loc, 3.5) then
+ Notifys(src, 'You are not in the correct location', 'error')
+ return
+ end
local tier = 'tier1'
if Config.TierSystem then
local coke = getRep(src, 'coke')
@@ -65,55 +69,44 @@ end)
RegisterServerEvent('md-drugs:server:cutcokeone', function(num)
local src = source
- local Player = getPlayer(src)
- local count = 0
- if Config.FancyCokeAnims then
- if not checkLoc(src, 'singleSpot', 'cutcoke') then return end
- else
- if not checkLoc(src, 'CuttingCoke', num) then return end
+ local tier = 'tier1'
+ if not ps.checkDistance(src, GlobalState.MDDrugsLocs.CuttingCoke[num].loc, 2.5) then
+ Notifys(src, 'You are not in the correct location', 'error')
+ return
end
if Config.TierSystem then
- local tier = 'tier1'
local cokeTiers = {
{item = 'coke', tier = 'tier1', log = ' Cut Coke'},
{item = 'cokestagetwo', tier = 'tier2', log = ' Cut Coke tier 2'},
{item = 'cokestagethree', tier = 'tier3', log = ' Cut Coke tier 3'}
}
for _, v in ipairs(cokeTiers) do
- if count >= 1 then break end
- if Player.Functions.GetItemByName(v.item) then
+ if ps.hasItem(src, v.item) then
tier = v.tier
- count = count + 1
+ break
end
end
- if not GetRecipe(src, 'cocaine', 'cutcoke', tier) then return end
- else
- if not GetRecipe(src, 'cocaine', 'cutcoke', 'tier1') then return end
end
+ if not GetRecipe(src, 'cocaine', 'cutcoke', tier) then return end
end)
RegisterServerEvent('md-drugs:server:bagcoke', function(num)
local src = source
- local Player = getPlayer(src)
- local count = 0
local tier = 'tier1'
- if Config.FancyCokeAnims then
- if not checkLoc(src, 'singleSpot', 'bagcokepowder') then return end
- else
- if not checkLoc(src, 'BaggingCoke', num) then return end
+ if not ps.checkDistance(src, GlobalState.MDDrugsLocs.BaggingCoke[num].loc, 2.5) then
+ Notifys(src, 'You are not in the correct location', 'error')
+ return
end
if Config.TierSystem then
- local coke = getRep(src, 'coke')
local cokeTiers = {
{item = 'loosecoke', tier = 'tier1', log = ' Bagged Coke'},
{item = 'loosecokestagetwo', tier = 'tier2', log = ' Bagged Coke tier 2'},
{item = 'loosecokestagethree', tier = 'tier3', log = ' Bagged Coke tier 3'}
}
for _, v in ipairs(cokeTiers) do
- if Player.Functions.GetItemByName(v.item) then
- if count >= 1 then break end
- count = count + 1
- tier = v.tier
+ if ps.hasItem(src, v.item) then
+ tier = v.tier
+ break
end
end
if not GetRecipe(src, 'cocaine', 'bagcoke', tier) then return end
@@ -125,16 +118,15 @@ end)
local cokecut = {loosecokestagetwo = 2, loosecokestagethree = 3}
for k, v in pairs (cokecut) do
- CUI(k, function(source, item)
+ ps.createUseable(k, function(source, item)
local src = source
local Player = getPlayer(src)
- if not Player.Functions.GetItemByName('bakingsoda') then Notifys(src, 'You Need Baking Soda For this', 'error') return end
- if Player.Functions.GetItemByName(item.name) then
- if not Itemcheck(src, 'bakingsoda', 1) then return end
+ if not ps.hasItem(src, 'bakingsoda') then ps.notify(src, 'You Need Baking Soda For this', 'error') return end
+ if ps.hasItem(src,item.name) then
local check = lib.callback.await('md-drugs:client:uncuff', src, 'Cutting It Further')
if not check then return end
- if RemoveItem(src, k, 1) and RemoveItem(src, 'bakingsoda', 1) then
- AddItem(src, 'loosecoke', v)
+ if ps.removeItem(src, k, 1) and ps.removeItem(src, 'bakingsoda', 1) then
+ ps.addItem(src, 'loosecoke', v)
end
end
end)
diff --git a/server/locations.lua b/server/locations.lua
index 41afd14..613a9c1 100644
--- a/server/locations.lua
+++ b/server/locations.lua
@@ -1,14 +1,16 @@
local Target = {
MakePowder = { -- where you chop your coca leaves to make powder
- {loc = vector3(1086.20, -3195.30, -39.20), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
+ {loc = vector3(1086.20, -3195.30, -39.20), l = 1.0, w = 1.0, rot = 45.0, gang = "ballas"},
{loc = vector3(1090.15, -3199.5, -39.18), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
{loc = vector3(1093.09, -3199.53, -39.05), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
},
CuttingCoke = { -- only active if Config.FancyCokeAnims = false
- {loc = vector3(1095.61, -3195.62, -39.13), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
+ {loc = vector3(1095.61, -3195.62, -39.13), l = 1.0, w = 1.0, rot = 45.0, offset = vec3(-1.782227, 0.445068, -0.502701), rotation = vector3(0,0,0), gang = ""},
+ {loc = vector3(1092.74, -3196.68, -38.99), l = 1.0, w = 1.0, rot = 45.0, offset = vec3(1.983398, 0.407959, -0.642696), rotation = vector3(0,0,180.0), gang = ""},
},
BaggingCoke = { -- only active if Config.FancyCokeAnims = false
- {loc = vector3(1093.16, -3195.78, -39.19), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
+ {loc = vector3(1093.16, -3195.78, -39.19), l = 1.0, w = 1.0, rot = 45.0,offset = vec3(4.515137, 2.542969, -0.814194), rotation = vector3(0,0,180.0), gang = ""},
+ {loc = vector3(1090.17, -3196.59, -38.99), l = 1.0, w = 1.0, rot = 45.0, offset = vec3(-5.207642, -1.666504, -1.014198), rotation = vector3(0,0, 0.0), gang = ""},
},
makecrack = { -- make crack with baking soda with cut coke 1-3
{loc = vector3(2433.47, 4970.02, 42.18), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
@@ -53,8 +55,7 @@ local Target = {
{loc = vector3(2855.62, 4446.73, 48.53), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
},
singleSpot = {
- cutcoke = vector3(1093.17, -3195.74, -39.19),
- bagcokepowder = vector3(1090.28, -3195.65, -39.19),
+
CokeTeleIn = vector3(198.16, -1276.92, 29.33), -- where you target to go inside coke
CokeTeleOut = vector3(1088.81, -3187.57, -38.99), -- where you target to leave coke
buylsdlabkit = vector4(2598.47, 5033.06, 105.86, 283.51), -- buy lab kit for lsd
@@ -110,7 +111,7 @@ local Target = {
vector4(474.88, 2609.56, 44.48, 357.0),
}
}
-
+GlobalState.MDDrugsLocs = Target
function checkLoc(source, event, num)
local ped = source
local pos = GetPlayerPed(ped)
diff --git a/server/recipes.lua b/server/recipes.lua
index fc7ce8b..120c5e6 100644
--- a/server/recipes.lua
+++ b/server/recipes.lua
@@ -136,31 +136,7 @@ local recipe = {
}
function GetRecipe(source, type, method, tier)
- local src = source
- local Player = getPlayer(source)
- local has = 0
- local need = 0
- for k, v in pairs (recipe[type][method][tier].take) do
- local item = Player.Functions.GetItemByName(k)
- if item and item.amount >= v then
- has = has + 1
- else
- Notifys(src, ' You Need ' .. v .. ' Of ' .. GetLabels(k) .. ' To Do This', 'error')
- end
- need = need + 1
- end
- if has == need then
- for k, v in pairs (recipe[type][method][tier].take) do
- RemoveItem(src, k, v)
- end
- for k,v in pairs (recipe[type][method][tier].give) do
- AddItem(src, k, v)
- Log(GetName(src) .. ' Made ' .. GetLabels(k) .. '!', 'drugMaking')
- end
- return true
- else
- return false
- end
+ ps.craftItem(source,recipe[type][method][tier])
end
lib.callback.register('md-drugs:server:GetRecipe', function(source, type, cat)
diff --git a/shared/config.lua b/shared/config.lua
index ea659b4..678d781 100644
--- a/shared/config.lua
+++ b/shared/config.lua
@@ -1,5 +1,5 @@
Config = {} --Ignore.
-
+ps = exports.ps_lib:init()
Config.respawnTime = 150 -- Seconds
Config.Fuel = "LegacyFuel" -- type the name of script you use i.e. ps-fuel, cdn-fuel, LegacyFuel
Config.TierSystem = true -- allows for three tiers of certain drugs ( coke, heroin, crack, lsd)
@@ -26,7 +26,7 @@ Config.progressbartype = 'oxcir' -- either 'qb', 'oxcir', 'oxbar'
Config.Notify = 'ox' -- -- either 'qb' or 'ox' or 'okok'
Config.Phone = 'qb' -- either 'qb' or 'yflip' or 'qs'
Config.Dispatch = 'ps' -- either 'ps', 'cd', 'core', 'aty'
-Config.Target = 'ox' -- qb or ox
+Config.Target = 'qb' -- qb or ox
Config.Inventory = 'ox' -- qb or ox, other if you dont use ox just mark as qb
Config.Minigames = {
ps_circle = {amount = 2, speed = 8,},
From 1b29aaa3b0e432c53942682967fff6bde875e014 Mon Sep 17 00:00:00 2001
From: Mustache Dom <123716453+Mustachedom@users.noreply.github.com>
Date: Tue, 1 Jul 2025 03:09:46 -0700
Subject: [PATCH 02/37] lots of shit
---
client/animationsandfunctions.lua | 4 +-
client/cocaine.lua | 15 +-
client/consumables.lua | 2 +-
client/cornerselling.lua | 4 +-
client/crack.lua | 47 ++-
client/deliveries.lua | 4 +-
client/functions.lua | 164 +-------
client/heroin.lua | 4 +-
client/lean.lua | 2 +-
client/lsd.lua | 222 ++++++----
client/meth.lua | 2 +-
client/oxyruns.lua | 6 +-
client/pedspawns.lua | 4 +-
client/pharma.lua | 4 +-
client/target.lua | 24 --
client/weed.lua | 4 +-
client/xtc.lua | 2 +-
clientRun.lua | 27 ++
fxmanifest.lua | 14 +-
shared/english.lua => locales/en.lua | 594 ++++++++++++++-------------
server/cocaine.lua | 10 +-
server/consumables.lua | 2 +-
server/cornerselling.lua | 4 +-
server/crack.lua | 80 ++--
server/deliveries.lua | 4 +-
server/functions.lua | 4 +-
server/heroin.lua | 4 +-
server/locations.lua | 4 +-
server/lsd.lua | 31 +-
server/oxyruns.lua | 2 +-
server/pharma.lua | 4 +-
server/recipes.lua | 2 +-
server/shops.lua | 2 +-
server/weed.lua | 4 +-
server/xtc.lua | 2 +-
serverRun.lua | 27 ++
shared/config.lua | 28 +-
37 files changed, 699 insertions(+), 664 deletions(-)
delete mode 100644 client/target.lua
create mode 100644 clientRun.lua
rename shared/english.lua => locales/en.lua (96%)
create mode 100644 serverRun.lua
diff --git a/client/animationsandfunctions.lua b/client/animationsandfunctions.lua
index 40f4003..16b830a 100644
--- a/client/animationsandfunctions.lua
+++ b/client/animationsandfunctions.lua
@@ -366,7 +366,7 @@ end
local hit = 0
function SpawnCarPedChase()
local stoploc = vector3(-1157.63, -3056.71, 13.94)
- local config = lib.callback.await('md-drugs:server:getLocs', false)
+ local config = ps.callback('md-drugs:server:getLocs', false)
local start = config.StartLoc[math.random(1,#config.StartLoc)]
if started then
Notify(Lang.lean.act,'error')
@@ -413,7 +413,7 @@ end
function SpawnMethCarPedChase()
local ped = GetEntityCoords(PlayerPedId())
local stoploc = vector3(-1157.63, -3056.71, 13.94)
-local config = lib.callback.await('md-drugs:server:getLocs', false)
+local config = ps.callback('md-drugs:server:getLocs', false)
local start = config.StartLoc[math.random(1,#config.StartLoc)]
local startedmeth = false
diff --git a/client/cocaine.lua b/client/cocaine.lua
index 65edee4..533dd88 100644
--- a/client/cocaine.lua
+++ b/client/cocaine.lua
@@ -1,7 +1,6 @@
local CocaPlant = {}
local cuttingcoke = nil
local baggingcoke = nil
-
local function pick(loc)
if not progressbar(Lang.Coke.picking, 4000, 'uncuff') then return end
TriggerServerEvent("coke:pickupCane", loc)
@@ -17,7 +16,7 @@ RegisterNetEvent('coke:respawnCane', function(loc)
ps.entityTarget(CocaPlant[loc], {
{
icon = "fa-solid fa-seedling",
- label = Lang.targets.coke.pick,
+ label = ps.lang('targets.coke.pick'),
action = function()
if not pick(loc) then return end
end
@@ -34,14 +33,14 @@ end)
RegisterNetEvent("coke:init", function()
for k, v in pairs (GlobalState.CocaPlant) do
local hash = GetHashKey(v.model)
- LoadModel(hash)
+ ps.requestModel(hash)
if not v.taken then
CocaPlant[k] = CreateObject(hash, v.location.x, v.location.y, v.location.z, false, true, true)
Freeze(CocaPlant[k], true, v.heading)
ps.entityTarget(CocaPlant[k], {
{
icon = "fa-solid fa-seedling",
- label = Lang.targets.coke.pick,
+ label = ps.lang('targets.coke.pick'),
action = function()
if not pick(k) then return end
end
@@ -65,11 +64,11 @@ end)
for k, v in pairs (GlobalState.MDDrugsLocs.MakePowder) do
ps.boxTarget('cocaplant'..k, v.loc, {length = v.l, width = v.w, height = 1.0, rotation = v.rot}, {
{
- label = Lang.targets.coke.pick,
+ label = ps.lang('.targets.coke.pick'),
icon = 'fa-solid fa-seedling',
action = function()
if not ps.hasItem('coca_leaf') then return end
- if not ps.progressbar(Lang.Coke.makepow, 4000, 'uncuff') then return end
+ if not ps.progressbar(ps.lang('Coke.makepow'), 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:makepowder", k)
end,
canInteract = function()
@@ -82,7 +81,7 @@ end
for k, v in pairs (GlobalState.MDDrugsLocs.CuttingCoke) do
ps.boxTarget('cutcoke'..k, v.loc, {length = 1.0, width = 1.0, height = 1.0, rotation = 180.0}, {
{
- label = 'cutCoke',
+ label = ps.lang('targets.coke.cut'),
icon = 'fa-solid fa-mortar-pestle',
action = function()
CutCoke(v.loc, v.offset, v.rotation)
@@ -98,7 +97,7 @@ end
for k, v in pairs (GlobalState.MDDrugsLocs.BaggingCoke) do
ps.boxTarget('bagcoke'..k, v.loc, {length = 1.0, width = 1.0, height = 1.0, rotation = 180.0}, {
{
- label = 'bagCoke',
+ label = ps.lang('targets.coke.bag'),
icon = 'fa-solid fa-sack-xmark',
action = function()
BagCoke(v.loc, v.offset, v.rotation)
diff --git a/client/consumables.lua b/client/consumables.lua
index 62a16ee..ae93b3c 100644
--- a/client/consumables.lua
+++ b/client/consumables.lua
@@ -1,6 +1,6 @@
-lib.callback.register('md-drugs:client:consumedrugs', function(time, effect, anim, progresstext, status, item)
+ps.registerCallback('md-drugs:client:consumedrugs', function(time, effect, anim, progresstext, status, item)
if not progressbar(progresstext .. GetLabel(item).. "!", time, anim ) then return end
for k, v in pairs (status) do
if k == 'health' then
diff --git a/client/cornerselling.lua b/client/cornerselling.lua
index c9dc85b..20731a4 100644
--- a/client/cornerselling.lua
+++ b/client/cornerselling.lua
@@ -51,7 +51,7 @@ function Cornersell()
local targ = lib.GetClosestPed(GetEntityCoords(PlayerPedId()), 8)
if targ == nil then return end
if IsPedInAnyVehicle(targ, false) or GetEntityHealth(targ) == 0 or not IsPedHuman(targ) then return end
- local data = lib.callback.await('md-drugs:server:cornerselling:getAvailableDrugs', false, targ)
+ local data = ps.callback('md-drugs:server:cornerselling:getAvailableDrugs', false, targ)
if data.item == 'nothing' then Notify(Lang.Cornerselling.nodrugs, 'error') sell = false FreezeEntityPosition(targ, false) ClearPedTasks(targ) active = false return false end
TaskGoToCoordAnyMeans(targ, GetEntityCoords(PlayerPedId()), 1.0, 0, 0, 0, 0)
active = true
@@ -83,7 +83,7 @@ end
RegisterNetEvent('md-drugs:client:cornerselling', function()
if not GetCops(QBConfig.MinimumDrugSalePolice) then return end
if inZone then Notify(Lang.Cornerselling.no, 'error') return end
- local has = lib.callback.await('md-drugs:server:hasDrugs', false)
+ local has = ps.callback('md-drugs:server:hasDrugs', false)
if has then
if sell then
TriggerServerEvent('md-drugs:server:cornerselling:stop')
diff --git a/client/crack.lua b/client/crack.lua
index 092f01e..df05518 100644
--- a/client/crack.lua
+++ b/client/crack.lua
@@ -1,12 +1,37 @@
-RegisterNetEvent("md-drugs:client:makecrackone", function(data)
- if not ItemCheck('bakingsoda') then return end
- if not minigame() then TriggerServerEvent("md-drugs:server:failcrackone", data.data) return end
- if not progressbar(Lang.Crack.cookcrack, 4000, 'uncuff') then return end
- TriggerServerEvent("md-drugs:server:makecrackone", data.data)
-end)
-RegisterNetEvent("md-drugs:client:bagcrack", function(data)
- if not ItemCheck('empty_weed_bag') then return end
- if not progressbar(Lang.Crack.bagcrack, 4000, 'uncuff') then return end
- TriggerServerEvent("md-drugs:server:bagcrack", data.data)
-end)
\ No newline at end of file
+for k, v in pairs (GlobalState.MDDrugsLocs.makecrack) do
+ ps.boxTarget('makeCrack'..k, v.loc, {length = v.l, width = v.w, height = 1.0, rotation = v.rot}, {
+ {
+ label = ps.lang('targets.crack.makecrack'),
+ icon = 'fa-solid fa-temperature-high',
+ action = function()
+ if not ps.hasItem('bakingsoda') then return end
+ if not minigame() then TriggerServerEvent("md-drugs:server:failcrackone", k) return end
+ if not ps.progressbar(ps.lang('Crack.makecrack'), 4000, 'uncuff') then return end
+ TriggerServerEvent("md-drugs:server:makecrack", k)
+ end,
+ canInteract = function()
+ if not handleGang(v.gang) then return false end
+ return true
+ end
+ }
+ })
+end
+
+for k, v in pairs (GlobalState.MDDrugsLocs.bagcrack) do
+ ps.boxTarget('bagCrack'..k, v.loc, {length = v.l, width = v.w, height = 1.0, rotation = v.rot}, {
+ {
+ label = ps.lang('targets.crack.bagcrack'),
+ icon = 'fa-solid fa-weight-scale',
+ action = function()
+ if not ps.hasItem('empty_weed_bag') then return end
+ if not ps.progressbar(ps.lang('Crack.bagcrack'), 4000, 'uncuff') then return end
+ TriggerServerEvent("md-drugs:server:bagcrack", k)
+ end,
+ canInteract = function()
+ if not handleGang(v.gang) then return false end
+ return true
+ end
+ }
+ })
+end
\ No newline at end of file
diff --git a/client/deliveries.lua b/client/deliveries.lua
index c9372ba..817c66c 100644
--- a/client/deliveries.lua
+++ b/client/deliveries.lua
@@ -8,7 +8,7 @@ RegisterNetEvent('md-drugs:client:opendealermenu', function()
end)
local function SpawnDealer()
- local getDealers = lib.callback.await('md-drugs:server:getDealers', false)
+ local getDealers = ps.callback('md-drugs:server:getDealers')
for k,v in pairs(getDealers) do
local Ped = "g_m_y_famdnf_01"
lib.requestModel(Ped, Config.RequestModelTime)
@@ -18,7 +18,7 @@ local function SpawnDealer()
AddMultiModel(dealer[k], {
{ icon = 'fas fa-user-secret', label = string.format(Lang.targets.Delivery.Deliver, v.name),
action = function()
- local bool, item, amount, coords = lib.callback.await('md-drugs:server:GetDeliveryItem', false, k)
+ local bool, item, amount, coords = ps.callback('md-drugs:server:GetDeliveryItem', false, k)
if bool then
Email(Lang.Delivery.emailn, Lang.Delivery.emailsub, string.format(Lang.Delivery.emailcon, amount, GetLabel(item)))
TriggerEvent('md-drugs:client:setLocation', {bool = bool, item = item, amount = amount, coords = coords})
diff --git a/client/functions.lua b/client/functions.lua
index 95e440d..fe569df 100644
--- a/client/functions.lua
+++ b/client/functions.lua
@@ -228,7 +228,7 @@ function GetLabel(label)
end
function GetRep()
- local rep = lib.callback.await('md-drugs:server:GetRep', false)
+ local rep = ps.callback('md-drugs:server:GetRep')
return rep
end
@@ -239,7 +239,7 @@ end
function makeMenu(name, rep)
local menu = {}
- local data = lib.callback.await('md-drugs:server:menu', false, name)
+ local data = ps.callback('md-drugs:server:menu', name)
for k, v in pairs (data.table) do
local allow = false
if rep == nil then
@@ -374,7 +374,7 @@ end
function GetCops(number)
if number == 0 then return true end
- local amount = lib.callback.await('md-drugs:server:GetCoppers', false)
+ local amount = ps.callback('md-drugs:server:GetCoppers')
if amount >= number then return true else Notify('You Need '.. number - amount .. ' More Cops To Do This', 'error') end
end
@@ -396,160 +396,6 @@ function tele(coords)
end
-function AddBoxZoneSingle(name, loc, data)
- if Config.Target == 'qb' then
- exports['qb-target']:AddBoxZone(name, loc, 1.5, 1.75, {name = name, minZ = loc.z-1,maxZ = loc.z +1},
- { options = {
- {
- type = data.type or nil,
- event = data.event or nil,
- action = data.action or nil,
- icon = data.icon or "fa-solid fa-eye",
- label = data.label,
- data = data.data,
- canInteract = data.canInteract,
- }
- },
- distance = 2.0
- })
- elseif Config.Target == 'ox' then
- exports.ox_target:addBoxZone({coords = loc, size = vec3(1,1,1), options = {
- {
- type = data.type or nil,
- event = data.event or nil,
- onSelect = data.action or nil,
- distance = 2.5,
- icon = data.icon or "fa-solid fa-eye",
- label = data.label,
- data = data.data,
- canInteract = data.canInteract,
- }
- }, })
- elseif Config.Target == 'interact' then
- exports.interact:AddInteraction({
- coords = vector3(loc.x, loc.y, loc.z),
- distance = 2.5,
- interactDst = 2,
- id = name,
- options = {
- {
- type = data.type or nil,
- event = data.event or nil,
- onSelect = data.action or nil,
- distance = 2.5,
- label = data.label,
- data = data.data,
- canInteract = data.canInteract,
- },
- }
- })
- end
-end
-
-function AddBoxZoneMulti(name, table, data)
- for k, v in pairs (table) do
- if v.gang == nil or v.gang == '' or v.gang == "" then v.gang = 1 end
- if Config.Target == 'qb' then
- exports['qb-target']:AddBoxZone(name .. k, v.loc, 1.5, 1.75, {name = name..k, minZ = v.loc.z-1.50,maxZ = v.loc.z +1.5},
- { options = {
- {
- type = data.type or nil,
- event = data.event or nil,
- action = data.action or nil,
- icon = data.icon or "fa-solid fa-eye",
- label = data.label,
- data = k,
- canInteract = data.canInteract or function()
- if QBCore.Functions.GetPlayerData().gang.name == v.gang or v.gang == 1 then return true end end
- }
- },
- distance = 2.5
- })
- elseif Config.Target == 'ox' then
- exports.ox_target:addBoxZone({coords = v.loc, size = vec3(1,1,1), options = {
- {
- type = data.type or nil,
- event = data.event or nil,
- onSelect = data.action or nil,
- icon = data.icon or "fa-solid fa-eye",
- label = data.label,
- data = k,
- distance = 2.5,
- canInteract = data.canInteract or function()
- if QBCore.Functions.GetPlayerData().gang.name == v.gang or v.gang == 1 then return true end end
- }
- }, })
- elseif Config.Target == 'interact' then
- exports.interact:AddInteraction({
- coords = vector3(v.loc.x, v.loc.y, v.loc.z),
- distance = 2.5,
- interactDst = 2,
- id = name,
- options = {
- {
- type = data.type or nil,
- event = data.event or nil,
- action = data.action or nil,
- distance = 2.5,
- label = data.label or "fa-solid fa-eye",
- data = k,
- canInteract = data.canInteract or function()
- if QBCore.Functions.GetPlayerData().gang.name == v.gang or v.gang == 1 then return true end end
- },
- }
- })
- end
- end
-end
-
-function AddBoxZoneMultiOptions(name, loc, data)
- local options = {}
- for k, v in pairs (data) do
- table.insert(options, {
- icon = v.icon or "fa-solid fa-eye", label = v.label, event = v.event or nil, action = v.action or nil,
- onSelect = v.action,data = v.data,canInteract = v.canInteract or nil, distance = 2.0,
- })
- end
- if Config.Target == 'qb' then
- exports['qb-target']:AddBoxZone(name , loc, 1.5, 1.75, {name = name, minZ = loc.z-1.50,maxZ = loc.z +1.5},
- { options = options, distance = 2.5})
- elseif Config.Target == 'ox' then
- exports.ox_target:addBoxZone({coords = loc, size = vec3(1,1,1), options = options })
- elseif Config.Target == 'interact' then
- exports.interact:AddInteraction({coords = vector3(loc.x, loc.y, loc.z),distance = 2.5,interactDst = 2,id = name,options = options})
- end
-end
-
-
-function AddSingleModel(model, data, num)
- if Config.Target == 'qb' then
- exports['qb-target']:AddTargetEntity(model, {options = {
- {icon = data.icon or "fa-solid fa-eye", label = data.label, event = data.event or nil, action = data.action or nil, data = num }
- }, distance = 2.5})
- elseif Config.Target == 'ox' then
- exports.ox_target:addLocalEntity(model, {icon = data.icon, label = data.label, event = data.event or nil, onSelect = data.action or nil, data = num, distance = 2.5 })
- elseif Config.Target == 'interact' then
- exports.interact:AddLocalEntityInteraction({entity = model,offset = vec3(0.0, 0.0, 1.0),id = 'mddrugs'..model,distance = 2.5,interactDst = 2.5, options = {label = data.label, event = data.event or nil, action = data.action or nil, data = num, distance = 2.5 }})
- end
-end
-
-function AddMultiModel(model, data, num)
- local options = {}
- for k, v in pairs (data) do
- table.insert(options, {
- icon = v.icon or "fa-solid fa-eye", label = v.label, event = v.event or nil, action = v.action or nil,
- onSelect = v.action,data = v.data,canInteract = v.canInteract or nil, distance = 2.0,
- })
- end
- if Config.Target == 'qb' then
- exports['qb-target']:AddTargetEntity(model, {options = options, distance = 2.5})
- elseif Config.Target == 'ox' then
- exports.ox_target:addLocalEntity(model, options)
- elseif Config.Target == 'interact' then
- local loc = GetEntityCoords(model)
- exports.interact:AddLocalEntityInteraction({entity = model,offset = vec3(0.0, 0.0, 1.0),id = 'mddrugss'..model,distance = 2.5,interactDst = 2.5, options = data})
- end
-end
local created = false
local heading = 180.0
@@ -654,14 +500,14 @@ CreateThread(function()
TriggerEvent('weed:init')
end)
-lib.callback.register('md-drugs:client:uncuff', function(data)
+ps.registerCallback('md-drugs:client:uncuff', function(data)
if not progressbar(data, 4000, 'uncuff') then return end
return true
end)
RegisterCommand('DrugRep', function()
if not Config.TierSystem then return end
- local rep = lib.callback.await('md-drugs:server:GetRep', false)
+ local rep = ps.callback('md-drugs:server:GetRep', false)
lib.registerContext({
id = 'DrugRep',
title = 'Drug Reputation',
diff --git a/client/heroin.lua b/client/heroin.lua
index 1922e59..716f175 100644
--- a/client/heroin.lua
+++ b/client/heroin.lua
@@ -71,7 +71,7 @@ RegisterNetEvent("md-drugs:client:buyheroinlabkit", function()
TriggerServerEvent("md-drugs:server:getheroinlabkit")
end)
-lib.callback.register("md-drugs:client:setheroinlabkit", function()
+ps.registerCallback("md-drugs:client:setheroinlabkit", function()
if herointable then
Notify(Lang.Heroin.tableout, 'error')
return false
@@ -103,7 +103,7 @@ end)
RegisterNetEvent("md-drugs:client:cleanheroinlabkit", function(data)
if not ItemCheck('cleaningkit') then return end
if not progressbar(Lang.Heroin.clean, 4000, 'clean') then return end
- local done = lib.callback.await('removeCleaningkit', false)
+ local done = ps.callback('removeCleaningkit', false)
if done then dirty = false end
end)
diff --git a/client/lean.lua b/client/lean.lua
index 9b9f903..cb1d07d 100644
--- a/client/lean.lua
+++ b/client/lean.lua
@@ -6,7 +6,7 @@ end)
RegisterNetEvent('md-drugs:client:leancraft', function()
local store = {}
local label = {}
-local items = lib.callback.await('md-drugs:server:GetRecipe', false,'lean', 'cups')
+local items = ps.callback('md-drugs:server:GetRecipe', false,'lean', 'cups')
for k, v in pairs (items) do
label = {}
local item = ''
diff --git a/client/lsd.lua b/client/lsd.lua
index 04c22da..01bf9af 100644
--- a/client/lsd.lua
+++ b/client/lsd.lua
@@ -4,41 +4,169 @@ local function createLabKit(coord, head)
local labkit = CreateObject("v_ret_ml_tablea", coord.x, coord.y, coord.z - 1, true, false)
SetEntityHeading(labkit, head)
PlaceObjectOnGroundProperly(labkit)
+ FreezeEntityPosition(labkit, true)
+ tableout = true
local options = {
- { event = "md-drugs:client:heatliquid", icon = "fa-solid fa-temperature-high", label = Lang.targets.lsd.heat, data = labkit, canInteract = function() if not dirtylsd then return true end end },
- { event = "md-drugs:client:refinequalityacid", icon = "fa-solid fa-temperature-high", label = Lang.targets.lsd.refine, data = labkit,canInteract = function() if not dirtylsd then return true end end },
- { event = "md-drugs:client:maketabpaper", icon = "fa-regular fa-note-sticky", label = Lang.targets.lsd.dab, data = labkit, canInteract = function() if not dirtylsd then return true end end },
- { event = "md-drugs:client:getlabkitback", icon = "fas fa-box-circle-check", label = Lang.targets.lsd.back, data = labkit, canInteract = function() if not dirtylsd then return true end end },
- {icon = "fa-solid fa-hand-sparkles", label = Lang.targets.lsd.clean, data = labkit,
+ {
+ icon = "fa-solid fa-temperature-high",
+ label = Lang.targets.lsd.heat,
action = function()
- if not ItemCheck('cleaningkit') then return end
- if not progressbar(Lang.lsd.clean, 4000, 'clean') then return end
- local check = lib.callback.await('md-drugs:server:removecleaningkit')
- if check then
+ local dict = "scr_ie_svm_technical2"
+ if not ps.hasItems({
+ {name = 'lysergic_acid', amount = 1},
+ {name = 'diethylamide', amount = 1}
+ }) then
+ Notify(Lang.lsd.need, 'error')
+ return
+ end
+ if not minigame() then
+ dirtylsd = true
+ loadParticle(dict)
+ local exitPtfx = StartParticleFxLoopedOnEntity("scr_dst_cocaine", labkit, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.5, false, false, false)
+ SetParticleFxLoopedAlpha(exitPtfx, 3.0)
+ return
+ end
+ if not progressbar(Lang.lsd.heat, 7000, 'uncuff') then return end
+ TriggerServerEvent("md-drugs:server:heatliquid")
+ end,
+ canInteract = function()
+ if not dirtylsd then return true end
+ end
+ },
+ {
+ icon = "fa-solid fa-temperature-high",
+ label = Lang.targets.lsd.refine,
+ action = function()
+ if not ps.hasItem('lsd_one_vial') then return end
+ if not minigame() then TriggerServerEvent("md-drugs:server:failrefinequality") return end
+ if not ps.progressbar(Lang.lsd.refine, 4000, 'uncuff') then return end
+ TriggerServerEvent("md-drugs:server:refinequalityacid")
+ end,
+ canInteract = function()
+ if not dirtylsd then return true end
+ end
+ },
+ {
+ icon = "fa-regular fa-note-sticky",
+ label = Lang.targets.lsd.dab,
+ action = function()
+ if not ps.hasItem('tab_paper') then return end
+ if not minigame() then TriggerServerEvent("md-drugs:server:failtabs") return end
+ if not ps.progressbar(Lang.lsd.dip, 4000, 'uncuff') then return end
+ TriggerServerEvent("md-drugs:server:maketabpaper")
+ end,
+ canInteract = function()
+ if not dirtylsd then return true end
+ end
+ },
+ {
+ event = "md-drugs:client:getlabkitback",
+ icon = "fas fa-box-circle-check",
+ label = Lang.targets.lsd.back,
+ action = function()
+ if not progressbar(Lang.lsd.tablepack, 4000, 'uncuff') then return end
+ DeleteObject(labkit)
+ TriggerServerEvent('md-drugs:server:getlabkitback')
+ tableout = false
+ end,
+ canInteract = function()
+ if not dirtylsd then return true end
+ end
+ },
+ {
+ icon = "fa-solid fa-hand-sparkles",
+ label = Lang.targets.lsd.clean,
+ action = function()
+ if not ps.hasItem('cleaningkit') then
+ Notify(Lang.lsd.needclean, 'error')
+ return
+ end
+ if not ps.progressbar(Lang.lsd.clean, 4000, 'clean') then return end
+ local check = ps.callback('md-drugs:server:removecleaningkit')
+ if check then
dirtylsd = false
end
end,
canInteract = function() if dirtylsd then return true end end
}
}
- AddMultiModel(labkit, options, labkit)
+ ps.targetEntity(labkit, options)
end
-RegisterNetEvent("md-drugs:client:getlysergic", function(data)
- if not minigame() then return end
- if not progressbar(Lang.lsd.steallys, 4000, 'uncuff') then return end
- TriggerServerEvent("md-drugs:server:getlysergic",data.data)
-end)
+for k, v in pairs (GlobalState.MDDrugsLocs.lysergicacid) do
+ ps.boxTarget('lysergicacid'..k, v.loc, {length = v.l, width = v.w, height = 1.0, rotation = v.rot}, {
+ {
+ label = Lang.targets.lsd.lys,
+ icon = 'fa-solid fa-temperature-high',
+ action = function()
+ if not ps.hasItem('empty_weed_bag') then return end
+ if not minigame() then TriggerServerEvent("md-drugs:server:faillysergic") return end
+ if not ps.progressbar(Lang.lsd.steallys, 4000, 'uncuff') then return end
+ TriggerServerEvent("md-drugs:server:getlysergic", k)
+ end,
+ canInteract = function()
+ if not handleGang(v.gang) then return false end
+ return true
+ end
+ }
+ })
+end
+for k, v in pairs (GlobalState.MDDrugsLocs.diethylamide) do
+ ps.boxTarget('diethylamide'..k, v.loc, {length = v.l, width = v.w, height = 1.0, rotation = v.rot}, {
+ {
+ label = Lang.targets.lsd.die,
+ icon = 'fa-solid fa-temperature-high',
+ action = function()
+ if not ps.hasItem('empty_weed_bag') then return end
+ if not minigame() then TriggerServerEvent("md-drugs:server:faildiethylamide") return end
+ if not ps.progressbar(Lang.lsd.stealdie, 4000, 'uncuff') then return end
+ TriggerServerEvent("md-drugs:server:getdiethylamide", k)
+ end,
+ canInteract = function()
+ if not handleGang(v.gang) then return false end
+ return true
+ end
+ }
+ })
+end
-RegisterNetEvent("md-drugs:client:getdiethylamide", function(data)
- if not minigame() then return end
- if not progressbar(Lang.lsd.stealdie, 4000, 'uncuff') then return end
- TriggerServerEvent('md-drugs:server:getdiethylamide', data.data)
-end)
+for k,v in pairs (GlobalState.MDDrugsLocs.gettabs) do
+ ps.boxTarget('gettabs'..k, v.loc, {length = v.l, width = v.w, height = 1.0, rotation = v.rot}, {
+ {
+ label = Lang.targets.lsd.buyt,
+ icon = 'fa-solid fa-hand-holding-dollar',
+ action = function()
+ if not ps.hasItem('lsdlabkit') then ps.notify(Lang.lsd.havlabkit, 'error') return end
+ TriggerEvent("md-drugs:client:buytabs", k)
+ end,
+ canInteract = function()
+ if not handleGang(v.gang) then return false end
+ return true
+ end
+ }
+ })
+end
+for k, v in pairs (GlobalState.MDDrugsLocs.buykit) do
+ ps.boxTarget('buykit'..k, v.loc, {length = v.l, width = v.w, height = 1.0, rotation = v.rot}, {
+ {
+ label = Lang.targets.lsd.buy,
+ icon = 'fa-solid fa-hand-holding-dollar',
+ action = function()
+ if ps.hasItem('lsdlabkit') then ps.notify(Lang.lsd.havlabkit, 'error') return end
+ if not ps.progressbar(Lang.lsd.buykit, 4000, 'uncuff') then return end
+ TriggerEvent("md-drugs:client:buylabkit")
+ end,
+ canInteract = function()
+ if not handleGang(v.gang) then return false end
+ return true
+ end
+ }
+ })
+end
-lib.callback.register("md-drugs:client:setlsdlabkit", function()
+ps.registerCallback("md-drugs:client:setlsdlabkit", function()
if tableout then
Notify(Lang.lsd.tableout, 'error')
return false
@@ -50,54 +178,4 @@ lib.callback.register("md-drugs:client:setlsdlabkit", function()
createLabKit(loc, head)
return true, loc
end
-end)
-
-RegisterNetEvent("md-drugs:client:getlabkitback", function(data)
- if not progressbar(Lang.lsd.tablepack, 4000, 'uncuff') then return end
- DeleteObject(data.data)
- TriggerServerEvent('md-drugs:server:getlabkitback')
- tableout = false
-end)
-
-RegisterNetEvent("md-drugs:client:heatliquid", function(data)
- local PedCoords, head = GetEntityCoords(data.data), GetEntityHeading(data.data)
- local dict = "scr_ie_svm_technical2"
- if not ItemCheck('lysergic_acid') then return end
- if not ItemCheck('diethylamide') then return end
- if not minigame() then
- dirtylsd = true
- loadParticle(dict)
- local exitPtfx = StartParticleFxLoopedOnEntity("scr_dst_cocaine", data.data, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.5, false, false, false)
- SetParticleFxLoopedAlpha(exitPtfx, 3.0)
- Wait(100)
- AddMultiModel(dirtylabkit, {{event = "md-drugs:client:cleanlabkit", icon = "fa-solid fa-hand-sparkles", label = Lang.targets.lsd.clean, data = dirtylabkit}}, nil )
- return end
- if not progressbar(Lang.lsd.heat, 7000, 'uncuff') then return end
- TriggerServerEvent("md-drugs:server:heatliquid")
-end)
-
-
-RegisterNetEvent("md-drugs:client:refinequalityacid", function()
- if not ItemCheck('lsd_one_vial') then return end
- if not minigame() then TriggerServerEvent("md-drugs:server:failrefinequality") return end
- if not progressbar(Lang.lsd.refine, 4000, 'uncuff') then return end
- TriggerServerEvent("md-drugs:server:refinequalityacid")
-end)
-
-RegisterNetEvent("md-drugs:client:maketabpaper", function()
- if not ItemCheck('tab_paper') then return end
- if not minigame() then TriggerServerEvent("md-drugs:server:failtabs") return end
- if not progressbar(Lang.lsd.dip, 4000, 'uncuff') then return end
- TriggerServerEvent("md-drugs:server:maketabpaper")
-end)
-
-RegisterNetEvent("md-drugs:client:buytabs", function(data)
- if not progressbar(Lang.lsd.buypaper, 4000, 'uncuff') then return end
- TriggerServerEvent("md-drugs:server:gettabpaper", data.data)
-end)
-
-RegisterNetEvent("md-drugs:client:buylabkit", function()
- if hasItem('lsdlabkit') then Notify(Lang.lsd.hav, 'error') return end
- if not progressbar(Lang.lsd.buykit, 4000, 'uncuff') then return end
- TriggerServerEvent("md-drugs:server:getlabkit")
-end)
+end)
\ No newline at end of file
diff --git a/client/meth.lua b/client/meth.lua
index 4aeba44..c43f2ef 100644
--- a/client/meth.lua
+++ b/client/meth.lua
@@ -82,7 +82,7 @@ CreateThread(function()
end)
CreateThread(function()
- local config = lib.callback.await('md-drugs:server:getLocs', false)
+ local config = ps.callback('md-drugs:server:getLocs', false)
AddBoxZoneSingle("methTeleOut",config.singleSpot.MethTeleIn, {name = 'teleout', icon = "fa-solid fa-door-open", label = Lang.targets.meth.enter, action = function() SetEntityCoords(PlayerPedId(), config.singleSpot.MethTeleOut) end} )
AddBoxZoneSingle("methtelein",config.singleSpot.MethTeleOut, {name = 'teleout', icon = "fa-solid fa-door-closed", label = Lang.targets.meth.exit, action = function() SetEntityCoords(PlayerPedId(), config.singleSpot.MethTeleIn) end} )
local options = {
diff --git a/client/oxyruns.lua b/client/oxyruns.lua
index 0bbaf35..c41161e 100644
--- a/client/oxyruns.lua
+++ b/client/oxyruns.lua
@@ -2,9 +2,9 @@ local carryPackage = nil
RegisterNetEvent("md-drugs:client:GetOxyCar", function()
lib.requestModel("burrito3", Config.RequestModelTime)
- local paid = lib.callback.await('md-drugs:server:payfortruck', false)
+ local paid = ps.callback('md-drugs:server:payfortruck', false)
if not paid then return end
- local loca = lib.callback.await('md-drugs:server:getLocs', false)
+ local loca = ps.callback('md-drugs:server:getLocs', false)
local loc = loca.singleSpot.truckspawn
local oxycar = CreateVehicle("burrito3",loc.x, loc.y,loc.z, loc.w, true, false)
exports[Config.Fuel]:SetFuel(oxycar, 100.0)
@@ -15,7 +15,7 @@ RegisterNetEvent("md-drugs:client:GetOxyCar", function()
end)
RegisterNetEvent("md-drugs:client:getoxylocationroute", function()
- local config = lib.callback.await('md-drugs:server:getLocs', false)
+ local config = ps.callback('md-drugs:server:getLocs', false)
local loc = config.oxylocations[math.random(#config.oxylocations)]
if loc ~= nil then
SetNewWaypoint(loc.x, loc.y)
diff --git a/client/pedspawns.lua b/client/pedspawns.lua
index 0fd9675..f1e2375 100644
--- a/client/pedspawns.lua
+++ b/client/pedspawns.lua
@@ -1,7 +1,7 @@
CreateThread(function()
- local config = lib.callback.await('md-drugs:server:getLocs', false)
- local num = lib.callback.await('md-drugs:server:GetMerchant', false)
+ local config = ps.callback('md-drugs:server:getLocs', false)
+ local num = ps.callback('md-drugs:server:GetMerchant', false)
local model = {"g_m_y_famdnf_01", 's_m_m_doctor_01', 'u_m_m_jesus_01', "prop_cooker_03"}
for k, v in pairs (model) do
lib.requestModel(v, Config.RequestModelTime)
diff --git a/client/pharma.lua b/client/pharma.lua
index b3b225c..59aa46f 100644
--- a/client/pharma.lua
+++ b/client/pharma.lua
@@ -1,5 +1,5 @@
-lib.callback.register("md-drugs:client:prescriptionpad", function(data, op)
+ps.registerCallback("md-drugs:client:prescriptionpad", function(data, op)
if getJobType() ~= 'ems' then return end
local input = lib.inputDialog('Who To Give A Prescription To?',{
{type = 'select', label = 'Player Name', options = data},
@@ -14,7 +14,7 @@ RegisterNetEvent("md-drugs:client:fillprescription", function(data)
TriggerServerEvent("md-drugs:server:fillprescription", data.data)
end)
-lib.callback.register("md-drugs:client:unbottle", function()
+ps.registerCallback("md-drugs:client:unbottle", function()
if not progressbar(Lang.Pharma.open, 4000, 'uncuff') then return end
return true
end)
diff --git a/client/target.lua b/client/target.lua
deleted file mode 100644
index d046d46..0000000
--- a/client/target.lua
+++ /dev/null
@@ -1,24 +0,0 @@
-
-CreateThread(function()
- local config = lib.callback.await('md-drugs:server:getLocs', false)
- if not config then print('Yo Dawg You Broke Your Locations.lua') return end
- AddBoxZoneSingle('telecokein', config.singleSpot.CokeTeleIn, {action = function()tele(config.singleSpot.CokeTeleOut)end, icon = 'fa-solid fa-door-open', label = Lang.targets.coke.enter}) -- coke
- AddBoxZoneSingle('telecokeout', config.singleSpot.CokeTeleOut, {action = function()tele(config.singleSpot.CokeTeleIn) end, icon = "fa-solid fa-door-closed", label = Lang.targets.coke.exit}) -- coke
- AddBoxZoneMulti('makepowder', config.MakePowder, {event = "md-drugs:client:makepowder", icon = "fa-solid fa-scissors", label = Lang.targets.coke.chop}) -- coke
- AddBoxZoneMulti('steallysergic', config.lysergicacid, {event = "md-drugs:client:getlysergic", icon = "fa-solid fa-prescription-bottle", label = Lang.targets.lsd.lys}) -- lsd
- AddBoxZoneMulti('stealdiethylamide', config.diethylamide, {event = "md-drugs:client:getdiethylamide", icon = "fa-solid fa-prescription-bottle", label = Lang.targets.lsd.die}) -- lsd
- AddBoxZoneMulti('gettabs', config.gettabs, {event = "md-drugs:client:buytabs", icon = "fa-solid fa-eye-dropper", label = Lang.targets.lsd.buyt}) -- lsd
- AddBoxZoneMulti('dryheroin', config.dryplant, {event = "md-drugs:client:dryplant", icon = "fa-solid fa-temperature-full", label = Lang.targets.heroin.dry}) -- heroin
- AddBoxZoneMulti('cutheroin', config.cutheroinone, {event = "md-drugs:client:cutheroin", icon = "fa-solid fa-flask", label = Lang.targets.heroin.cut}) -- heroin
- AddBoxZoneMulti('fillneedle', config.fillneedle, {event = "md-drugs:client:fillneedle", icon = "fa-solid fa-syringe", label = Lang.targets.heroin.fill}) -- heroin
- AddBoxZoneMulti('makecrack', config.makecrack, {event = "md-drugs:client:makecrackone", icon = "fa-solid fa-temperature-high", label = Lang.targets.crack.cook}) -- crack
- AddBoxZoneMulti('bagcrack', config.bagcrack, {event = "md-drugs:client:bagcrack", icon = "fa-solid fa-weight-scale", label = Lang.targets.crack.bag}) -- crack
- AddBoxZoneMulti('fillprescription', config.FillPrescription, {event = "md-drugs:client:fillprescription", icon = "fa-solid fa-prescription", label = Lang.targets.pha.fill}) -- pharma
- AddBoxZoneSingle('payfortruck', config.singleSpot.Payfortruck, {event = "md-drugs:client:GetOxyCar", icon = "fa-solid fa-truck-moving", label = Lang.targets.oxy.pay}) -- oxy runs
- AddBoxZoneSingle('drymescaline', config.singleSpot.DryOut, {event = "md-drugs:client:drymescaline", icon = "fa-solid fa-temperature-full", label = Lang.targets.mescaline.dry}) -- mescaline
- AddBoxZoneMulti('stealisosafrole', config.isosafrole, {event = "md-drugs:client:stealisosafrole", icon = "fa-solid fa-vial", label = Lang.targets.xtc.iso}) -- xtc
- AddBoxZoneMulti('stealmdp2p', config.mdp2p, {event = "md-drugs:client:stealmdp2p", icon = "fa-solid fa-vial", label = Lang.targets.xtc.mdp}) -- xtc
- AddBoxZoneMulti('rawxtcloc', config.rawxtcloc, {event = "md-drugs:client:makingrawxtc", icon = "fa-solid fa-tablets", label = Lang.targets.xtc.raw}) -- xtc
- AddBoxZoneSingle('buypress', config.singleSpot.buypress, {event = "md-drugs:client:buypress", icon = "fa-solid fa-mortar-pestle", label = Lang.targets.xtc.press}) -- xtc
- AddBoxZoneMulti('stamp', config.stamp, {event = "md-drugs:client:stampwhite", icon = "fa-solid fa-tablets", label = Lang.targets.xtc.stamp}) -- xtc
-end)
diff --git a/client/weed.lua b/client/weed.lua
index 0be6270..5b8370a 100644
--- a/client/weed.lua
+++ b/client/weed.lua
@@ -54,7 +54,7 @@ AddEventHandler('onResourceStop', function(resourceName)
end)
CreateThread(function()
- local config = lib.callback.await('md-drugs:server:getLocs', false)
+ local config = ps.callback('md-drugs:server:getLocs', false)
AddBoxZoneMulti('weeddry', config.WeedDry, {
name = 'dryweed',
icon = "fas fa-sign-in-alt",
@@ -147,7 +147,7 @@ end)
local function createBluntOptions(contextId, contextTitle, eventLabelPrefix, tableName)
local options = {}
- local items = lib.callback.await('md-drugs:server:GetRecipe', false,'weed',tableName)
+ local items = ps.callback('md-drugs:server:GetRecipe', false,'weed',tableName)
for k, v in pairs(items) do
local label = {}
local item = ''
diff --git a/client/xtc.lua b/client/xtc.lua
index 2b2cb5f..9699339 100644
--- a/client/xtc.lua
+++ b/client/xtc.lua
@@ -22,7 +22,7 @@ RegisterNetEvent("md-drugs:client:setpress", function(type)
end
end)
-lib.callback.register('md-drugs:client:setpress', function(type)
+ps.registerCallback('md-drugs:client:setpress', function(type)
if xtcpress then
Notify(Lang.xtc.out, 'error')
return false
diff --git a/clientRun.lua b/clientRun.lua
new file mode 100644
index 0000000..5e816ee
--- /dev/null
+++ b/clientRun.lua
@@ -0,0 +1,27 @@
+function loadFile(filePath)
+ local resourceName = 'md-drugs'
+ local fullScript = LoadResourceFile(resourceName, filePath)
+ if not fullScript then
+ ps.error("Error: Failed to load module '" .. filePath .. "' from resource '" .. resourceName .. "'.")
+ return false
+ end
+ local chunk, err = load(fullScript, filePath, "t")
+ if not chunk then
+ ps.error("Error loading Lua chunk from '" .. filePath .. "': " .. tostring(err))
+ return false
+ end
+
+ local success, execErr = pcall(chunk)
+ if not success then
+ ps.error("Error executing Lua chunk from '" .. filePath .. "': " .. tostring(execErr))
+ return false
+ end
+ ps.success("Successfully loaded module '" .. filePath .. "' from resource '" .. resourceName .. "'.")
+ return true
+end
+
+for scriptName, toggle in pairs(Config.Drugs) do
+ if not toggle then goto continue end
+ loadFile('client/' .. scriptName .. '.lua')
+ ::continue::
+end
\ No newline at end of file
diff --git a/fxmanifest.lua b/fxmanifest.lua
index 153a10e..6720e30 100644
--- a/fxmanifest.lua
+++ b/fxmanifest.lua
@@ -5,26 +5,30 @@ fx_version "cerulean"
game "gta5"
version '3.9.0'
client_scripts {
- 'client/**.lua',
+ 'client/functions.lua',
+ 'client/animationsandfunctions.lua',
+ 'clientRun.lua',
}
server_scripts {
'server/functions.lua',
- 'server/**.lua',
+ 'serverRun.lua',
'@oxmysql/lib/MySQL.lua',
}
shared_scripts {
- 'shared/config.lua',
- '@ox_lib/init.lua',
'shared/**.lua',
+ '@ox_lib/init.lua',
}
lua54 'yes'
files {
'stream/mushroom.ytyp',
- 'stream/mushroom.ydr'
+ 'stream/mushroom.ydr',
+ 'client/**.lua',
+ 'server/**.lua',
+ 'locales/**.lua'
}
data_file 'DLC_ITYP_REQUEST' 'stream/mushroom.ytyp'
diff --git a/shared/english.lua b/locales/en.lua
similarity index 96%
rename from shared/english.lua
rename to locales/en.lua
index ffe3865..febdf07 100644
--- a/shared/english.lua
+++ b/locales/en.lua
@@ -1,296 +1,298 @@
-Lang = {}
-
-Lang.targets = {
- coke = {
- pick = 'Pick Cocaine',
- cut = 'Cut Cocaine',
- bag = 'Bag Cocaine',
- enter = 'Enter Building',
- exit = 'Exit Building',
- chop = 'Chop Coca Leaves',
-
- },
- CornerSell = {
- sell = 'Sell %s Of %s For $%s',
- deny = 'Deny Price'
- },
- crack = {
- cook = 'Cook Crack',
- bag = 'Bag Crack'
- },
- Delivery = {
- Deliver = 'Deliver For %s',
- open = 'Open %s Shop',
- hand = 'Hand Over'
- },
- heroin = {
- pick = 'Pick Poppies',
- up = 'Pick Up Table',
- dry = 'Dry Poppies',
- cut = 'Cut Heroin',
- cook = 'Cook Heroin',
- kit = 'Buy Heroin Lab Kit',
- clean = 'Clean Table',
- fill = 'Fill Syringe',
- vial = 'Make Vial',
- },
- lean = {
- git = 'Get Task',
- st = 'Steal From Car'
- },
- lsd = {
- buy = 'Buy LSD Lab Kit',
- heat = 'Heat Liquid',
- refine = 'Refine Quality',
- paper = 'Make Tab Paper',
- back = 'Pick Up Lab Kit',
- dab = 'Dab LSD on sheets',
- clean = 'Clean Table',
- lys = 'Steal Lysergic Acid',
- die = 'Steal Diethylamide',
- buyt = 'Buy Tabs',
- },
- mescaline = {
- pick = 'Pick Cactus',
- dry = 'Dry Out Cactus',
- },
- meth = {
- bag = 'Bag Up Meth',
- enter = 'Enter Buidling',
- exit = 'Exit Building',
- cook = 'Cook Meth',
- tray = 'Grab Tray',
- box = 'Box Up Meth',
- adjust = 'Adjust Temperature',
- eph = 'Steal Ephedrine',
- ace = 'Steal Acetone',
- mission = 'Get Mission',
- stealfromcar = 'Steal From Car',
- },
- oxy = {
- pack = 'Get Oxy Package',
- talk = 'Talk To Buyer',
- pay = 'Pay For Truck',
- },
- pha = {
- fill = 'Fill Prescription',
- },
- shrooms = {
- pick = 'Pick Shrooms',
- },
- travel = {
- travel = 'Open Travelling Merchant',
- },
- xtc = {
- iso = 'Steal Isosafrole',
- mdp = 'Steal MDP2P',
- raw = 'Make Raw XTC',
- press = 'Buy XTC Press',
- stamp = 'Stamp Pills',
- make = 'Make XTC',
- pick = 'Pick Up Press',
- },
- weed = {
- pick = 'Pick Weed',
- dry = 'Dry Weed',
- dpick = 'Pick Dried Weed',
- butt = 'Open Edible Menu',
- oil = 'Make Oil'
- },
- Wholesale = {
- talk = 'Talk To Buyer'
- },
-
-}
-
-Lang.Coke = {
- -- client side progressbars
- picking = "Picking Leaves",
- makepow = 'Chopping Leaves Into A Powder',
- cutting = 'Cutting Coke With Baking Soda',
- bagging = "Bilbo Baggins This Bitch",
- -- end progressbars
- cut = "You Cut Some Coke",
- nocutcoke = "You Cant Cut Coke With No Coke Idiot",
- bagcoke = "You Bagged Up Coke",
- nobagcoke = "You Cant Bag Up Coke Without Coke Idiot",
-}
-Lang.Crack = {
- --client side
- cookcrack = "Cooking Some Crack",
- bagcrack = 'Bilbo Baggin This Bitch',
- -- server
- makecrack = 'Nice Crack',
- nocoke = 'You Cant Make This Without Coke'
-}
-Lang.Cornerselling = {
- -- client side notifys
- inveh = 'STRANGER DANGER, I WONT GET IN THE CAR WITH YOU',
- toofar = "To Far From Your Corner Homie",
- selling = 'Selling %s For $%s',
- deny = "Fuck That Offer",
- start = "Get That Paper",
- stop = "Lazy Ass Cant Even Sell Drugs",
- nodrugs = "What You Gonna sell? Air?",
- notcops = "Not Enough Cops",
- no = 'You Cant Sell Drugs Here!',
- -- end client side notifys
- -- progressbars
- sell = "Selling Drugs",
-}
-Lang.Delivery = {
- -- client side
- emailn = 'Not A Drug Dealer',
- emailsub = 'Hurry Up And Get The Package To The Buyer',
- emailcon = 'I Swear To God If It Doesnt Get There I Will Tell Your Mom You Said Fuck Just Bring %s Of %s',
- search = "Searching For A Delivery ...",
- none = "Nothing Close By",
- busy = "You Havent Even Finished The One I Told You Too",
- found = "Marked On Your Map",
- already = "Already Deliverying",
- checkrep = "Current Dealer Rep: ",
- -- progressbars
- pack = 'Handing Off Package',
- -- end client side
-}
-
-Lang.Heroin = {
- --client
- pick = " Picking Poppies Up",
- tableout = 'You Already Have A Table Out',
- dryout = "Drying Out Poppies",
- cutting = "Cutting Heroin With Baking Soda",
- secret = "SHHHHHHHHH",
- table = "Placing Table Down",
- success = "Heated Heroin Properly",
- clean = 'Cleaning Heroin Table',
- needles = 'Filling Syringe',
- pickup = 'Picking Up The Heroin Table',
- --
- cutheroin = 'You Made Some Cut Heroin',
- noheroin = "How Can You Cut Heroin Without Heroin Idiot",
- vial = 'You Made A Vial Of Heroin',
- novial = "How Can You Make Heroin Vials Without Heroin Idiot",
- fail = 'You Over Heated Them Idiot',
- fill = 'Filled The Syringe',
- nofill = 'How Are You Going To Fill Needles Of Heroin Without Heroin',
- haskit = 'You Already Have A Heroin Lab Kit'
-}
-Lang.Lean = {
- marked = ' Car Has Been Marked On Your Map',
- lean = 'You Got Purple Lean',
- dextro = ' You Got Red Dextro',
- act = 'You Already Have A Lean Task',
-}
-
-Lang.lsd = {
- steallys = 'Stealing Lysergic Acid',
- stealdie = 'Stealing Lysergic Acid',
- tableout = 'You Already Have A Table Out',
- tablepack = 'Packing Table Up',
- heat = 'Heating Up Liquids',
- clean = 'Cleaning The Table',
- refine = 'Refining The Quality',
- dip = 'Dipping LSD On The Paper',
- buypaper = 'Buying Tab Paper',
- buykit = 'Buying Lab Kit',
- place = 'Placing Table Down',
- hav = 'You Already Have A Table',
- -- server
- lys = 'You Got Lysergic Acid',
- die = 'You Got Diethylamide',
- cleaned = 'You Cleaned It Perfectly',
- madelsd = 'You Made LSD!',
- failed = 'You Over Heated Them Idiot',
- refined = 'You Refined Them!',
- broke = 'Your Broke Ass Cant Afford these!',
- novial = 'No LSD Vials Idiot',
-}
-Lang.mescaline = {
- pick = "Picking Cactus",
- dry = 'Drying Out Cactus',
- nocactus = 'No Cactus Bulbs',
- eat = 'eating mescaline'
-}
-
-Lang.meth = {
- inside = 'Stuff Inside Already',
- increaseheat = 'Increasing Heat',
- mission = 'Car Has Been Marked On Your Map',
- ace = 'You Got Some Acetone',
- eph = 'You Got Some Ephedrine',
- mix = 'Adding Things To The Mix',
- nobag = 'No Bags',
- act = 'You Already Have A Meth Task',
-}
-
-Lang.oxy = {
- truck = 'Your Truck Is Here',
- cantcarry = 'You Aint That Strong, You Can Only Carry One',
- hand = 'Handing Over oxy',
- empty = 'You Cant Be Empty Handed Idiot',
- broke = 'Your Broke Ass Cant Afford This',
- hot = 'Car Is Hot Dump It Now',
- next = 'Get To the Next Location'
-}
-
-Lang.Pharma = {
- notems = 'You Are Not A Medical Person',
- write = 'Writing Prescription',
- fill = 'Filling Prescription',
- open = 'Opening Bottle',
- pills = 'You Got Some Pills!',
- no = 'You Dont Have A Prescription'
-}
-
-Lang.Shrooms = {
- pick = 'Picking Shrooms',
- eat = 'Eating Shrooms',
- trip = 'Have A Good Trip!'
-}
-
-Lang.Weed = {
- pick = 'Harvesting Weed',
- busy = 'Already Drying One Out',
- canna = 'Making Canna-butter',
- brown = 'Making Special Brownies',
- cook = 'Making Special Cookies',
- Choc = 'Making Special Chocolate',
- muff = 'Making Special Muffin',
- stovehot = 'Stove Is Too Hot Wait 30 Seconds To Cool Down',
- shat = 'Making Shatter',
- roll = 'Rolling Blunts',
- wait = 'Wait A Little Bit For To Drive',
- take = 'Taking Down The Weed',
- --
- nodry = 'You Need Wet Cannabis To Dry',
- noweed = 'Cant Roll A Blunt With Air',
- noshat = 'You Need Shatter To Do A Dab',
- notorch = 'You Need A butane Torch'
-}
-
-Lang.xtc = {
- out = 'You Have A Press Out Already',
- pressing = 'Pressing Pills',
- raw = 'Making Raw XTC',
- mdp2p = 'Stealing MDP2P',
- iso = 'Stealing Isosafrole',
- fail = 'Dude Its A Circle Not Rocket Science',
- pickup = 'Picking Up The Press',
- stamp = 'Stamping %s Pills',
- buyp = "Buying Press",
- --
- cash = 'I need 20k In Cash',
- press = {
- title = {single = 'Single Press', dual = 'Dual Press', triple = 'Triple Press', quad = 'Quad Press'},
- des = {single ='Buy a single press for 20k', dual = '20 of each unstamped single stack pill and your single press ',
- triple = '50 of each unstamped dual stack pill and your dual press ', quad = '150 of each unstamped Triple stack pill and your triple press'
- }
- }
-}
-
-Lang.Wholesale = {
- al = 'You Already Have A Delivery To Make',
- na = 'No One Answered, Try Again Later',
-
-}
+Lang = {}
+
+Lang.targets = {
+ coke = {
+ pick = 'Pick Cocaine',
+ cut = 'Cut Cocaine',
+ bag = 'Bag Cocaine',
+ enter = 'Enter Building',
+ exit = 'Exit Building',
+ chop = 'Chop Coca Leaves',
+
+ },
+ CornerSell = {
+ sell = 'Sell %s Of %s For $%s',
+ deny = 'Deny Price'
+ },
+ crack = {
+ cook = 'Cook Crack',
+ bag = 'Bag Crack'
+ },
+ Delivery = {
+ Deliver = 'Deliver For %s',
+ open = 'Open %s Shop',
+ hand = 'Hand Over'
+ },
+ heroin = {
+ pick = 'Pick Poppies',
+ up = 'Pick Up Table',
+ dry = 'Dry Poppies',
+ cut = 'Cut Heroin',
+ cook = 'Cook Heroin',
+ kit = 'Buy Heroin Lab Kit',
+ clean = 'Clean Table',
+ fill = 'Fill Syringe',
+ vial = 'Make Vial',
+ },
+ lean = {
+ git = 'Get Task',
+ st = 'Steal From Car'
+ },
+ lsd = {
+ buy = 'Buy LSD Lab Kit',
+ heat = 'Heat Liquid',
+ refine = 'Refine Quality',
+ paper = 'Make Tab Paper',
+ back = 'Pick Up Lab Kit',
+ dab = 'Dab LSD on sheets',
+ clean = 'Clean Table',
+ lys = 'Steal Lysergic Acid',
+ die = 'Steal Diethylamide',
+ buyt = 'Buy Tabs',
+ },
+ mescaline = {
+ pick = 'Pick Cactus',
+ dry = 'Dry Out Cactus',
+ },
+ meth = {
+ bag = 'Bag Up Meth',
+ enter = 'Enter Buidling',
+ exit = 'Exit Building',
+ cook = 'Cook Meth',
+ tray = 'Grab Tray',
+ box = 'Box Up Meth',
+ adjust = 'Adjust Temperature',
+ eph = 'Steal Ephedrine',
+ ace = 'Steal Acetone',
+ mission = 'Get Mission',
+ stealfromcar = 'Steal From Car',
+ },
+ oxy = {
+ pack = 'Get Oxy Package',
+ talk = 'Talk To Buyer',
+ pay = 'Pay For Truck',
+ },
+ pha = {
+ fill = 'Fill Prescription',
+ },
+ shrooms = {
+ pick = 'Pick Shrooms',
+ },
+ travel = {
+ travel = 'Open Travelling Merchant',
+ },
+ xtc = {
+ iso = 'Steal Isosafrole',
+ mdp = 'Steal MDP2P',
+ raw = 'Make Raw XTC',
+ press = 'Buy XTC Press',
+ stamp = 'Stamp Pills',
+ make = 'Make XTC',
+ pick = 'Pick Up Press',
+ },
+ weed = {
+ pick = 'Pick Weed',
+ dry = 'Dry Weed',
+ dpick = 'Pick Dried Weed',
+ butt = 'Open Edible Menu',
+ oil = 'Make Oil'
+ },
+ Wholesale = {
+ talk = 'Talk To Buyer'
+ },
+
+}
+
+Lang.Coke = {
+ -- client side progressbars
+ picking = "Picking Leaves",
+ makepow = 'Chopping Leaves Into A Powder',
+ cutting = 'Cutting Coke With Baking Soda',
+ bagging = "Bilbo Baggins This Bitch",
+ -- end progressbars
+ cut = "You Cut Some Coke",
+ nocutcoke = "You Cant Cut Coke With No Coke Idiot",
+ bagcoke = "You Bagged Up Coke",
+ nobagcoke = "You Cant Bag Up Coke Without Coke Idiot",
+}
+Lang.Crack = {
+ --client side
+ cookcrack = "Cooking Some Crack",
+ bagcrack = 'Bilbo Baggin This Bitch',
+ -- server
+ makecrack = 'Nice Crack',
+ nocoke = 'You Cant Make This Without Coke'
+}
+Lang.Cornerselling = {
+ -- client side notifys
+ inveh = 'STRANGER DANGER, I WONT GET IN THE CAR WITH YOU',
+ toofar = "To Far From Your Corner Homie",
+ selling = 'Selling %s For $%s',
+ deny = "Fuck That Offer",
+ start = "Get That Paper",
+ stop = "Lazy Ass Cant Even Sell Drugs",
+ nodrugs = "What You Gonna sell? Air?",
+ notcops = "Not Enough Cops",
+ no = 'You Cant Sell Drugs Here!',
+ -- end client side notifys
+ -- progressbars
+ sell = "Selling Drugs",
+}
+Lang.Delivery = {
+ -- client side
+ emailn = 'Not A Drug Dealer',
+ emailsub = 'Hurry Up And Get The Package To The Buyer',
+ emailcon = 'I Swear To God If It Doesnt Get There I Will Tell Your Mom You Said Fuck Just Bring %s Of %s',
+ search = "Searching For A Delivery ...",
+ none = "Nothing Close By",
+ busy = "You Havent Even Finished The One I Told You Too",
+ found = "Marked On Your Map",
+ already = "Already Deliverying",
+ checkrep = "Current Dealer Rep: ",
+ -- progressbars
+ pack = 'Handing Off Package',
+ -- end client side
+}
+
+Lang.Heroin = {
+ --client
+ pick = " Picking Poppies Up",
+ tableout = 'You Already Have A Table Out',
+ dryout = "Drying Out Poppies",
+ cutting = "Cutting Heroin With Baking Soda",
+ secret = "SHHHHHHHHH",
+ table = "Placing Table Down",
+ success = "Heated Heroin Properly",
+ clean = 'Cleaning Heroin Table',
+ needles = 'Filling Syringe',
+ pickup = 'Picking Up The Heroin Table',
+ --
+ cutheroin = 'You Made Some Cut Heroin',
+ noheroin = "How Can You Cut Heroin Without Heroin Idiot",
+ vial = 'You Made A Vial Of Heroin',
+ novial = "How Can You Make Heroin Vials Without Heroin Idiot",
+ fail = 'You Over Heated Them Idiot',
+ fill = 'Filled The Syringe',
+ nofill = 'How Are You Going To Fill Needles Of Heroin Without Heroin',
+ haskit = 'You Already Have A Heroin Lab Kit'
+}
+Lang.Lean = {
+ marked = ' Car Has Been Marked On Your Map',
+ lean = 'You Got Purple Lean',
+ dextro = ' You Got Red Dextro',
+ act = 'You Already Have A Lean Task',
+}
+
+Lang.lsd = {
+ steallys = 'Stealing Lysergic Acid',
+ stealdie = 'Stealing Lysergic Acid',
+ tableout = 'You Already Have A Table Out',
+ tablepack = 'Packing Table Up',
+ heat = 'Heating Up Liquids',
+ clean = 'Cleaning The Table',
+ refine = 'Refining The Quality',
+ dip = 'Dipping LSD On The Paper',
+ buypaper = 'Buying Tab Paper',
+ buykit = 'Buying Lab Kit',
+ place = 'Placing Table Down',
+ hav = 'You Already Have A Table',
+ -- server
+ lys = 'You Got Lysergic Acid',
+ die = 'You Got Diethylamide',
+ cleaned = 'You Cleaned It Perfectly',
+ madelsd = 'You Made LSD!',
+ failed = 'You Over Heated Them Idiot',
+ refined = 'You Refined Them!',
+ broke = 'Your Broke Ass Cant Afford these!',
+ novial = 'No LSD Vials Idiot',
+}
+Lang.mescaline = {
+ pick = "Picking Cactus",
+ dry = 'Drying Out Cactus',
+ nocactus = 'No Cactus Bulbs',
+ eat = 'eating mescaline'
+}
+
+Lang.meth = {
+ inside = 'Stuff Inside Already',
+ increaseheat = 'Increasing Heat',
+ mission = 'Car Has Been Marked On Your Map',
+ ace = 'You Got Some Acetone',
+ eph = 'You Got Some Ephedrine',
+ mix = 'Adding Things To The Mix',
+ nobag = 'No Bags',
+ act = 'You Already Have A Meth Task',
+}
+
+Lang.oxy = {
+ truck = 'Your Truck Is Here',
+ cantcarry = 'You Aint That Strong, You Can Only Carry One',
+ hand = 'Handing Over oxy',
+ empty = 'You Cant Be Empty Handed Idiot',
+ broke = 'Your Broke Ass Cant Afford This',
+ hot = 'Car Is Hot Dump It Now',
+ next = 'Get To the Next Location'
+}
+
+Lang.Pharma = {
+ notems = 'You Are Not A Medical Person',
+ write = 'Writing Prescription',
+ fill = 'Filling Prescription',
+ open = 'Opening Bottle',
+ pills = 'You Got Some Pills!',
+ no = 'You Dont Have A Prescription'
+}
+
+Lang.Shrooms = {
+ pick = 'Picking Shrooms',
+ eat = 'Eating Shrooms',
+ trip = 'Have A Good Trip!'
+}
+
+Lang.Weed = {
+ pick = 'Harvesting Weed',
+ busy = 'Already Drying One Out',
+ canna = 'Making Canna-butter',
+ brown = 'Making Special Brownies',
+ cook = 'Making Special Cookies',
+ Choc = 'Making Special Chocolate',
+ muff = 'Making Special Muffin',
+ stovehot = 'Stove Is Too Hot Wait 30 Seconds To Cool Down',
+ shat = 'Making Shatter',
+ roll = 'Rolling Blunts',
+ wait = 'Wait A Little Bit For To Drive',
+ take = 'Taking Down The Weed',
+ --
+ nodry = 'You Need Wet Cannabis To Dry',
+ noweed = 'Cant Roll A Blunt With Air',
+ noshat = 'You Need Shatter To Do A Dab',
+ notorch = 'You Need A butane Torch'
+}
+
+Lang.xtc = {
+ out = 'You Have A Press Out Already',
+ pressing = 'Pressing Pills',
+ raw = 'Making Raw XTC',
+ mdp2p = 'Stealing MDP2P',
+ iso = 'Stealing Isosafrole',
+ fail = 'Dude Its A Circle Not Rocket Science',
+ pickup = 'Picking Up The Press',
+ stamp = 'Stamping %s Pills',
+ buyp = "Buying Press",
+ --
+ cash = 'I need 20k In Cash',
+ press = {
+ title = {single = 'Single Press', dual = 'Dual Press', triple = 'Triple Press', quad = 'Quad Press'},
+ des = {single ='Buy a single press for 20k', dual = '20 of each unstamped single stack pill and your single press ',
+ triple = '50 of each unstamped dual stack pill and your dual press ', quad = '150 of each unstamped Triple stack pill and your triple press'
+ }
+ }
+}
+
+Lang.Wholesale = {
+ al = 'You Already Have A Delivery To Make',
+ na = 'No One Answered, Try Again Later',
+
+}
+
+return Lang
\ No newline at end of file
diff --git a/server/cocaine.lua b/server/cocaine.lua
index 626da99..0c5100a 100644
--- a/server/cocaine.lua
+++ b/server/cocaine.lua
@@ -50,9 +50,8 @@ end)
RegisterServerEvent('md-drugs:server:makepowder', function(num)
local src = source
- ps.debug(#(GetEntityCoords(GetPlayerPed(src)) - GlobalState.MDDrugsLocs.MakePowder[num].loc))
if not ps.checkDistance(src, GlobalState.MDDrugsLocs.MakePowder[num].loc, 3.5) then
- Notifys(src, 'You are not in the correct location', 'error')
+ ps.notify(src, 'You are not in the correct location', 'error')
return
end
local tier = 'tier1'
@@ -71,7 +70,7 @@ RegisterServerEvent('md-drugs:server:cutcokeone', function(num)
local src = source
local tier = 'tier1'
if not ps.checkDistance(src, GlobalState.MDDrugsLocs.CuttingCoke[num].loc, 2.5) then
- Notifys(src, 'You are not in the correct location', 'error')
+ ps.notify(src, 'You are not in the correct location', 'error')
return
end
if Config.TierSystem then
@@ -94,7 +93,7 @@ RegisterServerEvent('md-drugs:server:bagcoke', function(num)
local src = source
local tier = 'tier1'
if not ps.checkDistance(src, GlobalState.MDDrugsLocs.BaggingCoke[num].loc, 2.5) then
- Notifys(src, 'You are not in the correct location', 'error')
+ ps.notify(src, 'You are not in the correct location', 'error')
return
end
if Config.TierSystem then
@@ -120,10 +119,9 @@ local cokecut = {loosecokestagetwo = 2, loosecokestagethree = 3}
for k, v in pairs (cokecut) do
ps.createUseable(k, function(source, item)
local src = source
- local Player = getPlayer(src)
if not ps.hasItem(src, 'bakingsoda') then ps.notify(src, 'You Need Baking Soda For this', 'error') return end
if ps.hasItem(src,item.name) then
- local check = lib.callback.await('md-drugs:client:uncuff', src, 'Cutting It Further')
+ local check = ps.callback('md-drugs:client:uncuff', src, 'Cutting It Further')
if not check then return end
if ps.removeItem(src, k, 1) and ps.removeItem(src, 'bakingsoda', 1) then
ps.addItem(src, 'loosecoke', v)
diff --git a/server/consumables.lua b/server/consumables.lua
index f05135d..92c8fb7 100644
--- a/server/consumables.lua
+++ b/server/consumables.lua
@@ -150,7 +150,7 @@ for k, v in pairs(Consume) do
local anim = v.anim or Consumables.defaultanim
local progressbartext = v.progressbartext or Consumables.defaultprogresstext
local add = v.add or {hunger = 0}
- local done = lib.callback.await('md-drugs:client:consumedrugs', source, time, effect, anim, progressbartext, add, k)
+ local done = ps.callback('md-drugs:client:consumedrugs', source, time, effect, anim, progressbartext, add, k)
if done then
RemoveItem(source, k, 1)
end
diff --git a/server/cornerselling.lua b/server/cornerselling.lua
index ac8c2c3..32f58e3 100644
--- a/server/cornerselling.lua
+++ b/server/cornerselling.lua
@@ -121,7 +121,7 @@ local Drugs = {
["cupofdextro"] = {rep = 1,min = 18, max = 40},
}
-lib.callback.register('md-drugs:server:cornerselling:getAvailableDrugs', function(source, ped)
+ps.registerCallback('md-drugs:server:cornerselling:getAvailableDrugs', function(source, ped)
local Player = getPlayer(source)
local rep = getRep(source, 'cornerselling')
if not Player then return nil end
@@ -144,7 +144,7 @@ lib.callback.register('md-drugs:server:cornerselling:getAvailableDrugs', functio
end
end)
-lib.callback.register('md-drugs:server:hasDrugs', function(source)
+ps.registerCallback('md-drugs:server:hasDrugs', function(source)
local Player = getPlayer(source)
for k, v in pairs(Drugs) do
local item = Player.Functions.GetItemByName(k)
diff --git a/server/crack.lua b/server/crack.lua
index 5e3b3d7..b957509 100644
--- a/server/crack.lua
+++ b/server/crack.lua
@@ -1,62 +1,82 @@
-local QBCore = exports['qb-core']:GetCoreObject()
RegisterServerEvent('md-drugs:server:makecrackone', function(num)
local src = source
- local Player = getPlayer(src)
- local count,type, tier = 0, 'cookcrack', 'tier1'
- if not checkLoc(src, 'makecrack', num) then return end
+ local tier = 'tier1'
+ if not ps.checkDistance(src, GlobalState.MDDrugsLocs.makecrack[num].loc, 2.0) then
+ ps.notify(src, 'You are not in the correct location', 'error')
+ return
+ end
if Config.TierSystem then
local crackTiers = {
- {item = 'loosecoke', tier = 'tier1', log = ' Cut Crack'},
- {item = 'loosecokestagetwo', tier = 'tier2', log = ' Cut Crack tier 2'},
- {item = 'loosecokestagethree', tier = 'tier3', log = ' Cut Crack tier 3'}
+ {item = 'loosecoke', tier = 'tier1'},
+ {item = 'loosecokestagetwo', tier = 'tier2'},
+ {item = 'loosecokestagethree', tier = 'tier3'}
}
for _, v in ipairs(crackTiers) do
- if count >= 1 then break end
- if Player.Functions.GetItemByName(v.item) then
- tier = v.tier
- count = count + 1
+ if ps.hasItem(src, v.item) then
+ tier = v.tier
+ break
end
end
end
- if not GetRecipe(src, 'crack', type, tier) then return end
+ if not GetRecipe(src, 'crack', 'cookcrack', tier) then return end
end)
RegisterServerEvent('md-drugs:server:bagcrack', function(num)
local src = source
- local Player = getPlayer(src)
- local count,type, tier = 0, 'bagcrack', 'tier1'
- if not checkLoc(src, 'bagcrack', num) then return end
+ local tier = 'tier1'
+ if not ps.checkDistance(src, GlobalState.MDDrugsLocs.bagcrack[num].loc, 2.0) then
+ ps.notify(src, 'You are not in the correct location', 'error')
+ return
+ end
if Config.TierSystem then
local crackTiers = {
- {item = 'crackrock', tier = 'tier1', log = ' Bagged Crack'},
- {item = 'crackrockstagetwo', tier = 'tier2', log = ' Bagged Crack tier 2'},
- {item = 'crackrockstagethree', tier = 'tier3', log = ' Bagged Crack tier 3'}
+ {item = 'crackrock', tier = 'tier1'},
+ {item = 'crackrockstagetwo', tier = 'tier2'},
+ {item = 'crackrockstagethree', tier = 'tier3'}
}
for _, v in ipairs(crackTiers) do
- if count >= 1 then break end
- if Player.Functions.GetItemByName(v.item) then
- tier = v.tier
- count = count + 1
+ if ps.hasItem(src, v.item) then
+ tier = v.tier
+ break
end
end
end
- if not GetRecipe(src, 'crack', type, tier) then return end
+ if not GetRecipe(src, 'crack', 'bagcrack', tier) then return end
end)
local cokecut = {crackrockstagetwo = 2, crackrockstagethree = 3}
for k, v in pairs (cokecut) do
- CUI(k, function(source, item)
+ ps.createUseable(k, function(source, item)
local src = source
- local Player = getPlayer(src)
- if Player.Functions.GetItemByName(item.name) then
- if not Itemcheck(src, 'bakingsoda', 1) then return end
- local check = lib.callback.await('md-drugs:client:uncuff', src, 'Cutting Crack Rock Further')
+ if ps.hasItem(src, item.name) then
+ if not ps.hasItem(src, 'bakingsoda', 1) then return end
+ local check = ps.callback('md-drugs:client:uncuff', src, 'Cutting Crack Rock Further')
if not check then return end
- if RemoveItem(src, k, 1) and RemoveItem(src, 'bakingsoda', 1) then
- AddItem(src, 'crackrock', v)
+ if ps.removeItem(src, k, 1) and ps.removeItem(src, 'bakingsoda', 1) then
+ ps.addItem(src, 'crackrock', v)
end
end
end)
end
+
+RegisterNetEvent("md-drugs:server:failcrackone", function(num)
+ local src = source
+ if not ps.checkDistance(src, GlobalState.MDDrugsLocs.makecrack[num].loc, 2.0) then
+ ps.notify(src, 'You are not in the correct location', 'error')
+ return
+ end
+ local items = {
+ loosecoke = 1,
+ loosecokestagetwo = 1,
+ loosecokestagethree = 1
+ }
+ for k,v in pairs(items) do
+ if ps.hasItem(src, k, v) then
+ ps.removeItem(src, k, v)
+ ps.notify(src, 'You failed to make crack and lost '..v..' '..k, 'error')
+ return
+ end
+ end
+end)
\ No newline at end of file
diff --git a/server/deliveries.lua b/server/deliveries.lua
index b62d4aa..1fb6115 100644
--- a/server/deliveries.lua
+++ b/server/deliveries.lua
@@ -80,7 +80,7 @@ local dloc = {
{coords = vector4(223.98, 121.53, 102.76, 259.68)},
{coords = vector4(102.19, -255.02, 50.05, 83.59)},
}
-lib.callback.register('md-drugs:server:getDealers', function(data)
+ps.registerCallback('md-drugs:server:getDealers', function(data)
local check = MySQL.query.await('SELECT * FROM dealers', {})
local loc = json.encode({x = 899.98, y = -2603.24, z = 6.11, h = 176.12 })
if not check[1] then
@@ -99,7 +99,7 @@ local DeliveryItems = {
{ item = "coke_brick", minrep = 0, payout = {min = 10, max = 50}},
}
-lib.callback.register('md-drugs:server:GetDeliveryItem', function(data)
+ps.registerCallback('md-drugs:server:GetDeliveryItem', function(data)
local src = source
local Player = getPlayer(src)
local itemnum = math.random(1, #DeliveryItems)
diff --git a/server/functions.lua b/server/functions.lua
index 84a21f6..4771245 100644
--- a/server/functions.lua
+++ b/server/functions.lua
@@ -323,7 +323,7 @@ function getCops()
return amount
end
-lib.callback.register('md-drugs:server:GetCoppers', function(source, cb, args)
+ps.registerCallback('md-drugs:server:GetCoppers', function(source, cb, args)
local amount = 0
local players = QBCore.Functions.GetQBPlayers()
for k, v in pairs(players) do
@@ -334,7 +334,7 @@ lib.callback.register('md-drugs:server:GetCoppers', function(source, cb, args)
return amount
end)
-lib.callback.register('md-drugs:server:GetRep', function(source, cb, args)
+ps.registerCallback('md-drugs:server:GetRep', function(source, cb, args)
local src = source
local rep = GetAllRep(source)
return rep
diff --git a/server/heroin.lua b/server/heroin.lua
index fa2f620..efa3de1 100644
--- a/server/heroin.lua
+++ b/server/heroin.lua
@@ -37,7 +37,7 @@ function heroinCooldown(loc)
end)
end
-lib.callback.register('removeCleaningkit', function(source)
+ps.registerCallback('removeCleaningkit', function(source)
local Player = getPlayer(source)
for k, v in pairs(heroinLabKits) do
if v.ownerid == Player.PlayerData.citizenid then
@@ -141,7 +141,7 @@ CUI('heroinlabkit', function(source, item)
local src = source
local Player = getPlayer(src)
if not Itemcheck(source, 'heroinlabkit', 1) then return end
- local placed, loc = lib.callback.await('md-drugs:client:setheroinlabkit', src)
+ local placed, loc = ps.callback('md-drugs:client:setheroinlabkit', src)
if placed then
RemoveItem(src, 'heroinlabkit', 1)
table.insert(heroinLabKits, {
diff --git a/server/locations.lua b/server/locations.lua
index 613a9c1..c1a6141 100644
--- a/server/locations.lua
+++ b/server/locations.lua
@@ -134,11 +134,11 @@ function checkLoc(source, event, num)
end
local loc = Target.Travellingmerchant[math.random(1, #Target.Travellingmerchant)]
-lib.callback.register('md-drugs:server:getLocs', function()
+ps.registerCallback('md-drugs:server:getLocs', function()
return Target
end)
-lib.callback.register('md-drugs:server:GetMerchant', function(source)
+ps.registerCallback('md-drugs:server:GetMerchant', function(source)
return loc
end)
diff --git a/server/lsd.lua b/server/lsd.lua
index eaded7a..647e617 100644
--- a/server/lsd.lua
+++ b/server/lsd.lua
@@ -1,29 +1,44 @@
-local QBCore = exports['qb-core']:GetCoreObject()
+
local prices = {
tabcost = 100, -- price per piece of tab paper event does 10 at a time
lsdlabkitcost = 10000 -- price of the lsd lab kit
}
-
+local timedOut = {}
+local function timeout(src, time)
+ timedOut[src] = true
+ CreateThread(function()
+ Wait(time)
+ timedOut[src] = nil
+ end)
+end
local lsdTables = {}
RegisterServerEvent('md-drugs:server:getlysergic', function(num)
local src = source
- if not checkLoc(src, 'lysergicacid', num) then return end
- if AddItem(src,'lysergic_acid', 2) then
+ if timedOut[src] then return end
+ if not ps.checkDistance(src, GlobalState.MDDrugsLocs.lysergicacid[num].loc, 2.0) then
+ Notifys(src, Lang.lsd.notinloc, "error")
+ return
end
+ timeout(src, 3000)
+ ps.addItem(src, 'lysergic_acid', 2)
end)
RegisterServerEvent('md-drugs:server:getdiethylamide', function(num)
local src = source
- if not checkLoc(src, 'diethylamide', num) then return end
- if AddItem(src,'diethylamide', 2) then
+ if not ps.checkDistance(src, GlobalState.MDDrugsLocs.diethylamide[num].loc, 2.0) then
+ Notifys(src, Lang.lsd.notinloc, "error")
+ return
end
+ if timedOut[src] then return end
+ timeout(src, 3000)
+ ps.addItem(src, 'diethylamide', 2)
end)
CUI('lsdlabkit', function(source, item)
local src = source
local Player = getPlayer(src)
- local placed, loc = lib.callback.await('md-drugs:client:setlsdlabkit', src)
+ local placed, loc = ps.callback('md-drugs:client:setlsdlabkit', src)
if placed then
if RemoveItem(src, 'lsdlabkit', 1) then
table.insert(lsdTables, {
@@ -46,7 +61,7 @@ local function hasLabKit(source)
end
end
-lib.callback.register('md-drugs:server:removecleaningkit', function(source)
+ps.registerCallback('md-drugs:server:removecleaningkit', function(source)
local src = source
if not Itemcheck(src, 'cleaningkit', 1) then return end
if RemoveItem(src,"cleaningkit", 1) then
diff --git a/server/oxyruns.lua b/server/oxyruns.lua
index cf2cc77..a3539f6 100644
--- a/server/oxyruns.lua
+++ b/server/oxyruns.lua
@@ -4,7 +4,7 @@ local prices = {
hotchance = 30,
itemChance = 20,
}
-lib.callback.register('md-drugs:server:payfortruck', function()
+ps.registerCallback('md-drugs:server:payfortruck', function()
local src = source
local Player = getPlayer(src)
if Player.Functions.RemoveMoney('cash', prices.payfortruck) or Player.Functions.RemoveMoney('bank', prices.payfortruck) then
diff --git a/server/pharma.lua b/server/pharma.lua
index 3949ddf..69aad4f 100644
--- a/server/pharma.lua
+++ b/server/pharma.lua
@@ -25,7 +25,7 @@ CUI('prescription_pad', function(source, item)
end
end
local options = { {label = 'Vicodin', value = 'vicodin_prescription'}, {label = 'Adderal', value = 'adderal_prescription'}, {label = 'Morphine', value = 'morphine_prescription'},{label = 'Xanax', value = 'xanax_prescription'}}
- local data = lib.callback.await('md-drugs:client:prescriptionpad', src, near, options)
+ local data = ps.callback('md-drugs:client:prescriptionpad', src, near, options)
if type(data) == 'table' then
local give = QBCore.Functions.GetPlayerByCitizenId(data.who)
for i = 1, #options do
@@ -42,7 +42,7 @@ for m, d in pairs (pharmabottle) do
CUI(d, function(source, item)
local src = source
local Player = getPlayer(src)
- local check = lib.callback.await("md-drugs:client:unbottle", src)
+ local check = ps.callback("md-drugs:client:unbottle", src)
if check then
local get = {
['vicodinbottle'] = 'vicodin',
diff --git a/server/recipes.lua b/server/recipes.lua
index 120c5e6..63e4f28 100644
--- a/server/recipes.lua
+++ b/server/recipes.lua
@@ -139,7 +139,7 @@ function GetRecipe(source, type, method, tier)
ps.craftItem(source,recipe[type][method][tier])
end
-lib.callback.register('md-drugs:server:GetRecipe', function(source, type, cat)
+ps.registerCallback('md-drugs:server:GetRecipe', function(source, type, cat)
if not source then return false end
return recipe[type][cat]
end)
\ No newline at end of file
diff --git a/server/shops.lua b/server/shops.lua
index 3eb404f..acbe2f0 100644
--- a/server/shops.lua
+++ b/server/shops.lua
@@ -53,7 +53,7 @@ local stores = {
}
}
-lib.callback.register('md-drugs:server:menu', function(source, data)
+ps.registerCallback('md-drugs:server:menu', function(source, data)
local src = source
if data == 'travellingMerchant' then
return {table = stores.travel, des = '$', id = 'travellingMerchant', title = 'travelling Merchant'}
diff --git a/server/weed.lua b/server/weed.lua
index 8e87e36..93ded81 100644
--- a/server/weed.lua
+++ b/server/weed.lua
@@ -122,7 +122,7 @@ CUI("weedgrinder", function(source, item)
local Player = getPlayer(src)
local has = Player.Functions.GetItemByName("drycannabis")
if not has then Notifys(src, 'You Need Dried Cannabis', 'error') return end
- local check = lib.callback.await('md-drugs:client:uncuff', src, 'Grinding Weed')
+ local check = ps.callback('md-drugs:client:uncuff', src, 'Grinding Weed')
if not check then return end
if RemoveItem(src, "drycannabis",1 ) then
AddItem(src, "grindedweed", 1)
@@ -132,7 +132,7 @@ end)
CUI("mdwoods", function(source, item)
local src = source
local Player = getPlayer(src)
- local check = lib.callback.await('md-drugs:client:uncuff', src, 'Breaking Blunt Open')
+ local check = ps.callback('md-drugs:client:uncuff', src, 'Breaking Blunt Open')
if not check then return end
if RemoveItem(src, "mdwoods",1 ) then
AddItem(src, "bluntwrap", 5)
diff --git a/server/xtc.lua b/server/xtc.lua
index 57c19aa..86c3d03 100644
--- a/server/xtc.lua
+++ b/server/xtc.lua
@@ -27,7 +27,7 @@ for k, v in pairs (presses) do
CUI(v.item, function(source, item)
local src = source
local Player = getPlayer(src)
-local check, loc = lib.callback.await('md-drugs:client:setpress', src, v.data)
+local check, loc = ps.callback('md-drugs:client:setpress', src, v.data)
if check then
if RemoveItem(src, v.item, 1) then
table.insert(activePresses, {
diff --git a/serverRun.lua b/serverRun.lua
new file mode 100644
index 0000000..42cf07c
--- /dev/null
+++ b/serverRun.lua
@@ -0,0 +1,27 @@
+function loadFile(filePath)
+ local resourceName = 'md-drugs'
+ local fullScript = LoadResourceFile(resourceName, filePath)
+ if not fullScript then
+ ps.error("Error: Failed to load module '" .. filePath .. "' from resource '" .. resourceName .. "'.")
+ return false
+ end
+ local chunk, err = load(fullScript, filePath, "t")
+ if not chunk then
+ ps.error("Error loading Lua chunk from '" .. filePath .. "': " .. tostring(err))
+ return false
+ end
+
+ local success, execErr = pcall(chunk)
+ if not success then
+ ps.error("Error executing Lua chunk from '" .. filePath .. "': " .. tostring(execErr))
+ return false
+ end
+ ps.success("Successfully loaded module '" .. filePath .. "' from resource '" .. resourceName .. "'.")
+ return true
+end
+
+for scriptName, toggle in pairs(Config.Drugs) do
+ if not toggle then goto continue end
+ loadFile('server/' .. scriptName .. '.lua')
+ ::continue::
+end
\ No newline at end of file
diff --git a/shared/config.lua b/shared/config.lua
index 678d781..be46299 100644
--- a/shared/config.lua
+++ b/shared/config.lua
@@ -1,5 +1,6 @@
Config = {} --Ignore.
ps = exports.ps_lib:init()
+ps.insertLang("en")
Config.respawnTime = 150 -- Seconds
Config.Fuel = "LegacyFuel" -- type the name of script you use i.e. ps-fuel, cdn-fuel, LegacyFuel
Config.TierSystem = true -- allows for three tiers of certain drugs ( coke, heroin, crack, lsd)
@@ -22,12 +23,10 @@ Config.Tier1 = 100 -- amount to hit for level 2
Config.Tier2 = 300 -- amount to hit for level 3
---------------------------------- BRIDGE
-Config.progressbartype = 'oxcir' -- either 'qb', 'oxcir', 'oxbar'
-Config.Notify = 'ox' -- -- either 'qb' or 'ox' or 'okok'
+
Config.Phone = 'qb' -- either 'qb' or 'yflip' or 'qs'
Config.Dispatch = 'ps' -- either 'ps', 'cd', 'core', 'aty'
-Config.Target = 'qb' -- qb or ox
-Config.Inventory = 'ox' -- qb or ox, other if you dont use ox just mark as qb
+
Config.Minigames = {
ps_circle = {amount = 2, speed = 8,},
ps_maze = {timelimit = 15},
@@ -49,4 +48,23 @@ Config.Minigames = {
Config.minigametype = 'ox' -- look above for options or choose none if you dont want any minigames
-------- Woah Where did like all the locations go?
---- read the readme to find out
\ No newline at end of file
+--- read the readme to find out
+---
+Config.Drugs = {
+ cocaine = true,
+ consumables =false,
+ crack = true,
+ cornerselling = false,
+ heroin = false,
+ deliveries = false,
+ lean = false,
+ lsd = false,
+ mescaline = false,
+ meth = false,
+ oxyruns = false,
+ pharma = false,
+ shrooms = false,
+ weed = false,
+ wholesale = false,
+ xtc = false,
+}
\ No newline at end of file
From 4fdef3cf3018401b23a9b2d0058eed60e52d0d08 Mon Sep 17 00:00:00 2001
From: Mustache Dom <123716453+Mustachedom@users.noreply.github.com>
Date: Mon, 14 Jul 2025 01:34:58 -0700
Subject: [PATCH 03/37] - fix up heroin
---
client/cocaine.lua | 41 ++--
client/cornerselling.lua | 238 ++++++++++++--------
client/heroin.lua | 183 ++++++++++------
fxmanifest.lua | 2 +
server/cornerselling.lua | 143 +++++++-----
server/functions.lua | 454 +++++++++++++++++++++++++++------------
server/heroin.lua | 204 +++++++++---------
shared/config.lua | 6 +-
8 files changed, 795 insertions(+), 476 deletions(-)
diff --git a/client/cocaine.lua b/client/cocaine.lua
index 533dd88..fbf6608 100644
--- a/client/cocaine.lua
+++ b/client/cocaine.lua
@@ -1,27 +1,32 @@
local CocaPlant = {}
local cuttingcoke = nil
local baggingcoke = nil
+
local function pick(loc)
if not progressbar(Lang.Coke.picking, 4000, 'uncuff') then return end
TriggerServerEvent("coke:pickupCane", loc)
return true
end
+local function targetOps(loc)
+ return {
+ {
+ icon = "fa-solid fa-seedling",
+ label = ps.lang('targets.coke.pick'),
+ action = function()
+ if not pick(loc) then return end
+ end
+ }
+ }
+end
+
RegisterNetEvent('coke:respawnCane', function(loc)
local v = GlobalState.CocaPlant[loc]
local hash = GetHashKey(v.model)
if not CocaPlant[loc] then
CocaPlant[loc] = CreateObject(hash, v.location, false, true, true)
Freeze(CocaPlant[loc], true, v.heading)
- ps.entityTarget(CocaPlant[loc], {
- {
- icon = "fa-solid fa-seedling",
- label = ps.lang('targets.coke.pick'),
- action = function()
- if not pick(loc) then return end
- end
- }
- })
+ ps.entityTarget(CocaPlant[loc], targetOps(loc))
end
end)
@@ -37,15 +42,7 @@ RegisterNetEvent("coke:init", function()
if not v.taken then
CocaPlant[k] = CreateObject(hash, v.location.x, v.location.y, v.location.z, false, true, true)
Freeze(CocaPlant[k], true, v.heading)
- ps.entityTarget(CocaPlant[k], {
- {
- icon = "fa-solid fa-seedling",
- label = ps.lang('targets.coke.pick'),
- action = function()
- if not pick(k) then return end
- end
- }
- })
+ ps.entityTarget(CocaPlant[k], targetOps(k))
end
end
end)
@@ -67,7 +64,10 @@ for k, v in pairs (GlobalState.MDDrugsLocs.MakePowder) do
label = ps.lang('.targets.coke.pick'),
icon = 'fa-solid fa-seedling',
action = function()
- if not ps.hasItem('coca_leaf') then return end
+ if not ps.hasItem('coca_leaf') then
+ ps.notify('You Need A Coke Leaf')
+ return
+ end
if not ps.progressbar(ps.lang('Coke.makepow'), 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:makepowder", k)
end,
@@ -94,6 +94,7 @@ for k, v in pairs (GlobalState.MDDrugsLocs.CuttingCoke) do
}
})
end
+
for k, v in pairs (GlobalState.MDDrugsLocs.BaggingCoke) do
ps.boxTarget('bagcoke'..k, v.loc, {length = 1.0, width = 1.0, height = 1.0, rotation = 180.0}, {
{
@@ -109,4 +110,4 @@ for k, v in pairs (GlobalState.MDDrugsLocs.BaggingCoke) do
end
}
})
-end
+end
\ No newline at end of file
diff --git a/client/cornerselling.lua b/client/cornerselling.lua
index 20731a4..be59564 100644
--- a/client/cornerselling.lua
+++ b/client/cornerselling.lua
@@ -1,115 +1,173 @@
local sell = false
-local sold = false
-local targbusy = false
local inZone = false
-local active = false
+local buyers = {}
-local function reset(targ)
+local function walkAway(targ)
FreezeEntityPosition(targ, false)
ClearPedTasks(targ)
- local coords = GetEntityCoords(targ)
- TaskWanderInArea(targ, coords.x, coords.y, coords.z, 100.0, 2, 10.0)
- Wait(10000)
- DeletePed(targ)
- targbusy = false
- sold = true
- active = false
-end
-
-local function walkAway(targ)
- FreezeEntityPosition(targ, false)
- ClearPedTasks(targ)
- local coords = GetEntityCoords(targ)
- TaskWanderInArea(targ, coords.x, coords.y, coords.z, 100.0, 2, 10.0)
- Wait(10000)
- DeletePed(targ)
- targbusy = false
- active = false
end
local function sellDrug(item, amount, price, targ)
- PoliceCall(20)
- targbusy = true
- if IsPedInAnyVehicle(PlayerPedId(), true) then
- Notify(Lang.Cornerselling.inveh, 'error')
- reset(targ)
- return end
- if not progressbar(string.format(Lang.Cornerselling.selling, GetLabel(item), price), 4000, 'uncuff') then return end
+ -- PoliceCall(20)
+ if ps.vehicleData() then
+ Notify(ps.lang('Cornerselling.inveh', 'error'))
+ walkAway(targ)
+ return
+ end
+
+ if not ps.progressbar(string.format(ps.lang('Cornerselling.selling', GetLabel(item), price)), 4000, 'uncuff') then walkAway(targ) return end
+ buyers[targ] = 'sold'
TriggerServerEvent('md-drugs:server:sellCornerDrugs', item, amount, price)
- reset(targ)
+ walkAway(targ)
end
local function deny(targ)
- PoliceCall(20)
- targbusy = true
- if not progressbar(Lang.Cornerselling.deny, 4000, 'argue5') then return end
- reset(targ)
+ -- PoliceCall(20)
+ buyers[targ] = 'sold'
+ if not ps.progressbar(ps.lang('Cornerselling.deny'), 4000, 'argue5') then return end
+ walkAway(targ)
+end
+
+local function findPed()
+ local targ = nil
+ repeat
+ Wait(100)
+ targ = ps.getNearestPed(GetEntityCoords(PlayerPedId()), 8)
+
+ if IsPedInAnyVehicle(targ, false) or GetEntityHealth(targ) == 0 or not IsPedHuman(targ) then
+ targ = nil
+ end
+ if buyers[targ] then
+ targ = nil
+ end
+ if inZone then
+ targ = nil
+ end
+ until targ ~= nil
+
+ buyers[targ] = true
+ ps.drawText('Waiting For Customer')
+
+ repeat
+ Wait(1000)
+ TaskGoToCoordAnyMeans(targ, GetEntityCoords(PlayerPedId()), 1.0, 0, 0, 0, 0)
+ until #(GetEntityCoords(PlayerPedId()) - GetEntityCoords(targ)) < 2.0
+
+ TaskTurnPedToFaceEntity(targ, PlayerPedId(), -1)
+ ps.hideText()
+ CreateThread(function()
+ Wait(45000)
+ walkAway(targ)
+ buyers[targ] = 'sold'
+ end)
+ return targ
+end
+
+local function checkItems()
+ local count = 0
+ for k, v in pairs (GlobalState.DrugNames) do
+ if ps.hasItem(v) then
+ count = count + 1
+ break
+ end
+ end
+ if count == 0 then ps.notify(ps.lang('Cornerselling.nodrugs', 'error')) return false end
+ return true
end
function Cornersell()
- if active then return false end
- local targ = lib.GetClosestPed(GetEntityCoords(PlayerPedId()), 8)
- if targ == nil then return end
- if IsPedInAnyVehicle(targ, false) or GetEntityHealth(targ) == 0 or not IsPedHuman(targ) then return end
- local data = ps.callback('md-drugs:server:cornerselling:getAvailableDrugs', false, targ)
- if data.item == 'nothing' then Notify(Lang.Cornerselling.nodrugs, 'error') sell = false FreezeEntityPosition(targ, false) ClearPedTasks(targ) active = false return false end
- TaskGoToCoordAnyMeans(targ, GetEntityCoords(PlayerPedId()), 1.0, 0, 0, 0, 0)
- active = true
- repeat
- Wait(1000)
- until #(GetEntityCoords(PlayerPedId()) - GetEntityCoords(targ)) < 2.0
- lib.requestAnimDict("rcmme_tracey1")
- TaskStartScenarioInPlace(targ, "WORLD_HUMAN_STAND_IMPATIENT_UPRIGHT", 0, false) FreezeEntityPosition(targ, true)
- AddMultiModel(data.ped, {
- { label = string.format(Lang.targets.CornerSell.sell, data.amount, GetLabel(data.item), data.price), icon ="fa-solid fa-money-bill",
- action = function() sellDrug(data.item, data.amount, data.price, targ) end,
- canInteract = function()
- if not targbusy then return true end end,
- },
- { label = Lang.targets.CornerSell.deny, icon = "fa-solid fa-person-harassing",
- action = function() deny(targ) end,
- canInteract = function()
- if not targbusy then return true end end,
+ if inZone then sell = false return end
+
+ if not sell then
+ return
+ end
+
+ local hasDrugs = checkItems()
+ if not hasDrugs then
+ sell = false
+ return
+ end
+
+ ps.drawText('Searching For Nearby Customers')
+
+ local targ = findPed()
+ local data = ps.callback('md-drugs:server:cornerselling:getAvailableDrugs', targ)
+
+ if data == false then
+ sell = false
+ return
+ end
+
+ if data == 'robbed' then
+ TaskGoStraightToCoord(targ, -1858.232910, -1242.395630, 8.60510, 100.0, -1, 0.0, 0.0)
+ SetPedMoveRateOverride(targ, 10.0)
+ local got = false
+ ps.entityTarget(targ, {
+ {
+ label = "Take Back Drugs",
+ icon ="fa-solid fa-money-bill",
+ action = function()
+ got = true
+ TriggerServerEvent('md-drugs:server:getBackRobbed')
+ Cornersell()
+ end,
+ canInteract = function()
+ if IsEntityDead(targ) and not got then
+ return true
+ end
+ end,
}}, nil)
- local timer = 45
- repeat
- Wait(1000)
- timer = timer - 1
- until sold or timer == 0
- if sold then sold = false return true end
- if timer == 0 then Notify(Lang.Cornerselling.timeout, 'error') targbusy = true walkAway(targ) return false end
+ else
+ ps.requestAnim("rcmme_tracey1")
+ TaskStartScenarioInPlace(targ, "WORLD_HUMAN_STAND_IMPATIENT_UPRIGHT", 0, false)
+ FreezeEntityPosition(targ, true)
+ ps.entityTarget(data.ped, {
+ {
+ label = string.format(ps.lang('targets.CornerSell.sell', data.amount, GetLabel(data.item), data.price)),
+ icon ="fa-solid fa-money-bill",
+ action = function()
+ sellDrug(data.item, data.amount, data.price, targ)
+ Cornersell()
+ end,
+ canInteract = function()
+ if buyers[targ] ~= 'sold' and sell then
+ return true
+ end
+ end,
+ },
+ {
+ label = ps.lang('targets.CornerSell.deny'),
+ icon = "fa-solid fa-person-harassing",
+ action = function()
+ deny(targ)
+ walkAway(targ)
+ Cornersell()
+ end,
+ canInteract = function()
+ if buyers[targ] == true and sell then
+ return true
+ end
+ end
+ }
+ })
+ end
end
RegisterNetEvent('md-drugs:client:cornerselling', function()
- if not GetCops(QBConfig.MinimumDrugSalePolice) then return end
- if inZone then Notify(Lang.Cornerselling.no, 'error') return end
- local has = ps.callback('md-drugs:server:hasDrugs', false)
- if has then
- if sell then
- TriggerServerEvent('md-drugs:server:cornerselling:stop')
- Notify(Lang.Cornerselling.stop, 'error')
- sell = false
- active = false
- else
- sell = true
- Notify(Lang.Cornerselling.start, 'success')
- repeat
- Wait(1000)
- Cornersell()
- until not sell
- end
+ if sell then
+ sell = false
+ ps.hideText()
+ ps.notify(ps.lang('Cornerselling.stopped', 'error'))
else
- Notify(Lang.Cornerselling.nodrugs, 'error')
+ sell = true
+ ps.notify(ps.lang('Cornerselling.started', 'success'))
+ Cornersell()
end
end)
CreateThread(function()
-for k, v in pairs (QBConfig.NoSellZones) do
- local box = lib.zones.box({ coords = v.loc, size = vec3(v.width, v.length, v.height), rotation = 180.0, debug = false,
- onEnter = function() inZone = true end, onExit = function() inZone = false end})
-end
-end)
-
-RegisterNetEvent('md-drugs:client:cornerselling:remove', function(ped)
-DeletePed(ped)
+ for k, v in pairs (QBConfig.NoSellZones) do
+ local box = lib.zones.box({ coords = v.loc, size = vec3(v.width, v.length, v.height), rotation = 180.0, debug = false,
+ onEnter = function() inZone = true end, onExit = function() inZone = false end})
+ end
end)
\ No newline at end of file
diff --git a/client/heroin.lua b/client/heroin.lua
index 716f175..98eaf5a 100644
--- a/client/heroin.lua
+++ b/client/heroin.lua
@@ -2,20 +2,79 @@ local PoppyPlants = {}
local herointable = false
local dirty = false
+local function pickher(loc)
+ if not ps.progressbar(Lang.Heroin.pick, 4000, 'uncuff') then return end
+ TriggerServerEvent("heroin:pickupCane", loc)
+end
+
+local function pickOps(loc)
+ return {
+ {
+ icon = "fa-solid fa-seedling",
+ label = ps.lang('Heroin.pick'),
+ action = function() pickher(loc) end
+ }
+ }
+end
+
local function createLabKit(coord, head)
local heroinlabkit = CreateObject("v_ret_ml_tablea", coord.x, coord.y, coord.z - 1, true, false,false)
SetEntityHeading(heroinlabkit, head)
PlaceObjectOnGroundProperly(heroinlabkit)
- AddMultiModel(heroinlabkit, {
- {data = heroinlabkit, event = "md-drugs:client:heatliquidheroin", icon = "fa-solid fa-temperature-high", label = Lang.targets.heroin.cook, canInteract = function() if not dirty then return true end end},
- {data = heroinlabkit, event = "md-drugs:client:getheroinkitback", icon = "fas fa-box-circle-check", label = Lang.targets.heroin.up, canInteract = function() if not dirty then return true end end},
- {data = heroinlabkit, event = "md-drugs:client:cleanheroinlabkit",icon = "fa-solid fa-hand-sparkles",label = Lang.targets.heroin.clean,canInteract = function() if dirty then return true end end}},heroinlabkit)
+ ps.entityTarget(heroinlabkit, {
+ {
+ icon = "fa-solid fa-temperature-high",
+ label = ps.lang('Heroin.cook'),
+ action = function()
+ if not ps.hasItem('emptyvial') then return end
+ if not minigame() then
+ dirty = true
+ TriggerServerEvent("md-drugs:server:failheatingheroin")
+ ps.requestPTFX("core")
+ local heroinkit = StartParticleFxLoopedOnEntity("exp_air_molotov", heroinlabkit, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.5, false, false, false)
+ SetParticleFxLoopedAlpha(heroinkit, 3.0)
+ SetPedToRagdoll(PlayerPedId(), 1300, 1300, 0, 0, 0, 0)
+ return end
+ if not ps.progressbar(ps.lang('Heroin.success'), 4000, 'uncuff') then return end
+ TriggerServerEvent("md-drugs:server:heatliquidheroin")
+ end,
+ canInteract = function()
+ if not dirty then return true end
+ return false
+ end
+ },
+ {
+ icon = "fas fa-box-circle-check",
+ label = ps.lang('Heroin.up'),
+ action = function()
+ if not ps.progressbar(ps.lang('Heroin.pickup'), 4000, 'uncuff') then return end
+ herointable = false
+ DeleteObject(heroinlabkit)
+ TriggerServerEvent("md-drugs:server:getheroinlabkitback")
+ end,
+ canInteract = function()
+ if not dirty then return true end
+ return false
+ end
+ },
+ {
+ event = "md-drugs:client:cleanheroinlabkit",
+ icon = "fa-solid fa-hand-sparkles",
+ label = ps.lang('Heroin.clean'),
+ action = function()
+ if not ps.hasItem('cleaningkit') then return end
+ if not ps.progressbar(ps.lang('Heroin.clean'), 4000, 'clean') then return end
+ local done = ps.callback('removeCleaningkit', false)
+ if done then dirty = false end
+ end,
+ canInteract = function()
+ if dirty then return true end
+ return false
+ end
+ }})
end
-local function pickher(loc)
- if not progressbar(Lang.Heroin.pick, 4000, 'uncuff') then return end
- TriggerServerEvent("heroin:pickupCane", loc)
-end
+
RegisterNetEvent('heroin:respawnCane', function(loc)
local v = GlobalState.PoppyPlants[loc]
@@ -23,7 +82,7 @@ RegisterNetEvent('heroin:respawnCane', function(loc)
if not PoppyPlants[loc] then
PoppyPlants[loc] = CreateObject(hash, v.location, false, true, true)
Freeze(PoppyPlants[loc], true, v.heading)
- AddSingleModel(PoppyPlants[loc], {icon = "fa-solid fa-seedling", label = Lang.targets.heroin.pick, action = function() pickher(loc) end}, loc )
+ ps.entityTarget(PoppyPlants[loc], pickOps(loc), loc)
end
end)
@@ -39,7 +98,7 @@ RegisterNetEvent("heroin:init", function()
if not v.taken then
PoppyPlants[k] = CreateObject(hash, v.location.x, v.location.y, v.location.z, false, true, true)
Freeze(PoppyPlants[k], true, v.heading)
- AddSingleModel(PoppyPlants[k], {icon = "fa-solid fa-seedling", label = Lang.targets.heroin.pick, action = function() pickher(k) end}, k )
+ ps.entityTarget(PoppyPlants[k], pickOps(k))
end
end
end)
@@ -55,73 +114,71 @@ end)
end
end)
-RegisterNetEvent("md-drugs:client:dryplant", function(data)
- if not progressbar(Lang.Heroin.dryout, 4000, 'uncuff') then return end
- TriggerServerEvent("md-drugs:server:dryplant",data.data)
-end)
+for k, v in pairs (GlobalState.MDDrugsLocs.dryplant) do
+ ps.boxTarget('dryHeroin'..k, v.loc, {length = v.l, width = v.w, height = 1.0, rotation = v.rot}, {
+ {
+ label = ps.lang('targets.heroin.dry'),
+ icon = 'fa-solid fa-temperature-high',
+ action = function()
+ if not ps.progressbar(ps.lang('Heroin.dryout'), 4000, 'uncuff') then return end
+ TriggerServerEvent("md-drugs:server:dryplant", k)
+ end,
+ canInteract = function()
+ return handleGang(v.gang)
+ end
+ }
+ })
+end
-RegisterNetEvent("md-drugs:client:cutheroin", function(data)
- if not ItemCheck('bakingsoda') then return end
- if not progressbar(Lang.Heroin.cutting, 4000, 'uncuff') then return end
- TriggerServerEvent("md-drugs:server:cutheroin", data.data)
-end)
+for k, v in pairs (GlobalState.MDDrugsLocs.cutheroinone) do
+ ps.boxTarget('cutHeroin'..k, v.loc, {length = v.l, width = v.w, height = 1.0, rotation = v.rot}, {
+ {
+ label = ps.lang('targets.heroin.cut'),
+ icon = 'fa-solid fa-seedling',
+ action = function()
+ if not ps.hasItem('bakingsoda') then return end
+ if not ps.progressbar(ps.lang('Heroin.cutting'), 4000, 'uncuff') then return end
+ TriggerServerEvent("md-drugs:server:cutheroin", k)
+ end,
+ canInteract = function()
+ return handleGang(v.gang)
+ end
+ }
+ })
+end
RegisterNetEvent("md-drugs:client:buyheroinlabkit", function()
- if not progressbar(Lang.Heroin.secret, 4000, 'uncuff') then return end
+ if not ps.progressbar(ps.lang('Heroin.secret'), 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:getheroinlabkit")
end)
ps.registerCallback("md-drugs:client:setheroinlabkit", function()
- if herointable then
- Notify(Lang.Heroin.tableout, 'error')
+ if herointable then
+ ps.notify(ps.lang('Heroin.tableout'), 'error')
return false
else
herointable = true
local location, head = StartRay()
if not location then herointable = false return end
- if not progressbar(Lang.Heroin.table, 4000, 'uncuff') then return end
+ if not ps.progressbar(ps.lang('Heroin.table'), 4000, 'uncuff') then return end
createLabKit(location, head)
return true, location
end
end)
-RegisterNetEvent("md-drugs:client:heatliquidheroin", function(data)
- local loc, head = GetEntityCoords(data.data), GetEntityHeading(data.data)
- if not ItemCheck('emptyvial') then return end
- if not minigame() then
- dirty = true
- TriggerServerEvent("md-drugs:server:failheatingheroin")
- loadParticle("core")
- local heroinkit = StartParticleFxLoopedOnEntity("exp_air_molotov", data.data, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.5, false, false, false)
- SetParticleFxLoopedAlpha(heroinkit, 3.0)
- SetPedToRagdoll(PlayerPedId(), 1300, 1300, 0, 0, 0, 0)
- return end
- if not progressbar(Lang.Heroin.success, 4000, 'uncuff') then return end
- TriggerServerEvent("md-drugs:server:heatliquidheroin")
-end)
-
-RegisterNetEvent("md-drugs:client:cleanheroinlabkit", function(data)
- if not ItemCheck('cleaningkit') then return end
- if not progressbar(Lang.Heroin.clean, 4000, 'clean') then return end
- local done = ps.callback('removeCleaningkit', false)
- if done then dirty = false end
-end)
-
-RegisterNetEvent("md-drugs:client:deletedirtyheroin", function(data)
- local location,head = GetEntityCoords(data), GetEntityHeading(data)
- DeleteObject(data)
- createLabKit(location, head)
-end)
-
-RegisterNetEvent("md-drugs:client:getheroinkitback", function(data)
- if not progressbar(Lang.Heroin.pickup, 4000, 'uncuff') then return end
- herointable = false
- DeleteObject(data.data)
- TriggerServerEvent("md-drugs:server:getheroinlabkitback")
-end)
-
-RegisterNetEvent("md-drugs:client:fillneedle", function(data)
- if not minigame() then TriggerServerEvent("md-drugs:server:failheroin", data.data) return end
- if not progressbar(Lang.Heroin.needles, 4000, 'uncuff') then return end
- TriggerServerEvent("md-drugs:server:fillneedle", data.data)
-end)
\ No newline at end of file
+for k, v in pairs (GlobalState.MDDrugsLocs.fillneedle) do
+ ps.boxTarget('fillNeedle'..k, v.loc, {length = v.l, width = v.w, height = 1.0, rotation = v.rot}, {
+ {
+ label = ps.lang('targets.heroin.fill'),
+ icon = 'fa-solid fa-syringe',
+ action = function()
+ if not minigame() then TriggerServerEvent("md-drugs:server:failheroin", k) return end
+ if not ps.progressbar(ps.lang('Heroin.needles'), 4000, 'uncuff') then return end
+ TriggerServerEvent("md-drugs:server:fillneedle", k)
+ end,
+ canInteract = function()
+ return handleGang(v.gang)
+ end
+ }
+ })
+end
\ No newline at end of file
diff --git a/fxmanifest.lua b/fxmanifest.lua
index 6720e30..e1709cf 100644
--- a/fxmanifest.lua
+++ b/fxmanifest.lua
@@ -12,6 +12,8 @@ client_scripts {
server_scripts {
'server/functions.lua',
+ 'server/locations.lua',
+ 'server/recipes.lua',
'serverRun.lua',
'@oxmysql/lib/MySQL.lua',
}
diff --git a/server/cornerselling.lua b/server/cornerselling.lua
index 32f58e3..4dfa634 100644
--- a/server/cornerselling.lua
+++ b/server/cornerselling.lua
@@ -1,4 +1,4 @@
-local QBCore = exports['qb-core']:GetCoreObject()
+
local DrugDeals = {}
local Drugs = {
["weed_white-widow"] = {rep = 1,min = 15, max = 24 },
@@ -121,75 +121,108 @@ local Drugs = {
["cupofdextro"] = {rep = 1,min = 18, max = 40},
}
-ps.registerCallback('md-drugs:server:cornerselling:getAvailableDrugs', function(source, ped)
- local Player = getPlayer(source)
- local rep = getRep(source, 'cornerselling')
- if not Player then return nil end
- local type = 0
- for k, v in pairs(Drugs) do
- local item = Player.Functions.GetItemByName(k)
- if item and type == 0 then
- type = type + 1
- Log(GetName(source) .. ' Allowed To Sell ' .. item.name .. '!' , 'cornerselling')
- local amount = math.random(1,item.amount)
- if amount >= 15 then amount = 15 end
- local price = math.random(Drugs[k]['min'], Drugs[k]['max']) * amount
- local result = math.floor(price * rep.price)
- table.insert(DrugDeals, {item = item.name, amount = amount, price = result, cid = Player.PlayerData.citizenid, ped = ped})
- return {item = item.name, amount = amount, price = result, ped = ped}
+local drugsNames = {}
+for k, v in pairs(Drugs) do
+ table.insert(drugsNames, k)
+end
+GlobalState.DrugNames = drugsNames
+local robChance = 1 -- Chance To Be Robbed
+local RobbedDrugs = {}
+
+local function beingRobbed(source, item, amount, ped)
+ local src = source
+ local math = math.random(1,100)
+ if math <= robChance then
+ ps.removeItem(src, item, amount)
+ ps.notify(src, 'You Got Robbed Nerd', 'error')
+ RobbedDrugs[ps.getIdentifier(source)] = {item = item, amount = amount, ped = ped}
+ return true
+ else
+ return false
+ end
+end
+
+local function getDrugBack(source, item, amount)
+ local src = source
+ if RobbedDrugs[ps.getIdentifier(source)] then
+ if RobbedDrugs[ps.getIdentifier(source)].item == item and RobbedDrugs[ps.getIdentifier(source)].amount == amount then
+ ps.addItem(src, item, amount)
+ ps.notify(src, 'You Got Your Drugs Back', 'success')
+ RobbedDrugs[ps.getIdentifier(source)] = nil
+ return true
end
end
- if type == 0 then
- return {item = 'nothing', amount = 0, price = 0, ped = ped}
+end
+
+ps.registerCallback('md-drugs:server:cornerselling:getAvailableDrugs', function(source, ped)
+ local Player = ps.getPlayer(source)
+ local rep = getRep(source, 'cornerselling')
+ if not Player then return nil end
+ for k, v in pairs(Drugs) do
+ local item = ps.getItemCount(source, k) or 0
+ if item >= 1 then
+ local maths = math.random(1,100)
+ if maths <= robChance then
+ beingRobbed(source, k, item, ped)
+ return 'robbed'
+ else
+ if item > 15 then item = 15 end
+ local amount = math.random(1, item)
+ local price = (math.random(Drugs[k]['min'], Drugs[k]['max']) * amount) * rep.price
+ DrugDeals[ps.getIdentifier(source)] = {item = k, amount = amount, price = math.floor(price), ped = ped}
+ return DrugDeals[ps.getIdentifier(source)]
+ end
+ end
end
+ return false
end)
ps.registerCallback('md-drugs:server:hasDrugs', function(source)
- local Player = getPlayer(source)
for k, v in pairs(Drugs) do
- local item = Player.Functions.GetItemByName(k)
- if item then
+ if hasItem(source, k, 1) then
return true
end
end
return false
end)
-RegisterNetEvent('md-drugs:server:sellCornerDrugs', function(item, amount, price)
- local src = source
- local Player = getPlayer(src)
+local function csCheck(src, item, amount, price)
local isIn = false
for k, v in pairs (Drugs) do
- if item == k then
+ if item == k then
isIn = true
end
end
- if not isIn then return end
- for k, v in pairs (DrugDeals) do
- if v.cid == Player.PlayerData.citizenid then
- if v.item == item then
- if v.amount == amount then
- if v.price == price then
- if RemoveItem(src, item, amount) then
- if QBConfig.MarkedBills then
- local info = {
- worth = price
- }
- Player.Functions.AddItem('markedbills', 1, false, info )
- elseif QBConfig.CustomDirtyMoney == true then
- AddItem(src, QBConfig.CustomDirtyMoneyitem, price)
- else
- Player.Functions.AddMoney('cash', price)
- end
- AddRep(src, 'cornerselling', Drugs[item].rep * amount)
- Log(GetName(src) .. ' Sold ' .. amount .. ' Of ' .. item .. ' For A Price Of ' .. price .. '!' , 'cornerselling')
- table.remove(DrugDeals, k)
- end
- end
- end
- end
+ if not isIn then return false end
+
+ if DrugDeals[ps.getIdentifier(src)] then
+ if DrugDeals[ps.getIdentifier(src)].item == item and DrugDeals[ps.getIdentifier(src)].amount == amount and DrugDeals[ps.getIdentifier(src)].price == price then
+ return true
end
end
+ return false
+end
+
+RegisterNetEvent('md-drugs:server:sellCornerDrugs', function(item, amount, price)
+ local src = source
+ if not csCheck(src, item, amount, price) then return end
+ if not ps.removeItem(src, item, amount) then
+ ps.notify(src, 'You Do Not Have Enough Of This Item', 'error')
+ DrugDeals[ps.getIdentifier(src)] = nil
+ return
+ end
+ --AddRep(src, 'cornerselling', Drugs[item].rep * amount)
+ Log(string.format('%s Sold %s Of %s For A Price Of $%s !', GetName(src),amount, item, price), 'cornerselling')
+ DrugDeals[ps.getIdentifier(src)] = nil
+ ps.addMoney(src, 'cash', price)
+
+end)
+
+RegisterNetEvent('md-drugs:server:getBackRobbed', function()
+ local tabl = RobbedDrugs[ps.getIdentifier(source)]
+ if tabl == nil then return end
+ getDrugBack(source, tabl.item, tabl.amount)
+ RobbedDrugs[ps.getIdentifier(source)] = nil
end)
lib.addCommand('cornersell', {
@@ -198,18 +231,12 @@ lib.addCommand('cornersell', {
},
}, function(source, args, raw)
local src = source
- local Player = getPlayer(src)
- Log(GetName(source) .. ' Used Command cornersell!' , 'cornerselling')
TriggerClientEvent('md-drugs:client:cornerselling', src)
end)
RegisterServerEvent('md-drugs:server:cornerselling:stop', function()
local src = source
- local Player = getPlayer(src)
- for k, v in pairs (DrugDeals) do
- if v.cid == Player.PlayerData.citizenid then
- TriggerClientEvent('md-drugs:client:cornerselling:remove', src, DrugDeals[k].ped)
- table.remove(DrugDeals, k)
- end
+ if DrugDeals[ps.getIdentifier(src)] then
+ DrugDeals[ps.getIdentifier(src)] = nil
end
end)
\ No newline at end of file
diff --git a/server/functions.lua b/server/functions.lua
index 4771245..da428b5 100644
--- a/server/functions.lua
+++ b/server/functions.lua
@@ -1,14 +1,25 @@
-local QBCore = exports['qb-core']:GetCoreObject()
+local QBCore, ESX, qbx = {}, {}, nil
local notify = Config.Notify -- qb or ox
local inventory = Config.Inventory -- qb or ox
+local invname = ''
+
------------------------------------------ logging stuff
local logs = false
local logapi = GetConvar("fivemerrLogs", "")
local endpoint = 'https://api.fivemerr.com/v1/logs'
local headers = {
- ['Authorization'] = logapi,
- ['Content-Type'] = 'application/json',
- }
+ ['Authorization'] = logapi,
+ ['Content-Type'] = 'application/json',
+}
+
+if Config.Framework == 'qb' then
+ QBCore = exports['qb-core']:GetCoreObject()
+elseif Config.Framework == 'esx' then
+ ESX = exports['es_extended']:getSharedObject()
+elseif Config.Framework == 'qbx' then
+ qbx = exports.qbx_core
+end
+
CreateThread(function()
if logs then
@@ -24,17 +35,11 @@ end
end)
function Log(message, type)
-if logs == false then return end
- local buffer = {
- level = "info",
- message = message,
- resource = GetCurrentResourceName(),
- metadata = {
- drugs = type,
- playerid = source
- }
+if logs == false then return end
+ local buffer = { level = "info", message = message, resource = GetCurrentResourceName(),
+ metadata = { drugs = type, playerid = source}
}
- SetTimeout(500, function()
+ SetTimeout(500, function()
PerformHttpRequest(endpoint, function(status, _, _, response)
if status ~= 200 then
if type(response) == 'string' then
@@ -43,29 +48,62 @@ if logs == false then return end
end
end, 'POST', json.encode(buffer), headers)
buffer = nil
- end)
+ end)
end
----------------------------------------------------- inventory catcher
-local invname = ''
-CreateThread(function()
- if GetResourceState('ps-inventory') == 'started' then
- invname = 'ps-inventory'
- elseif GetResourceState('qb-inventory') == 'started' then
- invname = 'qb-inventory'
- else
- invname = 'inventory'
- end
-end)
------------------------------------ Player Stuff functions
-function getPlayer(source)
+function getPlayer(source)
local src = source
- local Player = QBCore.Functions.GetPlayer(src)
- return Player
+ if Config.Framework == 'qb' then
+ local Player = QBCore.Functions.GetPlayer(src)
+ return Player
+ elseif Config.Framework == 'esx' then
+ local Player = ESX.GetPlayerFromId(src)
+ return Player
+ elseif Config.Framework == 'qbx' then
+ local Player = qbx:GetPlayer(source)
+ return Player
+ end
end
-function GetName(source)
- local Player = getPlayer(source)
- return Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname
+function getPlayerByCid(cid)
+ if Config.Framework == 'qb' then
+ local Player = QBCore.Functions.GetPlayerByCitizenId(cid)
+ return Player
+ elseif Config.Framework == 'esx' then
+ local Player = ESX.GetPlayerFromIdentifier(cid)
+ return Player
+ elseif Config.Framework == 'qbx' then
+ local Player = qbx:GetPlayerByCitizenId(cid)
+ return Player
+ end
+end
+
+function GetName(source)
+ local src = source
+ if Config.Framework == 'qb' then
+ local Player = getPlayer(src)
+ return Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname
+ elseif Config.Framework == 'esx' then
+ local Player = getPlayer(src)
+ return Player.getName()
+ elseif Config.Framework == 'qbx' then
+ local Player = getPlayer(src)
+ return Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname
+ end
+end
+
+function getCid(source)
+ local src = source
+ if Config.Framework == 'qb' then
+ local Player = getPlayer(src)
+ return Player.PlayerData.citizenid
+ elseif Config.Framework == 'esx' then
+ local Player = getPlayer(src)
+ return Player.getIdentifier()
+ elseif Config.Framework == 'qbx' then
+ local Player = getPlayer(src)
+ return Player.PlayerData.citizenid
+ end
end
function GetCoords(source)
@@ -78,7 +116,8 @@ function dist(source, coords)
local playerPed = GetPlayerPed(source)
local pcoords = GetEntityCoords(playerPed)
local dist = #(pcoords - coords)
- return dist
+
+ return dist
end
function CheckDist(source, coords)
@@ -87,7 +126,7 @@ function CheckDist(source, coords)
local ok
if #(pcoords - coords) < 4.0 then
return ok
- else
+ else
DropPlayer(source, 'md-drugs: You Were A Total Of ' .. #(pcoords - coords) .. ' Too Far Away To Trigger This Event')
return false
end
@@ -107,7 +146,7 @@ function Notifys(source, text, type)
end
end
-function GetLabels(item)
+function GetLabels(item)
if inventory == 'qb' then
return QBCore.Shared.Items[item].label
elseif inventory == 'ox' then
@@ -117,7 +156,13 @@ function GetLabels(item)
end
function CUI(item, useFunction)
- QBCore.Functions.CreateUseableItem(item, useFunction)
+ if Config.Framework == 'qb' then
+ QBCore.Functions.CreateUseableItem(item, useFunction)
+ elseif Config.Framework == 'esx' then
+ ESX.RegisterUsableItem(item, useFunction)
+ elseif Config.Framework == 'qbx' then
+ qbx:CreateUseableItem(item, useFunction)
+ end
end
function Itemcheck(source, item, amount)
@@ -131,9 +176,9 @@ function Itemcheck(source, item, amount)
return false
end
elseif inventory == 'ox' then
- local items = exports.ox_inventory:GetItem(source, item, nil, false)
+ local items = exports.ox_inventory:GetItem(source, item, nil, false)
if items.count >= amount then
- return true
+ return true
else
Notifys(source, 'You Need ' .. amount .. ' Of ' .. GetLabels(item) .. ' To Do This', 'error')
return false
@@ -141,13 +186,55 @@ function Itemcheck(source, item, amount)
end
end
+function hasItem(source, item, amount)
+ if inventory == 'qb' then
+ local Player = getPlayer(source)
+ local itemchecks = Player.Functions.GetItemByName(item)
+ if itemchecks and itemchecks.amount >= amount then
+ return true
+ else
+ return false
+ end
+ elseif inventory == 'ox' then
+ local items = exports.ox_inventory:GetItem(source, item, nil, false)
+ if items == nil then return false end
+ if items.count >= amount then
+ return true
+ else
+ return false
+ end
+ end
+end
+
+function getItemCount(source, item)
+ if inventory == 'qb' then
+ local Player = getPlayer(source)
+ local itemchecks = Player.Functions.GetItemByName(item)
+ if itemchecks then
+ return itemchecks.amount
+ else
+ return false
+ end
+ elseif inventory == 'ox' then
+ local items = exports.ox_inventory:GetItem(source, item, nil, false)
+ if items == nil then
+ print('You are missing ' .. item)
+ return 0
+ end
+ if items.count >= 1 then
+ return items.count
+ else
+ return 0
+ end
+ end
+end
function RemoveItem(source, item, amount)
if inventory == 'qb' then
local Player = getPlayer(source)
if Player.Functions.RemoveItem(item, amount) then
TriggerClientEvent(invname ..":client:ItemBox", source, QBCore.Shared.Items[item], "remove", amount)
return true
- else
+ else
Notifys(source, 'You Need ' .. amount .. ' Of ' .. GetLabels(item) .. ' To Do This', 'error')
end
elseif inventory == 'ox' then
@@ -162,16 +249,14 @@ end
function AddItem(source, item, amount)
if inventory == 'qb' then
local Player = getPlayer(source)
- if Player.Functions.AddItem(item, amount) then
+ if Player.Functions.AddItem(item, amount) then
TriggerClientEvent(invname ..":client:ItemBox", source, QBCore.Shared.Items[item], "add", amount)
return true
- else
+ else
print('Failed To Give Item: ' .. item .. ' Check Your qb-core/shared/items.lua')
return false
end
else
- local carry = exports.ox_inventory:CanCarryItem(source, item, amount)
- if not carry then Notifys(source, 'You Cant Carry that Much Weight!', 'error') return false end
if exports.ox_inventory:AddItem(source, item, amount) then
return true
else
@@ -181,66 +266,85 @@ function AddItem(source, item, amount)
end
end
+function addMoney(source, type, amount)
+ if Config.Framework == 'qb' then
+ local Player = getPlayer(source)
+ if Player.Functions.AddMoney(type, amount) then
+ return true
+ else
+ return false
+ end
+ elseif Config.Framework == 'esx' then
+ local Player = getPlayer(source)
+ if Player.addMoney(amount) then
+ return true
+ else
+ return false
+ end
+ elseif Config.Framework == 'qbx' then
+ if qbx:AddMoney(source, type, amount) then
+ return true
+ else
+ return false
+ end
+ end
+end
-function getRep(source, type)
- local Player = getPlayer(source)
- local sql = MySQL.query.await('SELECT * FROM drugrep WHERE cid = ?', {Player.PlayerData.citizenid})
+function removeMoney(source, type, amount)
+ if Config.Framework == 'qb' then
+ local Player = getPlayer(source)
+ if Player.Functions.RemoveMoney(type, amount) then
+ return true
+ else
+ return false
+ end
+ elseif Config.Framework == 'esx' then
+ if type == 'bank' then
+ print('Does Not Support Bank Funds Removing From ESX Defaulted To Cash')
+ end
+ local Player = getPlayer(source)
+ if Player.getMoney() >= amount then
+ Player.removeMoney(amount)
+ return true
+ else
+ return false
+ end
+ elseif Config.Framework == 'qbx' then
+ if qbx:RemoveMoney(source, type, amount) then
+ return true
+ else
+ return false
+ end
+ end
+end
+local function handleFresh(source)
+ local table = json.encode({
+ coke = 0,lsd = 0,heroin = 0,dealerrep = 0,
+ cornerselling = { price = QBConfig.SellLevel[1].price,rep = 0,label = QBConfig.SellLevel[1].label,level = 1}
+ })
+ MySQL.insert('INSERT INTO drugrep SET cid = ?, drugrep = ?, name = ?', {getCid(source), table, GetName(source)})
+ Wait(1000)
+ return json.decode(table)
+end
+
+function getRep(source, type)
+ local sql = MySQL.query.await('SELECT * FROM drugrep WHERE cid = ?', {getCid(source)})
if not sql[1] then
- local table = json.encode({
- coke = Player.PlayerData.metadata.coke or 0,
- lsd = Player.PlayerData.metadata.lsd or 0,
- heroin = Player.PlayerData.metadata.heroin or 0,
- dealerrep = Player.PlayerData.metadata.dealerrep or 0,
- cornerselling = {
- price = QBConfig.SellLevel[1].price,
- rep = 0,
- label = QBConfig.SellLevel[1].label,
- level = 1
- }
- })
- MySQL.insert('INSERT INTO drugrep SET cid = ?, drugrep = ?, name = ?', {Player.PlayerData.citizenid, table, GetName(source)})
- Wait(1000)
- return json.decode(table)
+ local new = handleFresh(source)
+ return new[type]
else
local reps = json.decode(sql[1].drugrep)
local rep = ''
if reps.coke == nil then rep = reps[1] else rep = reps end
- if type == 'coke' then
- return rep.coke
- elseif type == 'heroin' then
- return rep.heroin
- elseif type == 'lsd' then
- return rep.lsd
- elseif type == 'dealerrep' then
- return rep.dealerrep
- elseif type == 'cornerselling' then
- return rep.cornerselling
- else
- print('^1 Error: No Valid Drug Rep Option Chosen')
- end
- return false
+ return rep[type]
end
end
-function GetAllRep(source)
- local Player = getPlayer(source)
- local sql = MySQL.query.await('SELECT * FROM drugrep WHERE cid = ?', {Player.PlayerData.citizenid})
+function GetAllRep(source)
+ local sql = MySQL.query.await('SELECT * FROM drugrep WHERE cid = ?', {getCid(source)})
if not sql[1] then
- local table = json.encode({
- coke = Player.PlayerData.metadata.coke or 0,
- lsd = Player.PlayerData.metadata.lsd or 0,
- heroin = Player.PlayerData.metadata.heroin or 0,
- dealerrep = Player.PlayerData.metadata.dealerrep or 0,
- cornerselling = {
- price = QBConfig.SellLevel[1].price,
- rep = 0,
- label = QBConfig.SellLevel[1].label,
- level = 1
- }
- })
- MySQL.insert('INSERT INTO drugrep SET cid = ?, drugrep = ?, name = ?', {Player.PlayerData.citizenid, table, GetName(source)})
- Wait(1000)
- return json.decode(table)
+ local new = handleFresh(source)
+ return new
else
local rep = json.decode(sql[1].drugrep)
if rep.coke == nil then return rep[1] end
@@ -248,10 +352,10 @@ function GetAllRep(source)
end
end
-function AddRep(source, type, amount)
+function AddRep(source, type, amount)
+ if not Config.TierSystem then return false end
if not amount then amount = 1 end
- local Player = getPlayer(source)
- local sql = MySQL.query.await('SELECT * FROM drugrep WHERE cid = ?', {Player.PlayerData.citizenid})
+ local sql = MySQL.query.await('SELECT * FROM drugrep WHERE cid = ?', {getCid(source)})
local reps = json.decode(sql[1].drugrep)
local update
local rep = ''
@@ -265,19 +369,15 @@ function AddRep(source, type, amount)
update = json.encode({coke = rep.coke, heroin = rep.heroin, lsd = rep.lsd, dealerrep = rep.dealerrep, cornerselling = {label = v.label, price = v.price, rep = rep.cornerselling.rep + amount, level = k}})
end
end
- end
- elseif type == 'coke' then
- update = json.encode({coke = rep.coke + amount, heroin = rep.heroin, lsd = rep.lsd, dealerrep = rep.dealerrep, cornerselling = rep.cornerselling})
- elseif type == 'heroin' then
- update = json.encode({coke = rep.coke, heroin = rep.heroin + amount, lsd = rep.lsd, dealerrep = rep.dealerrep, cornerselling = rep.cornerselling})
- elseif type == 'lsd' then
- update = json.encode({coke = rep.coke, heroin = rep.heroin, lsd = rep.lsd +amount , dealerrep = rep.dealerrep, cornerselling = rep.cornerselling})
- elseif type == 'dealerrep' then
- update = json.encode({coke = rep.coke, heroin = rep.heroin, lsd = rep.lsd, dealerrep = rep.dealerrep + amount, cornerselling = rep.cornerselling})
+ end
+ if update == '' then return false end
+ MySQL.update('UPDATE drugrep SET drugrep = ? WHERE cid = ?', {update, getCid(source)})
+ return true
+ else
+ rep[type] = rep[type] + amount
+ MySQL.update('UPDATE drugrep SET drugrep = ? WHERE cid = ?', {json.encode(rep), getCid(source)})
+ return true
end
- if update == '' then return false end
- MySQL.update('UPDATE drugrep SET drugrep = ? WHERE cid = ?', {update, Player.PlayerData.citizenid})
- return true
end
lib.addCommand('addCornerSellingTOREP', {
@@ -290,17 +390,17 @@ lib.addCommand('addCornerSellingTOREP', {
local old = json.decode(v.drugrep)
local get = old[1] or old
table.insert(new, {
- coke = get.coke,
- lsd = get.lsd,
- heroin = get.heroin,
- dealerrep = get.dealerrep,
- cornerselling = {
- price = QBConfig.SellLevel[1].price,
- rep = 0,
- label = QBConfig.SellLevel[1].label,
- level = 1
- }
- })
+ coke = get.coke,
+ lsd = get.lsd,
+ heroin = get.heroin,
+ dealerrep = get.dealerrep,
+ cornerselling = {
+ price = QBConfig.SellLevel[1].price,
+ rep = 0,
+ label = QBConfig.SellLevel[1].label,
+ level = 1
+ }
+ })
local news = json.encode(new)
MySQL.query.await('UPDATE drugrep SET drugrep = ? WHERE cid = ?', {news, v.cid})
end
@@ -314,39 +414,110 @@ end
function getCops()
local amount = 0
- local players = QBCore.Functions.GetQBPlayers()
- for k, v in pairs(players) do
- if v.PlayerData.job.type == 'leo' and v.PlayerData.job.onduty then
- amount = amount + 1
- end
+ if Config.Framework == 'qb' then
+ local players = QBCore.Functions.GetQBPlayers()
+ for k, v in pairs(players) do
+ if v.PlayerData.job.type == 'leo' and v.PlayerData.job.onduty then
+ amount = amount + 1
+ end
+ end
+ return amount
+ elseif Config.Framework == 'esx' then
+ local players = ESX.GetPlayers()
+ for k, v in pairs(players) do
+ local xPlayer = ESX.GetPlayerFromId(v)
+ if xPlayer.job.name == 'police' and xPlayer.job.onduty then
+ amount = amount + 1
+ end
+ end
+ return amount
+ elseif Config.Framework == 'qbx' then
+ return qbx:GetDutyCountType('leo')
end
- return amount
end
-ps.registerCallback('md-drugs:server:GetCoppers', function(source, cb, args)
- local amount = 0
- local players = QBCore.Functions.GetQBPlayers()
- for k, v in pairs(players) do
- if v.PlayerData.job.type == 'leo' and v.PlayerData.job.onduty then
- amount = amount + 1
- end
+function getNear(src)
+ if Config.Framework == 'qb' then
+ local near = {}
+ local players = QBCore.Functions.GetPlayers()
+ for k, v in pairs (players) do
+ local targ = QBCore.Functions.GetPlayerByCitizenId(v.PlayerData.citizenid)
+ local tname = GetName(v.PlayerData.source)
+ local ped, tped = GetPlayerPed(src), GetPlayerPed(v.PlayerData.source)
+ local dist = #(GetEntityCoords(ped) - GetEntityCoords(tped))
+ if dist < 5.0 then
+ table.insert(near, {label = tname, value = targ.PlayerData.citizenid})
+ end
+ end
+ return near
+ elseif Config.Framework == 'esx' then
+ local near = {}
+ local players = ESX.GetPlayers()
+ for k, v in pairs (players) do
+ local targ = ESX.GetPlayerFromId(v)
+ local tname = GetName(v)
+ local ped, tped = GetPlayerPed(src), GetPlayerPed(v)
+ local dist = #(GetEntityCoords(ped) - GetEntityCoords(tped))
+ if dist < 5.0 then
+ table.insert(near, {label = tname, value = getCid(v)})
+ end
+ end
+ return near
+ elseif Config.Framework == 'qbx' then
+ local near = {}
+ local players = qbx:GetPlayers()
+ for k, v in pairs (players) do
+ local targ = qbx:GetPlayer(v)
+ local tname = GetName(v)
+ local ped, tped = GetPlayerPed(src), GetPlayerPed(v)
+ local dist = #(GetEntityCoords(ped) - GetEntityCoords(tped))
+ if dist < 5.0 then
+ table.insert(near, {label = tname, value = getCid(v)})
+ end
+ end
+ return near
end
- return amount
+end
+
+function handleCornersell(source, item, amount, price)
+ if RemoveItem(source, item, amount) then
+ if inventory == 'qb' then
+ local Player = getPlayer(source)
+ if QBConfig.MarkedBills == true then
+ Player.Functions.AddItem('markedbills',1,false, {worth = price})
+ return true
+ end
+ if QBConfig.CustomDirtyMoney == true then
+ AddItem(source, QBConfig.CustomDirtyMoneyitem,price)
+ return true
+ end
+ Player.Functions.AddMoney('cash', price)
+ elseif inventory == 'ox' then
+ AddItem(source, 'black_money', price)
+ return true
+ end
+ else
+ return false
+ end
+end
+
+lib.callback.register('md-drugs:server:GetCoppers', function(source, cb, args)
+ return getCops()
end)
-ps.registerCallback('md-drugs:server:GetRep', function(source, cb, args)
- local src = source
+lib.callback.register('md-drugs:server:GetRep', function(source, cb, args)
local rep = GetAllRep(source)
return rep
end)
CreateThread(function()
- if not GetResourceState('ox_lib'):find("start") then
- print('^1 ox_lib Is A Depndancy, Not An Optional ')
+ if GetResourceState('ps-inventory') == 'started' then
+ invname = 'ps-inventory'
+ elseif GetResourceState('qb-inventory') == 'started' then
+ invname = 'qb-inventory'
+ else
+ invname = 'inventory'
end
-end)
-
-CreateThread(function()
local url = "https://raw.githubusercontent.com/Mustachedom/md-drugs/main/version.txt"
local version = GetResourceMetadata('md-drugs', "version" )
PerformHttpRequest(url, function(err, text, headers)
@@ -354,4 +525,7 @@ CreateThread(function()
print('^2 Your Version:' .. version .. ' | Current Version:' .. text .. '' )
end
end, "GET", "", "")
+ if GetResourceState('ox_lib') ~= 'started' then
+ print('^1 ox_lib Is A Depndancy, Not An Optional ')
+ end
end)
diff --git a/server/heroin.lua b/server/heroin.lua
index efa3de1..9c41ccb 100644
--- a/server/heroin.lua
+++ b/server/heroin.lua
@@ -1,4 +1,5 @@
local QBCore = exports['qb-core']:GetCoreObject()
+
local prices = {
heroinlabkitprice = 10000
}
@@ -38,10 +39,9 @@ function heroinCooldown(loc)
end
ps.registerCallback('removeCleaningkit', function(source)
- local Player = getPlayer(source)
for k, v in pairs(heroinLabKits) do
- if v.ownerid == Player.PlayerData.citizenid then
- RemoveItem(source, 'cleaningkit', 1)
+ if v.ownerid == ps.getIdentifier(source) then
+ ps.removeItem(source, 'cleaningkit', 1)
return true
end
end
@@ -49,20 +49,21 @@ ps.registerCallback('removeCleaningkit', function(source)
end)
RegisterServerEvent("heroin:pickupCane", function(loc)
- if CheckDist(source, h[loc].location) then return end
+ local src = source
+ if ps.checkDistance(src, h[loc].location, 3.0) then return end
if not h[loc].taken then
h[loc].taken = true
GlobalState.PoppyPlants = h
TriggerClientEvent("heroin:removeCane", -1, loc)
heroinCooldown(loc)
- AddItem(source, 'poppyresin', 1)
+ ps.addItem(src, 'poppyresin', 1)
end
end)
RegisterServerEvent('md-drugs:server:dryplant', function(num)
local src = source
- if not checkLoc(source, 'dryplant', num) then return end
- if not Itemcheck(source, 'poppyresin', 1) then return end
+ if not ps.checkDistance(src, GlobalState.MDDrugsLocs.dryplant[num].loc, 3.0) then return end
+ if not ps.hasItem(src, 'poppyresin', 1) then return end
if Config.TierSystem then
local heroin = getRep(src, 'heroin')
if heroin <= Config.Tier1 then
@@ -72,28 +73,28 @@ RegisterServerEvent('md-drugs:server:dryplant', function(num)
else
if not GetRecipe(src, 'heroin', 'dryheroin', 'tier3') then return end
end
- else
- if not GetRecipe(src, 'heroin', 'dryheroin', 'tier1') then return end
+ return
end
+ if not GetRecipe(src, 'heroin', 'dryheroin', 'tier1') then return end
end)
RegisterServerEvent('md-drugs:server:cutheroin', function(num)
local src = source
- local Player = getPlayer(src)
- if not checkLoc(source, 'cutheroinone', num) then return end
- if not Itemcheck(src, 'bakingsoda', 1) then return end
+ if not ps.checkDistance(src, GlobalState.MDDrugsLocs.cutheroinone[num].loc, 3.0) then return end
+ if not ps.hasItem(src, 'bakingsoda', 1) then return end
if Config.TierSystem then
- local rawh = Player.Functions.GetItemByName('heroin')
- local rawh2 = Player.Functions.GetItemByName('heroinstagetwo')
- local rawh3 = Player.Functions.GetItemByName('heroinstagethree')
- if rawh then
- if not GetRecipe(src, 'heroin', 'cutheroin', 'tier1') then return end
- elseif rawh2 then
- if not GetRecipe(src, 'heroin', 'cutheroin', 'tier2') then return end
- elseif rawh3 then
- if not GetRecipe(src, 'heroin', 'cutheroin', 'tier3') then return end
- else
- Notifys(src, Lang.Heroin.noheroin, "error")
+ local itemList = {
+ heroin = 'tier1',
+ heroinstagetwo = 'tier2',
+ heroinstagethree = 'tier3'
+ }
+ for k, v in pairs(itemList) do
+ local cuth = ps.hasItem(src, k)
+ if cuth then
+ if not GetRecipe(src, 'heroin', 'cutheroin', v) then return end
+ AddRep(src, 'heroin')
+ return
+ end
end
else
if not GetRecipe(src, 'heroin', 'cutheroin', 'tier1') then return end
@@ -102,22 +103,19 @@ end)
RegisterServerEvent('md-drugs:server:getheroinlabkit', function()
local src = source
- local Player = getPlayer(src)
- if not checkLoc(source, 'singleSpot', 'buyheroinlabkit') then return end
- local has = Player.Functions.GetItemByName('heroinlabkit')
- if has then Notifys(src, Lang.Heroin.haskit, 'error') return end
- if Player.Functions.RemoveMoney('cash', prices.heroinlabkitprice) then
- AddItem(src, 'heroinlabkit', 1)
+ if not ps.checkDistance(src, GlobalState.MDDrugsLocs.singleSpot.buyheroinlabkit, 3.0) then return end
+ local has = ps.hasItem(src, 'heroinlabkit')
+ if has then ps.notify(src, Lang.Heroin.haskit, 'error') return end
+ if ps.removeMoney(src, 'cash', prices.heroinlabkitprice) then
+ ps.addItem(src, 'heroinlabkit', 1)
else
- Notifys(src, 'You Need '.. prices.heroinlabkitprice .. ' In Cash For This', 'error')
+ ps.notify(src, 'You Need '.. prices.heroinlabkitprice .. ' In Cash For This', 'error')
end
end)
local function hasHKit(src)
- local src = source
- local Player = getPlayer(src)
for k, v in pairs(heroinLabKits) do
- if v.ownerid == Player.PlayerData.citizenid then
+ if v.ownerid == ps.getIdentifier(src) then
return true
end
end
@@ -126,51 +124,49 @@ end
RegisterServerEvent('md-drugs:server:getheroinlabkitback', function()
local src = source
- local Player = getPlayer(src)
if not hasHKit(src) then return end
for k, v in pairs (heroinLabKits) do
- if v.ownerid == Player.PlayerData.citizenid then
+ if v.ownerid == ps.getIdentifier(src) then
table.remove(heroinLabKits, k)
- AddItem(src, 'heroinlabkit', 1)
+ ps.addItem(src, 'heroinlabkit', 1)
end
end
end)
-CUI('heroinlabkit', function(source, item)
+ps.createUseable('heroinlabkit', function(source, item)
local src = source
- local Player = getPlayer(src)
- if not Itemcheck(source, 'heroinlabkit', 1) then return end
+ if not ps.hasItem(src, 'heroinlabkit', 1) then return end
local placed, loc = ps.callback('md-drugs:client:setheroinlabkit', src)
if placed then
- RemoveItem(src, 'heroinlabkit', 1)
+ ps.removeItem(src, 'heroinlabkit', 1)
table.insert(heroinLabKits, {
- src = src,
- ownerid = Player.PlayerData.citizenid,
+ src = src,
+ ownerid = ps.getIdentifier(src),
coords = loc,
- name = GetName(src)
+ name = ps.getPlayerName(src)
})
- Notifys(src, Lang.Heroin.placed, "success")
+ ps.notify(src, Lang.Heroin.placed, "success")
end
end)
RegisterServerEvent('md-drugs:server:heatliquidheroin', function()
-local src = source
-local Player = getPlayer(src)
+ local src = source
if not hasHKit(src) then return end
- if not Itemcheck(source, 'emptyvial', 1) then return end
+ if not ps.itemCheck(src, 'emptyvial', 1) then return end
if Config.TierSystem then
- local cuth = Player.Functions.GetItemByName('heroincut')
- local cuth2 = Player.Functions.GetItemByName('heroincutstagetwo')
- local cuth3 = Player.Functions.GetItemByName('heroincutstagethree')
- if cuth then
- if not GetRecipe(src, 'heroin', 'fillvial', 'tier1') then return end
- elseif cuth2 then
- if not GetRecipe(src, 'heroin', 'fillvial', 'tier2') then return end
- elseif cuth3 then
- if not GetRecipe(src, 'heroin', 'fillvial', 'tier3') then return end
- else
- Notifys(src, 'no cut heroin', "error")
+ local itemList = {
+ heroincut = 'tier1',
+ heroincutstagetwo = 'tier2',
+ heroincutstagethree = 'tier3'
+ }
+ for k, v in pairs(itemList) do
+ local cuth = ps.hasItem(src, k)
+ if cuth then
+ if not GetRecipe(src, 'heroin', 'fillvial', v) then return end
+ AddRep(src, 'heroin')
+ return
+ end
end
else
if not GetRecipe(src, 'heroin', 'fillvial', 'tier1') then return end
@@ -178,46 +174,46 @@ local Player = getPlayer(src)
end)
RegisterServerEvent('md-drugs:server:failheatingheroin', function()
-local src = source
-local Player = getPlayer(src)
-if not hasHKit(src) then return end
-local cuth = Player.Functions.GetItemByName('heroincut')
-local cuth2 = Player.Functions.GetItemByName('heroincutstagetwo')
-local cuth3 = Player.Functions.GetItemByName('heroincutstagethree')
- if cuth then
- RemoveItem(src, 'heroincut', 1)
- Notifys(src,Lang.Heroin.fail, "error")
- elseif cuth2 then
- RemoveItem(src, 'heroincutstagetwo', 1)
- Notifys(src,Lang.Heroin.fail, "error")
- elseif cuth3 then
- RemoveItem(src, 'heroincutstagethree', 1)
- Notifys(src,Lang.Heroin.fail, "error")
+ local src = source
+ if not hasHKit(src) then return end
+ local itemList = {
+ heroincut = 1,
+ heroincutstagetwo = 1,
+ heroincutstagethree = 1
+ }
+ for k, v in pairs(itemList) do
+ local cuth = ps.hasItem(src, k)
+ if cuth then
+ ps.removeItem(src, k, v)
+ ps.notify(src, Lang.Heroin.fail, "error")
+ return
+ end
end
end)
RegisterServerEvent('md-drugs:server:fillneedle', function(num)
local src = source
- local Player = getPlayer(src)
- if not checkLoc(source, 'fillneedle', num) then return end
- if not Itemcheck(src, 'needle', 1) then return end
+ if not ps.checkDistance(src, GlobalState.MDDrugsLocs.fillneedle[num].loc, 3.0) then
+ ps.notify(src, Lang.Heroin.noloc, 'error')
+ return
+ end
+ if not ps.hasItem(src, 'needle', 1) then return end
if Config.TierSystem then
- local heroin = getRep(src, 'heroin')
- local vh = Player.Functions.GetItemByName('heroinvial')
- local vh2 = Player.Functions.GetItemByName('heroinvialstagetwo')
- local vh3 = Player.Functions.GetItemByName('heroinvialstagethree')
- if vh then
- if not GetRecipe(src, 'heroin', 'fillneedle', 'tier1') then return end
- AddRep(src, 'heroin')
- elseif vh2 then
- if not GetRecipe(src, 'heroin', 'fillneedle', 'tier2') then return end
- AddRep(src, 'heroin')
- elseif vh3 then
- if not GetRecipe(src, 'heroin', 'fillneedle', 'tier3') then return end
- AddRep(src, 'heroin')
- else
- Notifys(src,Lang.Heroin.nofill, "error")
+ local itemList = {
+ {item = 'heroinvial', tier = 'tier1', log = ' Filled Heroin Needle'},
+ {item = 'heroinvialstagetwo', tier = 'tier2', log = ' Filled Heroin Needle tier 2'},
+ {item = 'heroinvialstagethree', tier = 'tier3', log = ' Filled Heroin Needle tier 3'}
+ }
+ for k, v in pairs(itemList) do
+ local vh = ps.hasItem(src, v.item)
+ if vh then
+ if not GetRecipe(src, 'heroin', 'fillneedle', v.tier) then return end
+ AddRep(src, 'heroin')
+ Log(ps.getPlayerName(src) .. v.log, 'heroin')
+ return
+ end
end
+ ps.notify(src,Lang.Heroin.nofill, "error")
else
if not GetRecipe(src, 'heroin', 'fillneedle', 'tier1') then return end
end
@@ -225,28 +221,32 @@ end)
RegisterServerEvent('md-drugs:server:failheroin', function()
local src = source
- local Player = getPlayer(src)
- Log(GetName(src) ..' Sucks And Burned Their Heroin', 'heroin')
+ Log(ps.getPlayerName(src) ..' Sucks And Burned Their Heroin', 'heroin')
if Config.TierSystem then
- local vh = Player.Functions.GetItemByName('heroinvial')
- local vh2 = Player.Functions.GetItemByName('heroinvialstagetwo')
- local vh3 = Player.Functions.GetItemByName('heroinvialstagethree')
- if vh then RemoveItem(src, 'heroinvialstagethree', 1 )
- elseif vh2 then RemoveItem(src, 'heroinvialstagetwo', 1)
- elseif vh3 then RemoveItem(src, 'heroinvial', 1)
+ local itemList = {
+ heroinvial = 1,
+ heroinvialstagetwo = 1,
+ heroinvialstagethree = 1
+ }
+ for k, v in pairs (itemList) do
+ local cuth = ps.hasItem(src, k)
+ if cuth then
+ ps.removeItem(src, k, v)
+ ps.notify(src, Lang.Heroin.failneedle, "error")
+ return
+ end
end
else
- RemoveItem(src, 'heroinvial', 1)
+ ps.removeItem(src, 'heroinvial', 1)
end
end)
AddEventHandler('playerDropped', function()
local src = source
- local Player = getPlayer(src)
for k, v in pairs(heroinLabKits) do
if v.src == src then
table.remove(heroinLabKits, k)
- AddItem(src, 'heroinlabkit', 1)
+ ps.addItem(src, 'heroinlabkit', 1)
end
end
end)
\ No newline at end of file
diff --git a/shared/config.lua b/shared/config.lua
index be46299..ada6c77 100644
--- a/shared/config.lua
+++ b/shared/config.lua
@@ -1,6 +1,6 @@
Config = {} --Ignore.
ps = exports.ps_lib:init()
-ps.insertLang("en")
+ps.loadLangs("en")
Config.respawnTime = 150 -- Seconds
Config.Fuel = "LegacyFuel" -- type the name of script you use i.e. ps-fuel, cdn-fuel, LegacyFuel
Config.TierSystem = true -- allows for three tiers of certain drugs ( coke, heroin, crack, lsd)
@@ -54,8 +54,8 @@ Config.Drugs = {
cocaine = true,
consumables =false,
crack = true,
- cornerselling = false,
- heroin = false,
+ cornerselling = true,
+ heroin = true,
deliveries = false,
lean = false,
lsd = false,
From a86a342f4d1ad41e8e365e453736f9b0c55850f2 Mon Sep 17 00:00:00 2001
From: Mustache Dom <123716453+Mustachedom@users.noreply.github.com>
Date: Tue, 15 Jul 2025 02:21:34 -0700
Subject: [PATCH 04/37] - hush hush
---
client/cocaine.lua | 58 +-----------------
client/functions.lua | 1 +
client/heroin.lua | 63 ++-----------------
client/lsd.lua | 46 +++++++-------
client/mescaline.lua | 43 -------------
client/plantSpawns.lua | 117 ++++++++++++++++++++++++++++++++++++
client/shrooms.lua | 54 -----------------
client/weed.lua | 44 --------------
fxmanifest.lua | 1 +
server/cocaine.lua | 35 +++++------
server/functions.lua | 12 ++--
server/heroin.lua | 16 +++--
server/lsd.lua | 133 ++++++++++++++++++-----------------------
server/mescaline.lua | 4 +-
server/shrooms.lua | 2 +-
server/weed.lua | 47 +++++----------
shared/config.lua | 8 +--
17 files changed, 252 insertions(+), 432 deletions(-)
create mode 100644 client/plantSpawns.lua
diff --git a/client/cocaine.lua b/client/cocaine.lua
index fbf6608..6859ed6 100644
--- a/client/cocaine.lua
+++ b/client/cocaine.lua
@@ -1,63 +1,7 @@
-local CocaPlant = {}
+
local cuttingcoke = nil
local baggingcoke = nil
-local function pick(loc)
- if not progressbar(Lang.Coke.picking, 4000, 'uncuff') then return end
- TriggerServerEvent("coke:pickupCane", loc)
- return true
-end
-
-local function targetOps(loc)
- return {
- {
- icon = "fa-solid fa-seedling",
- label = ps.lang('targets.coke.pick'),
- action = function()
- if not pick(loc) then return end
- end
- }
- }
-end
-
-RegisterNetEvent('coke:respawnCane', function(loc)
- local v = GlobalState.CocaPlant[loc]
- local hash = GetHashKey(v.model)
- if not CocaPlant[loc] then
- CocaPlant[loc] = CreateObject(hash, v.location, false, true, true)
- Freeze(CocaPlant[loc], true, v.heading)
- ps.entityTarget(CocaPlant[loc], targetOps(loc))
- end
-end)
-
-RegisterNetEvent('coke:removeCane', function(loc)
- if DoesEntityExist(CocaPlant[loc]) then DeleteEntity(CocaPlant[loc]) end
- CocaPlant[loc] = nil
-end)
-
-RegisterNetEvent("coke:init", function()
- for k, v in pairs (GlobalState.CocaPlant) do
- local hash = GetHashKey(v.model)
- ps.requestModel(hash)
- if not v.taken then
- CocaPlant[k] = CreateObject(hash, v.location.x, v.location.y, v.location.z, false, true, true)
- Freeze(CocaPlant[k], true, v.heading)
- ps.entityTarget(CocaPlant[k], targetOps(k))
- end
- end
-end)
-
-AddEventHandler('onResourceStop', function(resourceName)
- if GetCurrentResourceName() == resourceName then
- SetModelAsNoLongerNeeded(GetHashKey('prop_plant_01a'))
- for k, v in pairs(CocaPlant) do
- if DoesEntityExist(v) then
- DeleteEntity(v) SetEntityAsNoLongerNeeded(v)
- end
- end
- end
-end)
-
for k, v in pairs (GlobalState.MDDrugsLocs.MakePowder) do
ps.boxTarget('cocaplant'..k, v.loc, {length = v.l, width = v.w, height = 1.0, rotation = v.rot}, {
{
diff --git a/client/functions.lua b/client/functions.lua
index fe569df..e604a32 100644
--- a/client/functions.lua
+++ b/client/functions.lua
@@ -496,6 +496,7 @@ CreateThread(function()
TriggerEvent('heroin:init')
TriggerEvent('coke:init')
TriggerEvent('Mescaline:init')
+ ps.requestModel(GetHashKey('mushroom'))
TriggerEvent('shrooms:init')
TriggerEvent('weed:init')
end)
diff --git a/client/heroin.lua b/client/heroin.lua
index 98eaf5a..f6303fe 100644
--- a/client/heroin.lua
+++ b/client/heroin.lua
@@ -1,22 +1,7 @@
-local PoppyPlants = {}
+
local herointable = false
local dirty = false
-local function pickher(loc)
- if not ps.progressbar(Lang.Heroin.pick, 4000, 'uncuff') then return end
- TriggerServerEvent("heroin:pickupCane", loc)
-end
-
-local function pickOps(loc)
- return {
- {
- icon = "fa-solid fa-seedling",
- label = ps.lang('Heroin.pick'),
- action = function() pickher(loc) end
- }
- }
-end
-
local function createLabKit(coord, head)
local heroinlabkit = CreateObject("v_ret_ml_tablea", coord.x, coord.y, coord.z - 1, true, false,false)
SetEntityHeading(heroinlabkit, head)
@@ -31,6 +16,7 @@ local function createLabKit(coord, head)
dirty = true
TriggerServerEvent("md-drugs:server:failheatingheroin")
ps.requestPTFX("core")
+ lib.requestNamedPtfxAsset("core")
local heroinkit = StartParticleFxLoopedOnEntity("exp_air_molotov", heroinlabkit, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.5, false, false, false)
SetParticleFxLoopedAlpha(heroinkit, 3.0)
SetPedToRagdoll(PlayerPedId(), 1300, 1300, 0, 0, 0, 0)
@@ -39,9 +25,8 @@ local function createLabKit(coord, head)
TriggerServerEvent("md-drugs:server:heatliquidheroin")
end,
canInteract = function()
- if not dirty then return true end
- return false
- end
+ if not dirty then return true end
+ end
},
{
icon = "fas fa-box-circle-check",
@@ -74,46 +59,6 @@ local function createLabKit(coord, head)
}})
end
-
-
-RegisterNetEvent('heroin:respawnCane', function(loc)
- local v = GlobalState.PoppyPlants[loc]
- local hash = GetHashKey(v.model)
- if not PoppyPlants[loc] then
- PoppyPlants[loc] = CreateObject(hash, v.location, false, true, true)
- Freeze(PoppyPlants[loc], true, v.heading)
- ps.entityTarget(PoppyPlants[loc], pickOps(loc), loc)
- end
-end)
-
-RegisterNetEvent('heroin:removeCane', function(loc)
- if DoesEntityExist(PoppyPlants[loc]) then DeleteEntity(PoppyPlants[loc]) end
- PoppyPlants[loc] = nil
-end)
-
-RegisterNetEvent("heroin:init", function()
- for k, v in pairs (GlobalState.PoppyPlants) do
- local hash = GetHashKey(v.model)
- if not HasModelLoaded(hash) then LoadModel(hash) end
- if not v.taken then
- PoppyPlants[k] = CreateObject(hash, v.location.x, v.location.y, v.location.z, false, true, true)
- Freeze(PoppyPlants[k], true, v.heading)
- ps.entityTarget(PoppyPlants[k], pickOps(k))
- end
- end
-end)
-
- AddEventHandler('onResourceStop', function(resourceName)
- if GetCurrentResourceName() == resourceName then
- SetModelAsNoLongerNeeded(GetHashKey('prop_plant_01b'))
- for k, v in pairs(PoppyPlants) do
- if DoesEntityExist(v) then
- DeleteEntity(v) SetEntityAsNoLongerNeeded(v)
- end
- end
- end
-end)
-
for k, v in pairs (GlobalState.MDDrugsLocs.dryplant) do
ps.boxTarget('dryHeroin'..k, v.loc, {length = v.l, width = v.w, height = 1.0, rotation = v.rot}, {
{
diff --git a/client/lsd.lua b/client/lsd.lua
index 01bf9af..906f289 100644
--- a/client/lsd.lua
+++ b/client/lsd.lua
@@ -9,14 +9,14 @@ local function createLabKit(coord, head)
local options = {
{
icon = "fa-solid fa-temperature-high",
- label = Lang.targets.lsd.heat,
+ label = ps.lang('targets.lsd.heat'),
action = function()
local dict = "scr_ie_svm_technical2"
if not ps.hasItems({
{name = 'lysergic_acid', amount = 1},
{name = 'diethylamide', amount = 1}
}) then
- Notify(Lang.lsd.need, 'error')
+ Notify(ps.lang('lsd.need'), 'error')
return
end
if not minigame() then
@@ -26,7 +26,7 @@ local function createLabKit(coord, head)
SetParticleFxLoopedAlpha(exitPtfx, 3.0)
return
end
- if not progressbar(Lang.lsd.heat, 7000, 'uncuff') then return end
+ if not progressbar(ps.lang('lsd.heat'), 7000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:heatliquid")
end,
canInteract = function()
@@ -35,11 +35,11 @@ local function createLabKit(coord, head)
},
{
icon = "fa-solid fa-temperature-high",
- label = Lang.targets.lsd.refine,
+ label = ps.lang('targets.lsd.refine'),
action = function()
if not ps.hasItem('lsd_one_vial') then return end
if not minigame() then TriggerServerEvent("md-drugs:server:failrefinequality") return end
- if not ps.progressbar(Lang.lsd.refine, 4000, 'uncuff') then return end
+ if not ps.progressbar(ps.lang('lsd.refine'), 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:refinequalityacid")
end,
canInteract = function()
@@ -48,11 +48,11 @@ local function createLabKit(coord, head)
},
{
icon = "fa-regular fa-note-sticky",
- label = Lang.targets.lsd.dab,
+ label = ps.lang('targets.lsd.dab'),
action = function()
if not ps.hasItem('tab_paper') then return end
if not minigame() then TriggerServerEvent("md-drugs:server:failtabs") return end
- if not ps.progressbar(Lang.lsd.dip, 4000, 'uncuff') then return end
+ if not ps.progressbar(ps.lang('lsd.dip'), 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:maketabpaper")
end,
canInteract = function()
@@ -62,9 +62,9 @@ local function createLabKit(coord, head)
{
event = "md-drugs:client:getlabkitback",
icon = "fas fa-box-circle-check",
- label = Lang.targets.lsd.back,
+ label = ps.lang('targets.lsd.back'),
action = function()
- if not progressbar(Lang.lsd.tablepack, 4000, 'uncuff') then return end
+ if not progressbar(ps.lang('lsd.tablepack'), 4000, 'uncuff') then return end
DeleteObject(labkit)
TriggerServerEvent('md-drugs:server:getlabkitback')
tableout = false
@@ -75,13 +75,13 @@ local function createLabKit(coord, head)
},
{
icon = "fa-solid fa-hand-sparkles",
- label = Lang.targets.lsd.clean,
+ label = ps.lang('targets.lsd.clean'),
action = function()
if not ps.hasItem('cleaningkit') then
- Notify(Lang.lsd.needclean, 'error')
+ Notify(ps.lang('lsd.needclean'), 'error')
return
end
- if not ps.progressbar(Lang.lsd.clean, 4000, 'clean') then return end
+ if not ps.progressbar(ps.lang('lsd.clean'), 4000, 'clean') then return end
local check = ps.callback('md-drugs:server:removecleaningkit')
if check then
dirtylsd = false
@@ -96,12 +96,12 @@ end
for k, v in pairs (GlobalState.MDDrugsLocs.lysergicacid) do
ps.boxTarget('lysergicacid'..k, v.loc, {length = v.l, width = v.w, height = 1.0, rotation = v.rot}, {
{
- label = Lang.targets.lsd.lys,
+ label = ps.lang('targets.lsd.lys'),
icon = 'fa-solid fa-temperature-high',
action = function()
if not ps.hasItem('empty_weed_bag') then return end
if not minigame() then TriggerServerEvent("md-drugs:server:faillysergic") return end
- if not ps.progressbar(Lang.lsd.steallys, 4000, 'uncuff') then return end
+ if not ps.progressbar(ps.lang('lsd.steallys'), 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:getlysergic", k)
end,
canInteract = function()
@@ -115,12 +115,12 @@ end
for k, v in pairs (GlobalState.MDDrugsLocs.diethylamide) do
ps.boxTarget('diethylamide'..k, v.loc, {length = v.l, width = v.w, height = 1.0, rotation = v.rot}, {
{
- label = Lang.targets.lsd.die,
+ label = ps.lang('targets.lsd.die'),
icon = 'fa-solid fa-temperature-high',
action = function()
if not ps.hasItem('empty_weed_bag') then return end
if not minigame() then TriggerServerEvent("md-drugs:server:faildiethylamide") return end
- if not ps.progressbar(Lang.lsd.stealdie, 4000, 'uncuff') then return end
+ if not ps.progressbar(ps.lang('lsd.stealdie'), 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:getdiethylamide", k)
end,
canInteract = function()
@@ -134,10 +134,10 @@ end
for k,v in pairs (GlobalState.MDDrugsLocs.gettabs) do
ps.boxTarget('gettabs'..k, v.loc, {length = v.l, width = v.w, height = 1.0, rotation = v.rot}, {
{
- label = Lang.targets.lsd.buyt,
+ label = ps.lang('targets.lsd.buyt'),
icon = 'fa-solid fa-hand-holding-dollar',
action = function()
- if not ps.hasItem('lsdlabkit') then ps.notify(Lang.lsd.havlabkit, 'error') return end
+ if not ps.hasItem('lsdlabkit') then ps.notify(ps.lang('lsd.havlabkit'), 'error') return end
TriggerEvent("md-drugs:client:buytabs", k)
end,
canInteract = function()
@@ -151,11 +151,11 @@ end
for k, v in pairs (GlobalState.MDDrugsLocs.buykit) do
ps.boxTarget('buykit'..k, v.loc, {length = v.l, width = v.w, height = 1.0, rotation = v.rot}, {
{
- label = Lang.targets.lsd.buy,
+ label = ps.lang('targets.lsd.buy'),
icon = 'fa-solid fa-hand-holding-dollar',
action = function()
- if ps.hasItem('lsdlabkit') then ps.notify(Lang.lsd.havlabkit, 'error') return end
- if not ps.progressbar(Lang.lsd.buykit, 4000, 'uncuff') then return end
+ if ps.hasItem('lsdlabkit') then ps.notify(ps.lang('lsd.havlabkit'), 'error') return end
+ if not ps.progressbar(ps.lang('lsd.buykit'), 4000, 'uncuff') then return end
TriggerEvent("md-drugs:client:buylabkit")
end,
canInteract = function()
@@ -168,13 +168,13 @@ end
ps.registerCallback("md-drugs:client:setlsdlabkit", function()
if tableout then
- Notify(Lang.lsd.tableout, 'error')
+ Notify(ps.lang('lsd.tableout'), 'error')
return false
else
tableout = true
local loc, head = StartRay()
if not loc then tableout = false return end
- if not progressbar(Lang.lsd.place, 4000, 'uncuff') then return end
+ if not progressbar(ps.lang('lsd.place'), 4000, 'uncuff') then return end
createLabKit(loc, head)
return true, loc
end
diff --git a/client/mescaline.lua b/client/mescaline.lua
index faa6085..5c9c6e2 100644
--- a/client/mescaline.lua
+++ b/client/mescaline.lua
@@ -1,47 +1,4 @@
-local Mescaline = {}
-local function pick(loc)
- if not progressbar(Lang.mescaline.pick, 4000, 'uncuff') then return end
- TriggerServerEvent("Mescaline:pickupCane", loc)
-end
-
-RegisterNetEvent('Mescaline:respawnCane', function(loc)
- local v = GlobalState.Mescaline[loc]
- local hash = GetHashKey(v.model)
- if not Mescaline[loc] then
- Mescaline[loc] = CreateObject(hash, v.location, false, true, true)
- Freeze(Mescaline[loc], true, v.heading)
- AddSingleModel(Mescaline[loc], {icon = "fa-solid fa-seedling",label = Lang.targets.mescaline.pick, action = function() pick(loc) end}, loc )
- end
-end)
-
-RegisterNetEvent('Mescaline:removeCane', function(loc)
- if DoesEntityExist(Mescaline[loc]) then DeleteEntity(Mescaline[loc]) end
- Mescaline[loc] = nil
-end)
-
-RegisterNetEvent("Mescaline:init", function()
- for k, v in pairs (GlobalState.Mescaline) do
- local hash = GetHashKey(v.model)
- if not HasModelLoaded(hash) then LoadModel(hash) end
- if not v.taken then
- Mescaline[k] = CreateObject(hash, v.location.x, v.location.y, v.location.z, false, true, true)
- Freeze(Mescaline[k], true, v.heading)
- AddSingleModel(Mescaline[k], {icon = "fa-solid fa-seedling",label = Lang.targets.mescaline.pick,action = function() pick(k) end}, k)
- end
- end
-end)
-
-AddEventHandler('onResourceStop', function(resourceName)
- if GetCurrentResourceName() == resourceName then
- SetModelAsNoLongerNeeded(GetHashKey('prop_cactus_03'))
- for k, v in pairs(Mescaline) do
- if DoesEntityExist(v) then
- DeleteEntity(v) SetEntityAsNoLongerNeeded(v)
- end
- end
- end
-end)
RegisterNetEvent("md-drugs:client:drymescaline", function()
if not ItemCheck('cactusbulb') then return end
diff --git a/client/plantSpawns.lua b/client/plantSpawns.lua
new file mode 100644
index 0000000..bf572bd
--- /dev/null
+++ b/client/plantSpawns.lua
@@ -0,0 +1,117 @@
+
+local DrugPlants = {
+ {model = 'prop_plant_01a', label = 'coke', tbl = GlobalState.CocaPlant, plantTbl = {},
+ pick = function(loc)
+ if not ps.progressbar(ps.lang('Coke.picking'), 4000, 'uncuff') then return end
+ TriggerServerEvent("coke:pickupCane", loc)
+ return true
+ end,
+ target = {
+ icon = "fa-solid fa-seedling",
+ label = ps.lang('targets.coke.pick'),
+ },
+ },
+ {model = 'prop_plant_01b', label = 'heroin', tbl = GlobalState.PoppyPlants, plantTbl = {},
+ pick = function(loc)
+ if not ps.progressbar(ps.lang('Heroin.pick'), 4000, 'uncuff') then return end
+ TriggerServerEvent("heroin:pickupCane", loc)
+ return true
+ end,
+ target = {
+ icon = "fa-solid fa-seedling",
+ label = ps.lang('targets.heroin.pick'),
+ },
+ },
+ {model = 'prop_cactus_03', label = 'Mescaline', tbl = GlobalState.Mescaline, plantTbl = {},
+ pick = function(loc)
+ if not ps.progressbar(ps.lang('mescaline.pick'), 4000, 'uncuff') then return end
+ TriggerServerEvent("Mescaline:pickupCane", loc)
+ return true
+ end,
+ target = {
+ icon = "fa-solid fa-seedling",
+ label = ps.lang('targets.mescaline.pick'),
+ },
+ },
+ {model = 'prop_weed_01', label = 'weed', tbl = GlobalState.WeedPlant, plantTbl = {},
+ pick = function(loc)
+ if not ps.progressbar(ps.lang('Weed.picking'), 4000, 'uncuff') then return end
+ TriggerServerEvent("weed:pickupCane", loc)
+ return true
+ end,
+ target = {
+ icon = "fa-solid fa-seedling",
+ label = ps.lang('targets.weed.pick'),
+ },
+ },
+ {model = 'mushroom', label = 'shrooms', tbl = GlobalState.shrooms, plantTbl = {},
+ pick = function(loc)
+ if not ps.progressbar(ps.lang('Shrooms.pick'), 4000, 'uncuff') then return end
+ TriggerServerEvent("shrooms:pickupCane", loc)
+ return true
+ end,
+ target = {
+ icon = "fa-solid fa-hand",
+ label = ps.lang('targets.shrooms.pick'),
+ },
+ },
+}
+
+for k, v in pairs (DrugPlants) do
+ RegisterNetEvent(v.label ..':respawnCane', function(loc)
+ local plant = v.tbl[loc]
+ local hash = GetHashKey(plant.model)
+ if not v.plantTbl[loc] then
+ ps.requestModel(hash)
+ v.plantTbl[loc] = CreateObject(hash, plant.location, false, true, true)
+ Freeze(v.plantTbl[loc], true, plant.heading)
+ ps.entityTarget(v.plantTbl[loc], {
+ {
+ icon = v.icon,
+ label = v.label,
+ action = function()
+ if not v.pick(loc) then return end
+ end
+ }
+ })
+ end
+ end)
+
+ RegisterNetEvent(v.label ..':removeCane', function(loc)
+ ps.debug(v.plantTbl)
+ DeleteEntity(v.plantTbl[loc])
+ v.plantTbl[loc] = nil
+ end)
+
+ RegisterNetEvent(v.label ..":init", function()
+ if not v.plantTbl then v.plantTbl = {} end
+ for key, value in pairs (v.tbl) do
+ local hash = GetHashKey(value.model)
+ if not value.taken then
+ v.plantTbl[key] = CreateObject(hash, value.location.x, value.location.y, value.location.z, false, true, true)
+ Freeze(v.plantTbl[key], true, v.heading)
+ ps.entityTarget(v.plantTbl[key], {
+ {
+ icon = v.icon,
+ label = v.label,
+ action = function()
+ if not v.pick(key) then return end
+ end
+ }
+ })
+ end
+ end
+ end)
+end
+
+AddEventHandler('onResourceStop', function(resourceName)
+ if GetCurrentResourceName() == resourceName then
+ SetModelAsNoLongerNeeded(GetHashKey('prop_plant_01a'))
+ for k, v in pairs(DrugPlants) do
+ for key, plant in pairs(v.plantTbl) do
+ if DoesEntityExist(plant) then DeleteEntity(plant) end
+ v.plantTbl[key] = nil
+ end
+ end
+ end
+end)
\ No newline at end of file
diff --git a/client/shrooms.lua b/client/shrooms.lua
index 9ffd5b0..d2dedb0 100644
--- a/client/shrooms.lua
+++ b/client/shrooms.lua
@@ -1,57 +1,3 @@
-local shrooms = {}
-
-local function LoadModels(hash)
- hash = GetHashKey(hash)
- RequestModel(hash)
- local timeout = GetGameTimer() + 5000 -- 5-second timeout
- while not HasModelLoaded(hash) and GetGameTimer() < timeout do
- Wait(10)
- end
- if HasModelLoaded(hash) then return true end
-end
-
-local function pick(loc)
- if not progressbar(Lang.Shrooms.pick, 4000, 'uncuff') then return end
- TriggerServerEvent("shrooms:pickupCane", loc)
-end
-
-RegisterNetEvent('shrooms:respawnCane', function(loc)
- local v = GlobalState.shrooms[loc]
- local hash = GetHashKey(v.model)
- if not shrooms[loc] then
- shrooms[loc] = CreateObject(hash, v.location, false, true, true)
- Freeze(shrooms[loc], true, v.heading)
- AddSingleModel(shrooms[loc],{ icon = "fas fa-hand", label = Lang.targets.shrooms.pick, action = function() pick(loc) end }, loc )
- end
-end)
-
-AddEventHandler('onResourceStop', function(resourceName)
- if GetCurrentResourceName() == resourceName then
- SetModelAsNoLongerNeeded(GetHashKey('mushroom'))
- for k, v in pairs(shrooms) do
- if DoesEntityExist(v) then
- DeleteEntity(v) SetEntityAsNoLongerNeeded(v)
- end
- end
- end
-end)
-
-RegisterNetEvent('shrooms:removeCane', function(loc)
- if DoesEntityExist(shrooms[loc]) then DeleteEntity(shrooms[loc]) end
- shrooms[loc] = nil
-end)
-
-RegisterNetEvent("shrooms:init", function()
- for k, v in pairs (GlobalState.shrooms) do
- local hash = GetHashKey(v.model)
- if not HasModelLoaded(hash) then LoadModels(hash) end
- if not v.taken then
- shrooms[k] = CreateObject(hash, v.location.x, v.location.y, v.location.z, false, true, true)
- Freeze(shrooms[k], true, v.heading)
- AddSingleModel(shrooms[k],{ icon = "fas fa-hand", label = Lang.targets.shrooms.pick, action = function() pick(k) end }, k )
- end
- end
-end)
RegisterNetEvent('md-drugs:client:takeshrooms', function()
if not progressbar(Lang.Shrooms.eat, 500, 'eat') then return end
diff --git a/client/weed.lua b/client/weed.lua
index 5b8370a..59fd5f2 100644
--- a/client/weed.lua
+++ b/client/weed.lua
@@ -1,4 +1,3 @@
-local WeedPlant = {}
local exploded, drying = false, false
local function hasJob()
@@ -9,49 +8,6 @@ local function hasJob()
return true end
end
- local function pick(loc)
- if not progressbar(Lang.Weed.pick, 4000, 'uncuff') then return end
- TriggerServerEvent("weed:pickupCane", loc)
- end
-
-RegisterNetEvent('weed:respawnCane', function(loc)
- local v = GlobalState.WeedPlant[loc]
- local hash = GetHashKey(v.model)
- if not HasModelLoaded(hash) then LoadModel(hash) end
- if not WeedPlant[loc] then
- WeedPlant[loc] = CreateObject(hash, v.location.x, v.location.y, v.location.z-3.5, false, true, true)
- Freeze(WeedPlant[loc],true, v.heading)
- AddSingleModel(WeedPlant[loc], {icon = "fas fa-hand",label = Lang.targets.weed.pick, action = function() pick(loc) end}, loc)
- end
-end)
-
-RegisterNetEvent('weed:removeCane', function(loc)
- if DoesEntityExist(WeedPlant[loc]) then DeleteEntity(WeedPlant[loc]) end
- WeedPlant[loc] = nil
-end)
-
-RegisterNetEvent("weed:init", function()
- for k, v in pairs (GlobalState.WeedPlant) do
- local hash = GetHashKey(v.model)
- lib.requestModel('prop_weed_01', 1000)
- if not v.taken then
- WeedPlant[k] = CreateObject(hash, v.location.x, v.location.y, v.location.z-3.5, false, true, true)
- Freeze(WeedPlant[k],true, v.heading)
- AddSingleModel(WeedPlant[k], {icon = "fas fa-hand",label = Lang.targets.weed.pick, action = function() pick(k) end}, k)
- end
- end
-end)
-
-AddEventHandler('onResourceStop', function(resourceName)
- if GetCurrentResourceName() == resourceName then
- SetModelAsNoLongerNeeded(GetHashKey('bkr_prop_weed_lrg_01b'))
- for k, v in pairs(WeedPlant) do
- if DoesEntityExist(v) then
- DeleteEntity(v) SetEntityAsNoLongerNeeded(v)
- end
- end
- end
-end)
CreateThread(function()
local config = ps.callback('md-drugs:server:getLocs', false)
diff --git a/fxmanifest.lua b/fxmanifest.lua
index e1709cf..dcb31de 100644
--- a/fxmanifest.lua
+++ b/fxmanifest.lua
@@ -7,6 +7,7 @@ version '3.9.0'
client_scripts {
'client/functions.lua',
'client/animationsandfunctions.lua',
+ 'client/plantSpawns.lua',
'clientRun.lua',
}
diff --git a/server/cocaine.lua b/server/cocaine.lua
index 0c5100a..65cbd8b 100644
--- a/server/cocaine.lua
+++ b/server/cocaine.lua
@@ -1,28 +1,23 @@
local cokeplants = {
- { location = vector3(1474.25, -2643.87, 42.88), heading = 334.49, model = "prop_plant_01a" },
- { location = vector3(1472.35, -2649.3, 41.87), heading = 329.56, model = "prop_plant_01a" },
- { location = vector3(1475.7, -2652.9, 40.8), heading = 25.16, model = "prop_plant_01a" },
- { location = vector3(1481.0, -2654.99, 39.86), heading = 21.52, model = "prop_plant_01a" },
- { location = vector3(1480.9, -2660.63, 38.68), heading = 202.97, model = "prop_plant_01a" },
- { location = vector3(1477.18, -2666.53, 38.19), heading = 202.97, model = "prop_plant_01a" },
- { location = vector3(1477.58, -2670.82, 37.73), heading = 202.97, model = "prop_plant_01a" },
- { location = vector3(1476.56, -2675.82, 37.46), heading = 202.97, model = "prop_plant_01a" },
- { location = vector3(1474.8, -2680.19, 37.03), heading = 202.97, model = "prop_plant_01a" },
- { location = vector3(1471.52, -2685.0, 36.82), heading = 202.97, model = "prop_plant_01a" },
- { location = vector3(1462.82, -2676.58, 38.83), heading = 202.97, model = "prop_plant_01a" },
- { location = vector3(1461.31, -2667.74, 39.67), heading = 202.97, model = "prop_plant_01a" },
- { location = vector3(1456.3, -2647.61, 43.39), heading = 202.97, model = "prop_plant_01a" },
- { location = vector3(1453.65, -2641.56, 45.0), heading = 202.97, model = "prop_plant_01a" },
+ { location = vector3(1474.25, -2643.87, 42.88), heading = 334.49, model = "prop_plant_01a", taken = false },
+ { location = vector3(1472.35, -2649.3, 41.87), heading = 329.56, model = "prop_plant_01a", taken = false },
+ { location = vector3(1475.7, -2652.9, 40.8), heading = 25.16, model = "prop_plant_01a", taken = false },
+ { location = vector3(1481.0, -2654.99, 39.86), heading = 21.52, model = "prop_plant_01a", taken = false },
+ { location = vector3(1480.9, -2660.63, 38.68), heading = 202.97, model = "prop_plant_01a", taken = false },
+ { location = vector3(1477.18, -2666.53, 38.19), heading = 202.97, model = "prop_plant_01a", taken = false },
+ { location = vector3(1477.58, -2670.82, 37.73), heading = 202.97, model = "prop_plant_01a", taken = false },
+ { location = vector3(1476.56, -2675.82, 37.46), heading = 202.97, model = "prop_plant_01a", taken = false },
+ { location = vector3(1474.8, -2680.19, 37.03), heading = 202.97, model = "prop_plant_01a", taken = false },
+ { location = vector3(1471.52, -2685.0, 36.82), heading = 202.97, model = "prop_plant_01a", taken = false },
+ { location = vector3(1462.82, -2676.58, 38.83), heading = 202.97, model = "prop_plant_01a", taken = false },
+ { location = vector3(1461.31, -2667.74, 39.67), heading = 202.97, model = "prop_plant_01a", taken = false },
+ { location = vector3(1456.3, -2647.61, 43.39), heading = 202.97, model = "prop_plant_01a", taken = false },
+ { location = vector3(1453.65, -2641.56, 45.0), heading = 202.97, model = "prop_plant_01a", taken = false },
}
GlobalState.CocaPlant = cokeplants
-Citizen.CreateThread(function()
- for _, v in pairs(cokeplants) do
- v.taken = false
- end
-end)
function CaneCooldown(loc)
CreateThread(function()
@@ -44,7 +39,7 @@ AddEventHandler("coke:pickupCane", function(loc)
GlobalState.CocaPlant = cokeplants
TriggerClientEvent("coke:removeCane", -1, loc)
CaneCooldown(loc)
- AddItem(src, 'coca_leaf', 1)
+ ps.addItem(src, 'coca_leaf', 1)
end
end)
diff --git a/server/functions.lua b/server/functions.lua
index da428b5..0dc869f 100644
--- a/server/functions.lua
+++ b/server/functions.lua
@@ -322,26 +322,22 @@ local function handleFresh(source)
coke = 0,lsd = 0,heroin = 0,dealerrep = 0,
cornerselling = { price = QBConfig.SellLevel[1].price,rep = 0,label = QBConfig.SellLevel[1].label,level = 1}
})
- MySQL.insert('INSERT INTO drugrep SET cid = ?, drugrep = ?, name = ?', {getCid(source), table, GetName(source)})
- Wait(1000)
+ MySQL.insert('INSERT INTO drugrep SET cid = ?, drugrep = ?, name = ?', {ps.getIdentifier(source), table, ps.getPlayerName(source)})
return json.decode(table)
end
function getRep(source, type)
- local sql = MySQL.query.await('SELECT * FROM drugrep WHERE cid = ?', {getCid(source)})
+ local sql = MySQL.query.await('SELECT JSON_UNQUOTE(JSON_EXTRACT(drugrep, ?)) AS rep FROM drugrep WHERE cid = ?', {'$.' .. type, ps.getIdentifier(source)})
if not sql[1] then
local new = handleFresh(source)
return new[type]
else
- local reps = json.decode(sql[1].drugrep)
- local rep = ''
- if reps.coke == nil then rep = reps[1] else rep = reps end
- return rep[type]
+ return tonumber(sql[1].rep)
end
end
function GetAllRep(source)
- local sql = MySQL.query.await('SELECT * FROM drugrep WHERE cid = ?', {getCid(source)})
+ local sql = MySQL.query.await('SELECT * FROM drugrep WHERE cid = ?', {ps.getIdentifier(source)})
if not sql[1] then
local new = handleFresh(source)
return new
diff --git a/server/heroin.lua b/server/heroin.lua
index 9c41ccb..deecfc3 100644
--- a/server/heroin.lua
+++ b/server/heroin.lua
@@ -1,9 +1,7 @@
-local QBCore = exports['qb-core']:GetCoreObject()
-
+local heroinLabKits = {}
local prices = {
heroinlabkitprice = 10000
}
-local heroinLabKits = {}
local h = {
{ location = vector3(-2251.3, -99.18, 100.11), heading = 334.49, model = "prop_plant_01b"},
{ location = vector3(-2249.63, -92.97, 101.8), heading = 329.56, model = "prop_plant_01b"},
@@ -50,7 +48,7 @@ end)
RegisterServerEvent("heroin:pickupCane", function(loc)
local src = source
- if ps.checkDistance(src, h[loc].location, 3.0) then return end
+ if not ps.checkDistance(src, h[loc].location, 3.0) then return end
if not h[loc].taken then
h[loc].taken = true
GlobalState.PoppyPlants = h
@@ -146,14 +144,14 @@ ps.createUseable('heroinlabkit', function(source, item)
coords = loc,
name = ps.getPlayerName(src)
})
- ps.notify(src, Lang.Heroin.placed, "success")
+ ps.notify(src, ps.lang('Heroin.placed'), "success")
end
end)
RegisterServerEvent('md-drugs:server:heatliquidheroin', function()
local src = source
if not hasHKit(src) then return end
- if not ps.itemCheck(src, 'emptyvial', 1) then return end
+ if not ps.hasItem(src, 'emptyvial', 1) then return end
if Config.TierSystem then
local itemList = {
heroincut = 'tier1',
@@ -185,7 +183,7 @@ RegisterServerEvent('md-drugs:server:failheatingheroin', function()
local cuth = ps.hasItem(src, k)
if cuth then
ps.removeItem(src, k, v)
- ps.notify(src, Lang.Heroin.fail, "error")
+ ps.notify(src, ps.lang('Heroin.fail'), "error")
return
end
end
@@ -194,7 +192,7 @@ end)
RegisterServerEvent('md-drugs:server:fillneedle', function(num)
local src = source
if not ps.checkDistance(src, GlobalState.MDDrugsLocs.fillneedle[num].loc, 3.0) then
- ps.notify(src, Lang.Heroin.noloc, 'error')
+ ps.notify(src, ps.lang('Heroin.noloc'), 'error')
return
end
if not ps.hasItem(src, 'needle', 1) then return end
@@ -232,7 +230,7 @@ RegisterServerEvent('md-drugs:server:failheroin', function()
local cuth = ps.hasItem(src, k)
if cuth then
ps.removeItem(src, k, v)
- ps.notify(src, Lang.Heroin.failneedle, "error")
+ ps.notify(src, ps.lang('Heroin.failneedle'), "error")
return
end
end
diff --git a/server/lsd.lua b/server/lsd.lua
index 647e617..c8db10a 100644
--- a/server/lsd.lua
+++ b/server/lsd.lua
@@ -4,6 +4,7 @@ local prices = {
lsdlabkitcost = 10000 -- price of the lsd lab kit
}
local timedOut = {}
+
local function timeout(src, time)
timedOut[src] = true
CreateThread(function()
@@ -11,12 +12,14 @@ local function timeout(src, time)
timedOut[src] = nil
end)
end
+
local lsdTables = {}
+
RegisterServerEvent('md-drugs:server:getlysergic', function(num)
local src = source
if timedOut[src] then return end
if not ps.checkDistance(src, GlobalState.MDDrugsLocs.lysergicacid[num].loc, 2.0) then
- Notifys(src, Lang.lsd.notinloc, "error")
+ ps.notify(src, ps.lang('lsd.notinloc'), "error")
return
end
timeout(src, 3000)
@@ -25,25 +28,24 @@ end)
RegisterServerEvent('md-drugs:server:getdiethylamide', function(num)
local src = source
+ if timedOut[src] then return end
if not ps.checkDistance(src, GlobalState.MDDrugsLocs.diethylamide[num].loc, 2.0) then
Notifys(src, Lang.lsd.notinloc, "error")
return
end
- if timedOut[src] then return end
timeout(src, 3000)
ps.addItem(src, 'diethylamide', 2)
end)
-CUI('lsdlabkit', function(source, item)
+ps.createUseable('lsdlabkit', function(source, item)
local src = source
- local Player = getPlayer(src)
local placed, loc = ps.callback('md-drugs:client:setlsdlabkit', src)
if placed then
- if RemoveItem(src, 'lsdlabkit', 1) then
+ if ps.removeItem(src, 'lsdlabkit', 1) then
table.insert(lsdTables, {
- owner = GetName(src),
- ownerid = Player.PlayerData.citizenid,
+ owner = ps.getPlayerName(src),
+ ownerid = ps.getIdentifier(src),
src = src,
loc = loc
})
@@ -51,11 +53,10 @@ CUI('lsdlabkit', function(source, item)
end
end)
-local function hasLabKit(source)
- local src = source
- local Player = getPlayer(src)
+local function hasLabKit(source)
+ local src = source
for k, v in pairs (lsdTables) do
- if v.ownerid == Player.PlayerData.citizenid then
+ if v.ownerid == ps.getIdentifier(src) then
return true
end
end
@@ -63,19 +64,15 @@ end
ps.registerCallback('md-drugs:server:removecleaningkit', function(source)
local src = source
- if not Itemcheck(src, 'cleaningkit', 1) then return end
- if RemoveItem(src,"cleaningkit", 1) then
- return true
- end
+ return ps.removeItem(src,"cleaningkit", 1)
end)
RegisterServerEvent('md-drugs:server:getlabkitback', function()
local src = source
- local Player = getPlayer(src)
for k, v in pairs (lsdTables) do
- if v.ownerid == Player.PlayerData.citizenid then
+ if v.ownerid == ps.getIdentifier(src) then
table.remove(lsdTables, k)
- AddItem(src, 'lsdlabkit', 1)
+ ps.addItem(src, 'lsdlabkit', 1)
end
end
end)
@@ -89,49 +86,49 @@ end)
RegisterServerEvent('md-drugs:server:failheating', function()
local src = source
if not hasLabKit(src) then return end
- RemoveItem(src, 'lysergic_acid', 1)
- RemoveItem(src, 'diethylamide', 1)
- Notifys(src,Lang.lsd.failed, "error")
- Log(GetName(src) ..' Failed Basic LSD Like An Idiot!', 'lsd')
+ ps.removeItem(src, 'lysergic_acid', 1)
+ ps.removeItem(src, 'diethylamide', 1)
+ ps.notify(src, ps.lang('prices.lsd.failed'), "error")
+ Log(ps.getPlayerName(src) ..' Failed Basic LSD Like An Idiot!', 'lsd')
end)
RegisterServerEvent('md-drugs:server:refinequalityacid', function()
local src = source
if not hasLabKit(src) then return end
-if not Itemcheck(src, 'lsd_one_vial', 1) then return end
+if not ps.itemCheck(src, 'lsd_one_vial', 1) then return end
if Config.TierSystem then
local lsd = getRep(src, 'lsd')
- if RemoveItem(src, 'lsd_one_vial', 1) then
+ if ps.removeItem(src, 'lsd_one_vial', 1) then
if lsd <= 30 then
- AddItem(src,'lsd_vial_two', 1)
+ ps.addItem(src,'lsd_vial_two', 1)
elseif lsd >= 31 and lsd <= 60 then
- AddItem(src,'lsd_vial_three', 1)
+ ps.addItem(src,'lsd_vial_three', 1)
elseif lsd >= 61 and lsd <= 90 then
- AddItem(src,'lsd_vial_four', 1)
+ ps.addItem(src,'lsd_vial_four', 1)
elseif lsd >= 91 and lsd <= 120 then
- AddItem(src,'lsd_vial_five', 1)
+ ps.addItem(src,'lsd_vial_five', 1)
else
- AddItem(src,'lsd_vial_six', 1)
+ ps.addItem(src,'lsd_vial_six', 1)
end
AddRep(src,'lsd')
- Log(GetName(src) ..' Refined Acid and Now Has A Rep Of ' .. lsd + 1 .. '!', 'lsd')
+ ps.log(ps.getPlayerName(src) ..' Refined Acid and Now Has A Rep Of ' .. lsd + 1 .. '!', 'lsd')
end
else
local randomchance = math.random(1,100)
- if RemoveItem(src,'lsd_one_vial', 1) then
+ if ps.removeItem(src,'lsd_one_vial', 1) then
if randomchance <= 60 then
- AddItem(src,'lsd_vial_two', 1)
+ ps.addItem(src,'lsd_vial_two', 1)
elseif randomchance >= 61 and randomchance <= 75 then
- AddItem(src,'lsd_vial_three', 1)
+ ps.addItem(src,'lsd_vial_three', 1)
elseif randomchance >= 76 and randomchance <= 85 then
- AddItem(src,'lsd_vial_four', 1)
+ ps.addItem(src,'lsd_vial_four', 1)
elseif randomchance >= 86 and randomchance <= 93 then
- AddItem(src,'lsd_vial_five', 1)
+ ps.addItem(src,'lsd_vial_five', 1)
else
- AddItem(src,'lsd_vial_six', 1)
+ ps.addItem(src,'lsd_vial_six', 1)
end
- Log(GetName(src) ..' Refined Acid!', 'lsd')
+ ps.log(ps.getPlayerName(src) ..' Refined Acid!', 'lsd')
end
end
end)
@@ -139,40 +136,35 @@ end)
RegisterServerEvent('md-drugs:server:failrefinequality', function()
local src = source
if not hasLabKit(src) then return end
- if not Itemcheck(src, 'lsd_one_vial', 1) then return end
- RemoveItem(src,'lsd_one_vial', 1)
+ if not ps.hasItem(src, 'lsd_one_vial', 1) then return end
+ ps.removeItem(src,'lsd_one_vial', 1)
end)
RegisterServerEvent('md-drugs:server:gettabpaper', function(num)
local src = source
- local Player = getPlayer(src)
- if not checkLoc(src, 'gettabs', num) then return end
- if Player.Functions.RemoveMoney('cash', prices.tabcost * 10) then
- AddItem(src,'tab_paper', 10)
+ if not ps.checkDistance(src, GlobalState.MDDrugsLocs.gettabs[num].loc, 3.0) then return end
+ if ps.removeMoney('cash', prices.tabcost * 10) then
+ ps.addItem(src,'tab_paper', 10)
else
- Notifys(Lang.lsd.broke, "error")
+ ps.notify(src, Lang.lsd.broke, "error")
end
end)
RegisterServerEvent('md-drugs:server:getlabkit', function()
local src = source
- local Player = getPlayer(src)
- if not checkLoc(src,'singleSpot', 'buylsdlabkit') then return end
- if Player.Functions.RemoveMoney('cash', prices.lsdlabkitcost) then
- AddItem(src,'lsdlabkit', 1)
+ if not ps.checkDistance(src,'singleSpot', 'buylsdlabkit') then return end
+ if ps.removeMoney('cash', prices.lsdlabkitcost) then
+ ps.addItem(src,'lsdlabkit', 1)
else
- Notifys(src, Lang.lsd.broke, "error")
+ ps.notify(src, Lang.lsd.broke, "error")
end
end)
RegisterServerEvent('md-drugs:server:maketabpaper', function()
local src = source
- local Player = getPlayer(src)
if not hasLabKit(src) then return end
- if not Itemcheck(src,'tab_paper', 1) then return end
- local count = 0
- local items, recieve = nil, nil
+ if not ps.hasItem(src,'tab_paper', 1) then return end
local vialdata = {
{vial = 'lsd_one_vial', sheet = 'smileyfacesheet', log = 'Made A Smiley Face Sheet'},
{vial = 'lsd_vial_two', sheet = 'wildcherrysheet', log = 'Made A Wild Cherry Sheet'},
@@ -181,21 +173,12 @@ RegisterServerEvent('md-drugs:server:maketabpaper', function()
{vial = 'lsd_vial_five', sheet = 'bartsheet', log = 'Made A Cluckin Bell Sheet'},
{vial = 'lsd_vial_six', sheet = 'gratefuldeadsheet', log = 'Made A Maze Sheet'}
}
- sortTab(vialdata, 'vial')
- for k, v in pairs (vialdata) do
- if count >= 1 then break end
- local check = Player.Functions.GetItemByName(v.vial)
-
- if check and check.amount >= 1 then
- items = v.vial
- recieve = v.sheet
- count = count + 1
- break
- end
- end
- if count >= 1 then
- if RemoveItem(src, items, 1) and RemoveItem(src, 'tab_paper', 1) then
- AddItem(src, recieve, 1)
+ for k, v in ipairs (vialdata) do
+ local check = ps.hasItem(src, v.vial)
+ if check then
+ if ps.removeItem(src, v.vial, 1) and ps.removeItem(src, 'tab_paper', 1) then
+ ps.addItem(src, v.sheet, 1)
+ end
end
end
end)
@@ -209,25 +192,23 @@ local sheets = {
{item = 'gratefuldeadsheet', recieve = "gratefuldead_tabs", },
}
-for k, v in pairs (sheets) do
+for k, v in pairs (sheets) do
CUI(v.item, function(source)
local src = source
- local Player = getPlayer(src)
local math = math.random(1,10)
- if RemoveItem(src, v.item, 1) then
- AddItem(src, v.recieve, math)
- Log(GetName(src) ..' Made ' .. math .. 'Tabs of ' .. v.recieve .. '!', 'lsd')
+ if ps.removeItem(src, v.item, 1) then
+ ps.addItem(src, v.recieve, math)
+ ps.log(ps.getPlayerName(src) ..' Made ' .. math .. 'Tabs of ' .. v.recieve .. '!', 'lsd')
end
end)
end
AddEventHandler('playerDropped', function()
local src = source
- local Player = getPlayer(src)
for k, v in pairs (lsdTables) do
- if v.ownerid == Player.PlayerData.citizenid then
+ if v.ownerid == ps.getPlayerCitizenId(src) then
table.remove(lsdTables, k)
- AddItem(src, 'lsdlabkit', 1)
+ ps.addItem(src, 'lsdlabkit', 1)
end
end
end)
\ No newline at end of file
diff --git a/server/mescaline.lua b/server/mescaline.lua
index b14eb8e..bc07e14 100644
--- a/server/mescaline.lua
+++ b/server/mescaline.lua
@@ -1,4 +1,4 @@
-local QBCore = exports['qb-core']:GetCoreObject()
+
local m = {
{ location = vector3(2598.73, 4207.89, 41.02), heading = 334.49, model = "prop_cactus_03"},
@@ -44,7 +44,7 @@ RegisterNetEvent("Mescaline:pickupCane", function(loc)
GlobalState.Mescaline = m
TriggerClientEvent("Mescaline:removeCane", -1, loc)
MescalineCooldown(loc)
- AddItem(source,'cactusbulb', 1)
+ ps.addItem(source,'cactusbulb', 1)
end
end)
diff --git a/server/shrooms.lua b/server/shrooms.lua
index f2d5404..61f0be1 100644
--- a/server/shrooms.lua
+++ b/server/shrooms.lua
@@ -45,7 +45,7 @@ RegisterNetEvent("shrooms:pickupCane", function(loc)
GlobalState.shrooms = s
TriggerClientEvent("shrooms:removeCane", -1, loc)
shroomsCooldown(loc)
- AddItem(source, 'shrooms', 1)
+ ps.addItem(source, 'shrooms', 1)
Log(GetName(source) .. ' Picked A Shroom With a distance of ' .. dist(source,s[loc].location) .. ' vectors', 'shrooms')
end
end)
diff --git a/server/weed.lua b/server/weed.lua
index 93ded81..cdb8c8c 100644
--- a/server/weed.lua
+++ b/server/weed.lua
@@ -1,38 +1,21 @@
local QBCore = exports['qb-core']:GetCoreObject()
local weedPlant = {
- { location = vector3(1049.63, -3202.12, -36.75), heading = 334.49, model = "prop_weed_01"},
- { location = vector3(1050.85, -3202.15, -36.75), heading = 329.56, model = "prop_weed_01"},
- { location = vector3(1052.01, -3202.22, -36.75), heading = 25.16, model = "prop_weed_01"},
- { location = vector3(1052.99, -3202.15, -36.75), heading = 21.52, model = "prop_weed_01"},
- { location = vector3(1053.08, -3201.11, -36.75), heading = 202.97, model = "prop_weed_01"},
- { location = vector3(1052.91, -3199.99, -36.75), heading = 202.97, model = "prop_weed_01"},
- { location = vector3(1053.02, -3198.97, -36.75), heading = 202.97, model = "prop_weed_01"},
- { location = vector3(1051.95, -3198.93, -36.75), heading = 202.97, model = "prop_weed_01"},
- { location = vector3(1051.96, -3199.86, -36.75), heading = 202.97, model = "prop_weed_01"},
- { location = vector3(1051.93, -3201.17, -36.75), heading = 202.97, model = "prop_weed_01"},
- { location = vector3(1050.98, -3201.13, -36.75), heading = 202.97, model = "prop_weed_01"},
- { location = vector3(1050.89, -3200.07, -36.75), heading = 202.97, model = "prop_weed_01"},
- { location = vector3(1050.89, -3198.95, -36.75), heading = 202.97, model = "prop_weed_01"},
- { location = vector3(1049.72, -3198.95, -36.75), heading = 202.97, model = "prop_weed_01"},
- { location = vector3(1049.98, -3200.1, -36.75), heading = 202.97, model = "prop_weed_01"},
- { location = vector3(1049.82, -3201.01, -36.75), heading = 202.97, model = "prop_weed_01"},
- { location = vector3(1053.07, -3194.51, -36.75), heading = 334.49, model = "prop_weed_01"},
- { location = vector3(1052.97, -3195.55, -36.75), heading = 329.56, model = "prop_weed_01"},
- { location = vector3(1052.82, -3196.58, -36.75), heading = 25.16, model = "prop_weed_01"},
- { location = vector3(1052.94, -3197.59, -36.75), heading = 21.52, model = "prop_weed_01"},
- { location = vector3(1051.92, -3197.54, -36.75), heading = 202.97, model = "prop_weed_01"},
- { location = vector3(1051.88, -3196.61, -36.75), heading = 202.97, model = "prop_weed_01"},
- { location = vector3(1051.82, -3195.52, -36.75), heading = 202.97, model = "prop_weed_01"},
- { location = vector3(1051.95, -3194.38, -36.75), heading = 202.97, model = "prop_weed_01"},
- { location = vector3(1050.88, -3194.31, -36.75), heading = 202.97, model = "prop_weed_01"},
- { location = vector3(1050.78, -3195.29, -36.75), heading = 202.97, model = "prop_weed_01"},
- { location = vector3(1050.76, -3196.49, -36.75), heading = 202.97, model = "prop_weed_01"},
- { location = vector3(1050.77, -3197.62, -36.75), heading = 202.97, model = "prop_weed_01"},
- { location = vector3(1049.64, -3197.61, -36.75), heading = 202.97, model = "prop_weed_01"},
- { location = vector3(1049.64, -3196.59, -36.75), heading = 202.97, model = "prop_weed_01"},
- { location = vector3(1049.62, -3195.51, -36.75), heading = 202.97, model = "prop_weed_01"},
- { location = vector3(1049.66, -3194.36, -36.75), heading = 202.97, model = "prop_weed_01"},
+ { location = vector3(1064.84, -3199.84, -42.70), heading = 334.49, model = "bkr_prop_weed_lrg_01b"},
+ { location = vector3(1063.88, -3198.69, -42.70), heading = 329.56, model = "bkr_prop_weed_lrg_01b"},
+ { location = vector3(1061.68, -3196.46, -42.70), heading = 25.16, model = "bkr_prop_weed_lrg_01b"},
+ { location = vector3(1061.62, -3199.63, -42.70), heading = 21.52, model = "bkr_prop_weed_lrg_01b"},
+ { location = vector3(1062.82, -3197.70, -42.70), heading = 202.97, model = "bkr_prop_weed_lrg_01b"},
+ { location = vector3(1064.69, -3196.31, -42.70), heading = 202.97, model = "bkr_prop_weed_lrg_01b"},
+ { location = vector3(1062.92, -3198.78, -42.70), heading = 202.97, model = "bkr_prop_weed_lrg_01b"},
+ { location = vector3(1049.73, -3201.92, -42.70), heading = 202.97, model = "bkr_prop_weed_lrg_01b"},
+ { location = vector3(1052.94, -3202.21, -42.70), heading = 202.97, model = "bkr_prop_weed_lrg_01b"},
+ { location = vector3(1051.93, -3201.17, -42.70), heading = 202.97, model = "bkr_prop_weed_lrg_01b"},
+ { location = vector3(1050.98, -3201.13, -42.70), heading = 202.97, model = "bkr_prop_weed_lrg_01b"},
+ { location = vector3(1050.89, -3200.07, -42.70), heading = 202.97, model = "bkr_prop_weed_lrg_01b"},
+ { location = vector3(1050.89, -3198.95, -42.70), heading = 202.97, model = "bkr_prop_weed_lrg_01b"},
+ { location = vector3(1049.72, -3198.95, -42.70), heading = 202.97, model = "bkr_prop_weed_lrg_01b"},
+
}
GlobalState.WeedPlant = weedPlant
diff --git a/shared/config.lua b/shared/config.lua
index ada6c77..b763867 100644
--- a/shared/config.lua
+++ b/shared/config.lua
@@ -1,7 +1,7 @@
Config = {} --Ignore.
ps = exports.ps_lib:init()
ps.loadLangs("en")
-Config.respawnTime = 150 -- Seconds
+Config.respawnTime = 3 -- Seconds
Config.Fuel = "LegacyFuel" -- type the name of script you use i.e. ps-fuel, cdn-fuel, LegacyFuel
Config.TierSystem = true -- allows for three tiers of certain drugs ( coke, heroin, crack, lsd)
Config.StupidassNewQbItemName = true -- true if you have updated your items.lua from base qb after november 2023 because changing item names this far in a framework is 3 IQ points total
@@ -59,12 +59,12 @@ Config.Drugs = {
deliveries = false,
lean = false,
lsd = false,
- mescaline = false,
+ mescaline = true,
meth = false,
oxyruns = false,
pharma = false,
- shrooms = false,
- weed = false,
+ shrooms = true,
+ weed = true,
wholesale = false,
xtc = false,
}
\ No newline at end of file
From 2dd8729dc9710f7a1510fc05f6740443ed54a7e6 Mon Sep 17 00:00:00 2001
From: Mustache Dom <123716453+Mustachedom@users.noreply.github.com>
Date: Tue, 15 Jul 2025 02:23:03 -0700
Subject: [PATCH 05/37] - hush
---
client/plantSpawns.lua | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/client/plantSpawns.lua b/client/plantSpawns.lua
index bf572bd..0149a0a 100644
--- a/client/plantSpawns.lua
+++ b/client/plantSpawns.lua
@@ -10,6 +10,7 @@ local DrugPlants = {
icon = "fa-solid fa-seedling",
label = ps.lang('targets.coke.pick'),
},
+ allow = Config.Drugs.coke,
},
{model = 'prop_plant_01b', label = 'heroin', tbl = GlobalState.PoppyPlants, plantTbl = {},
pick = function(loc)
@@ -21,6 +22,7 @@ local DrugPlants = {
icon = "fa-solid fa-seedling",
label = ps.lang('targets.heroin.pick'),
},
+ allow = Config.Drugs.heroin,
},
{model = 'prop_cactus_03', label = 'Mescaline', tbl = GlobalState.Mescaline, plantTbl = {},
pick = function(loc)
@@ -32,6 +34,8 @@ local DrugPlants = {
icon = "fa-solid fa-seedling",
label = ps.lang('targets.mescaline.pick'),
},
+ allow = Config.Drugs.mescaline,
+
},
{model = 'prop_weed_01', label = 'weed', tbl = GlobalState.WeedPlant, plantTbl = {},
pick = function(loc)
@@ -43,6 +47,7 @@ local DrugPlants = {
icon = "fa-solid fa-seedling",
label = ps.lang('targets.weed.pick'),
},
+ allow = Config.Drugs.weed,
},
{model = 'mushroom', label = 'shrooms', tbl = GlobalState.shrooms, plantTbl = {},
pick = function(loc)
@@ -54,10 +59,12 @@ local DrugPlants = {
icon = "fa-solid fa-hand",
label = ps.lang('targets.shrooms.pick'),
},
+ allow = Config.Drugs.shrooms,
},
}
for k, v in pairs (DrugPlants) do
+ if not v.allow then goto continue end
RegisterNetEvent(v.label ..':respawnCane', function(loc)
local plant = v.tbl[loc]
local hash = GetHashKey(plant.model)
@@ -102,6 +109,7 @@ for k, v in pairs (DrugPlants) do
end
end
end)
+ ::continue::
end
AddEventHandler('onResourceStop', function(resourceName)
From 94c64580372fe9d093458a7a7e5a7fab2beaf750 Mon Sep 17 00:00:00 2001
From: Mustache Dom <123716453+Mustachedom@users.noreply.github.com>
Date: Wed, 16 Jul 2025 01:48:56 -0700
Subject: [PATCH 06/37] - update sv side plants
---
client/animationsandfunctions.lua | 29 ++---
client/cornerselling.lua | 9 +-
client/functions.lua | 148 +--------------------
client/lsd.lua | 12 +-
client/plantSpawns.lua | 3 +-
fxmanifest.lua | 1 +
server/cocaine.lua | 44 -------
server/cornerselling.lua | 4 +-
server/heroin.lua | 45 +------
server/mescaline.lua | 48 -------
server/plantSpawns.lua | 208 ++++++++++++++++++++++++++++++
server/shrooms.lua | 51 --------
server/weed.lua | 47 -------
13 files changed, 239 insertions(+), 410 deletions(-)
create mode 100644 server/plantSpawns.lua
diff --git a/client/animationsandfunctions.lua b/client/animationsandfunctions.lua
index 16b830a..dd1b94c 100644
--- a/client/animationsandfunctions.lua
+++ b/client/animationsandfunctions.lua
@@ -12,7 +12,7 @@ end
function MethCooking()
local animDict, animName = "anim@amb@business@meth@meth_monitoring_cooking@cooking@", "chemical_pour_short_cooker"
- lib.requestAnimDict(animDict, 500)
+ ps.requestAnim(animDict, 500)
SetEntityCoords(PlayerPedId(), vector3(1005.773, -3200.402, -38.524))
local targetPosition = GetEntityCoords(PlayerPedId())
local animDuration = GetAnimDuration(animDict, animName) * 800
@@ -29,7 +29,7 @@ function MethCooking()
NetworkStopSynchronisedScene(netScene)
DeleteObject(sacid) DeleteObject(ammonia)
FreezeEntityPosition(PlayerPedId(), false)
- lib.requestModel('hei_prop_heist_thermite', 2000)
+ ps.requestModel('hei_prop_heist_thermite', 2000)
loadParticle('scr_ornate_heist')
local thermite = CreateObject('hei_prop_heist_thermite', vector3(1005.76, -3201.3, -39.25), true, false, false)
FreezeEntityPosition(thermite, true)
@@ -44,7 +44,7 @@ end
function SmashMeth()
local ver = ""
local animDict, animName = "anim@amb@business@meth@meth_smash_weight_check@", "break_weigh_"..ver.."char02"
- lib.requestAnimDict(animDict, 500)
+ ps.requestAnim(animDict, 500)
local ped = PlayerPedId()
local targetPosition = vector3(1012.628, -3194.619, -39.589)
SetEntityCoords(ped, targetPosition)
@@ -79,7 +79,7 @@ end
function BagMeth()
local ver = ""
local animDict, animName = "anim@amb@business@meth@meth_smash_weight_check@", "break_weigh_"..ver.."char01"
- lib.requestAnimDict(animDict, 500)
+ ps.requestAnim(animDict, 500)
local animDuration = GetAnimDuration(animDict, animName) * 1000
local ped = PlayerPedId()
local coords = GetEntityCoords(ped)
@@ -161,7 +161,7 @@ end
function CutCoke(coords, offset, rotation)
local animDict, animName = "anim@amb@business@coc@coc_unpack_cut_left@", "coke_cut_v5_coccutter"
- lib.requestAnimDict(animDict, 500)
+ ps.requestAnim(animDict, 500)
local animDuration = GetAnimDuration(animDict, animName) * 1000
local ped = PlayerPedId()
local scenePos, sceneRot = vector3(coords.x + offset.x, coords.y + offset.y,coords.z + offset.z), rotation
@@ -216,7 +216,7 @@ end)
function BagCoke(coords, offset, rotation)
local ver = ""
local animDict, animName = "anim@amb@business@meth@meth_smash_weight_check@", "break_weigh_"..ver.."char01"
- lib.requestAnimDict(animDict, 500)
+ ps.requestAnim(animDict, 500)
local animDuration = GetAnimDuration(animDict, animName) * 1000
local ped = PlayerPedId()
local scenePos, sceneRot = vector3(coords.x + offset.x, coords.y + offset.y,coords.z + offset.z), rotation
@@ -372,9 +372,9 @@ function SpawnCarPedChase()
Notify(Lang.lean.act,'error')
else
started = true
- lib.requestModel("pounder", Config.RequestModelTime)
- lib.requestModel("ig_priest", Config.RequestModelTime)
- lib.requestModel("cargobob3", Config.RequestModelTime)
+ ps.requestModel("pounder", Config.RequestModelTime)
+ ps.requestModel("ig_priest", Config.RequestModelTime)
+ ps.requestModel("cargobob3", Config.RequestModelTime)
local leancar = CreateVehicle("pounder", start.x+3, start.y-2, start.z-1, 52.0, true, false)
local driver = CreatePed(26, "ig_priest", start.x, start.y, start.z, 268.9422, false, false)
local pilot2 = CreatePed(26, "ig_priest", stoploc.x-3, stoploc.y-3, stoploc.z-1, 268.9422, false, false)
@@ -418,12 +418,12 @@ local start = config.StartLoc[math.random(1,#config.StartLoc)]
local startedmeth = false
if startedmeth then
- Notify(Lang.meth.act,'error')
+ ps.notify(Lang.meth.act,'error')
else
startedmeth = true
- lib.requestModel("journey", Config.RequestModelTime)
- lib.requestModel("a_m_m_hillbilly_02", Config.RequestModelTime)
- lib.requestModel("cargobob3", Config.RequestModelTime)
+ ps.requestModel("journey", Config.RequestModelTime)
+ ps.requestModel("a_m_m_hillbilly_02", Config.RequestModelTime)
+ ps.requestModel("cargobob3", Config.RequestModelTime)
local methcar = CreateVehicle("journey", start.x+3, start.y-2, start.z-1, 52.0, true, false)
local methdriver = CreatePed(26, "a_m_m_hillbilly_02", start.x, start.y, start.z, 268.9422, false, false)
local methpilot = CreatePed(26, "a_m_m_hillbilly_02", stoploc.x-3, stoploc.y-3, stoploc.z-1, 268.9422, false, false)
@@ -482,5 +482,4 @@ function SetUpPeds()
TaskCombatPed(i, PlayerPedId(), 0, 16)
SetPedCombatAttributes(i, 46, true)
end
-end
-
+end
\ No newline at end of file
diff --git a/client/cornerselling.lua b/client/cornerselling.lua
index be59564..0f03a89 100644
--- a/client/cornerselling.lua
+++ b/client/cornerselling.lua
@@ -10,12 +10,12 @@ end
local function sellDrug(item, amount, price, targ)
-- PoliceCall(20)
if ps.vehicleData() then
- Notify(ps.lang('Cornerselling.inveh', 'error'))
+ ps.notify(ps.lang('Cornerselling.inveh', 'error'))
walkAway(targ)
return
end
- if not ps.progressbar(string.format(ps.lang('Cornerselling.selling', GetLabel(item), price)), 4000, 'uncuff') then walkAway(targ) return end
+ if not ps.progressbar(string.format(ps.lang('Cornerselling.selling', ps.getLabel(item), price)), 4000, 'uncuff') then walkAway(targ) return end
buyers[targ] = 'sold'
TriggerServerEvent('md-drugs:server:sellCornerDrugs', item, amount, price)
walkAway(targ)
@@ -46,6 +46,7 @@ local function findPed()
until targ ~= nil
buyers[targ] = true
+
ps.drawText('Waiting For Customer')
repeat
@@ -79,7 +80,7 @@ function Cornersell()
if inZone then sell = false return end
if not sell then
- return
+ return
end
local hasDrugs = checkItems()
@@ -123,7 +124,7 @@ function Cornersell()
FreezeEntityPosition(targ, true)
ps.entityTarget(data.ped, {
{
- label = string.format(ps.lang('targets.CornerSell.sell', data.amount, GetLabel(data.item), data.price)),
+ label = string.format(ps.lang('targets.CornerSell.sell', data.amount, ps.getLabel(data.item), data.price)),
icon ="fa-solid fa-money-bill",
action = function()
sellDrug(data.item, data.amount, data.price, targ)
diff --git a/client/functions.lua b/client/functions.lua
index e604a32..e5dc6c0 100644
--- a/client/functions.lua
+++ b/client/functions.lua
@@ -1,65 +1,7 @@
-local QBCore = exports['qb-core']:GetCoreObject()
-local progressbartype = Config.progressbartype
local minigametype = Config.minigametype
-local notifytype = Config.Notify
local dispatch = Config.Dispatch
-function getJobType()
- return QBCore.Functions.GetPlayerData().job.type
-end
-
-function getJobName()
- return QBCore.Functions.GetPlayerData().job.name
-end
-
-function progressbar(text, time, anim)
- TriggerEvent('animations:client:EmoteCommandStart', {anim})
- if progressbartype == 'oxbar' then
- if lib.progressBar({ duration = time, label = text, useWhileDead = false, canCancel = true, disable = { car = true, move = true},}) then
- if GetResourceState('scully_emotemenu') == 'started' then
- exports.scully_emotemenu:cancelEmote()
- else
- TriggerEvent('animations:client:EmoteCommandStart', {"c"})
- end
- return true
- end
- elseif progressbartype == 'oxcir' then
- if lib.progressCircle({ duration = time, label = text, useWhileDead = false, canCancel = true, position = 'bottom', disable = { car = true,move = true},}) then
- if GetResourceState('scully_emotemenu') == 'started' then
- exports.scully_emotemenu:cancelEmote()
- else
- TriggerEvent('animations:client:EmoteCommandStart', {"c"})
- end
- return true
- end
- elseif progressbartype == 'qb' then
- local test = false
- local cancelled = false
- QBCore.Functions.Progressbar("drink_something", text, time, false, true, { disableMovement = true, disableCarMovement = true, disableMouse = false, disableCombat = true, disableInventory = true,
- }, {}, {}, {}, function()-- Done
- test = true
- if GetResourceState('scully_emotemenu') == 'started' then
- exports.scully_emotemenu:cancelEmote()
- else
- TriggerEvent('animations:client:EmoteCommandStart', {"c"})
- end
- end, function()
- cancelled = true
- if GetResourceState('scully_emotemenu') == 'started' then
- exports.scully_emotemenu:cancelEmote()
- else
- TriggerEvent('animations:client:EmoteCommandStart', {"c"})
- end
- end)
- repeat
- Wait(100)
- until cancelled or test
- if test then return true end
- else
- print"^1 SCRIPT ERROR: Md-DRUGS set your progressbar with one of the options!"
- end
- end
function loadParticle(dict)
if not HasNamedPtfxAssetLoaded(dict) then
@@ -175,57 +117,7 @@ function minigame()
else
print"^1 SCRIPT ERROR: Md-Drugs set your minigame with one of the options!"
end
- end
-
- function Notify(text, type)
- if notifytype =='ox' then
- lib.notify({title = text, type = type})
- elseif notifytype == 'qb' then
- QBCore.Functions.Notify(text, type)
- elseif notifytype == 'okok' then
- exports['okokNotify']:Alert('', text, 4000, type, false)
- else
- print"^1 SCRIPT ERROR: Md-DRUGS set your notification with one of the options!"
- end
- end
-
-function GetImage(img)
- if GetResourceState('ox_inventory') == 'started' then
- local Items = exports['ox_inventory']:Items()
- if not Items[img] then print(' You Are Missing: ' .. img .. ' From Your ox items.lua') return end
- local itemClient = Items[img] and Items[img]['client']
- if itemClient and itemClient['image'] then
- return itemClient['image']
- else
- return "nui://ox_inventory/web/images/" .. img .. '.png'
- end
- end
- local invs = {
- ['ps-inventory'] = "nui://ps-inventory/html/images/",
- ['lj-inventory'] = "nui://lj-inventory/html/images/",
- ['qb-inventory'] = "nui://qb-inventory/html/images/",
- ['qs-inventory'] = "nui://qs-inventory/html/imgages/",
- ['origen_inventory'] = "nui://origen_inventory/html/img/",
- ['core_inventory'] = "nui://core_inventory/html/img/"
- }
- for k, v in pairs(invs) do
- if not QBCore.Shared.Items[img] then print(' You Are Missing: ' .. img .. ' From Your QB items.lua') return end
- if GetResourceState(k) == 'started' then
- return v .. QBCore.Shared.Items[img].image
- end
- end
-end
-
-function GetLabel(label)
- if GetResourceState('ox_inventory') == 'started' then
- local Items = exports['ox_inventory']:Items()
- if not Items[label] then print(' You Are Missing: ' .. label .. ' From Your ox items.lua') return end
- return Items[label]['label']
- else
- if QBCore.Shared.Items[label] == nil then print("There Is No " .. label .. " In Your QB Items.lua") return end
- return QBCore.Shared.Items[label]['label']
- end
-end
+end
function GetRep()
local rep = ps.callback('md-drugs:server:GetRep')
@@ -269,43 +161,6 @@ function makeMenu(name, rep)
end
-function ItemCheck(item)
- if GetResourceState('ox_inventory') == 'started' then
- if exports.ox_inventory:GetItemCount(item) >= 1 then return true else Notify('You Need ' .. GetLabel(item) .. " !", 'error') return false end
- else
- if QBCore.Shared.Items[item] == nil then print("There Is No " .. item .. " In Your QB Items.lua") return end
- if QBCore.Functions.HasItem(item) then return true else Notify('You Need ' .. QBCore.Shared.Items[item].label .. " !", 'error') return false end
- end
-end
-
-function hasItem(item)
- if GetResourceState('ox_inventory') == 'started' then
- if exports.ox_inventory:GetItemCount(item) >= 1 then return true else return false end
- else
- if QBCore.Shared.Items[item] == nil then print("There Is No " .. item .. " In Your QB Items.lua") return end
- if QBCore.Functions.HasItem(item) then return true else return false end
- end
-end
-
-function ItemCheckMulti(item)
- local need = 0
- local has = 0
- for k,v in pairs (item) do
- need = need + 1
- if GetResourceState('ox_inventory') == 'started' then
- if exports.ox_inventory:GetItemCount(v) >= 1 then has = has + 1 else Notify('You Need ' .. GetLabel(v) .. " !", 'error') end
- else
- if QBCore.Shared.Items[v] == nil then print("There Is No " .. item .. " In Your QB Items.lua") return end
- if QBCore.Functions.HasItem(v) then has = has + 1 else Notify('You Need ' .. QBCore.Shared.Items[v].label .. " !", 'error') end
- end
- end
- if need == has then
- return true
- else
- return false
- end
-end
-
function Email(sender, subject, message)
if Config.Phone == 'yflip' then
local receiver = GetPlayerServerId(PlayerId())
@@ -498,7 +353,6 @@ CreateThread(function()
TriggerEvent('Mescaline:init')
ps.requestModel(GetHashKey('mushroom'))
TriggerEvent('shrooms:init')
- TriggerEvent('weed:init')
end)
ps.registerCallback('md-drugs:client:uncuff', function(data)
diff --git a/client/lsd.lua b/client/lsd.lua
index 906f289..ff1687f 100644
--- a/client/lsd.lua
+++ b/client/lsd.lua
@@ -16,7 +16,7 @@ local function createLabKit(coord, head)
{name = 'lysergic_acid', amount = 1},
{name = 'diethylamide', amount = 1}
}) then
- Notify(ps.lang('lsd.need'), 'error')
+ ps.notify(ps.lang('lsd.need'), 'error')
return
end
if not minigame() then
@@ -26,7 +26,7 @@ local function createLabKit(coord, head)
SetParticleFxLoopedAlpha(exitPtfx, 3.0)
return
end
- if not progressbar(ps.lang('lsd.heat'), 7000, 'uncuff') then return end
+ if not ps.progressbar(ps.lang('lsd.heat'), 7000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:heatliquid")
end,
canInteract = function()
@@ -64,7 +64,7 @@ local function createLabKit(coord, head)
icon = "fas fa-box-circle-check",
label = ps.lang('targets.lsd.back'),
action = function()
- if not progressbar(ps.lang('lsd.tablepack'), 4000, 'uncuff') then return end
+ if not ps.progressbar(ps.lang('lsd.tablepack'), 4000, 'uncuff') then return end
DeleteObject(labkit)
TriggerServerEvent('md-drugs:server:getlabkitback')
tableout = false
@@ -78,7 +78,7 @@ local function createLabKit(coord, head)
label = ps.lang('targets.lsd.clean'),
action = function()
if not ps.hasItem('cleaningkit') then
- Notify(ps.lang('lsd.needclean'), 'error')
+ ps.notify(ps.lang('lsd.needclean'), 'error')
return
end
if not ps.progressbar(ps.lang('lsd.clean'), 4000, 'clean') then return end
@@ -168,13 +168,13 @@ end
ps.registerCallback("md-drugs:client:setlsdlabkit", function()
if tableout then
- Notify(ps.lang('lsd.tableout'), 'error')
+ ps.notify(ps.lang('lsd.tableout'), 'error')
return false
else
tableout = true
local loc, head = StartRay()
if not loc then tableout = false return end
- if not progressbar(ps.lang('lsd.place'), 4000, 'uncuff') then return end
+ if not ps.progressbar(ps.lang('lsd.place'), 4000, 'uncuff') then return end
createLabKit(loc, head)
return true, loc
end
diff --git a/client/plantSpawns.lua b/client/plantSpawns.lua
index 0149a0a..104e61d 100644
--- a/client/plantSpawns.lua
+++ b/client/plantSpawns.lua
@@ -10,7 +10,7 @@ local DrugPlants = {
icon = "fa-solid fa-seedling",
label = ps.lang('targets.coke.pick'),
},
- allow = Config.Drugs.coke,
+ allow = Config.Drugs.cocaine,
},
{model = 'prop_plant_01b', label = 'heroin', tbl = GlobalState.PoppyPlants, plantTbl = {},
pick = function(loc)
@@ -85,7 +85,6 @@ for k, v in pairs (DrugPlants) do
end)
RegisterNetEvent(v.label ..':removeCane', function(loc)
- ps.debug(v.plantTbl)
DeleteEntity(v.plantTbl[loc])
v.plantTbl[loc] = nil
end)
diff --git a/fxmanifest.lua b/fxmanifest.lua
index dcb31de..8c85ffe 100644
--- a/fxmanifest.lua
+++ b/fxmanifest.lua
@@ -15,6 +15,7 @@ server_scripts {
'server/functions.lua',
'server/locations.lua',
'server/recipes.lua',
+ 'server/plantSpawns.lua',
'serverRun.lua',
'@oxmysql/lib/MySQL.lua',
}
diff --git a/server/cocaine.lua b/server/cocaine.lua
index 65cbd8b..746fdaa 100644
--- a/server/cocaine.lua
+++ b/server/cocaine.lua
@@ -1,48 +1,4 @@
-local cokeplants = {
- { location = vector3(1474.25, -2643.87, 42.88), heading = 334.49, model = "prop_plant_01a", taken = false },
- { location = vector3(1472.35, -2649.3, 41.87), heading = 329.56, model = "prop_plant_01a", taken = false },
- { location = vector3(1475.7, -2652.9, 40.8), heading = 25.16, model = "prop_plant_01a", taken = false },
- { location = vector3(1481.0, -2654.99, 39.86), heading = 21.52, model = "prop_plant_01a", taken = false },
- { location = vector3(1480.9, -2660.63, 38.68), heading = 202.97, model = "prop_plant_01a", taken = false },
- { location = vector3(1477.18, -2666.53, 38.19), heading = 202.97, model = "prop_plant_01a", taken = false },
- { location = vector3(1477.58, -2670.82, 37.73), heading = 202.97, model = "prop_plant_01a", taken = false },
- { location = vector3(1476.56, -2675.82, 37.46), heading = 202.97, model = "prop_plant_01a", taken = false },
- { location = vector3(1474.8, -2680.19, 37.03), heading = 202.97, model = "prop_plant_01a", taken = false },
- { location = vector3(1471.52, -2685.0, 36.82), heading = 202.97, model = "prop_plant_01a", taken = false },
- { location = vector3(1462.82, -2676.58, 38.83), heading = 202.97, model = "prop_plant_01a", taken = false },
- { location = vector3(1461.31, -2667.74, 39.67), heading = 202.97, model = "prop_plant_01a", taken = false },
- { location = vector3(1456.3, -2647.61, 43.39), heading = 202.97, model = "prop_plant_01a", taken = false },
- { location = vector3(1453.65, -2641.56, 45.0), heading = 202.97, model = "prop_plant_01a", taken = false },
-}
-
-GlobalState.CocaPlant = cokeplants
-
-
-function CaneCooldown(loc)
- CreateThread(function()
- Wait(Config.respawnTime * 1000)
- cokeplants[loc].taken = false
- GlobalState.CocaPlant = cokeplants
- Wait(1000)
- TriggerClientEvent('coke:respawnCane', -1, loc)
- Log('Coca Plant Respawned At ' .. cokeplants[loc].location, 'coke')
- end)
-end
-
-RegisterNetEvent("coke:pickupCane")
-AddEventHandler("coke:pickupCane", function(loc)
- local src = source
- if CheckDist(src, cokeplants[loc].location) then return end
- if not cokeplants[loc].taken then
- cokeplants[loc].taken = true
- GlobalState.CocaPlant = cokeplants
- TriggerClientEvent("coke:removeCane", -1, loc)
- CaneCooldown(loc)
- ps.addItem(src, 'coca_leaf', 1)
- end
-end)
-
RegisterServerEvent('md-drugs:server:makepowder', function(num)
local src = source
if not ps.checkDistance(src, GlobalState.MDDrugsLocs.MakePowder[num].loc, 3.5) then
diff --git a/server/cornerselling.lua b/server/cornerselling.lua
index 4dfa634..2c01dba 100644
--- a/server/cornerselling.lua
+++ b/server/cornerselling.lua
@@ -126,6 +126,7 @@ for k, v in pairs(Drugs) do
table.insert(drugsNames, k)
end
GlobalState.DrugNames = drugsNames
+
local robChance = 1 -- Chance To Be Robbed
local RobbedDrugs = {}
@@ -211,11 +212,10 @@ RegisterNetEvent('md-drugs:server:sellCornerDrugs', function(item, amount, price
DrugDeals[ps.getIdentifier(src)] = nil
return
end
- --AddRep(src, 'cornerselling', Drugs[item].rep * amount)
+ AddRep(src, 'cornerselling', Drugs[item].rep * amount)
Log(string.format('%s Sold %s Of %s For A Price Of $%s !', GetName(src),amount, item, price), 'cornerselling')
DrugDeals[ps.getIdentifier(src)] = nil
ps.addMoney(src, 'cash', price)
-
end)
RegisterNetEvent('md-drugs:server:getBackRobbed', function()
diff --git a/server/heroin.lua b/server/heroin.lua
index deecfc3..79481c0 100644
--- a/server/heroin.lua
+++ b/server/heroin.lua
@@ -2,39 +2,6 @@ local heroinLabKits = {}
local prices = {
heroinlabkitprice = 10000
}
-local h = {
- { location = vector3(-2251.3, -99.18, 100.11), heading = 334.49, model = "prop_plant_01b"},
- { location = vector3(-2249.63, -92.97, 101.8), heading = 329.56, model = "prop_plant_01b"},
- { location = vector3(-2245.57, -85.12, 104.5), heading = 25.16, model = "prop_plant_01b"},
- { location = vector3(-2240.81, -88.48, 105.88), heading = 21.52, model = "prop_plant_01b"},
- { location = vector3(-2240.87, -93.36, 103.88), heading = 334.49, model = "prop_plant_01b"},
- { location = vector3(-2236.0, -95.34, 102.55), heading = 329.56, model = "prop_plant_01b"},
- { location = vector3(-2240.6, -100.01, 100.49), heading = 25.16, model = "prop_plant_01b"},
- { location = vector3(-2246.29, -104.92, 99.27), heading = 21.52, model = "prop_plant_01b"},
- { location = vector3(-2243.64, -107.99, 96.71), heading = 334.49, model = "prop_plant_01b"},
- { location = vector3(-2254.22, -108.76, 97.25), heading = 329.56, model = "prop_plant_01b"},
- { location = vector3(-2247.33, -108.92, 97.70), heading = 25.16, model = "prop_plant_01b"},
- { location = vector3(-2250.96, -111.22, 97.50), heading = 21.52, model = "prop_plant_01b"},
- { location = vector3(465.95, -1021.32, 31.78), heading = 21.52, model = "prop_plant_01b"},
-}
-
-GlobalState.PoppyPlants = h
-Citizen.CreateThread(function()
- for _, v in pairs(h) do
- v.taken = false
- end
-end)
-
-function heroinCooldown(loc)
- CreateThread(function()
- Wait(Config.respawnTime * 1000)
- h[loc].taken = false
- GlobalState.PoppyPlants = h
- Wait(1000)
- TriggerClientEvent('heroin:respawnCane', -1, loc)
- Log('Heroin Plant Respawned At ' .. h[loc].location, 'heroin')
- end)
-end
ps.registerCallback('removeCleaningkit', function(source)
for k, v in pairs(heroinLabKits) do
@@ -46,17 +13,7 @@ ps.registerCallback('removeCleaningkit', function(source)
return false
end)
-RegisterServerEvent("heroin:pickupCane", function(loc)
- local src = source
- if not ps.checkDistance(src, h[loc].location, 3.0) then return end
- if not h[loc].taken then
- h[loc].taken = true
- GlobalState.PoppyPlants = h
- TriggerClientEvent("heroin:removeCane", -1, loc)
- heroinCooldown(loc)
- ps.addItem(src, 'poppyresin', 1)
- end
-end)
+
RegisterServerEvent('md-drugs:server:dryplant', function(num)
local src = source
diff --git a/server/mescaline.lua b/server/mescaline.lua
index bc07e14..fc85a5a 100644
--- a/server/mescaline.lua
+++ b/server/mescaline.lua
@@ -1,53 +1,5 @@
-local m = {
- { location = vector3(2598.73, 4207.89, 41.02), heading = 334.49, model = "prop_cactus_03"},
- { location = vector3(2601.46, 4199.34, 40.62), heading = 329.56, model = "prop_cactus_03"},
- { location = vector3(2611.63, 4194.18, 41.18), heading = 25.16, model = "prop_cactus_03"},
- { location = vector3(2620.18, 4202.69, 41.5), heading = 21.52, model = "prop_cactus_03"},
- { location = vector3(2624.26, 4211.75, 42.34), heading = 334.49, model = "prop_cactus_03"},
- { location = vector3(2635.21, 4207.5, 42.49), heading = 329.56, model = "prop_cactus_03"},
- { location = vector3(2644.97, 4193.51, 42.11), heading = 25.16, model = "prop_cactus_03"},
- { location = vector3(2654.21, 4195.31, 41.23), heading = 21.52, model = "prop_cactus_03"},
- { location = vector3(2653.32, 4206.49, 41.62), heading = 334.49, model = "prop_cactus_03"},
- { location = vector3(2647.45, 4213.94, 42.49), heading = 329.56, model = "prop_cactus_03"},
- { location = vector3(2636.3, 4218.49, 43.03), heading = 25.16, model = "prop_cactus_03"},
- { location = vector3(2627.37, 4223.2, 42.88), heading = 21.52, model = "prop_cactus_03"},
- { location = vector3(2617.86, 4230.38, 42.63), heading = 21.52, model = "prop_cactus_03"},
- { location = vector3(2609.8, 4222.12, 41.19), heading = 21.52, model = "prop_cactus_03"},
- { location = vector3(2602.96, 4194.05, 41.01), heading = 21.52, model = "prop_cactus_03"},
- { location = vector3(2614.39, 4188.3, 41.68), heading = 21.52, model = "prop_cactus_03"},
- { location = vector3(2623.82, 4189.97, 41.44), heading = 21.52, model = "prop_cactus_03"},
-}
-GlobalState.Mescaline = m
-Citizen.CreateThread(function()
- for _, v in pairs(m) do
- v.taken = false
- end
-end)
-
-function MescalineCooldown(loc)
- CreateThread(function()
- Wait(Config.respawnTime * 1000)
- m[loc].taken = false
- GlobalState.Mescaline = m
- TriggerClientEvent('Mescaline:respawnCane', -1, loc)
- Log('Cactus Respawned At ' ..m[loc].location, 'mescaline')
- end)
-end
-
-
-RegisterNetEvent("Mescaline:pickupCane", function(loc)
- if CheckDist(source, m[loc].location) then return end
- if not m[loc].taken then
- m[loc].taken = true
- GlobalState.Mescaline = m
- TriggerClientEvent("Mescaline:removeCane", -1, loc)
- MescalineCooldown(loc)
- ps.addItem(source,'cactusbulb', 1)
- end
-end)
-
RegisterNetEvent("md-drugs:server:drymescaline", function()
local src = source
if not checkLoc(src, 'singleSpot', 'DryOut') then return end
diff --git a/server/plantSpawns.lua b/server/plantSpawns.lua
new file mode 100644
index 0000000..a25408b
--- /dev/null
+++ b/server/plantSpawns.lua
@@ -0,0 +1,208 @@
+local plants = {
+ cocaine = {
+ { location = vector3(1474.25, -2643.87, 42.88), heading = 334.49, model = "prop_plant_01a", taken = false },
+ { location = vector3(1472.35, -2649.3, 41.87), heading = 329.56, model = "prop_plant_01a", taken = false },
+ { location = vector3(1475.7, -2652.9, 40.8), heading = 25.16, model = "prop_plant_01a", taken = false },
+ { location = vector3(1481.0, -2654.99, 39.86), heading = 21.52, model = "prop_plant_01a", taken = false },
+ { location = vector3(1480.9, -2660.63, 38.68), heading = 202.97, model = "prop_plant_01a", taken = false },
+ { location = vector3(1477.18, -2666.53, 38.19), heading = 202.97, model = "prop_plant_01a", taken = false },
+ { location = vector3(1477.58, -2670.82, 37.73), heading = 202.97, model = "prop_plant_01a", taken = false },
+ { location = vector3(1476.56, -2675.82, 37.46), heading = 202.97, model = "prop_plant_01a", taken = false },
+ { location = vector3(1474.8, -2680.19, 37.03), heading = 202.97, model = "prop_plant_01a", taken = false },
+ { location = vector3(1471.52, -2685.0, 36.82), heading = 202.97, model = "prop_plant_01a", taken = false },
+ { location = vector3(1462.82, -2676.58, 38.83), heading = 202.97, model = "prop_plant_01a", taken = false },
+ { location = vector3(1461.31, -2667.74, 39.67), heading = 202.97, model = "prop_plant_01a", taken = false },
+ { location = vector3(1456.3, -2647.61, 43.39), heading = 202.97, model = "prop_plant_01a", taken = false },
+ { location = vector3(1453.65, -2641.56, 45.0), heading = 202.97, model = "prop_plant_01a", taken = false },
+ },
+ heroin = {
+ { location = vector3(-2251.3, -99.18, 100.11), heading = 334.49, model = "prop_plant_01b", taken = false},
+ { location = vector3(-2249.63, -92.97, 101.8), heading = 329.56, model = "prop_plant_01b", taken = false},
+ { location = vector3(-2245.57, -85.12, 104.5), heading = 25.16, model = "prop_plant_01b", taken = false},
+ { location = vector3(-2240.81, -88.48, 105.88), heading = 21.52, model = "prop_plant_01b", taken = false},
+ { location = vector3(-2240.87, -93.36, 103.88), heading = 334.49, model = "prop_plant_01b", taken = false},
+ { location = vector3(-2236.0, -95.34, 102.55), heading = 329.56, model = "prop_plant_01b", taken = false},
+ { location = vector3(-2240.6, -100.01, 100.49), heading = 25.16, model = "prop_plant_01b", taken = false},
+ { location = vector3(-2246.29, -104.92, 99.27), heading = 21.52, model = "prop_plant_01b", taken = false},
+ { location = vector3(-2243.64, -107.99, 96.71), heading = 334.49, model = "prop_plant_01b", taken = false},
+ { location = vector3(-2254.22, -108.76, 97.25), heading = 329.56, model = "prop_plant_01b", taken = false},
+ { location = vector3(-2247.33, -108.92, 97.70), heading = 25.16, model = "prop_plant_01b", taken = false},
+ { location = vector3(-2250.96, -111.22, 97.50), heading = 21.52, model = "prop_plant_01b", taken = false},
+ { location = vector3(465.95, -1021.32, 31.78), heading = 21.52, model = "prop_plant_01b", taken = false},
+ },
+ mescaline = {
+ { location = vector3(2598.73, 4207.89, 41.02), heading = 334.49, model = "prop_cactus_03", taken = false},
+ { location = vector3(2601.46, 4199.34, 40.62), heading = 329.56, model = "prop_cactus_03", taken = false},
+ { location = vector3(2611.63, 4194.18, 41.18), heading = 25.16, model = "prop_cactus_03", taken = false},
+ { location = vector3(2620.18, 4202.69, 41.5), heading = 21.52, model = "prop_cactus_03", taken = false},
+ { location = vector3(2624.26, 4211.75, 42.34), heading = 334.49, model = "prop_cactus_03", taken = false},
+ { location = vector3(2635.21, 4207.5, 42.49), heading = 329.56, model = "prop_cactus_03", taken = false},
+ { location = vector3(2644.97, 4193.51, 42.11), heading = 25.16, model = "prop_cactus_03", taken = false},
+ { location = vector3(2654.21, 4195.31, 41.23), heading = 21.52, model = "prop_cactus_03", taken = false},
+ { location = vector3(2653.32, 4206.49, 41.62), heading = 334.49, model = "prop_cactus_03", taken = false},
+ { location = vector3(2647.45, 4213.94, 42.49), heading = 329.56, model = "prop_cactus_03", taken = false},
+ { location = vector3(2636.3, 4218.49, 43.03), heading = 25.16, model = "prop_cactus_03", taken = false},
+ { location = vector3(2627.37, 4223.2, 42.88), heading = 21.52, model = "prop_cactus_03", taken = false},
+ { location = vector3(2617.86, 4230.38, 42.63), heading = 21.52, model = "prop_cactus_03", taken = false},
+ { location = vector3(2609.8, 4222.12, 41.19), heading = 21.52, model = "prop_cactus_03", taken = false},
+ { location = vector3(2602.96, 4194.05, 41.01), heading = 21.52, model = "prop_cactus_03", taken = false},
+ { location = vector3(2614.39, 4188.3, 41.68), heading = 21.52, model = "prop_cactus_03", taken = false},
+ { location = vector3(2623.82, 4189.97, 41.44), heading = 21.52, model = "prop_cactus_03", taken = false},
+ },
+ shrooms = {
+ { location = vector3(2185.14, 5183.81, 57.48), heading = 334.49, model = "mushroom", taken = false},
+ { location = vector3(2174.45, 5187.85, 57.43), heading = 329.56, model = "mushroom", taken = false},
+ { location = vector3(2166.22, 5196.56, 58.0), heading = 25.16, model = "mushroom", taken = false},
+ { location = vector3(2166.82, 5204.83, 58.63), heading = 21.52, model = "mushroom", taken = false},
+ { location = vector3(2174.84, 5205.82, 59.19), heading = 334.49, model = "mushroom", taken = false},
+ { location = vector3(2184.46, 5201.23, 59.2), heading = 329.56, model = "mushroom", taken = false},
+ { location = vector3(2192.45, 5194.89, 58.86), heading = 25.16, model = "mushroom", taken = false},
+ { location = vector3(2207.53, 5187.81, 58.95), heading = 21.52, model = "mushroom", taken = false},
+ { location = vector3(2213.46, 5191.11, 59.81), heading = 334.49, model = "mushroom", taken = false},
+ { location = vector3(2218.31, 5180.0, 58.18), heading = 329.56, model = "mushroom", taken = false},
+ { location = vector3(2212.75, 5172.35, 57.2), heading = 25.16, model = "mushroom", taken = false},
+ { location = vector3(2208.56, 5167.06, 56.34), heading = 21.52, model = "mushroom", taken = false},
+ { location = vector3(2196.9, 5158.59, 54.84), heading = 21.52, model = "mushroom", taken = false},
+ { location = vector3(2191.62, 5174.91, 56.68), heading = 21.52, model = "mushroom", taken = false},
+ { location = vector3(2190.18, 5182.54, 57.47), heading = 21.52, model = "mushroom", taken = false},
+ { location = vector3(2185.85, 5190.49, 58.1), heading = 21.52, model = "mushroom", taken = false},
+ { location = vector3(2179.95, 5194.19, 58.26), heading = 21.52, model = "mushroom", taken = false},
+ },
+ weed = {
+ { location = vector3(1064.84, -3199.84, -42.70), heading = 334.49, model = "bkr_prop_weed_lrg_01b", taken = false},
+ { location = vector3(1063.88, -3198.69, -42.70), heading = 329.56, model = "bkr_prop_weed_lrg_01b", taken = false},
+ { location = vector3(1061.68, -3196.46, -42.70), heading = 25.16, model = "bkr_prop_weed_lrg_01b", taken = false},
+ { location = vector3(1061.62, -3199.63, -42.70), heading = 21.52, model = "bkr_prop_weed_lrg_01b", taken = false},
+ { location = vector3(1062.82, -3197.70, -42.70), heading = 202.97, model = "bkr_prop_weed_lrg_01b", taken = false},
+ { location = vector3(1064.69, -3196.31, -42.70), heading = 202.97, model = "bkr_prop_weed_lrg_01b", taken = false},
+ { location = vector3(1062.92, -3198.78, -42.70), heading = 202.97, model = "bkr_prop_weed_lrg_01b", taken = false},
+ { location = vector3(1049.73, -3201.92, -42.70), heading = 202.97, model = "bkr_prop_weed_lrg_01b", taken = false},
+ { location = vector3(1052.94, -3202.21, -42.70), heading = 202.97, model = "bkr_prop_weed_lrg_01b", taken = false},
+ { location = vector3(1051.93, -3201.17, -42.70), heading = 202.97, model = "bkr_prop_weed_lrg_01b", taken = false},
+ { location = vector3(1050.98, -3201.13, -42.70), heading = 202.97, model = "bkr_prop_weed_lrg_01b", taken = false},
+ { location = vector3(1050.89, -3200.07, -42.70), heading = 202.97, model = "bkr_prop_weed_lrg_01b", taken = false},
+ { location = vector3(1050.89, -3198.95, -42.70), heading = 202.97, model = "bkr_prop_weed_lrg_01b", taken = false},
+ { location = vector3(1049.72, -3198.95, -42.70), heading = 202.97, model = "bkr_prop_weed_lrg_01b", taken = false},
+ }
+}
+
+local plantData = {
+ {
+ label = 'coke',
+ plants = plants.cocaine,
+ globalState = function()
+ GlobalState.CocaPlant = plants.cocaine
+ end,
+ itemGive = function(src)
+ ps.addItem(src, 'coca_leaf', 1)
+ end,
+ coolDown = function(loc)
+ CreateThread(function()
+ Wait(Config.respawnTime * 1000)
+ plants.cocaine[loc].taken = false
+ GlobalState.CocaPlant = plants.cocaine
+ TriggerClientEvent('coke:respawnCane', -1, loc)
+ Log('Coca Plant Respawned At ' .. plants.cocaine[loc].location, 'coke')
+ end)
+ end,
+ allow = Config.Drugs.cocaine
+ },
+ {
+ label = 'heroin',
+ plants = plants.heroin,
+ globalState = function()
+ GlobalState.PoppyPlants = plants.heroin
+ end,
+ itemGive = function(src)
+ ps.addItem(src, 'poppyresin', 1)
+ end,
+ coolDown = function(loc)
+ CreateThread(function()
+ Wait(Config.respawnTime * 1000)
+ plants.heroin[loc].taken = false
+ GlobalState.PoppyPlants = plants.heroin
+ TriggerClientEvent('heroin:respawnCane', -1, loc)
+ Log('Heroin Plant Respawned At ' .. plants.heroin[loc].location, 'heroin')
+ end)
+ end,
+ allow = Config.Drugs.heroin
+ },
+ {
+ label = 'Mescaline',
+ plants = plants.mescaline,
+ globalState = function()
+ GlobalState.Mescaline = plants.mescaline
+ end,
+ itemGive = function(src)
+ ps.addItem(src, 'cactusbulb', 1)
+ end,
+ coolDown = function(loc)
+ CreateThread(function()
+ Wait(Config.respawnTime * 1000)
+ plants.mescaline[loc].taken = false
+ GlobalState.Mescaline = plants.mescaline
+ TriggerClientEvent('Mescaline:respawnCane', -1, loc)
+ Log('Mescaline Plant Respawned At ' .. plants.mescaline[loc].location, 'mescaline')
+ end)
+ end,
+ allow = Config.Drugs.mescaline
+ },
+ {
+ label = 'shrooms',
+ plants = plants.shrooms,
+ globalState = function()
+ GlobalState.shrooms = plants.shrooms
+ end,
+ itemGive = function(src)
+ ps.addItem(src, 'shrooms', 1)
+ end,
+ coolDown = function(loc)
+ CreateThread(function()
+ Wait(Config.respawnTime * 1000)
+ plants.shrooms[loc].taken = false
+ GlobalState.shrooms = plants.shrooms
+ TriggerClientEvent('shrooms:respawnCane', -1, loc)
+ Log('Shroom Respawned At ' .. plants.shrooms[loc].location, 'shrooms')
+ end)
+ end,
+ allow = Config.Drugs.shrooms
+ },
+ {
+ label = 'weed',
+ plants = plants.weed,
+ globalState = function()
+ GlobalState.WeedPlant = plants.weed
+ end,
+ itemGive = function(src)
+ ps.addItem(src, 'wetcannabis', 1)
+ end,
+ coolDown = function(loc)
+ CreateThread(function()
+ Wait(Config.respawnTime * 1000)
+ plants.weed[loc].taken = false
+ GlobalState.WeedPlant = plants.weed
+ TriggerClientEvent('weed:respawnCane', -1, loc)
+ Log('Weed Plant Respawned At ' .. plants.weed[loc].location, 'weed')
+ end)
+ end,
+ allow = Config.Drugs.weed
+ }
+}
+
+for k, v in pairs (plantData) do
+ if not v.allow then goto continue end
+ v.globalState()
+ RegisterNetEvent(v.label ..":pickupCane", function(loc)
+ local src = source
+ if ps.checkDistance(src, v.plants[loc].location, 5.0) then
+ if not v.plants[loc].taken then
+ v.plants[loc].taken = true
+ v.globalState()
+ TriggerClientEvent(v.label ..":removeCane", -1, loc)
+ v.coolDown(loc)
+ v.itemGive(src)
+ end
+ end
+ end)
+ ::continue::
+end
\ No newline at end of file
diff --git a/server/shrooms.lua b/server/shrooms.lua
index 61f0be1..621bd70 100644
--- a/server/shrooms.lua
+++ b/server/shrooms.lua
@@ -1,54 +1,3 @@
-local QBCore = exports['qb-core']:GetCoreObject()
-
-local s = {
- { location = vector3(2185.14, 5183.81, 57.48), heading = 334.49, model = "mushroom"},
- { location = vector3(2174.45, 5187.85, 57.43), heading = 329.56, model = "mushroom"},
- { location = vector3(2166.22, 5196.56, 58.0), heading = 25.16, model = "mushroom"},
- { location = vector3(2166.82, 5204.83, 58.63), heading = 21.52, model = "mushroom"},
- { location = vector3(2174.84, 5205.82, 59.19), heading = 334.49, model = "mushroom"},
- { location = vector3(2184.46, 5201.23, 59.2), heading = 329.56, model = "mushroom"},
- { location = vector3(2192.45, 5194.89, 58.86), heading = 25.16, model = "mushroom"},
- { location = vector3(2207.53, 5187.81, 58.95), heading = 21.52, model = "mushroom"},
- { location = vector3(2213.46, 5191.11, 59.81), heading = 334.49, model = "mushroom"},
- { location = vector3(2218.31, 5180.0, 58.18), heading = 329.56, model = "mushroom"},
- { location = vector3(2212.75, 5172.35, 57.2), heading = 25.16, model = "mushroom"},
- { location = vector3(2208.56, 5167.06, 56.34), heading = 21.52, model = "mushroom"},
- { location = vector3(2196.9, 5158.59, 54.84), heading = 21.52, model = "mushroom"},
- { location = vector3(2191.62, 5174.91, 56.68), heading = 21.52, model = "mushroom"},
- { location = vector3(2190.18, 5182.54, 57.47), heading = 21.52, model = "mushroom"},
- { location = vector3(2185.85, 5190.49, 58.1), heading = 21.52, model = "mushroom"},
- { location = vector3(2179.95, 5194.19, 58.26), heading = 21.52, model = "mushroom"},
-}
-GlobalState.shrooms = s
-Citizen.CreateThread(function()
- for _, v in pairs(s) do
- v.taken = false
- end
-end)
-
-
-function shroomsCooldown(loc)
- CreateThread(function()
- Wait(Config.respawnTime * 1000)
- s[loc].taken = false
- GlobalState.shrooms = s
- Wait(1000)
- TriggerClientEvent('shrooms:respawnCane', -1, loc)
- Log('Cactus Respawned At ' .. s[loc].location, 'shrooms')
- end)
-end
-
-RegisterNetEvent("shrooms:pickupCane", function(loc)
- if CheckDist(source, s[loc].location) then return end
- if not s[loc].taken then
- s[loc].taken = true
- GlobalState.shrooms = s
- TriggerClientEvent("shrooms:removeCane", -1, loc)
- shroomsCooldown(loc)
- ps.addItem(source, 'shrooms', 1)
- Log(GetName(source) .. ' Picked A Shroom With a distance of ' .. dist(source,s[loc].location) .. ' vectors', 'shrooms')
- end
-end)
CUI('shrooms', function(source, item)
local src = source
diff --git a/server/weed.lua b/server/weed.lua
index cdb8c8c..9ecdf3d 100644
--- a/server/weed.lua
+++ b/server/weed.lua
@@ -1,52 +1,5 @@
-local QBCore = exports['qb-core']:GetCoreObject()
-local weedPlant = {
- { location = vector3(1064.84, -3199.84, -42.70), heading = 334.49, model = "bkr_prop_weed_lrg_01b"},
- { location = vector3(1063.88, -3198.69, -42.70), heading = 329.56, model = "bkr_prop_weed_lrg_01b"},
- { location = vector3(1061.68, -3196.46, -42.70), heading = 25.16, model = "bkr_prop_weed_lrg_01b"},
- { location = vector3(1061.62, -3199.63, -42.70), heading = 21.52, model = "bkr_prop_weed_lrg_01b"},
- { location = vector3(1062.82, -3197.70, -42.70), heading = 202.97, model = "bkr_prop_weed_lrg_01b"},
- { location = vector3(1064.69, -3196.31, -42.70), heading = 202.97, model = "bkr_prop_weed_lrg_01b"},
- { location = vector3(1062.92, -3198.78, -42.70), heading = 202.97, model = "bkr_prop_weed_lrg_01b"},
- { location = vector3(1049.73, -3201.92, -42.70), heading = 202.97, model = "bkr_prop_weed_lrg_01b"},
- { location = vector3(1052.94, -3202.21, -42.70), heading = 202.97, model = "bkr_prop_weed_lrg_01b"},
- { location = vector3(1051.93, -3201.17, -42.70), heading = 202.97, model = "bkr_prop_weed_lrg_01b"},
- { location = vector3(1050.98, -3201.13, -42.70), heading = 202.97, model = "bkr_prop_weed_lrg_01b"},
- { location = vector3(1050.89, -3200.07, -42.70), heading = 202.97, model = "bkr_prop_weed_lrg_01b"},
- { location = vector3(1050.89, -3198.95, -42.70), heading = 202.97, model = "bkr_prop_weed_lrg_01b"},
- { location = vector3(1049.72, -3198.95, -42.70), heading = 202.97, model = "bkr_prop_weed_lrg_01b"},
-
-}
-GlobalState.WeedPlant = weedPlant
-Citizen.CreateThread(function()
- for _, v in pairs(weedPlant) do
- v.taken = false
- end
-end)
-
-function WeedCooldown(loc)
- CreateThread(function()
- Wait(Config.respawnTime * 1000)
- weedPlant[loc].taken = false
- GlobalState.WeedPlant = weedPlant
- Wait(1000)
- TriggerClientEvent('weed:respawnCane', -1, loc)
- Log('Weed Plant Respawned At ' .. weedPlant[loc].location, 'weed')
- end)
-end
-
-RegisterNetEvent("weed:pickupCane", function(loc)
- if CheckDist(source, weedPlant[loc].location) then return end
- if not weedPlant[loc].taken then
- weedPlant[loc].taken = true
- GlobalState.WeedPlant = weedPlant
- TriggerClientEvent("weed:removeCane", -1, loc)
- WeedCooldown(loc)
- AddItem(source, 'wetcannabis', 1)
- Log(GetName(source) .. ' Picked Weed With a distance of ' .. dist(source, weedPlant[loc].location) .. ' vectors', 'weed')
- end
-end)
--------------- events
RegisterServerEvent('md-drugs:server:dryoutweed', function()
From e3caf16b53842b9bbf53d55ec696eb2421d8ae33 Mon Sep 17 00:00:00 2001
From: Mustache Dom <123716453+Mustachedom@users.noreply.github.com>
Date: Wed, 16 Jul 2025 01:54:05 -0700
Subject: [PATCH 07/37] Update version.txt
---
version.txt | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/version.txt b/version.txt
index b72ad01..ae8b5e3 100644
--- a/version.txt
+++ b/version.txt
@@ -1 +1,3 @@
-3.9.0
\ No newline at end of file
+
+Newest Build:3.9.1
+- `tested` version checker
From 2fd900ec222315d37c1ec3327f2c017b0a127c08 Mon Sep 17 00:00:00 2001
From: Mustache Dom <123716453+Mustachedom@users.noreply.github.com>
Date: Thu, 17 Jul 2025 02:06:17 -0500
Subject: [PATCH 08/37] - holy fuck a lot
---
client/animationsandfunctions.lua | 205 ++-------------
client/functions.lua | 2 +-
client/lean.lua | 110 +++++---
client/lsd.lua | 21 +-
client/mescaline.lua | 25 +-
client/meth.lua | 375 ++++++++++++++++++++-------
client/oxyruns.lua | 12 +-
client/pedspawns.lua | 2 +-
client/pharma.lua | 8 +-
client/shrooms.lua | 2 +-
client/weed.lua | 20 +-
client/wholesale.lua | 8 +-
client/xtc.lua | 42 ++--
server/consumables.lua | 8 +-
server/cornerselling.lua | 2 +-
server/deliveries.lua | 14 +-
server/functions.lua | 403 +-----------------------------
server/heroin.lua | 4 +-
server/lean.lua | 79 ++++--
server/locations.lua | 71 +++---
server/lsd.lua | 39 +--
server/mescaline.lua | 15 +-
server/meth.lua | 56 +++--
server/oxyruns.lua | 8 +-
server/pharma.lua | 8 +-
server/plantSpawns.lua | 10 +-
server/recipes.lua | 3 +-
server/shops.lua | 2 +-
server/shrooms.lua | 4 +-
server/weed.lua | 8 +-
server/wholesale.lua | 4 +-
server/xtc.lua | 14 +-
shared/config.lua | 6 +-
33 files changed, 680 insertions(+), 910 deletions(-)
diff --git a/client/animationsandfunctions.lua b/client/animationsandfunctions.lua
index dd1b94c..5d152aa 100644
--- a/client/animationsandfunctions.lua
+++ b/client/animationsandfunctions.lua
@@ -1,164 +1,5 @@
local started = nil
-local function loadParticle(dict)
- if not HasNamedPtfxAssetLoaded(dict) then
- RequestNamedPtfxAsset(dict)
- end
- while not HasNamedPtfxAssetLoaded(dict) do
- Wait(0)
- end
- SetPtfxAssetNextCall(dict)
-end
-
-function MethCooking()
- local animDict, animName = "anim@amb@business@meth@meth_monitoring_cooking@cooking@", "chemical_pour_short_cooker"
- ps.requestAnim(animDict, 500)
- SetEntityCoords(PlayerPedId(), vector3(1005.773, -3200.402, -38.524))
- local targetPosition = GetEntityCoords(PlayerPedId())
- local animDuration = GetAnimDuration(animDict, animName) * 800
- FreezeEntityPosition(PlayerPedId(), true)
- local scenePos, sceneRot = vector3(1010.656, -3198.445, -38.925), vector3(0.0, 0.0, 0.0)
- local netScene = NetworkCreateSynchronisedScene(scenePos, sceneRot, 2, false, false, 1065353216, 0, 1.3)
- NetworkAddPedToSynchronisedScene(PlayerPedId(), netScene, animDict, animName, 1.5, -4.0, 1, 16, 1148846080, 0)
- local sacid = CreateObjectNoOffset("bkr_prop_meth_sacid", targetPosition, 1, 1, 0)
- NetworkAddEntityToSynchronisedScene(sacid, netScene, animDict, "chemical_pour_short_sacid", 4.0, -8.0, 1)
- local ammonia = CreateObjectNoOffset("bkr_prop_meth_ammonia", targetPosition, 1, 1, 0)
- NetworkAddEntityToSynchronisedScene(ammonia, netScene, animDict, "chemical_pour_short_ammonia", 4.0, -8.0, 1)
- NetworkStartSynchronisedScene(netScene)
- Wait(animDuration)
- NetworkStopSynchronisedScene(netScene)
- DeleteObject(sacid) DeleteObject(ammonia)
- FreezeEntityPosition(PlayerPedId(), false)
- ps.requestModel('hei_prop_heist_thermite', 2000)
- loadParticle('scr_ornate_heist')
- local thermite = CreateObject('hei_prop_heist_thermite', vector3(1005.76, -3201.3, -39.25), true, false, false)
- FreezeEntityPosition(thermite, true)
- SetEntityRotation(thermite, 190.0, 90.0, 140.0, 3, true )
- Wait(1000)
- local therm = StartParticleFxLoopedOnEntity('scr_heist_ornate_thermal_burn', thermite, 0.0, 1.4, 0.0, 0.0, 0.0, 0.0, 1.5, false, false, false)
- Wait(math.random(10000, 20000))
- StopParticleFxLooped(therm, true)
-end
-
-
-function SmashMeth()
- local ver = ""
- local animDict, animName = "anim@amb@business@meth@meth_smash_weight_check@", "break_weigh_"..ver.."char02"
- ps.requestAnim(animDict, 500)
- local ped = PlayerPedId()
- local targetPosition = vector3(1012.628, -3194.619, -39.589)
- SetEntityCoords(ped, targetPosition)
- Wait(1)
- local animDuration = GetAnimDuration(animDict, animName) * 800
- FreezeEntityPosition(ped, true)
- local scenePos, sceneRot = vector3(1008.734, -3196.646, -39.99), vector3(0.0, 0.0, 1.08)
- local netScene = NetworkCreateSynchronisedScene(scenePos, sceneRot, 2, false, false, 1065353216, 0, 1.3)
- NetworkAddPedToSynchronisedScene(ped, netScene, animDict, animName, 1.5, -4.0, 1, 16, 1148846080, 0)
- local objects, sceneObjects = {}, {
- { hash = "w_me_hammer", animName = "break_weigh_" .. ver .. "hammer"},
- { hash = "bkr_Prop_Meth_SmashedTray_01_frag_", animName = "break_weigh_"..ver.."tray01"},
- { hash = "bkr_Prop_Meth_Tray_02a", animName = "break_weigh_"..ver.."tray01^1"},
- { hash = "bkr_Prop_Meth_Tray_02a", animName = "break_weigh_"..ver.."tray01^2"},
- { hash = "bkr_Prop_Meth_SmashedTray_01_frag_", animName = "break_weigh_"..ver.."tray01^3"},
- }
- for i=1, #sceneObjects, 1 do
- local obj = CreateObjectNoOffset(sceneObjects[i].hash, targetPosition, true, true, true)
- NetworkAddEntityToSynchronisedScene(obj, netScene, animDict, sceneObjects[i].animName, 4.0, -8.0, 1)
- objects[#objects+1] = obj
- end
- NetworkStartSynchronisedScene(netScene)
- Wait(animDuration)
- NetworkStopSynchronisedScene(netScene)
- for i=1, #objects, 1 do
- DeleteObject(objects[i])
- end
- RemoveAnimDict(animDict)
- FreezeEntityPosition(ped, false)
-end
-
-function BagMeth()
- local ver = ""
- local animDict, animName = "anim@amb@business@meth@meth_smash_weight_check@", "break_weigh_"..ver.."char01"
- ps.requestAnim(animDict, 500)
- local animDuration = GetAnimDuration(animDict, animName) * 1000
- local ped = PlayerPedId()
- local coords = GetEntityCoords(ped)
- local scenePos, sceneRot = vector3(1008.734, -3196.646, -39.99), vector3(0.0, 0.0, 1.08)
- local scenes = {
- {
- { hash = "bkr_prop_meth_bigbag_04a", animName = "break_weigh_"..ver.."box01"},
- { hash = "bkr_prop_meth_bigbag_03a", animName = "break_weigh_"..ver.."box01^1"},
- { hash = "bkr_prop_meth_openbag_02", animName = "break_weigh_"..ver.."methbag01"}
- },
- {
- { hash = "bkr_prop_meth_openbag_02", animName = "break_weigh_"..ver.."methbag01^1"},
- { hash = "bkr_prop_meth_openbag_02", animName = "break_weigh_"..ver.."methbag01^2"},
- { hash = "bkr_prop_meth_openbag_02", animName = "break_weigh_"..ver.."methbag01^3"}
- },
- {
- { hash = "bkr_prop_meth_openbag_02", animName = "break_weigh_"..ver.."methbag01^4"},
- { hash = "bkr_prop_meth_openbag_02", animName = "break_weigh_"..ver.."methbag01^5"},
- { hash = "bkr_prop_meth_openbag_02", animName = "break_weigh_"..ver.."methbag01^6"}
- },
- {
- { hash = "bkr_prop_meth_scoop_01a", animName = "break_weigh_"..ver.."scoop"},
- { hash = "bkr_prop_coke_scale_01", animName = "break_weigh_"..ver.."scale"},
- { hash = "bkr_prop_fakeid_penclipboard", animName = "break_weigh_"..ver.."pen"}
- },
- {
- { hash = "bkr_prop_fakeid_clipboard_01a", animName = "break_weigh_"..ver.."clipboard"},
- { hash = "bkr_Prop_Meth_Tray_02a", animName = "break_weigh_"..ver.."tray01^5"}
- }
-}
-local scenesList, entitiesList = {}, {}
-for i=1, #scenes, 1 do
- local scene = NetworkCreateSynchronisedScene(scenePos, sceneRot, 2, false, false, 1065353216, 0, 1.3)
- NetworkAddPedToSynchronisedScene(ped, scene, animDict, animName, 1.5, -4.0, 1, 16, 1148846080, 0)
- for j=1, #scenes[i], 1 do
- local s = scenes[i][j]
- RequestModel(s.hash)
- while not HasModelLoaded(s.hash) do
- Wait(0)
- end
- local obj = CreateObjectNoOffset(s.hash, coords, true, true, true)
- SetModelAsNoLongerNeeded(s.hash)
- entitiesList[#entitiesList+1] = obj
- NetworkAddEntityToSynchronisedScene(obj, scene, animDict, s.animName, 4.0, -8.0, 1)
- end
- scenesList[#scenesList+1] = scene
-end
-DisableCamCollisionForEntity(ped)
-FreezeEntityPosition(ped, true)
-for i=1, #scenesList, 1 do
- NetworkStartSynchronisedScene(scenesList[i])
-end
-
-Wait(animDuration-11000)
-for i=1, #scenesList, 1 do
- NetworkStopSynchronisedScene(scenesList[i])
-end
-for i=1, #entitiesList, 1 do
- DeleteEntity(entitiesList[i])
-end
-RemoveAnimDict(animDict)
-FreezeEntityPosition(ped, false)
-end
-
-function Tray()
- local pos = GetEntityCoords(PlayerPedId(), true)
- RequestAnimDict('anim@heists@box_carry@')
- while (not HasAnimDictLoaded('anim@heists@box_carry@')) do
- Wait(7)
- end
- TaskPlayAnim(PlayerPedId(), 'anim@heists@box_carry@', 'idle', 5.0, -1, -1, 50, 0, false, false, false)
- RequestModel("bkr_prop_meth_tray_02a")
- while not HasModelLoaded("bkr_prop_meth_tray_02a") do
- Wait(0)
- end
- local trays = CreateObject("bkr_prop_meth_tray_02a", pos.x, pos.y, pos.z, true, true, true)
- AttachEntityToEntity(trays, PlayerPedId(), GetPedBoneIndex(PlayerPedId(), 28422), 0.01,-0.2, -0.2, 20.0, 0.0, 0.0, true, true, false, true, 1, true)
-end
-
function CutCoke(coords, offset, rotation)
local animDict, animName = "anim@amb@business@coc@coc_unpack_cut_left@", "coke_cut_v5_coccutter"
ps.requestAnim(animDict, 500)
@@ -365,11 +206,11 @@ end
local hit = 0
function SpawnCarPedChase()
+ ps.debug("SpawnCarPedChase")
local stoploc = vector3(-1157.63, -3056.71, 13.94)
- local config = ps.callback('md-drugs:server:getLocs', false)
- local start = config.StartLoc[math.random(1,#config.StartLoc)]
+ local start = GlobalState.MDDrugsLocs.StartLoc[math.random(1,#GlobalState.MDDrugsLocs.StartLoc)]
if started then
- Notify(Lang.lean.act,'error')
+ ps.notify(Lang.lean.act,'error')
else
started = true
ps.requestModel("pounder", Config.RequestModelTime)
@@ -385,28 +226,34 @@ function SpawnCarPedChase()
SetPedIntoVehicle(driver, leancar, -1)
SetPedFleeAttributes(driver,false)
TaskVehicleDriveToCoordLongrange(driver, leancar, stoploc.x, stoploc.y, stoploc.z-1, 50.0, 524288, 25.0)
- SetPedKeepTask(driver, true)
- repeat
+ SetPedKeepTask(driver, true)
+ repeat
Wait(1000)
until #(GetEntityCoords(driver) - stoploc) < 20.0 or GetEntityHealth(driver) == 0
RemoveBlip(leancar)
- if GetEntityHealth(driver) == 0 then
- AddSingleModel(leancar, { name = 'leancar', icon = 'fa-solid fa-car', label = Lang.targets.lean.st,
- action = function()
- hit = hit + 1
- if not minigame() then return end
- TriggerServerEvent('md-drugs:server:givelean')
- started = nil
- if math.random(1,100) <= 30 or hit == 4 then
- hit = 0
- DeleteVehicle(leancar)
- DeleteEntity(driver)
- DeleteEntity(pilot2)
- end
- end}, nil)
+ if GetEntityHealth(driver) == 0 then
+ ps.entityTarget(leancar, {
+ {
+ name = 'leancar',
+ icon = 'fa-solid fa-car',
+ label = Lang.targets.lean.st,
+ action = function()
+ hit = hit + 1
+ if not minigame() then return end
+ TriggerServerEvent('md-drugs:server:givelean')
+ started = nil
+ if math.random(1,100) <= 30 or hit == 4 then
+ hit = 0
+ DeleteVehicle(leancar)
+ DeleteEntity(driver)
+ DeleteEntity(pilot2)
+ end
+ end
+ }
+ })
else
DeleteVehicle(leancar) DeleteEntity(driver) DeleteEntity(pilot2)
- end
+ end
end
end
diff --git a/client/functions.lua b/client/functions.lua
index e5dc6c0..25e58c3 100644
--- a/client/functions.lua
+++ b/client/functions.lua
@@ -230,7 +230,7 @@ end
function GetCops(number)
if number == 0 then return true end
local amount = ps.callback('md-drugs:server:GetCoppers')
- if amount >= number then return true else Notify('You Need '.. number - amount .. ' More Cops To Do This', 'error') end
+ if amount >= number then return true else ps.notify('You Need '.. number - amount .. ' More Cops To Do This', 'error') end
end
diff --git a/client/lean.lua b/client/lean.lua
index cb1d07d..a61a135 100644
--- a/client/lean.lua
+++ b/client/lean.lua
@@ -1,41 +1,75 @@
-RegisterNetEvent("md-drugs:client:getsyruplocationtobuy", function()
- Notify(Lang.Lean.marked, "success")
- SpawnCarPedChase()
-end)
-RegisterNetEvent('md-drugs:client:leancraft', function()
-local store = {}
-local label = {}
-local items = ps.callback('md-drugs:server:GetRecipe', false,'lean', 'cups')
-for k, v in pairs (items) do
- label = {}
- local item = ''
- for m, d in pairs (items[k].take) do table.insert(label, GetLabel(m) .. ' X ' .. d) end
- for m,d in pairs (items[k].give) do item = m end
- store[#store + 1] = {
- icon = GetImage(item),
- description = table.concat(label, ", "),
- title = GetLabel(item),
- event = 'md-drugs:client:stirlean',
- args = {
- item = item,
- recipe = 'lean',
- num = k,
- label = 'Cooking Up ' .. GetLabel(item),
- table = 'cups'
- }
- }
- sorter(store, 'title')
- lib.registerContext({id = 'leanCraft',title = "Make Lean", options = store})
+local started = false
+local hit = 0
+
+function SpawnCarPedChase()
+ local stoploc = vector3(-1157.63, -3056.71, 13.94)
+ local start = GlobalState.MDDrugsLocs.StartLoc[math.random(1,#GlobalState.MDDrugsLocs.StartLoc)]
+ if started then ps.notify(Lang.lean.act,'error') return end
+ started = true
+ ps.callback('md-drugs:server:RegisterLean')
+ ps.requestModel("pounder", Config.RequestModelTime)
+ ps.requestModel("ig_priest", Config.RequestModelTime)
+ ps.requestModel("cargobob3", Config.RequestModelTime)
+
+ local leancar = CreateVehicle("pounder", start.x+3, start.y-2, start.z-1, 52.0, true, false)
+ local driver = CreatePed(26, "ig_priest", start.x, start.y, start.z, 268.9422, false, false)
+ local pilot2 = CreatePed(26, "ig_priest", stoploc.x-3, stoploc.y-3, stoploc.z-1, 268.9422, false, false)
+
+ FreezeEntityPosition(pilot2, true)
+ SetEntityInvincible(pilot2, true)
+ SetEntityAsMissionEntity(leancar)
+ AddBlipForEntity(leancar)
+ SetPedIntoVehicle(driver, leancar, -1)
+ SetPedFleeAttributes(driver,false)
+ TaskVehicleDriveToCoordLongrange(driver, leancar, stoploc.x, stoploc.y, stoploc.z-1, 50.0, 524288, 25.0)
+ SetPedKeepTask(driver, true)
+
+ repeat
+ Wait(1000)
+ until #(GetEntityCoords(driver) - stoploc) < 20.0 or GetEntityHealth(driver) == 0
+
+ RemoveBlip(leancar)
+
+ if GetEntityHealth(driver) == 0 then
+ ps.entityTarget(leancar, {
+ {
+ name = 'leancar',
+ icon = 'fa-solid fa-car',
+ label = Lang.targets.lean.st,
+ action = function()
+ hit = hit + 1
+ if not minigame() then return end
+ TriggerServerEvent('md-drugs:server:givelean')
+ started = false
+ if math.random(1,100) <= 30 or hit == 4 then
+ hit = 0
+ DeleteVehicle(leancar)
+ DeleteEntity(driver)
+ DeleteEntity(pilot2)
+ end
+ end
+ }
+ })
+ else
+ DeleteVehicle(leancar)
+ DeleteEntity(driver)
+ DeleteEntity(pilot2)
+ end
end
-lib.showContext('leanCraft')
-end)
-local busy = false
-RegisterNetEvent('md-drugs:client:stirlean', function(data)
- if busy then return end
- busy = true
- if not progressbar(data.label, 4000, 'uncuff') then busy = false return end
- TriggerServerEvent('md-drugs:server:finishcup', data)
- busy = false
-end)
\ No newline at end of file
+local leanPeds = {}
+for k, v in pairs (GlobalState.MDDrugsLocs.SyrupVendor) do
+ ps.requestModel(v.ped)
+ leanPeds[k] = CreatePed(0, v.ped, v.loc.x, v.loc.y, v.loc.z, false, false)
+ Freeze(leanPeds[k], true, v.loc.w)
+ ps.entityTarget(leanPeds[k], {
+ {
+ icon = "fa-solid fa-hand-holding-medical",
+ label = ps.lang('Lean.buylean'),
+ action = function()
+ SpawnCarPedChase()
+ end,
+ },
+ })
+end
\ No newline at end of file
diff --git a/client/lsd.lua b/client/lsd.lua
index ff1687f..093031e 100644
--- a/client/lsd.lua
+++ b/client/lsd.lua
@@ -13,8 +13,8 @@ local function createLabKit(coord, head)
action = function()
local dict = "scr_ie_svm_technical2"
if not ps.hasItems({
- {name = 'lysergic_acid', amount = 1},
- {name = 'diethylamide', amount = 1}
+ lysergic_acid = 1,
+ diethylamide = 1
}) then
ps.notify(ps.lang('lsd.need'), 'error')
return
@@ -90,7 +90,7 @@ local function createLabKit(coord, head)
canInteract = function() if dirtylsd then return true end end
}
}
- ps.targetEntity(labkit, options)
+ ps.entityTarget(labkit, options)
end
for k, v in pairs (GlobalState.MDDrugsLocs.lysergicacid) do
@@ -131,7 +131,7 @@ for k, v in pairs (GlobalState.MDDrugsLocs.diethylamide) do
})
end
-for k,v in pairs (GlobalState.MDDrugsLocs.gettabs) do
+for k, v in pairs (GlobalState.MDDrugsLocs.gettabs) do
ps.boxTarget('gettabs'..k, v.loc, {length = v.l, width = v.w, height = 1.0, rotation = v.rot}, {
{
label = ps.lang('targets.lsd.buyt'),
@@ -147,16 +147,19 @@ for k,v in pairs (GlobalState.MDDrugsLocs.gettabs) do
}
})
end
-
-for k, v in pairs (GlobalState.MDDrugsLocs.buykit) do
- ps.boxTarget('buykit'..k, v.loc, {length = v.l, width = v.w, height = 1.0, rotation = v.rot}, {
+local seller = {}
+for k, v in pairs (GlobalState.MDDrugsLocs.buyLSDkit) do
+ ps.requestModel(v.ped, 1000)
+ seller[k] = CreatePed(4, v.ped, v.loc.x, v.loc.y, v.loc.z, v.loc.w, false, false)
+ Freeze(seller[k], true, v.loc.w)
+ ps.entityTarget(seller[k], {
{
label = ps.lang('targets.lsd.buy'),
icon = 'fa-solid fa-hand-holding-dollar',
action = function()
if ps.hasItem('lsdlabkit') then ps.notify(ps.lang('lsd.havlabkit'), 'error') return end
if not ps.progressbar(ps.lang('lsd.buykit'), 4000, 'uncuff') then return end
- TriggerEvent("md-drugs:client:buylabkit")
+ TriggerServerEvent('md-drugs:server:getlabkit', k)
end,
canInteract = function()
if not handleGang(v.gang) then return false end
@@ -167,7 +170,7 @@ for k, v in pairs (GlobalState.MDDrugsLocs.buykit) do
end
ps.registerCallback("md-drugs:client:setlsdlabkit", function()
- if tableout then
+ if tableout then
ps.notify(ps.lang('lsd.tableout'), 'error')
return false
else
diff --git a/client/mescaline.lua b/client/mescaline.lua
index 5c9c6e2..7a3992d 100644
--- a/client/mescaline.lua
+++ b/client/mescaline.lua
@@ -1,16 +1,27 @@
-
-RegisterNetEvent("md-drugs:client:drymescaline", function()
- if not ItemCheck('cactusbulb') then return end
- if not progressbar(Lang.mescaline.dry, 4000, 'uncuff') then return end
- TriggerServerEvent("md-drugs:server:drymescaline")
-end)
+for k, v in pairs (GlobalState.MDDrugsLocs.DryOutMescaline) do
+ ps.boxTarget('dryoutMesc'..k, v.loc, {length = v.l, width = v.w, height = 1.0, rotation = v.rot}, {
+ {
+ label = ps.lang('mescaline.dry'),
+ icon = 'fa-solid fa-temperature-high',
+ action = function()
+ if not ps.hasItem('cactusbulb') then ps.notify(ps.lang('mescaline.needbulb'), 'error') return end
+ if not ps.progressbar(ps.lang('mescaline.dry'), 4000, 'drymescaline') then return end
+ TriggerServerEvent("md-drugs:server:drymescaline", k)
+ end,
+ canInteract = function()
+ if not handleGang(v.gang) then return false end
+ return true
+ end
+ }
+ })
+end
RegisterNetEvent("md-drugs:client:takemescaline", function()
local chance, chance2 = math.random(1,100), math.random(1,100)
local weapon = ''
if chance2 == 100 then weapon = 'weapon_rpg' else weapon = 'weapon_flaregun' end
- if not progressbar(Lang.mescaline.eat, 4000, 'uncuff') then return end
+ if not ps.progressbar(ps.lang('mescaline.eat'), 4000, 'uncuff') then return end
if chance <= Config.Badtrip then
AlienEffect()
local clone = ClonePed(PlayerPedId(), false, false, true)
diff --git a/client/meth.lua b/client/meth.lua
index c43f2ef..c20d164 100644
--- a/client/meth.lua
+++ b/client/meth.lua
@@ -1,78 +1,223 @@
-local amonia = nil
-local tray = nil
-local heated = nil
-local active = nil
+local amonia = false
+local tray = false
+local heated = false
+local active = false
+local trays = nil
+---- start animation shit
+local function loadParticle(dict)
+ if not HasNamedPtfxAssetLoaded(dict) then
+ RequestNamedPtfxAsset(dict)
+ end
+ while not HasNamedPtfxAssetLoaded(dict) do
+ Wait(0)
+ end
+ SetPtfxAssetNextCall(dict)
+end
-local function startcook()
- if not ItemCheck('empty_weed_bag') then return end
- if not ItemCheck('acetone') then return end
- if not ItemCheck('ephedrine') then return end
- if amonia == nil then
+local function MethCooking(coords, offset, rotation)
+ local animDict, animName = "anim@amb@business@meth@meth_monitoring_cooking@cooking@", "chemical_pour_short_cooker"
+ ps.requestAnim(animDict, 500)
+ SetEntityCoords(PlayerPedId(), coords)
+ local targetPosition = GetEntityCoords(PlayerPedId())
+ local animDuration = GetAnimDuration(animDict, animName) * 800
+ FreezeEntityPosition(PlayerPedId(), true)
+ local scenePos, sceneRot = vector3(coords.x + offset.x, coords.y + offset.y, coords.z + offset.z), rotation
+ local netScene = NetworkCreateSynchronisedScene(scenePos, sceneRot, 2, false, false, 1065353216, 0, 1.3)
+ NetworkAddPedToSynchronisedScene(PlayerPedId(), netScene, animDict, animName, 1.5, -4.0, 1, 16, 1148846080, 0)
+ local sacid = CreateObjectNoOffset("bkr_prop_meth_sacid", targetPosition, 1, 1, 0)
+ NetworkAddEntityToSynchronisedScene(sacid, netScene, animDict, "chemical_pour_short_sacid", 4.0, -8.0, 1)
+ local ammonia = CreateObjectNoOffset("bkr_prop_meth_ammonia", targetPosition, 1, 1, 0)
+ NetworkAddEntityToSynchronisedScene(ammonia, netScene, animDict, "chemical_pour_short_ammonia", 4.0, -8.0, 1)
+ NetworkStartSynchronisedScene(netScene)
+ Wait(animDuration)
+ NetworkStopSynchronisedScene(netScene)
+ DeleteObject(sacid) DeleteObject(ammonia)
+ FreezeEntityPosition(PlayerPedId(), false)
+ ps.requestModel('hei_prop_heist_thermite', 2000)
+ loadParticle('scr_ornate_heist')
+ local thermite = CreateObject('hei_prop_heist_thermite', vector3(1005.76, -3201.3, -39.25), true, false, false)
+ FreezeEntityPosition(thermite, true)
+ SetEntityRotation(thermite, 190.0, 90.0, 140.0, 3, true )
+ Wait(1000)
+ local therm = StartParticleFxLoopedOnEntity('scr_heist_ornate_thermal_burn', thermite, 0.0, 1.4, 0.0, 0.0, 0.0, 0.0, 1.5, false, false, false)
+ Wait(math.random(10000, 20000))
+ StopParticleFxLooped(therm, true)
+end
+
+
+local function SmashMeth(coords, offset, rotation)
+ local ver = ""
+ local animDict, animName = "anim@amb@business@meth@meth_smash_weight_check@", "break_weigh_"..ver.."char02"
+ ps.requestAnim(animDict, 500)
+ local ped = PlayerPedId()
+ local targetPosition = coords
+ SetEntityCoords(ped, targetPosition)
+ Wait(1)
+ local animDuration = GetAnimDuration(animDict, animName) * 800
+ FreezeEntityPosition(ped, true)
+ local scenePos, sceneRot = vector3(coords.x + offset.x, coords.y + offset.y, coords.z + offset.z), rotation
+ local netScene = NetworkCreateSynchronisedScene(scenePos, sceneRot, 2, false, false, 1065353216, 0, 1.3)
+ NetworkAddPedToSynchronisedScene(ped, netScene, animDict, animName, 1.5, -4.0, 1, 16, 1148846080, 0)
+ local objects, sceneObjects = {}, {
+ { hash = "w_me_hammer", animName = "break_weigh_" .. ver .. "hammer"},
+ { hash = "bkr_Prop_Meth_SmashedTray_01_frag_", animName = "break_weigh_"..ver.."tray01"},
+ { hash = "bkr_Prop_Meth_Tray_02a", animName = "break_weigh_"..ver.."tray01^1"},
+ { hash = "bkr_Prop_Meth_Tray_02a", animName = "break_weigh_"..ver.."tray01^2"},
+ { hash = "bkr_Prop_Meth_SmashedTray_01_frag_", animName = "break_weigh_"..ver.."tray01^3"},
+ }
+ for i=1, #sceneObjects, 1 do
+ local obj = CreateObjectNoOffset(sceneObjects[i].hash, targetPosition, true, true, true)
+ NetworkAddEntityToSynchronisedScene(obj, netScene, animDict, sceneObjects[i].animName, 4.0, -8.0, 1)
+ objects[#objects+1] = obj
+ end
+ NetworkStartSynchronisedScene(netScene)
+ Wait(animDuration)
+ NetworkStopSynchronisedScene(netScene)
+ for i=1, #objects, 1 do
+ DeleteObject(objects[i])
+ end
+ RemoveAnimDict(animDict)
+ FreezeEntityPosition(ped, false)
+end
+
+local function BagMeth(coords, offset, rotation)
+ local ver = ""
+ local animDict, animName = "anim@amb@business@meth@meth_smash_weight_check@", "break_weigh_"..ver.."char01"
+ ps.requestAnim(animDict, 500)
+ local animDuration = GetAnimDuration(animDict, animName) * 1000
+ local ped = PlayerPedId()
+ SetEntityCoords(ped, coords)
+ local scenePos, sceneRot = vector3(coords.x + offset.x, coords.y + offset.y, coords.z + offset.z), rotation
+ local scenes = {
+ {
+ { hash = "bkr_prop_meth_bigbag_04a", animName = "break_weigh_"..ver.."box01"},
+ { hash = "bkr_prop_meth_bigbag_03a", animName = "break_weigh_"..ver.."box01^1"},
+ { hash = "bkr_prop_meth_openbag_02", animName = "break_weigh_"..ver.."methbag01"}
+ },
+ {
+ { hash = "bkr_prop_meth_openbag_02", animName = "break_weigh_"..ver.."methbag01^1"},
+ { hash = "bkr_prop_meth_openbag_02", animName = "break_weigh_"..ver.."methbag01^2"},
+ { hash = "bkr_prop_meth_openbag_02", animName = "break_weigh_"..ver.."methbag01^3"}
+ },
+ {
+ { hash = "bkr_prop_meth_openbag_02", animName = "break_weigh_"..ver.."methbag01^4"},
+ { hash = "bkr_prop_meth_openbag_02", animName = "break_weigh_"..ver.."methbag01^5"},
+ { hash = "bkr_prop_meth_openbag_02", animName = "break_weigh_"..ver.."methbag01^6"}
+ },
+ {
+ { hash = "bkr_prop_meth_scoop_01a", animName = "break_weigh_"..ver.."scoop"},
+ { hash = "bkr_prop_coke_scale_01", animName = "break_weigh_"..ver.."scale"},
+ { hash = "bkr_prop_fakeid_penclipboard", animName = "break_weigh_"..ver.."pen"}
+ },
+ {
+ { hash = "bkr_prop_fakeid_clipboard_01a", animName = "break_weigh_"..ver.."clipboard"},
+ { hash = "bkr_Prop_Meth_Tray_02a", animName = "break_weigh_"..ver.."tray01^5"}
+ }
+}
+ local scenesList, entitiesList = {}, {}
+ for i=1, #scenes, 1 do
+ local scene = NetworkCreateSynchronisedScene(scenePos, sceneRot, 2, false, false, 1065353216, 0, 1.3)
+ NetworkAddPedToSynchronisedScene(ped, scene, animDict, animName, 1.5, -4.0, 1, 16, 1148846080, 0)
+ for j=1, #scenes[i], 1 do
+ local s = scenes[i][j]
+ RequestModel(s.hash)
+ while not HasModelLoaded(s.hash) do
+ Wait(0)
+ end
+ local obj = CreateObjectNoOffset(s.hash, coords, true, true, true)
+ SetModelAsNoLongerNeeded(s.hash)
+ entitiesList[#entitiesList+1] = obj
+ NetworkAddEntityToSynchronisedScene(obj, scene, animDict, s.animName, 4.0, -8.0, 1)
+ end
+ scenesList[#scenesList+1] = scene
+ end
+ DisableCamCollisionForEntity(ped)
+ FreezeEntityPosition(ped, true)
+ for i=1, #scenesList, 1 do
+ NetworkStartSynchronisedScene(scenesList[i])
+ end
+
+ Wait(animDuration-11000)
+ for i=1, #scenesList, 1 do
+ NetworkStopSynchronisedScene(scenesList[i])
+ end
+ for i=1, #entitiesList, 1 do
+ DeleteEntity(entitiesList[i])
+ end
+ RemoveAnimDict(animDict)
+ FreezeEntityPosition(ped, false)
+end
+---------------------- end animation shit
+---
+
+local function startcook(num, coords, offset, rotation)
+ if not amonia then
+ local adding = ps.callback('md-drugs:server:startcook', num)
+ if not adding then return end
active = true
- TriggerServerEvent("md-drugs:server:startcook")
- MethCooking()
+ amonia = true
+ MethCooking(coords, offset, rotation)
amonia = true
else
- Notify(Lang.meth.inside, "error")
+ ps.notify(ps.lang('meth.inside'), "error")
end
end
-local function dials()
+
+local function dials(coords)
if amonia == true then
- if not minigame() then
- AddExplosion(1005.773, -3200.402, -38.524, 49, 10, true, false, true)
- ClearPedTasks(PlayerPedId())
- amonia = nil
- active = nil
+ if not ps.minigame('ps-circle', {amount = 2, speed = 8}) then
+ AddExplosion(coords.x, coords.y,coords.z, 49, 10, true, false, true)
+ amonia = false
+ active = false
return end
- Notify(Lang.meth.increaseheat, "success")
- ClearPedTasks(PlayerPedId())
- heated = true
- else
+ ps.notify(ps.lang('meth.increaseheat'), "success")
+ heated = true
end
end
-local function smash()
-if tray then
- tray = false
- DeleteObject(trays)
- local bucket = CreateObject("bkr_prop_meth_bigbag_03a", vector3(1012.85, -3194.29, -39.2), true, true, true)
- Freeze(bucket, true, 90.0)
- SmashMeth()
- Wait(100)
- AddSingleModel(bucket,
- {name = 'bucket',icon = "fa-solid fa-sack-xmark",label = Lang.targets.meth.bag, canInteract = function() if active == nil then return false end end,
- action = function()
- active = nil
- DeleteObject(bucket)
- amonia = nil
- heated = nil
- tray = nil
- BagMeth()
- TriggerServerEvent('md-drugs:server:getmeth')
- end,}, bucket)
-end
+local function smash(coords, offset, rotation, buckets, k)
+ if tray then
+ tray = false
+ DeleteObject(trays)
+ local bucket = CreateObject("bkr_prop_meth_bigbag_03a", buckets.x, buckets.y, buckets.z, true, true, true)
+ Freeze(bucket, true, buckets.w)
+ ps.entityTarget(bucket, {
+ {
+ name = 'bucket',
+ icon = "fa-solid fa-sack-xmark",
+ label = ps.lang('targets.meth.bag'),
+ canInteract = function()
+ if active == false then return false end
+ end,
+ action = function()
+ DeleteObject(bucket)
+ active = false
+ amonia = false
+ heated = false
+ tray = false
+ BagMeth(GlobalState.MDDrugsLocs.BagMeth[k].loc, GlobalState.MDDrugsLocs.BagMeth[k].offset, GlobalState.MDDrugsLocs.BagMeth[k].rotation)
+ TriggerServerEvent('md-drugs:server:getmeth', k)
+ end,
+ }
+ })
+ SmashMeth(coords, offset, rotation)
+ Wait(100)
+ end
end
local function trayscarry()
if amonia then
local pos = GetEntityCoords(PlayerPedId(), true)
- RequestAnimDict('anim@heists@box_carry@')
- while (not HasAnimDictLoaded('anim@heists@box_carry@')) do
- Wait(7)
- end
- TaskPlayAnim(PlayerPedId(), 'anim@heists@box_carry@', 'idle', 5.0, -1, -1, 50, 0, false, false,
- false)
- RequestModel("bkr_prop_meth_tray_02a")
- while not HasModelLoaded("bkr_prop_meth_tray_02a") do
- Wait(0)
- end
- trays = CreateObject("bkr_prop_meth_tray_02a", pos.x, pos.y, pos.z, true, true, true)
- AttachEntityToEntity(trays, PlayerPedId(), GetPedBoneIndex(PlayerPedId(), 28422), 0.01, -0.2,
- -0.2, 20.0, 0.0, 0.0, true, true, false, true, 1, true)
+ ps.requestAnim('anim@heists@box_carry@')
+ TaskPlayAnim(PlayerPedId(), 'anim@heists@box_carry@', 'idle', 5.0, -1, -1, 50, 0, false, false, false)
+ ps.requestModel('bkr_prop_meth_tray_02a')
+ trays = CreateObject("bkr_prop_meth_tray_02a", pos.x, pos.y, pos.z, true, true, true)
+ AttachEntityToEntity(trays, PlayerPedId(), GetPedBoneIndex(PlayerPedId(), 28422), 0.01, -0.2,-0.2, 20.0, 0.0, 0.0, true, true, false, true, 1, true)
tray = true
end
end
+
CreateThread(function()
BikerMethLab = exports['bob74_ipl']:GetBikerMethLabObject()
BikerMethLab.Style.Set(BikerMethLab.Style.upgrade)
@@ -81,46 +226,96 @@ CreateThread(function()
RefreshInterior(BikerMethLab.interiorId)
end)
-CreateThread(function()
- local config = ps.callback('md-drugs:server:getLocs', false)
- AddBoxZoneSingle("methTeleOut",config.singleSpot.MethTeleIn, {name = 'teleout', icon = "fa-solid fa-door-open", label = Lang.targets.meth.enter, action = function() SetEntityCoords(PlayerPedId(), config.singleSpot.MethTeleOut) end} )
- AddBoxZoneSingle("methtelein",config.singleSpot.MethTeleOut, {name = 'teleout', icon = "fa-solid fa-door-closed", label = Lang.targets.meth.exit, action = function() SetEntityCoords(PlayerPedId(), config.singleSpot.MethTeleIn) end} )
- local options = {
- { name = 'methcook', icon = "fa-solid fa-temperature-high", label = Lang.targets.meth.cook, distance = 2.5, action = function() startcook() end,
- canInteract = function()
- if amonia == nil and active == nil then
+for k, v in pairs (GlobalState.MDDrugsLocs.CookMeth) do
+ ps.boxTarget('cookMeth'..k, v.loc, {length = v.l, width = v.w, rotation = v.rot, height = 1.0},{
+ {
+ label = 'Cook Meth',
+ icon = 'fa-solid fa-temperature-high',
+ action = function()
+ startcook(k, v.loc, v.offset or vec3(0,0,0), v.rotation or vector3(0,0,180.0))
+ end,
+ canInteract = function()
+ if not amonia and not active then
return true
end
- end,
+ end,
},
- { name = 'grabtray', icon = "fas fa-sign-in-alt", label = Lang.targets.meth.tray, distance = 2.5, action = function() trayscarry() end,
- canInteract = function()
- if heated and amonia and tray == nil then return true end
- end,
+ {
+ icon = "fas fa-sign-in-alt",
+ label = ps.lang('targets.meth.tray'),
+ action = function() trayscarry() end,
+ canInteract = function()
+ if heated and amonia and not tray then
+ return true
+ end
+ end,
},
- }
- AddBoxZoneMultiOptions("cookmeth",vector3(1005.72, -3200.33, -38.52), options )
- AddBoxZoneSingle('boxmeth', vector3(1012.15, -3194.04, -39.20), {name = 'boxmeth',icon = "fa-solid fa-weight-scale",label = Lang.targets.meth.box,action = function() smash()end,
+ })
+end
+
+for k, v in pairs (GlobalState.MDDrugsLocs.MethDials) do
+ ps.boxTarget('adjustMethDials'..k, v.loc, {length = v.l, width = v.w, rotation = v.rot, height = 1.0},{
+ {
+ name = 'adjustdials',
+ icon = "fa-solid fa-temperature-three-quarters",
+ label = ps.lang('targets.meth.adjust'),
+ action = function()
+ dials(GlobalState.MDDrugsLocs.CookMeth[k].loc)
+ end,
canInteract = function()
- if tray then return true end
- end})
- AddBoxZoneSingle('adjustdials',vector3(1007.89, -3201.17, -38.99),{ name = 'adjustdials', icon = "fa-solid fa-temperature-three-quarters", label = Lang.targets.meth.adjust,
- distance = 5, action = function() dials() end,
+ if amonia and heated == false then return true end
+ end
+ }
+ })
+end
+
+for k, v in pairs (GlobalState.MDDrugsLocs.MethSmash) do
+ ps.boxTarget('smashMeth'..k, v.loc, {length = v.l, width = v.w, rotation = v.rot, height = 1.0},{
+ {
+ name = 'smash',
+ icon = "fa-solid fa-weight-scale",
+ label = ps.lang('targets.meth.smash'),
+ action = function()
+ smash(v.loc, v.offset, v.rotation, v.bucket,k)
+ end,
canInteract = function()
- if amonia and heated == nil then return true end end
- })
- if Config.MethHeist == false then
- AddBoxZoneMulti('methep', config.MethEph, {icon = "fa-solid fa-bucket", label = Lang.targets.meth.eph, event = 'md-drugs:client:stealeph'})
- AddBoxZoneMulti('methace', config.Methace, {icon = "fa-solid fa-bucket", label = Lang.targets.meth.ace, event = 'md-drugs:client:stealace'})
+ if heated and amonia and tray then return true end
+ end
+ }
+ })
+end
+
+RegisterCommand('offset', function()
+ local pos = GetEntityCoords(PlayerPedId())
+ Wait(4000)
+ local offset = GetEntityCoords(PlayerPedId()) - pos
+ print("Offset: ", offset)
+end)
+
+if not Config.MethHeist then
+ for k, v in pairs (GlobalState.MDDrugsLocs.MethEph) do
+ ps.boxTarget('stealMethEph'..k, v.loc, {length = v.l, width = v.w, rotation = v.rot, height = 1.0},{
+ {
+ label = 'Steal Ephedrine',
+ icon = 'fa-solid fa-bucket',
+ action = function()
+ if not ps.progressbar('Stealing Ephedrine', 4000, 'uncuff') then return end
+ TriggerServerEvent("md-drugs:server:geteph", k)
+ end,
+ }
+ })
end
-end)
-RegisterNetEvent("md-drugs:client:stealeph", function(data)
- if not progressbar('Stealing Ephedrine', 4000, 'uncuff') then return end
- TriggerServerEvent("md-drugs:server:geteph", data.data)
-end)
-
-RegisterNetEvent("md-drugs:client:stealace", function(data)
- if not progressbar('Stealing Acetone', 4000, 'uncuff') then return end
- TriggerServerEvent("md-drugs:server:getace", data.data)
-end)
\ No newline at end of file
+ for k, v in pairs (GlobalState.MDDrugsLocs.Methace) do
+ ps.boxTarget('stealMethAce'..k, v.loc, {length = v.l, width = v.w, rotation = v.rot, height = 1.0},{
+ {
+ label = 'Steal Acetone',
+ icon = 'fa-solid fa-bucket',
+ action = function()
+ if not ps.progressbar('Stealing Acetone', 4000, 'uncuff') then return end
+ TriggerServerEvent("md-drugs:server:getace", k)
+ end,
+ }
+ })
+ end
+end
\ No newline at end of file
diff --git a/client/oxyruns.lua b/client/oxyruns.lua
index c41161e..1661fa8 100644
--- a/client/oxyruns.lua
+++ b/client/oxyruns.lua
@@ -9,7 +9,7 @@ RegisterNetEvent("md-drugs:client:GetOxyCar", function()
local oxycar = CreateVehicle("burrito3",loc.x, loc.y,loc.z, loc.w, true, false)
exports[Config.Fuel]:SetFuel(oxycar, 100.0)
TriggerEvent("vehiclekeys:client:SetOwner", GetVehicleNumberPlateText(oxycar))
- Notify(Lang.oxy.truck, 'success')
+ ps.notify(Lang.oxy.truck, 'success')
TriggerEvent("md-drugs:client:getoxylocationroute")
AddSingleModel(oxycar, { event = "md-drugs:client:getfromtrunk", icon = "fa-solid fa-box", label = Lang.targets.oxy.pack}, nil )
end)
@@ -30,14 +30,14 @@ RegisterNetEvent("md-drugs:client:getoxylocationroute", function()
AddSingleModel(oxybuyer, { type = "client", label = Lang.targets.oxy.talk, icon = "fa-solid fa-dollar-sign",
action = function()
if carryPackage then
- if not progressbar(Lang.oxy.hand, 4000, 'uncuff') then return end
+ if not ps.progressbar(Lang.oxy.hand, 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:giveoxybox")
DeleteEntity(oxybuyer)
DetachEntity(carryPackage, true, true)
DeleteObject(carryPackage)
carryPackage = nil
else
- Notify(Lang.oxy.empty, "error")
+ ps.notify(Lang.oxy.empty, "error")
end
end}, oxybuyer)
end
@@ -46,7 +46,7 @@ end)
RegisterNetEvent("md-drugs:client:getfromtrunk", function()
if carryPackage then
- Notify(Lang.oxy.cantcarry, "error")
+ ps.notify(Lang.oxy.cantcarry, "error")
else
local pos = GetEntityCoords(PlayerPedId(), true)
lib.requestAnimDict('anim@heists@box_carry@')
@@ -61,14 +61,14 @@ end)
RegisterNetEvent("md-drugs:client:giveoxybox", function(data)
if carryPackage then
- if not progressbar(Lang.oxy.hand, 4000, 'uncuff') then return end
+ if not ps.progressbar(Lang.oxy.hand, 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:giveoxybox")
DeleteEntity(data.ped)
DetachEntity(carryPackage, true, true)
DeleteObject(carryPackage)
carryPackage = nil
else
- Notify(Lang.oxy.empty, "error")
+ ps.notify(Lang.oxy.empty, "error")
end
end)
diff --git a/client/pedspawns.lua b/client/pedspawns.lua
index f1e2375..83498d2 100644
--- a/client/pedspawns.lua
+++ b/client/pedspawns.lua
@@ -22,6 +22,6 @@ CreateThread(function()
AddSingleModel(heroinkitdealer, { label = Lang.targets.heroin.kit, icon = "fa-solid fa-money-bill", event = "md-drugs:client:buyheroinlabkit", distance = 2.0}, nil )
AddSingleModel(SyrupLocation, { type = "client", label = Lang.targets.lean.git, icon = "fa-solid fa-circle-info", event = "md-drugs:client:getsyruplocationtobuy", distance = 2.0}, nil )
AddSingleModel(WeedGuy, {label = "Weed Shop",icon = "fa-solid fa-cannabis", action = function() makeMenu('WeedShop') lib.showContext('WeedShop')end}, nil)
- AddSingleModel(methdealer,{label = Lang.targets.meth.mission, icon = "fa-solid fa-circle-info", action = function() Notify(Lang.meth.mission, "success") SpawnMethCarPedChase() end,},nil )
+ AddSingleModel(methdealer,{label = Lang.targets.meth.mission, icon = "fa-solid fa-circle-info", action = function() ps.notify(Lang.meth.mission, "success") SpawnMethCarPedChase() end,},nil )
AddSingleModel(travellingmerchant, {label = Lang.targets.travel.travel, icon = "fa-solid fa-cart-shopping", action = function() makeMenu('travellingMerchant') lib.showContext('travellingMerchant') end}, nil)
end)
\ No newline at end of file
diff --git a/client/pharma.lua b/client/pharma.lua
index 59aa46f..7650c5e 100644
--- a/client/pharma.lua
+++ b/client/pharma.lua
@@ -1,20 +1,20 @@
ps.registerCallback("md-drugs:client:prescriptionpad", function(data, op)
- if getJobType() ~= 'ems' then return end
+ if ps.getJobType() ~= 'ems' then return end
local input = lib.inputDialog('Who To Give A Prescription To?',{
{type = 'select', label = 'Player Name', options = data},
{type = 'select', label = 'Prescription', options = op}})
if not input[1] then return end
- if not progressbar(Lang.Pharma.write, 4000, 'notepad') then return end
+ if not ps.progressbar(Lang.Pharma.write, 4000, 'notepad') then return end
return {who = input[1], what = input[2]}
end)
RegisterNetEvent("md-drugs:client:fillprescription", function(data)
- if not progressbar(Lang.Pharma.fill, 4000, 'uncuff') then return end
+ if not ps.progressbar(Lang.Pharma.fill, 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:fillprescription", data.data)
end)
ps.registerCallback("md-drugs:client:unbottle", function()
- if not progressbar(Lang.Pharma.open, 4000, 'uncuff') then return end
+ if not ps.progressbar(Lang.Pharma.open, 4000, 'uncuff') then return end
return true
end)
diff --git a/client/shrooms.lua b/client/shrooms.lua
index d2dedb0..323798d 100644
--- a/client/shrooms.lua
+++ b/client/shrooms.lua
@@ -1,6 +1,6 @@
RegisterNetEvent('md-drugs:client:takeshrooms', function()
- if not progressbar(Lang.Shrooms.eat, 500, 'eat') then return end
+ if not ps.progressbar(Lang.Shrooms.eat, 500, 'eat') then return end
TriggerEvent("evidence:client:SetStatus", "widepupils", 300)
EcstasyEffect()
end)
diff --git a/client/weed.lua b/client/weed.lua
index 59fd5f2..0ba52cf 100644
--- a/client/weed.lua
+++ b/client/weed.lua
@@ -19,15 +19,15 @@ CreateThread(function()
action = function()
if not ItemCheck('wetcannabis') then return end
if drying then
- Notify(Lang.Weed.busy, "error")
+ ps.notify(Lang.Weed.busy, "error")
else
local loc = GetEntityCoords(PlayerPedId())
local weedplant = CreateObject("bkr_prop_weed_drying_01a", loc.x, loc.y+.2, loc.z, true, false)
drying = true
FreezeEntityPosition(weedplant, true)
- Notify(Lang.Weed.wait, "success")
+ ps.notify(Lang.Weed.wait, "success")
Wait(math.random(1000,5000))
- Notify(Lang.Weed.take, "success")
+ ps.notify(Lang.Weed.take, "success")
AddSingleModel(weedplant, {
icon = "fa-solid fa-cannabis",
label = Lang.targets.weed.dpick,
@@ -65,11 +65,11 @@ AddBoxZoneSingle('makeoil',config.singleSpot.MakeOil, {
local loc = GetEntityCoords(PlayerPedId())
AddExplosion(loc.x, loc.y, loc.z, 49, 10, true, false, true)
exploded = true
- Notify(Lang.Weed.stovehot, "error")
+ ps.notify(Lang.Weed.stovehot, "error")
Wait(1000 * 30)
exploded = false
return end
- if not progressbar(Lang.Weed.shat, 4000, 'uncuff') then return end
+ if not ps.progressbar(Lang.Weed.shat, 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:makeoil")
end,
canInteract = function()
@@ -97,7 +97,7 @@ CreateThread(function()
end)
RegisterNetEvent("md-drugs:client:dodabs", function()
- if not progressbar('Doing Dabs', 4000, 'bong2') then AlienEffect() return end
+ if not ps.progressbar('Doing Dabs', 4000, 'bong2') then AlienEffect() return end
AlienEffect()
end)
@@ -128,14 +128,14 @@ local function createBluntOptions(contextId, contextTitle, eventLabelPrefix, tab
end
CreateThread(function()
-createBluntOptions('ButterCraft', "Edible Cooking", 'Cooking A ', 'edibles')
-createBluntOptions('mddrugsblunts', "Roll Blunts", 'Rolling A ', 'blunts')
-createBluntOptions('mddrugsbluntwraps', "Dipping Syrup", 'Dipping Syrup To Make ', 'bluntwrap')
+--createBluntOptions('ButterCraft', "Edible Cooking", 'Cooking A ', 'edibles')
+--createBluntOptions('mddrugsblunts', "Roll Blunts", 'Rolling A ', 'blunts')
+--createBluntOptions('mddrugsbluntwraps', "Dipping Syrup", 'Dipping Syrup To Make ', 'bluntwrap')
end)
RegisterNetEvent("md-drugs:client:MakeWeedItems", function(data)
if not minigame() then return end
- if not progressbar('Making ' .. data.item, 4000, 'uncuff') then return end
+ if not ps.progressbar('Making ' .. data.item, 4000, 'uncuff') then return end
TriggerServerEvent('md-drugs:server:MakeWeedItems', data)
end)
diff --git a/client/wholesale.lua b/client/wholesale.lua
index ebfbbc7..f97d129 100644
--- a/client/wholesale.lua
+++ b/client/wholesale.lua
@@ -3,7 +3,7 @@ local miss = false
RegisterNetEvent("md-drugs:client:GetLocation", function(drug)
if not GetCops(Config.PoliceCount) then return end
if miss then
- Notify(Lang.Wholesale.al, 'error')
+ ps.notify(Lang.Wholesale.al, 'error')
else
local loc = drug.location
local timer = 0
@@ -20,10 +20,10 @@ RegisterNetEvent("md-drugs:client:GetLocation", function(drug)
action = function()
local luck = math.random(1,100)
if luck <= Config.SuccessfulChance then
- if not progressbar("Wholesaling Drugs", 4000, 'uncuff') then return end
+ if not ps.progressbar("Wholesaling Drugs", 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:SuccessSale", drug)
else
- progressbar("YOU FUCKED NOW", 4000, 'uncuff')
+ ps.progressbar("YOU FUCKED NOW", 4000, 'uncuff')
SetUpPeds()
end
Wait(3000)
@@ -39,7 +39,7 @@ RegisterNetEvent("md-drugs:client:GetLocation", function(drug)
if timer <= Config.WholesaleTimeout or #(GetEntityCoords(PlayerPedId()) - vector3(loc.x, loc.y, loc.z) ) < 4.0 then
timer = 0
else
- Notify('The Buyer Waited To Long', 'error')
+ ps.notify('The Buyer Waited To Long', 'error')
DeleteEntity(drugdealer)
end
end
diff --git a/client/xtc.lua b/client/xtc.lua
index 9699339..f404d7b 100644
--- a/client/xtc.lua
+++ b/client/xtc.lua
@@ -2,11 +2,11 @@ local xtcpress = false
RegisterNetEvent("md-drugs:client:setpress", function(type)
if xtcpress then
- Notify(Lang.xtc.out, 'error')
+ ps.notify(Lang.xtc.out, 'error')
else
local coords, head = StartRay2()
xtcpress = true
- progressbar('Setting Press On The Ground', 4000, 'uncuff')
+ ps.progressbar('Setting Press On The Ground', 4000, 'uncuff')
local press = CreateObject("bkr_prop_coke_press_01aa", coords.x, coords.y, coords.z, true, false, false)
PlaceObjectOnGroundProperly(press)
Freeze(press, true, head)
@@ -24,12 +24,12 @@ end)
ps.registerCallback('md-drugs:client:setpress', function(type)
if xtcpress then
- Notify(Lang.xtc.out, 'error')
+ ps.notify(Lang.xtc.out, 'error')
return false
else
local coords, head = StartRay2()
xtcpress = true
- progressbar('Setting Press On The Ground', 4000, 'uncuff')
+ ps.progressbar('Setting Press On The Ground', 4000, 'uncuff')
local press = CreateObject("bkr_prop_coke_press_01aa", coords.x, coords.y, coords.z, true, false, false)
PlaceObjectOnGroundProperly(press)
Freeze(press, true, head)
@@ -62,34 +62,34 @@ RegisterNetEvent("md-drugs:client:XTCMenu", function(type)
end)
RegisterNetEvent("md-drugs:client:GetPressBack", function(type, press)
- if not progressbar(Lang.xtc.pickup, 5000, 'uncuff') then return end
+ if not ps.progressbar(Lang.xtc.pickup, 5000, 'uncuff') then return end
DeleteObject(press)
xtcpress = false
TriggerServerEvent("md-drugs:server:getpressback", type)
end)
RegisterNetEvent("md-drugs:client:stealisosafrole", function(data)
- if not minigame() then Notify(Lang.xtc.fail, "error") return end
- if not progressbar(Lang.xtc.iso, 4000, 'uncuff') then return end
+ if not minigame() then ps.notify(Lang.xtc.fail, "error") return end
+ if not ps.progressbar(Lang.xtc.iso, 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:stealisosafrole",data.data)
end)
RegisterNetEvent("md-drugs:client:stealmdp2p", function(data)
- if not minigame() then Notify(Lang.xtc.fail, "error") return end
- if not progressbar(Lang.xtc.mdp2p, 4000, 'uncuff') then return end
+ if not minigame() then ps.notify(Lang.xtc.fail, "error") return end
+ if not ps.progressbar(Lang.xtc.mdp2p, 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:stealmdp2p", data.data)
end)
RegisterNetEvent("md-drugs:client:makingrawxtc", function(data)
if not ItemCheck('isosafrole') then return end
if not ItemCheck('mdp2p') then return end
- if not progressbar(Lang.xtc.raw, 4000, 'uncuff') then return end
+ if not ps.progressbar(Lang.xtc.raw, 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:makingrawxtc",data.data)
end)
RegisterNetEvent("md-drugs:client:MakeXTC", function(data)
if not ItemCheck('raw_xtc') then return end
- if not progressbar(Lang.xtc.pressing, 4000, 'uncuff') then return end
+ if not ps.progressbar(Lang.xtc.pressing, 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:makextc",data)
end)
@@ -98,29 +98,29 @@ RegisterNetEvent("md-drugs:client:stampwhite", function(data)
options = {
{ icon = GetImage('white_xtc'), title = 'White XTC',
onSelect = function()
- if not minigame() then Notify(Lang.xtc.fail, "error") return end
- if not progressbar(string.format(Lang.xtc.stamp, 'White'), 4000, 'uncuff') then return end
+ if not minigame() then ps.notify(Lang.xtc.fail, "error") return end
+ if not ps.progressbar(string.format(Lang.xtc.stamp, 'White'), 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:stampwhite",data.data)
end
},
{ icon = GetImage('red_xtc'), title = 'Red XTC',
onSelect = function()
- if not minigame() then Notify(Lang.xtc.fail, "error") return end
- if not progressbar(string.format(Lang.xtc.stamp, 'Red'), 4000, 'uncuff') then return end
+ if not minigame() then ps.notify(Lang.xtc.fail, "error") return end
+ if not ps.progressbar(string.format(Lang.xtc.stamp, 'Red'), 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:stampred", data.data)
end
},
{ icon = GetImage('orange_xtc'), title = 'Orange XTC',
onSelect = function()
- if not minigame() then Notify(Lang.xtc.fail, "error") return end
- if not progressbar(string.format(Lang.xtc.stamp, 'Orange'), 4000, 'uncuff') then return end
+ if not minigame() then ps.notify(Lang.xtc.fail, "error") return end
+ if not ps.progressbar(string.format(Lang.xtc.stamp, 'Orange'), 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:stamporange", data.data)
end,
},
{ icon = GetImage('blue_xtc'), title = 'Blue XTC',
onSelect = function()
- if not minigame() then Notify(Lang.xtc.fail, "error") return end
- if not progressbar(string.format(Lang.xtc.stamp, 'Blue'), 4000, 'uncuff') then return end
+ if not minigame() then ps.notify(Lang.xtc.fail, "error") return end
+ if not ps.progressbar(string.format(Lang.xtc.stamp, 'Blue'), 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:stampblue", data.data)
end
},
@@ -130,13 +130,13 @@ RegisterNetEvent("md-drugs:client:stampwhite", function(data)
end)
RegisterNetEvent("md-drugs:client:getsinglepress", function()
- if not progressbar(Lang.xtc.buyp, 4000, 'uncuff') then return end
+ if not ps.progressbar(Lang.xtc.buyp, 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:buypress")
end)
RegisterNetEvent("md-drugs:client:exchangepresses", function(data)
- if not progressbar(Lang.xtc.buyp, 4000, 'uncuff') then return end
+ if not ps.progressbar(Lang.xtc.buyp, 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:upgradepress", data.data)
end)
diff --git a/server/consumables.lua b/server/consumables.lua
index 92c8fb7..5436544 100644
--- a/server/consumables.lua
+++ b/server/consumables.lua
@@ -1,4 +1,4 @@
-local QBCore = exports['qb-core']:GetCoreObject()
+
--[[
effect options
alien
@@ -21,7 +21,7 @@ strength = number -- how long you are strong boi
]]
local Consume = {
-- meth
-methbags = { time = 4000, effect = 'meth', anim = "smoke", progressbartext = "Injesting",
+methbags = { time = 4000, effect = 'meth', anim = "smoke", ps.progressbartext = "Injesting",
add = {health = -20, stress = -10, speed = 40, strength = 10, thirst = -30}},
cokebaggy = { anim = 'smell', time = 1000, effect = 'coke', add = { stress = -10 }},
cokebaggystagetwo = { anim = 'smell', time = 1000, effect = 'coke', add = { stress = -10 }},
@@ -148,9 +148,9 @@ for k, v in pairs(Consume) do
local time = v.time or Consumables.defaulttime
local effect = v.effect or 0
local anim = v.anim or Consumables.defaultanim
- local progressbartext = v.progressbartext or Consumables.defaultprogresstext
+ local ps.progressbartext = v.ps.progressbartext or Consumables.defaultprogresstext
local add = v.add or {hunger = 0}
- local done = ps.callback('md-drugs:client:consumedrugs', source, time, effect, anim, progressbartext, add, k)
+ local done = ps.callback('md-drugs:client:consumedrugs', source, time, effect, anim, ps.progressbartext, add, k)
if done then
RemoveItem(source, k, 1)
end
diff --git a/server/cornerselling.lua b/server/cornerselling.lua
index 2c01dba..f5beb47 100644
--- a/server/cornerselling.lua
+++ b/server/cornerselling.lua
@@ -213,7 +213,7 @@ RegisterNetEvent('md-drugs:server:sellCornerDrugs', function(item, amount, price
return
end
AddRep(src, 'cornerselling', Drugs[item].rep * amount)
- Log(string.format('%s Sold %s Of %s For A Price Of $%s !', GetName(src),amount, item, price), 'cornerselling')
+ --Log(string.format('%s Sold %s Of %s For A Price Of $%s !', GetName(src),amount, item, price), 'cornerselling')
DrugDeals[ps.getIdentifier(src)] = nil
ps.addMoney(src, 'cash', price)
end)
diff --git a/server/deliveries.lua b/server/deliveries.lua
index 1fb6115..82b52af 100644
--- a/server/deliveries.lua
+++ b/server/deliveries.lua
@@ -1,4 +1,4 @@
-local QBCore = exports['qb-core']:GetCoreObject()
+
local dloc = {
{coords = vector4(282.48, -1814.32, 27.23, 145.11)},
@@ -122,8 +122,8 @@ ps.registerCallback('md-drugs:server:GetDeliveryItem', function(data)
local time = os.time()
local timeout = math.floor(os.difftime(time, check[1].maxtime) / 60)
- if timeout > 15 then MySQL.query.await('DELETE FROM deliveriesdealer WHERE cid = ?', {Player.PlayerData.citizenid}) Notifys(src, 'You Failed To Make It In Time!', 'error' ) return false end
- Notifys(src,'You Already Have A Delivery To Make', 'error' ) return false, item, amount, coord
+ if timeout > 15 then MySQL.query.await('DELETE FROM deliveriesdealer WHERE cid = ?', {Player.PlayerData.citizenid}) ps.notify(src, 'You Failed To Make It In Time!', 'error' ) return false end
+ ps.notify(src,'You Already Have A Delivery To Make', 'error' ) return false, item, amount, coord
end
end)
@@ -135,7 +135,7 @@ RegisterNetEvent('md-drugs:server:giveDeliveryItems', function(item, amount)
local time = os.time()
local timeout = math.floor(os.difftime(time, check[1].maxtime) / 60)
local itemData = json.decode(check[1].itemdata)
- if timeout >= 15 then MySQL.query.await('DELETE FROM deliveriesdealer WHERE cid = ?', {Player.PlayerData.citizenid}) Notifys(source, 'You Failed To Make It In Time!', 'error' ) return end
+ if timeout >= 15 then MySQL.query.await('DELETE FROM deliveriesdealer WHERE cid = ?', {Player.PlayerData.citizenid}) ps.notify(source, 'You Failed To Make It In Time!', 'error' ) return end
if item ~= itemData.item then return end
if amount ~= itemData.amount then return end
if RemoveItem(src, item, amount) then
@@ -169,7 +169,7 @@ lib.addCommand("newdealer", {
local result = MySQL.scalar.await('SELECT name FROM dealers WHERE name = ?', { dealerName })
if result then
- return Notifys(source,"Already Exists", "error")
+ return ps.notify(source,"Already Exists", "error")
end
MySQL.insert('INSERT INTO dealers (name, coords, time, createdby) VALUES (?, ?, ?, ?)', {
@@ -202,8 +202,8 @@ lib.addCommand("deletedealer", {
MySQL.query('DELETE FROM dealers WHERE name = ?', { dealerName })
QBConfig.Dealers[dealerName] = nil
TriggerClientEvent('md-drugs:client:RefreshDealers', -1, QBConfig.Dealers)
- TriggerClientEvent('QBCore:Notify', source, "Dealer Deleted", "success")
+ TriggerClientEvent('QBCore:ps.notify', source, "Dealer Deleted", "success")
else
- TriggerClientEvent('QBCore:Notify', source, "Who You Tryna Delete", "error")
+ TriggerClientEvent('QBCore:ps.notify', source, "Who You Tryna Delete", "error")
end
end)
\ No newline at end of file
diff --git a/server/functions.lua b/server/functions.lua
index 0dc869f..f46a821 100644
--- a/server/functions.lua
+++ b/server/functions.lua
@@ -1,7 +1,3 @@
-local QBCore, ESX, qbx = {}, {}, nil
-local notify = Config.Notify -- qb or ox
-local inventory = Config.Inventory -- qb or ox
-local invname = ''
------------------------------------------ logging stuff
local logs = false
@@ -12,311 +8,7 @@ local headers = {
['Content-Type'] = 'application/json',
}
-if Config.Framework == 'qb' then
- QBCore = exports['qb-core']:GetCoreObject()
-elseif Config.Framework == 'esx' then
- ESX = exports['es_extended']:getSharedObject()
-elseif Config.Framework == 'qbx' then
- qbx = exports.qbx_core
-end
-
-CreateThread(function()
-if logs then
- print'^2 Logs Enabled for md-drugs'
- if logapi == 'insert string here' then
- print'^1 homie you gotta set your api on line 4'
- else
- print'^2 API Key Looks Good, Dont Trust Me Though, Im Not Smart'
- end
-else
- print'^1 logs disabled for md-drugs'
-end
-end)
-
-function Log(message, type)
-if logs == false then return end
- local buffer = { level = "info", message = message, resource = GetCurrentResourceName(),
- metadata = { drugs = type, playerid = source}
- }
- SetTimeout(500, function()
- PerformHttpRequest(endpoint, function(status, _, _, response)
- if status ~= 200 then
- if type(response) == 'string' then
- response = json.decode(response) or response
- end
- end
- end, 'POST', json.encode(buffer), headers)
- buffer = nil
- end)
-end
------------------------------------- Player Stuff functions
-function getPlayer(source)
- local src = source
- if Config.Framework == 'qb' then
- local Player = QBCore.Functions.GetPlayer(src)
- return Player
- elseif Config.Framework == 'esx' then
- local Player = ESX.GetPlayerFromId(src)
- return Player
- elseif Config.Framework == 'qbx' then
- local Player = qbx:GetPlayer(source)
- return Player
- end
-end
-
-function getPlayerByCid(cid)
- if Config.Framework == 'qb' then
- local Player = QBCore.Functions.GetPlayerByCitizenId(cid)
- return Player
- elseif Config.Framework == 'esx' then
- local Player = ESX.GetPlayerFromIdentifier(cid)
- return Player
- elseif Config.Framework == 'qbx' then
- local Player = qbx:GetPlayerByCitizenId(cid)
- return Player
- end
-end
-
-function GetName(source)
- local src = source
- if Config.Framework == 'qb' then
- local Player = getPlayer(src)
- return Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname
- elseif Config.Framework == 'esx' then
- local Player = getPlayer(src)
- return Player.getName()
- elseif Config.Framework == 'qbx' then
- local Player = getPlayer(src)
- return Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname
- end
-end
-
-function getCid(source)
- local src = source
- if Config.Framework == 'qb' then
- local Player = getPlayer(src)
- return Player.PlayerData.citizenid
- elseif Config.Framework == 'esx' then
- local Player = getPlayer(src)
- return Player.getIdentifier()
- elseif Config.Framework == 'qbx' then
- local Player = getPlayer(src)
- return Player.PlayerData.citizenid
- end
-end
-
-function GetCoords(source)
- local ped = GetPlayerPed(source)
- local playerCoords = GetEntityCoords(ped)
- return playerCoords
-end
-
-function dist(source, coords)
- local playerPed = GetPlayerPed(source)
- local pcoords = GetEntityCoords(playerPed)
- local dist = #(pcoords - coords)
-
- return dist
-end
-
-function CheckDist(source, coords)
- local playerPed = GetPlayerPed(source)
- local pcoords = GetEntityCoords(playerPed)
- local ok
- if #(pcoords - coords) < 4.0 then
- return ok
- else
- DropPlayer(source, 'md-drugs: You Were A Total Of ' .. #(pcoords - coords) .. ' Too Far Away To Trigger This Event')
- return false
- end
-end
-
-
-function Notifys(source, text, type)
- local src = source
- if notify == 'qb' then
- TriggerClientEvent("QBCore:Notify", src, text, type)
- elseif notify == 'ox' then
- lib.notify(src, { title = text, type = type})
- elseif notify == 'okok' then
- TriggerClientEvent('okokNotify:Alert', src, '', text, 4000, type, false)
- else
- print"^1 Look At The Config For Proper Alert Options"
- end
-end
-
-function GetLabels(item)
- if inventory == 'qb' then
- return QBCore.Shared.Items[item].label
- elseif inventory == 'ox' then
- local items = exports.ox_inventory:Items()
- return items[item].label
- end
-end
-
-function CUI(item, useFunction)
- if Config.Framework == 'qb' then
- QBCore.Functions.CreateUseableItem(item, useFunction)
- elseif Config.Framework == 'esx' then
- ESX.RegisterUsableItem(item, useFunction)
- elseif Config.Framework == 'qbx' then
- qbx:CreateUseableItem(item, useFunction)
- end
-end
-
-function Itemcheck(source, item, amount)
- if inventory == 'qb' then
- local Player = getPlayer(source)
- local itemchecks = Player.Functions.GetItemByName(item)
- if itemchecks and itemchecks.amount >= amount then
- return true
- else
- Notifys(source, 'You Need ' .. amount .. ' Of ' .. GetLabels(item) .. ' To Do this', 'error')
- return false
- end
- elseif inventory == 'ox' then
- local items = exports.ox_inventory:GetItem(source, item, nil, false)
- if items.count >= amount then
- return true
- else
- Notifys(source, 'You Need ' .. amount .. ' Of ' .. GetLabels(item) .. ' To Do This', 'error')
- return false
- end
- end
-end
-
-function hasItem(source, item, amount)
- if inventory == 'qb' then
- local Player = getPlayer(source)
- local itemchecks = Player.Functions.GetItemByName(item)
- if itemchecks and itemchecks.amount >= amount then
- return true
- else
- return false
- end
- elseif inventory == 'ox' then
- local items = exports.ox_inventory:GetItem(source, item, nil, false)
- if items == nil then return false end
- if items.count >= amount then
- return true
- else
- return false
- end
- end
-end
-
-function getItemCount(source, item)
- if inventory == 'qb' then
- local Player = getPlayer(source)
- local itemchecks = Player.Functions.GetItemByName(item)
- if itemchecks then
- return itemchecks.amount
- else
- return false
- end
- elseif inventory == 'ox' then
- local items = exports.ox_inventory:GetItem(source, item, nil, false)
- if items == nil then
- print('You are missing ' .. item)
- return 0
- end
- if items.count >= 1 then
- return items.count
- else
- return 0
- end
- end
-end
-function RemoveItem(source, item, amount)
- if inventory == 'qb' then
- local Player = getPlayer(source)
- if Player.Functions.RemoveItem(item, amount) then
- TriggerClientEvent(invname ..":client:ItemBox", source, QBCore.Shared.Items[item], "remove", amount)
- return true
- else
- Notifys(source, 'You Need ' .. amount .. ' Of ' .. GetLabels(item) .. ' To Do This', 'error')
- end
- elseif inventory == 'ox' then
- if exports.ox_inventory:RemoveItem(source, item, amount) then
- return true
- else
- Notifys(source, 'You Need ' .. amount .. ' Of ' .. GetLabels(item) .. ' To Do This', 'error')
- end
- end
-end
-
-function AddItem(source, item, amount)
- if inventory == 'qb' then
- local Player = getPlayer(source)
- if Player.Functions.AddItem(item, amount) then
- TriggerClientEvent(invname ..":client:ItemBox", source, QBCore.Shared.Items[item], "add", amount)
- return true
- else
- print('Failed To Give Item: ' .. item .. ' Check Your qb-core/shared/items.lua')
- return false
- end
- else
- if exports.ox_inventory:AddItem(source, item, amount) then
- return true
- else
- print('Failed To Give Item: ' .. item .. ' Check Your ox_inventory/data/items.lua')
- return false
- end
- end
-end
-
-function addMoney(source, type, amount)
- if Config.Framework == 'qb' then
- local Player = getPlayer(source)
- if Player.Functions.AddMoney(type, amount) then
- return true
- else
- return false
- end
- elseif Config.Framework == 'esx' then
- local Player = getPlayer(source)
- if Player.addMoney(amount) then
- return true
- else
- return false
- end
- elseif Config.Framework == 'qbx' then
- if qbx:AddMoney(source, type, amount) then
- return true
- else
- return false
- end
- end
-end
-
-function removeMoney(source, type, amount)
- if Config.Framework == 'qb' then
- local Player = getPlayer(source)
- if Player.Functions.RemoveMoney(type, amount) then
- return true
- else
- return false
- end
- elseif Config.Framework == 'esx' then
- if type == 'bank' then
- print('Does Not Support Bank Funds Removing From ESX Defaulted To Cash')
- end
- local Player = getPlayer(source)
- if Player.getMoney() >= amount then
- Player.removeMoney(amount)
- return true
- else
- return false
- end
- elseif Config.Framework == 'qbx' then
- if qbx:RemoveMoney(source, type, amount) then
- return true
- else
- return false
- end
- end
-end
local function handleFresh(source)
local table = json.encode({
coke = 0,lsd = 0,heroin = 0,dealerrep = 0,
@@ -351,7 +43,7 @@ end
function AddRep(source, type, amount)
if not Config.TierSystem then return false end
if not amount then amount = 1 end
- local sql = MySQL.query.await('SELECT * FROM drugrep WHERE cid = ?', {getCid(source)})
+ local sql = MySQL.query.await('SELECT * FROM drugrep WHERE cid = ?', {ps.getIdentifier(source)})
local reps = json.decode(sql[1].drugrep)
local update
local rep = ''
@@ -367,11 +59,11 @@ function AddRep(source, type, amount)
end
end
if update == '' then return false end
- MySQL.update('UPDATE drugrep SET drugrep = ? WHERE cid = ?', {update, getCid(source)})
+ MySQL.update('UPDATE drugrep SET drugrep = ? WHERE cid = ?', {update, ps.getIdentifier(source)})
return true
else
rep[type] = rep[type] + amount
- MySQL.update('UPDATE drugrep SET drugrep = ? WHERE cid = ?', {json.encode(rep), getCid(source)})
+ MySQL.update('UPDATE drugrep SET drugrep = ? WHERE cid = ?', {json.encode(rep), ps.getIdentifier(source)})
return true
end
end
@@ -408,73 +100,6 @@ function sortTab(tbl, type)
end)
end
-function getCops()
- local amount = 0
- if Config.Framework == 'qb' then
- local players = QBCore.Functions.GetQBPlayers()
- for k, v in pairs(players) do
- if v.PlayerData.job.type == 'leo' and v.PlayerData.job.onduty then
- amount = amount + 1
- end
- end
- return amount
- elseif Config.Framework == 'esx' then
- local players = ESX.GetPlayers()
- for k, v in pairs(players) do
- local xPlayer = ESX.GetPlayerFromId(v)
- if xPlayer.job.name == 'police' and xPlayer.job.onduty then
- amount = amount + 1
- end
- end
- return amount
- elseif Config.Framework == 'qbx' then
- return qbx:GetDutyCountType('leo')
- end
-end
-
-function getNear(src)
- if Config.Framework == 'qb' then
- local near = {}
- local players = QBCore.Functions.GetPlayers()
- for k, v in pairs (players) do
- local targ = QBCore.Functions.GetPlayerByCitizenId(v.PlayerData.citizenid)
- local tname = GetName(v.PlayerData.source)
- local ped, tped = GetPlayerPed(src), GetPlayerPed(v.PlayerData.source)
- local dist = #(GetEntityCoords(ped) - GetEntityCoords(tped))
- if dist < 5.0 then
- table.insert(near, {label = tname, value = targ.PlayerData.citizenid})
- end
- end
- return near
- elseif Config.Framework == 'esx' then
- local near = {}
- local players = ESX.GetPlayers()
- for k, v in pairs (players) do
- local targ = ESX.GetPlayerFromId(v)
- local tname = GetName(v)
- local ped, tped = GetPlayerPed(src), GetPlayerPed(v)
- local dist = #(GetEntityCoords(ped) - GetEntityCoords(tped))
- if dist < 5.0 then
- table.insert(near, {label = tname, value = getCid(v)})
- end
- end
- return near
- elseif Config.Framework == 'qbx' then
- local near = {}
- local players = qbx:GetPlayers()
- for k, v in pairs (players) do
- local targ = qbx:GetPlayer(v)
- local tname = GetName(v)
- local ped, tped = GetPlayerPed(src), GetPlayerPed(v)
- local dist = #(GetEntityCoords(ped) - GetEntityCoords(tped))
- if dist < 5.0 then
- table.insert(near, {label = tname, value = getCid(v)})
- end
- end
- return near
- end
-end
-
function handleCornersell(source, item, amount, price)
if RemoveItem(source, item, amount) then
if inventory == 'qb' then
@@ -501,27 +126,9 @@ lib.callback.register('md-drugs:server:GetCoppers', function(source, cb, args)
return getCops()
end)
-lib.callback.register('md-drugs:server:GetRep', function(source, cb, args)
+ps.registerCallback('md-drugs:server:GetRep', function(source, cb, args)
local rep = GetAllRep(source)
return rep
end)
-CreateThread(function()
- if GetResourceState('ps-inventory') == 'started' then
- invname = 'ps-inventory'
- elseif GetResourceState('qb-inventory') == 'started' then
- invname = 'qb-inventory'
- else
- invname = 'inventory'
- end
- local url = "https://raw.githubusercontent.com/Mustachedom/md-drugs/main/version.txt"
- local version = GetResourceMetadata('md-drugs', "version" )
- PerformHttpRequest(url, function(err, text, headers)
- if (text ~= nil) then
- print('^2 Your Version:' .. version .. ' | Current Version:' .. text .. '' )
- end
- end, "GET", "", "")
- if GetResourceState('ox_lib') ~= 'started' then
- print('^1 ox_lib Is A Depndancy, Not An Optional ')
- end
-end)
+ps.versionCheck('md-drugs', 'https://raw.githubusercontent.com/Mustachedom/md-drugs/refs/heads/hushhushmotherfucker/version.txt', 'https://github.com/Mustachedom/md-drugs/')
\ No newline at end of file
diff --git a/server/heroin.lua b/server/heroin.lua
index 79481c0..a4d3f7b 100644
--- a/server/heroin.lua
+++ b/server/heroin.lua
@@ -164,7 +164,7 @@ RegisterServerEvent('md-drugs:server:fillneedle', function(num)
if vh then
if not GetRecipe(src, 'heroin', 'fillneedle', v.tier) then return end
AddRep(src, 'heroin')
- Log(ps.getPlayerName(src) .. v.log, 'heroin')
+ --Log(ps.getPlayerName(src) .. v.log, 'heroin')
return
end
end
@@ -176,7 +176,7 @@ end)
RegisterServerEvent('md-drugs:server:failheroin', function()
local src = source
- Log(ps.getPlayerName(src) ..' Sucks And Burned Their Heroin', 'heroin')
+ --Log(ps.getPlayerName(src) ..' Sucks And Burned Their Heroin', 'heroin')
if Config.TierSystem then
local itemList = {
heroinvial = 1,
diff --git a/server/lean.lua b/server/lean.lua
index ff39052..4e90041 100644
--- a/server/lean.lua
+++ b/server/lean.lua
@@ -1,27 +1,68 @@
-local QBCore = exports['qb-core']:GetCoreObject()
+local onRun = {}
+
+local function setTimeout(identifier)
+ if onRun[identifier] then
+ CreateThread(function()
+ Wait(10 * 60 * 1000)
+ onRun[identifier] = nil
+ end)
+ end
+end
RegisterServerEvent('md-drugs:server:givelean', function()
- local chance = math.random(1,100)
+ local src = source
local amount = math.random(1,5)
- if chance <= 50 then
- if AddItem(source, 'mdlean', amount) then
- Notifys(Lang.Lean.lean, "success")
- Log(GetName(source) .. ' Got ' .. amount .. ' Of Lean' , 'lean')
- end
+ if not onRun[ps.getIdentifier(src)] then return ps.notify(src, Lang.lean.err, "error") end
+ onRun[ps.getIdentifier(src)] = onRun[ps.getIdentifier(src)] + 1
+ if math.random(1,100) <= 50 then
+ ps.addItem(src, "mdlean", amount)
else
- if AddItem(source, 'mdreddextro', amount) then
- Notifys(Lang.Lean.dextro, "success")
- Log(GetName(source) .. ' Got ' .. amount .. ' Of Red Dextro' , 'lean')
- end
- end
-end)
-
-CUI('leancup', function(source, item)
- if Itemcheck(source, 'leancup', 1) then
- TriggerClientEvent('md-drugs:client:leancraft', source)
+ ps.addItem(src, "mdreddextro", amount)
+ end
+ if onRun[ps.getIdentifier(src)] >= 4 then
+ onRun[ps.getIdentifier(src)] = nil
end
end)
-RegisterServerEvent('md-drugs:server:finishcup', function(data)
- if not GetRecipe(source, 'lean','cups', data.item) then return end
+exports.ps_lib:registerCrafter({
+ loc = GlobalState.MDDrugsLocs.MakeLean,
+ recipes = {
+ cupoflean = {
+ amount = 1,
+ time = 5000,
+ anim = 'uncuff',
+ recipe = {
+ leancup = 1,
+ mdlean = 1,
+ sprunk = 1
+ }
+ },
+ cupofdextro = {
+ amount = 1,
+ time = 5000,
+ anim = 'uncuff',
+ recipe = {
+ leancup = 1,
+ mdreddextro = 1,
+ sprunk = 1
+ }
+ }
+ },
+ targetData = {
+ size = {height = 1.0, width = 1.0, length = 1.0, rotation = 180.0},
+ label = 'Make Lean',
+ icon = 'fa-solid fa-mug-saucer',
+ },
+})
+
+ps.registerCallback('md-drugs:server:RegisterLean', function(source)
+ local identifier = ps.getIdentifier(source)
+ if not identifier then return false end
+ if onRun[identifier] then
+ return false
+ else
+ onRun[identifier] = 0
+ setTimeout(identifier)
+ return true
+ end
end)
\ No newline at end of file
diff --git a/server/locations.lua b/server/locations.lua
index c1a6141..3083dae 100644
--- a/server/locations.lua
+++ b/server/locations.lua
@@ -30,6 +30,9 @@ local Target = {
{loc = vector3(-1370.77, -314.51, 39.58), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
{loc = vector3(2409.59, 5012.45, 46.09), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
},
+ buyLSDkit = {
+ {ped = 'g_f_y_families_01', loc = vector4(2598.47, 5033.06, 105.86, 283.51), l = 1.0, w = 1.0, rot = 283.51, gang = ""},
+ },
dryplant = { -- turn resin into powder
{loc = vector3(-1353.77, -335.58, 43.92), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
},
@@ -54,15 +57,47 @@ local Target = {
FillPrescription = { -- where to fill out your prescription
{loc = vector3(2855.62, 4446.73, 48.53), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
},
+ DryOutMescaline = { -- where to dry out mescaline
+ {loc = vector3(2638.22, 4237.93, 44.78), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
+ },
+ MakeLean = {
+ {
+ loc = vector3(2635.81, 4240.57, 45.32),
+ checks = { -- these can be arrays like {'police', 'ambulance'} or just a single string like 'police'
+ --gang = {},
+ --item = {},
+ --job = {},
+ --citizenid = {}
+ }
+ },
+ },
+ CookMeth = {
+ {loc = vector3(1006.09, -3200.59, -38.52), l = 1.0, w = 1.0, rot = 45.0, offset = vec3(4.79, 2.13, -0.41), rotation = vector3(0,0,0.0), gang = ""},
+ },
+ MethDials = {
+ {loc = vector3(1007.89, -3201.17, -38.99),l = 1.0, w = 1.0, rot = 45.0, gang = ""},
+ },
+ MethSmash = {
+ {loc = vector3(1012.04, -3194.96, -38.99), bucket = vector4(1012.86, -3194.13, -39.20, 90.00), l = 1.0, w = 1.0, rot = 45.0, offset = vec3(-3.143311, -1.666748, -1.010128), rotation = vector3(0,0,0.0), gang = ""},
+ },
+ BagMeth = {
+ {loc = vector3(1014.25, -3194.93, -38.99), l = 1.0, w = 1.0, rot = 45.0, offset = vec3(-4.9, -1.70, -1.01), rotation = vector3(0,0,0.0), gang = ""},
+ },
+ MethEph = { -- get ephedrine
+ {loc = vector3(3559.86, 3673.9, 28.13), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
+ },
+ Methace = { -- get acetone
+ {loc = vector3(3535.41, 3661.05, 28.12), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
+ },
+ SyrupVendor = {
+ {ped = 'a_m_m_farmer_01', loc = vector4(365.21, -578.77, 39.30, 347.23), l = 1.0, w = 1.0, rot = 347.23, gang = ""},
+ },
singleSpot = {
-
CokeTeleIn = vector3(198.16, -1276.92, 29.33), -- where you target to go inside coke
CokeTeleOut = vector3(1088.81, -3187.57, -38.99), -- where you target to leave coke
buylsdlabkit = vector4(2598.47, 5033.06, 105.86, 283.51), -- buy lab kit for lsd
buyheroinlabkit = vector4(-1358.77, -339.12, 43.92, 302.13), -- buy lab kit for heroin
buypress = vector3(845.82, -884.79, 25.18), -- buy lab kit for xtc
- DryOut = vector3(2638.22, 4237.93, 44.78), -- Place to dry out mescaline into usuable drug
- SyrupVendor = vector4(365.21, -578.77, 39.30, 347.23), -- where the mission ped starts
weedTelein = vector3(244.74, 374.54, 105.74), -- where you target to tele in
weedTeleout = vector3(1066.31, -3183.36, -39.16), -- where you target to tele out
MakeButter = vector3(1045.48, -3198.49, -38.22), -- where you make cannabutter and baked edibles
@@ -74,12 +109,7 @@ local Target = {
truckspawn = vector4(1450.87, -1482.13, 63.22, 69.95), --- where the truck will spawn when you pay for it
Payfortruck = vector3(1437.64, -1491.91, 63.62), --- where you pay for the truck
},
- MethEph = { -- get ephedrine
- {loc = vector3(3559.86, 3673.9, 28.13), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
- },
- Methace = { -- get acetone
- {loc = vector3(3535.41, 3661.05, 28.12), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
- },
+
StartLoc = { -- where truck spawns for lean and meth missions
vector3(-2307.22, 434.77, 174.47),
vector3(614.75, 1786.26, 199.39),
@@ -112,31 +142,8 @@ local Target = {
}
}
GlobalState.MDDrugsLocs = Target
-function checkLoc(source, event, num)
- local ped = source
- local pos = GetPlayerPed(ped)
- local coord = GetEntityCoords(pos)
- local loc
- if type(num) == 'string' then
- loc = vector3(Target[event][num].x, Target[event][num].y, Target[event][num].z)
- else
- loc = Target[event][num].loc
- end
- local dist = #(coord - loc)
- if dist < 2.5 then
- Log(GetName(source) .. ' Triggered the table ' .. event .. ' Within The Correct Distance', 'locations')
- return true
- else
- Log(GetName(source) .. ' Triggered the table ' .. event .. ' Not Within The Correct Distance', 'locations')
- Notifys(source, 'You are not in the correct location', 'error')
- return false
- end
-end
local loc = Target.Travellingmerchant[math.random(1, #Target.Travellingmerchant)]
-ps.registerCallback('md-drugs:server:getLocs', function()
- return Target
-end)
ps.registerCallback('md-drugs:server:GetMerchant', function(source)
return loc
diff --git a/server/lsd.lua b/server/lsd.lua
index c8db10a..67f1526 100644
--- a/server/lsd.lua
+++ b/server/lsd.lua
@@ -30,7 +30,7 @@ RegisterServerEvent('md-drugs:server:getdiethylamide', function(num)
local src = source
if timedOut[src] then return end
if not ps.checkDistance(src, GlobalState.MDDrugsLocs.diethylamide[num].loc, 2.0) then
- Notifys(src, Lang.lsd.notinloc, "error")
+ ps.notify(src, Lang.lsd.notinloc, "error")
return
end
timeout(src, 3000)
@@ -41,7 +41,7 @@ end)
ps.createUseable('lsdlabkit', function(source, item)
local src = source
local placed, loc = ps.callback('md-drugs:client:setlsdlabkit', src)
- if placed then
+ if placed then
if ps.removeItem(src, 'lsdlabkit', 1) then
table.insert(lsdTables, {
owner = ps.getPlayerName(src),
@@ -64,7 +64,7 @@ end
ps.registerCallback('md-drugs:server:removecleaningkit', function(source)
local src = source
- return ps.removeItem(src,"cleaningkit", 1)
+ return ps.removeItem(src, "cleaningkit", 1)
end)
RegisterServerEvent('md-drugs:server:getlabkitback', function()
@@ -89,18 +89,18 @@ RegisterServerEvent('md-drugs:server:failheating', function()
ps.removeItem(src, 'lysergic_acid', 1)
ps.removeItem(src, 'diethylamide', 1)
ps.notify(src, ps.lang('prices.lsd.failed'), "error")
- Log(ps.getPlayerName(src) ..' Failed Basic LSD Like An Idiot!', 'lsd')
+ --Log(ps.getPlayerName(src) ..' Failed Basic LSD Like An Idiot!', 'lsd')
end)
RegisterServerEvent('md-drugs:server:refinequalityacid', function()
local src = source
if not hasLabKit(src) then return end
-if not ps.itemCheck(src, 'lsd_one_vial', 1) then return end
+if not ps.hasItem(src, 'lsd_one_vial', 1) then return end
if Config.TierSystem then
local lsd = getRep(src, 'lsd')
if ps.removeItem(src, 'lsd_one_vial', 1) then
- if lsd <= 30 then
+ if lsd <= 30 then
ps.addItem(src,'lsd_vial_two', 1)
elseif lsd >= 31 and lsd <= 60 then
ps.addItem(src,'lsd_vial_three', 1)
@@ -112,7 +112,7 @@ if not ps.itemCheck(src, 'lsd_one_vial', 1) then return end
ps.addItem(src,'lsd_vial_six', 1)
end
AddRep(src,'lsd')
- ps.log(ps.getPlayerName(src) ..' Refined Acid and Now Has A Rep Of ' .. lsd + 1 .. '!', 'lsd')
+ --ps.log(ps.getPlayerName(src) ..' Refined Acid and Now Has A Rep Of ' .. lsd + 1 .. '!', 'lsd')
end
else
local randomchance = math.random(1,100)
@@ -128,7 +128,7 @@ if not ps.itemCheck(src, 'lsd_one_vial', 1) then return end
else
ps.addItem(src,'lsd_vial_six', 1)
end
- ps.log(ps.getPlayerName(src) ..' Refined Acid!', 'lsd')
+ --ps.log(ps.getPlayerName(src) ..' Refined Acid!', 'lsd')
end
end
end)
@@ -136,25 +136,28 @@ end)
RegisterServerEvent('md-drugs:server:failrefinequality', function()
local src = source
if not hasLabKit(src) then return end
- if not ps.hasItem(src, 'lsd_one_vial', 1) then return end
- ps.removeItem(src,'lsd_one_vial', 1)
+ ps.removeItem(src,'lsd_one_vial', 1)
end)
RegisterServerEvent('md-drugs:server:gettabpaper', function(num)
local src = source
if not ps.checkDistance(src, GlobalState.MDDrugsLocs.gettabs[num].loc, 3.0) then return end
- if ps.removeMoney('cash', prices.tabcost * 10) then
+ if ps.removeMoney(src, 'cash', prices.tabcost * 10) then
ps.addItem(src,'tab_paper', 10)
else
ps.notify(src, Lang.lsd.broke, "error")
end
end)
-RegisterServerEvent('md-drugs:server:getlabkit', function()
+RegisterServerEvent('md-drugs:server:getlabkit', function(num)
local src = source
- if not ps.checkDistance(src,'singleSpot', 'buylsdlabkit') then return end
- if ps.removeMoney('cash', prices.lsdlabkitcost) then
+ if ps.hasItem(src,'lsdlabkit', 1) then
+ ps.notify(src, ps.lang('lsd.havlabkit'), 'error')
+ return
+ end
+ if not ps.checkDistance(src, GlobalState.MDDrugsLocs.buyLSDkit[num].loc, 3.0) then return end
+ if ps.removeMoney(src, 'cash', prices.lsdlabkitcost) then
ps.addItem(src,'lsdlabkit', 1)
else
ps.notify(src, Lang.lsd.broke, "error")
@@ -174,8 +177,8 @@ RegisterServerEvent('md-drugs:server:maketabpaper', function()
{vial = 'lsd_vial_six', sheet = 'gratefuldeadsheet', log = 'Made A Maze Sheet'}
}
for k, v in ipairs (vialdata) do
- local check = ps.hasItem(src, v.vial)
- if check then
+ local check = ps.hasItem(src, v.vial) and ps.hasItem(src, 'tab_paper')
+ if check then
if ps.removeItem(src, v.vial, 1) and ps.removeItem(src, 'tab_paper', 1) then
ps.addItem(src, v.sheet, 1)
end
@@ -193,12 +196,12 @@ local sheets = {
}
for k, v in pairs (sheets) do
- CUI(v.item, function(source)
+ ps.createUseable(v.item, function(source)
local src = source
local math = math.random(1,10)
if ps.removeItem(src, v.item, 1) then
ps.addItem(src, v.recieve, math)
- ps.log(ps.getPlayerName(src) ..' Made ' .. math .. 'Tabs of ' .. v.recieve .. '!', 'lsd')
+ --ps.log(ps.getPlayerName(src) ..' Made ' .. math .. 'Tabs of ' .. v.recieve .. '!', 'lsd')
end
end)
end
diff --git a/server/mescaline.lua b/server/mescaline.lua
index fc85a5a..b859868 100644
--- a/server/mescaline.lua
+++ b/server/mescaline.lua
@@ -1,15 +1,18 @@
-RegisterNetEvent("md-drugs:server:drymescaline", function()
+RegisterNetEvent("md-drugs:server:drymescaline", function(num)
local src = source
- if not checkLoc(src, 'singleSpot', 'DryOut') then return end
+ if not ps.checkDistance(src, GlobalState.MDDrugsLocs.DryOutMescaline[num].loc, 3.0) then
+ ps.notify(src, "You are not in the right location", "error")
+ return
+ end
if not GetRecipe(src, 'mescaline', 'dry', 'dried') then return end
end)
-CUI("driedmescaline", function(source, item)
+ps.createUseable("driedmescaline", function(source, item)
local src = source
- if RemoveItem(src, "driedmescaline", 1) then
+ if ps.removeItem(src, "driedmescaline", 1) then
TriggerClientEvent("md-drugs:client:takemescaline", src)
- Log(GetName(source) .. ' Consumed Mescaline', 'consume')
+ --Log(GetName(source) .. ' Consumed Mescaline', 'consume')
end
-end)
+end)
\ No newline at end of file
diff --git a/server/meth.lua b/server/meth.lua
index b432da9..a1875b2 100644
--- a/server/meth.lua
+++ b/server/meth.lua
@@ -1,28 +1,38 @@
-local QBCore = exports['qb-core']:GetCoreObject()
-RegisterServerEvent('md-drugs:server:startcook', function()
- local src = source
- if not GetRecipe(source, 'meth', 'cook', 'heat') then return end
- Notifys(src, "Adding Things To The Mix", "success")
-end)
+local onRun = {}
+
+local function setTimeout(identifier)
+ if onRun[identifier] then
+ CreateThread(function()
+ Wait(10 * 60 * 1000)
+ onRun[identifier] = nil
+ end)
+ end
+end
RegisterServerEvent('md-drugs:server:givemethingridients', function()
- local src = source
- local chance = math.random(1,100)
+ local src = source
local amount = math.random(1,5)
- if chance <= 50 then
- if AddItem(src,'ephedrine', amount) then
- Log(GetName(src) .. ' Got ' .. amount .. ' Of Ephedrine', 'Meth')
- end
+ if not onRun[ps.getIdentifier(src)] then return ps.notify(src, Lang.lean.err, "error") end
+ onRun[ps.getIdentifier(src)] = onRun[ps.getIdentifier(src)] + 1
+ if math.random(1,100) <= 50 then
+ ps.addItem(src, "ephedrine", amount)
else
- if AddItem(src, 'acetone', amount) then
- Log(GetName(src) .. ' Got ' .. amount .. ' Of Acetone', 'Meth')
- end
- end
+ ps.addItem(src, "acetone", amount)
+ end
+ if onRun[ps.getIdentifier(src)] >= 4 then
+ onRun[ps.getIdentifier(src)] = nil
+ end
+end)
+RegisterServerEvent('md-drugs:server:startcook', function(num)
+ local src = source
+ if not GetRecipe(source, 'meth', 'cook', 'heat') then return end
+ ps.notify(src, "Adding Things To The Mix", "success")
end)
-RegisterServerEvent('md-drugs:server:getmeth', function()
+RegisterServerEvent('md-drugs:server:getmeth', function(num)
local src = source
+ if not ps.checkDistance(src, GlobalState.MDDrugsLocs.BagMeth[num].loc, 2.5) then return end
if not GetRecipe(src, 'meth', 'bag', 'bags') then return end
end)
@@ -30,7 +40,7 @@ RegisterServerEvent('md-drugs:server:geteph', function(num)
local src = source
if not checkLoc(src, 'MethEph', num) then return end
if AddItem(src, 'ephedrine', 1) then
- Notifys(src, 'Got Ephedrine!', "success")
+ ps.notify(src, 'Got Ephedrine!', "success")
end
end)
@@ -38,6 +48,14 @@ RegisterServerEvent('md-drugs:server:getace', function(num)
local src = source
if not checkLoc(src, 'Methace', num) then return end
if AddItem(src, 'acetone', 1) then
- Log(GetName(src) .. ' Got ' .. 1 .. 'Of Acetone', 'Meth')
+ --Log(GetName(src) .. ' Got ' .. 1 .. 'Of Acetone', 'Meth')
end
+end)
+
+ps.registerCallback('md-drugs:server:startcook', function(source, num)
+ local src = source
+ if not ps.checkDistance(src, GlobalState.MDDrugsLocs.CookMeth[num].loc, 2.5) then return false end
+ local recipe = GetRecipe(src, 'meth', 'cook', 'heat')
+ ps.debug(recipe)
+ return recipe
end)
\ No newline at end of file
diff --git a/server/oxyruns.lua b/server/oxyruns.lua
index a3539f6..82a77d3 100644
--- a/server/oxyruns.lua
+++ b/server/oxyruns.lua
@@ -8,10 +8,10 @@ ps.registerCallback('md-drugs:server:payfortruck', function()
local src = source
local Player = getPlayer(src)
if Player.Functions.RemoveMoney('cash', prices.payfortruck) or Player.Functions.RemoveMoney('bank', prices.payfortruck) then
- Log(GetName(src) .. ' Rented A Van For OxyRuns', 'oxy')
+ --Log(GetName(src) .. ' Rented A Van For OxyRuns', 'oxy')
return true
else
- Notifys(src, Lang.oxy.broke, "error")
+ ps.notify(src, Lang.oxy.broke, "error")
return false
end
end)
@@ -29,13 +29,13 @@ RegisterServerEvent('md-drugs:server:giveoxybox', function()
}
local item = itemList[math.random(1, #itemList)]
if chance <= prices.hotchance then
- Notifys(src, Lang.oxy.hot, "error")
+ ps.notify(src, Lang.oxy.hot, "error")
Player.Functions.AddMoney("cash", cash * 0.5)
if itemchance <= prices.itemChance then
AddItem(src, item.item, item.amount)
end
else
- Notifys(Lang.oxy.next, "success")
+ ps.notify(Lang.oxy.next, "success")
TriggerClientEvent("md-drugs:client:getoxylocationroute", src)
Player.Functions.AddMoney("cash", cash)
if itemchance <= prices.itemChance then
diff --git a/server/pharma.lua b/server/pharma.lua
index 69aad4f..f0f3454 100644
--- a/server/pharma.lua
+++ b/server/pharma.lua
@@ -6,7 +6,7 @@ local function GetJob(source)
if Player.PlayerData.job.type == 'ems' then
return true
else
- Notifys(src, 'You Must Be EMS To Do This', 'error')
+ ps.notify(src, 'You Must Be EMS To Do This', 'error')
return false
end
end
@@ -54,8 +54,8 @@ CUI(d, function(source, item)
if d == k then
RemoveItem(src, d, 1)
AddItem(src, v, math.random(10,30))
- Notifys(src,Lang.Pharma.unbottle, "success")
- Log(GetName(src) .. ' Unbottled 30 Of ' .. v .. '!', 'pharma')
+ ps.notify(src,Lang.Pharma.unbottle, "success")
+ --Log(GetName(src) .. ' Unbottled 30 Of ' .. v .. '!', 'pharma')
end
end
end
@@ -73,5 +73,5 @@ RegisterServerEvent('md-drugs:server:fillprescription', function()
break
end
end
- Log(GetName(src) .. ' Filled A Prescription!', 'pharma')
+ --Log(GetName(src) .. ' Filled A Prescription!', 'pharma')
end)
diff --git a/server/plantSpawns.lua b/server/plantSpawns.lua
index a25408b..eacd835 100644
--- a/server/plantSpawns.lua
+++ b/server/plantSpawns.lua
@@ -102,7 +102,7 @@ local plantData = {
plants.cocaine[loc].taken = false
GlobalState.CocaPlant = plants.cocaine
TriggerClientEvent('coke:respawnCane', -1, loc)
- Log('Coca Plant Respawned At ' .. plants.cocaine[loc].location, 'coke')
+ --Log('Coca Plant Respawned At ' .. plants.cocaine[loc].location, 'coke')
end)
end,
allow = Config.Drugs.cocaine
@@ -122,7 +122,7 @@ local plantData = {
plants.heroin[loc].taken = false
GlobalState.PoppyPlants = plants.heroin
TriggerClientEvent('heroin:respawnCane', -1, loc)
- Log('Heroin Plant Respawned At ' .. plants.heroin[loc].location, 'heroin')
+ --Log('Heroin Plant Respawned At ' .. plants.heroin[loc].location, 'heroin')
end)
end,
allow = Config.Drugs.heroin
@@ -142,7 +142,7 @@ local plantData = {
plants.mescaline[loc].taken = false
GlobalState.Mescaline = plants.mescaline
TriggerClientEvent('Mescaline:respawnCane', -1, loc)
- Log('Mescaline Plant Respawned At ' .. plants.mescaline[loc].location, 'mescaline')
+ --Log('Mescaline Plant Respawned At ' .. plants.mescaline[loc].location, 'mescaline')
end)
end,
allow = Config.Drugs.mescaline
@@ -162,7 +162,7 @@ local plantData = {
plants.shrooms[loc].taken = false
GlobalState.shrooms = plants.shrooms
TriggerClientEvent('shrooms:respawnCane', -1, loc)
- Log('Shroom Respawned At ' .. plants.shrooms[loc].location, 'shrooms')
+ --Log('Shroom Respawned At ' .. plants.shrooms[loc].location, 'shrooms')
end)
end,
allow = Config.Drugs.shrooms
@@ -182,7 +182,7 @@ local plantData = {
plants.weed[loc].taken = false
GlobalState.WeedPlant = plants.weed
TriggerClientEvent('weed:respawnCane', -1, loc)
- Log('Weed Plant Respawned At ' .. plants.weed[loc].location, 'weed')
+ --Log('Weed Plant Respawned At ' .. plants.weed[loc].location, 'weed')
end)
end,
allow = Config.Drugs.weed
diff --git a/server/recipes.lua b/server/recipes.lua
index 63e4f28..d46e3b7 100644
--- a/server/recipes.lua
+++ b/server/recipes.lua
@@ -136,7 +136,8 @@ local recipe = {
}
function GetRecipe(source, type, method, tier)
- ps.craftItem(source,recipe[type][method][tier])
+ print(ps.craftItem(source,recipe[type][method][tier]))
+ return ps.craftItem(source,recipe[type][method][tier])
end
ps.registerCallback('md-drugs:server:GetRecipe', function(source, type, cat)
diff --git a/server/shops.lua b/server/shops.lua
index acbe2f0..39b5f4f 100644
--- a/server/shops.lua
+++ b/server/shops.lua
@@ -73,7 +73,7 @@ RegisterServerEvent("md-drugs:server:purchaseGoods", function(amount, money, ite
if not table[i].price == price then return end
if Player.Functions.RemoveMoney(tostring(money), tonumber(table[i].price) * tonumber(amount)) then
AddItem(src, item, amount)
- Log(GetName(src) .. ' Bought ' .. amount .. ' Of ' .. item .. ' For ' .. tonumber(price) * tonumber(amount) .. '!', 'merchant')
+ --Log(GetName(src) .. ' Bought ' .. amount .. ' Of ' .. item .. ' For ' .. tonumber(price) * tonumber(amount) .. '!', 'merchant')
end
end
end
diff --git a/server/shrooms.lua b/server/shrooms.lua
index 621bd70..72a76f6 100644
--- a/server/shrooms.lua
+++ b/server/shrooms.lua
@@ -3,8 +3,8 @@ CUI('shrooms', function(source, item)
local src = source
if TriggerClientEvent('md-drugs:client:takeshrooms', src, item.name) then
RemoveItem(src, 'shrooms', 1)
- Log(GetName(source) .. ' Took Some Mushrooms', 'shrooms')
- Notifys(src, 'You Took Some Shrooms!', 'success')
+ --Log(GetName(source) .. ' Took Some Mushrooms', 'shrooms')
+ ps.notify(src, 'You Took Some Shrooms!', 'success')
end
end)
diff --git a/server/weed.lua b/server/weed.lua
index 9ecdf3d..e980c41 100644
--- a/server/weed.lua
+++ b/server/weed.lua
@@ -7,9 +7,9 @@ RegisterServerEvent('md-drugs:server:dryoutweed', function()
local Player = getPlayer(src)
if RemoveItem(src,"wetcannabis", 1) then
AddItem(src,"drycannabis", 1)
- Log(GetName(source) .. ' Dried Weed', 'weed')
+ --Log(GetName(source) .. ' Dried Weed', 'weed')
else
- Notifys(src, Lang.Weed.nodry, "error")
+ ps.notify(src, Lang.Weed.nodry, "error")
end
end)
@@ -49,7 +49,7 @@ CUI("dabrig", function(source, item)
TriggerClientEvent("md-drugs:client:dodabs", src)
end
else
- Notifys(src, 'You Need A Butane Torch', 'error')
+ ps.notify(src, 'You Need A Butane Torch', 'error')
end
end)
@@ -57,7 +57,7 @@ CUI("weedgrinder", function(source, item)
local src = source
local Player = getPlayer(src)
local has = Player.Functions.GetItemByName("drycannabis")
- if not has then Notifys(src, 'You Need Dried Cannabis', 'error') return end
+ if not has then ps.notify(src, 'You Need Dried Cannabis', 'error') return end
local check = ps.callback('md-drugs:client:uncuff', src, 'Grinding Weed')
if not check then return end
if RemoveItem(src, "drycannabis",1 ) then
diff --git a/server/wholesale.lua b/server/wholesale.lua
index 12e6e0d..9f3f8eb 100644
--- a/server/wholesale.lua
+++ b/server/wholesale.lua
@@ -19,10 +19,10 @@ for k, v in pairs (burners) do
CUI(k, function(source, item)
local src = source
local Player = getPlayer(src)
- if getCops() < Config.PoliceCount then return Notifys(src, Lang.Wholesale.na, 'error') end
+ if getCops() < Config.PoliceCount then return ps.notify(src, Lang.Wholesale.na, 'error') end
for m, d in pairs (active) do
if d.cid == Player.PlayerData.citizenid then
- return Notifys(src, Lang.Wholesale.al, 'error' )
+ return ps.notify(src, Lang.Wholesale.al, 'error' )
end
end
local tab = ''
diff --git a/server/xtc.lua b/server/xtc.lua
index 86c3d03..326a6cd 100644
--- a/server/xtc.lua
+++ b/server/xtc.lua
@@ -125,9 +125,9 @@ RegisterServerEvent('md-drugs:server:buypress', function()
if Player.Functions.RemoveMoney("cash", 20000) then
AddItem(src, "singlepress", 1)
- Log(GetName(source) .. ' Bought A Pill Press', 'xtc')
+ --Log(GetName(source) .. ' Bought A Pill Press', 'xtc')
else
- Notifys(Lang.xtc.cash, "error")
+ ps.notify(Lang.xtc.cash, "error")
end
end)
@@ -140,7 +140,7 @@ RegisterServerEvent('md-drugs:server:upgradepress', function(data)
elseif data == 'quad' then
if not GetRecipe(src, 'xtc', 'press', 'quad') then return end
else
- Notifys(src, 'huh', 'error')
+ ps.notify(src, 'huh', 'error')
end
end)
@@ -170,7 +170,7 @@ RegisterServerEvent('md-drugs:server:stampwhite', function(num)
elseif RemoveItem(src, "white_xtc4", 1) then
AddItem(src, four[chance], 1)
else
- Notifys('You Dont Have Unstamped White Pills', 'error')
+ ps.notify('You Dont Have Unstamped White Pills', 'error')
end
end)
@@ -192,7 +192,7 @@ RegisterServerEvent('md-drugs:server:stampred', function(num)
elseif RemoveItem(src, "red_xtc4", 1) then
AddItem(src, four[chance], 1)
else
- Notifys('You Dont Have Unstamped red Pills', 'error')
+ ps.notify('You Dont Have Unstamped red Pills', 'error')
end
end)
@@ -214,7 +214,7 @@ RegisterServerEvent('md-drugs:server:stamporange', function(num)
elseif RemoveItem(src, "orange_xtc4", 1) then
AddItem(src, four[chance], 1)
else
- Notifys('You Dont Have Unstamped orange Pills', 'error')
+ ps.notify('You Dont Have Unstamped orange Pills', 'error')
end
end)
@@ -235,7 +235,7 @@ RegisterServerEvent('md-drugs:server:stampblue', function(num)
elseif RemoveItem(src, "blue_xtc4", 1) then
AddItem(src, four[chance], 1)
else
- Notifys('You Dont Have Unstamped blue Pills', 'error')
+ ps.notify('You Dont Have Unstamped blue Pills', 'error')
end
end)
diff --git a/shared/config.lua b/shared/config.lua
index b763867..a1b66cb 100644
--- a/shared/config.lua
+++ b/shared/config.lua
@@ -57,10 +57,10 @@ Config.Drugs = {
cornerselling = true,
heroin = true,
deliveries = false,
- lean = false,
- lsd = false,
+ lean = true,
+ lsd = true,
mescaline = true,
- meth = false,
+ meth = true,
oxyruns = false,
pharma = false,
shrooms = true,
From daa1a4f8a334cc5b1acdc6adfbe80f7998ed0537 Mon Sep 17 00:00:00 2001
From: Mustache Dom <123716453+Mustachedom@users.noreply.github.com>
Date: Fri, 18 Jul 2025 01:19:12 -0700
Subject: [PATCH 09/37] fuckin christ
---
client/animationsandfunctions.lua | 221 ------------------------------
client/cocaine.lua | 118 +++++++++++++++-
client/cornerselling.lua | 2 +-
client/lean.lua | 4 +-
client/meth.lua | 80 +++++++++++
client/oxyruns.lua | 148 +++++++++++---------
client/pharma.lua | 29 +++-
server/locations.lua | 6 +
server/meth.lua | 44 ++++--
server/oxyruns.lua | 55 ++++----
server/pharma.lua | 98 ++++++-------
shared/config.lua | 4 +-
12 files changed, 425 insertions(+), 384 deletions(-)
diff --git a/client/animationsandfunctions.lua b/client/animationsandfunctions.lua
index 5d152aa..e8fef1a 100644
--- a/client/animationsandfunctions.lua
+++ b/client/animationsandfunctions.lua
@@ -1,121 +1,5 @@
local started = nil
-function CutCoke(coords, offset, rotation)
- local animDict, animName = "anim@amb@business@coc@coc_unpack_cut_left@", "coke_cut_v5_coccutter"
- ps.requestAnim(animDict, 500)
- local animDuration = GetAnimDuration(animDict, animName) * 1000
- local ped = PlayerPedId()
- local scenePos, sceneRot = vector3(coords.x + offset.x, coords.y + offset.y,coords.z + offset.z), rotation
- local scenes = {
- {
- { hash = "bkr_prop_coke_bakingsoda_o", animName = "coke_cut_v5_bakingsoda"},
- { hash = "prop_cs_credit_card", animName = "coke_cut_v5_creditcard"},
- { hash = "prop_cs_credit_card", animName = "coke_cut_v5_creditcard^1"}
- },
-}
- local scenesList, entitiesList = {}, {}
- for i=1, #scenes, 1 do
- local scene = NetworkCreateSynchronisedScene(scenePos, sceneRot, 2, false, false, 1065353216, 0, 1.3)
- NetworkAddPedToSynchronisedScene(ped, scene, animDict, animName, 1.5, -4.0, 1, 16, 1148846080, 0)
- for j=1, #scenes[i], 1 do
- local s = scenes[i][j]
- RequestModel(s.hash)
- while not HasModelLoaded(s.hash) do
- Wait(0)
- end
- local obj = CreateObjectNoOffset(s.hash, coords, true, true, true)
- SetModelAsNoLongerNeeded(s.hash)
- entitiesList[#entitiesList+1] = obj
- NetworkAddEntityToSynchronisedScene(obj, scene, animDict, s.animName, 4.0, -8.0, 1)
- end
- scenesList[#scenesList+1] = scene
- end
- DisableCamCollisionForEntity(ped)
- FreezeEntityPosition(ped, true)
- for i=1, #scenesList, 1 do
- NetworkStartSynchronisedScene(scenesList[i])
- end
-
- Wait(animDuration-11000)
- for i=1, #scenesList, 1 do
- NetworkStopSynchronisedScene(scenesList[i])
- end
- for i=1, #entitiesList, 1 do
- DeleteEntity(entitiesList[i])
- end
- RemoveAnimDict(animDict)
- FreezeEntityPosition(ped, false)
-end
-
-CreateThread(function()
- BikerCocaine = exports['bob74_ipl']:GetBikerCocaineObject()
- BikerCocaine.Style.Set(BikerCocaine.Style.upgrade)
- BikerCocaine.Security.Set(BikerCocaine.Security.upgrade)
- BikerCocaine.Details.Enable({BikerCocaine.Details.cokeBasic1, BikerCocaine.Details.cokeBasic2, BikerCocaine.Details.cokeBasic3}, true)
-end)
-
-function BagCoke(coords, offset, rotation)
-local ver = ""
- local animDict, animName = "anim@amb@business@meth@meth_smash_weight_check@", "break_weigh_"..ver.."char01"
- ps.requestAnim(animDict, 500)
- local animDuration = GetAnimDuration(animDict, animName) * 1000
- local ped = PlayerPedId()
- local scenePos, sceneRot = vector3(coords.x + offset.x, coords.y + offset.y,coords.z + offset.z), rotation
- local scenes = {
- {
- { hash = "bkr_prop_coke_cutblock_01", animName = "break_weigh_"..ver.."box01"},
- { hash = "bkr_prop_coke_fullmetalbowl_02", animName = "break_weigh_"..ver.."box01^1"},
- { hash = "bkr_prop_coke_cutblock_01", animName = "break_weigh_"..ver.."methbag01"}
- },
- {
- { hash = "xm3_prop_xm3_bag_coke_01a", animName = "break_weigh_"..ver.."methbag01^1"},
- { hash = "xm3_prop_xm3_bag_coke_01a", animName = "break_weigh_"..ver.."methbag01^2"},
- { hash = "xm3_prop_xm3_bag_coke_01a", animName = "break_weigh_"..ver.."methbag01^3"}
- },
- {
- { hash = "bkr_prop_coke_fullscoop_01a", animName = "break_weigh_"..ver.."scoop"},
- { hash = "bkr_prop_coke_scale_01", animName = "break_weigh_"..ver.."scale"},
- { hash = "bkr_prop_fakeid_penclipboard", animName = "break_weigh_"..ver.."pen"}
- },
- {
- { hash = "bkr_prop_fakeid_clipboard_01a", animName = "break_weigh_"..ver.."clipboard"},
-
- }
-}
-local scenesList, entitiesList = {}, {}
-for i=1, #scenes, 1 do
- local scene = NetworkCreateSynchronisedScene(scenePos, sceneRot, 2, false, false, 1065353216, 0, 1.3)
- NetworkAddPedToSynchronisedScene(ped, scene, animDict, animName, 1.5, -4.0, 1, 16, 1148846080, 0)
- for j=1, #scenes[i], 1 do
- local s = scenes[i][j]
- RequestModel(s.hash)
- while not HasModelLoaded(s.hash) do
- Wait(0)
- end
- local obj = CreateObjectNoOffset(s.hash, coords, true, true, true)
- SetModelAsNoLongerNeeded(s.hash)
- entitiesList[#entitiesList+1] = obj
- NetworkAddEntityToSynchronisedScene(obj, scene, animDict, s.animName, 4.0, -8.0, 1)
- end
- scenesList[#scenesList+1] = scene
-end
-DisableCamCollisionForEntity(ped)
-FreezeEntityPosition(ped, true)
-for i=1, #scenesList, 1 do
- NetworkStartSynchronisedScene(scenesList[i])
-end
-
-Wait(animDuration-11000)
-for i=1, #scenesList, 1 do
- NetworkStopSynchronisedScene(scenesList[i])
-end
-for i=1, #entitiesList, 1 do
- DeleteEntity(entitiesList[i])
-end
-RemoveAnimDict(animDict)
-FreezeEntityPosition(ped, false)
-end
-
function EcstasyEffect()
local startStamina = 50
SetFlash(0, 0, 500, 20000, 500)
@@ -204,111 +88,6 @@ function AlienEffect()
StopScreenEffect("DrugsMichaelAliensFightOut")
end
-local hit = 0
-function SpawnCarPedChase()
- ps.debug("SpawnCarPedChase")
- local stoploc = vector3(-1157.63, -3056.71, 13.94)
- local start = GlobalState.MDDrugsLocs.StartLoc[math.random(1,#GlobalState.MDDrugsLocs.StartLoc)]
- if started then
- ps.notify(Lang.lean.act,'error')
- else
- started = true
- ps.requestModel("pounder", Config.RequestModelTime)
- ps.requestModel("ig_priest", Config.RequestModelTime)
- ps.requestModel("cargobob3", Config.RequestModelTime)
- local leancar = CreateVehicle("pounder", start.x+3, start.y-2, start.z-1, 52.0, true, false)
- local driver = CreatePed(26, "ig_priest", start.x, start.y, start.z, 268.9422, false, false)
- local pilot2 = CreatePed(26, "ig_priest", stoploc.x-3, stoploc.y-3, stoploc.z-1, 268.9422, false, false)
- FreezeEntityPosition(pilot2, true)
- SetEntityInvincible(pilot2, true)
- SetEntityAsMissionEntity(leancar)
- AddBlipForEntity(leancar)
- SetPedIntoVehicle(driver, leancar, -1)
- SetPedFleeAttributes(driver,false)
- TaskVehicleDriveToCoordLongrange(driver, leancar, stoploc.x, stoploc.y, stoploc.z-1, 50.0, 524288, 25.0)
- SetPedKeepTask(driver, true)
- repeat
- Wait(1000)
- until #(GetEntityCoords(driver) - stoploc) < 20.0 or GetEntityHealth(driver) == 0
- RemoveBlip(leancar)
- if GetEntityHealth(driver) == 0 then
- ps.entityTarget(leancar, {
- {
- name = 'leancar',
- icon = 'fa-solid fa-car',
- label = Lang.targets.lean.st,
- action = function()
- hit = hit + 1
- if not minigame() then return end
- TriggerServerEvent('md-drugs:server:givelean')
- started = nil
- if math.random(1,100) <= 30 or hit == 4 then
- hit = 0
- DeleteVehicle(leancar)
- DeleteEntity(driver)
- DeleteEntity(pilot2)
- end
- end
- }
- })
- else
- DeleteVehicle(leancar) DeleteEntity(driver) DeleteEntity(pilot2)
- end
-end
-end
-
-function SpawnMethCarPedChase()
-local ped = GetEntityCoords(PlayerPedId())
-local stoploc = vector3(-1157.63, -3056.71, 13.94)
-local config = ps.callback('md-drugs:server:getLocs', false)
-local start = config.StartLoc[math.random(1,#config.StartLoc)]
-local startedmeth = false
-
-if startedmeth then
- ps.notify(Lang.meth.act,'error')
-else
- startedmeth = true
- ps.requestModel("journey", Config.RequestModelTime)
- ps.requestModel("a_m_m_hillbilly_02", Config.RequestModelTime)
- ps.requestModel("cargobob3", Config.RequestModelTime)
- local methcar = CreateVehicle("journey", start.x+3, start.y-2, start.z-1, 52.0, true, false)
- local methdriver = CreatePed(26, "a_m_m_hillbilly_02", start.x, start.y, start.z, 268.9422, false, false)
- local methpilot = CreatePed(26, "a_m_m_hillbilly_02", stoploc.x-3, stoploc.y-3, stoploc.z-1, 268.9422, false, false)
- FreezeEntityPosition(methpilot, true)
- SetEntityInvincible(methpilot, true)
- SetEntityAsMissionEntity(methcar)
- AddBlipForEntity(methcar)
- SetPedIntoVehicle(methdriver, methcar, -1)
- SetPedFleeAttributes(methdriver,false)
- TaskVehicleDriveToCoordLongrange(methdriver, methcar, stoploc.x, stoploc.y, stoploc.z-1, 50.0, 524288, 25.0)
- SetPedKeepTask(methdriver, true)
- repeat
- Wait(1000)
- until #(GetEntityCoords(methdriver) - stoploc) < 20.0 or GetEntityHealth(methdriver) == 0
- if GetEntityHealth(methdriver) == 0 then
- AddSingleModel(methcar,{
- name = 'methcar',
- icon = 'fa-solid fa-car',
- label = Lang.targets.meth.stealfromcar,
- action = function()
- if not minigame() then return end
- TriggerServerEvent('md-drugs:server:givemethingridients')
- startedmeth = false
- if math.random(1,100) <= 30 then
- DeleteVehicle(methcar)
- DeleteEntity(methdriver)
- DeleteEntity(methpilot)
- end
- end,
- }, nil )
- else
- DeleteVehicle(methcar)
- DeleteEntity(methdriver)
- DeleteEntity(methpilot)
- end
-end
-end
-
function SetUpPeds()
AddRelationshipGroup('setups')
local ped = GetEntityCoords(PlayerPedId())
diff --git a/client/cocaine.lua b/client/cocaine.lua
index 6859ed6..7986e29 100644
--- a/client/cocaine.lua
+++ b/client/cocaine.lua
@@ -2,6 +2,115 @@
local cuttingcoke = nil
local baggingcoke = nil
+local function CutCoke(coords, offset, rotation)
+ local animDict, animName = "anim@amb@business@coc@coc_unpack_cut_left@", "coke_cut_v5_coccutter"
+ ps.requestAnim(animDict, 500)
+ local animDuration = GetAnimDuration(animDict, animName) * 1000
+ local ped = PlayerPedId()
+ local scenePos, sceneRot = vector3(coords.x + offset.x, coords.y + offset.y,coords.z + offset.z), rotation
+ local scenes = {
+ {
+ { hash = "bkr_prop_coke_bakingsoda_o", animName = "coke_cut_v5_bakingsoda"},
+ { hash = "prop_cs_credit_card", animName = "coke_cut_v5_creditcard"},
+ { hash = "prop_cs_credit_card", animName = "coke_cut_v5_creditcard^1"}
+ },
+}
+ local scenesList, entitiesList = {}, {}
+ for i=1, #scenes, 1 do
+ local scene = NetworkCreateSynchronisedScene(scenePos, sceneRot, 2, false, false, 1065353216, 0, 1.3)
+ NetworkAddPedToSynchronisedScene(ped, scene, animDict, animName, 1.5, -4.0, 1, 16, 1148846080, 0)
+ for j=1, #scenes[i], 1 do
+ local s = scenes[i][j]
+ RequestModel(s.hash)
+ while not HasModelLoaded(s.hash) do
+ Wait(0)
+ end
+ local obj = CreateObjectNoOffset(s.hash, coords, true, true, true)
+ SetModelAsNoLongerNeeded(s.hash)
+ entitiesList[#entitiesList+1] = obj
+ NetworkAddEntityToSynchronisedScene(obj, scene, animDict, s.animName, 4.0, -8.0, 1)
+ end
+ scenesList[#scenesList+1] = scene
+ end
+ DisableCamCollisionForEntity(ped)
+ FreezeEntityPosition(ped, true)
+ for i=1, #scenesList, 1 do
+ NetworkStartSynchronisedScene(scenesList[i])
+ end
+
+ Wait(animDuration-11000)
+ for i=1, #scenesList, 1 do
+ NetworkStopSynchronisedScene(scenesList[i])
+ end
+ for i=1, #entitiesList, 1 do
+ DeleteEntity(entitiesList[i])
+ end
+ RemoveAnimDict(animDict)
+ FreezeEntityPosition(ped, false)
+end
+
+local function BagCoke(coords, offset, rotation)
+ local ver = ""
+ local animDict, animName = "anim@amb@business@meth@meth_smash_weight_check@", "break_weigh_"..ver.."char01"
+ ps.requestAnim(animDict, 500)
+ local animDuration = GetAnimDuration(animDict, animName) * 1000
+ local ped = PlayerPedId()
+ local scenePos, sceneRot = vector3(coords.x + offset.x, coords.y + offset.y,coords.z + offset.z), rotation
+ local scenes = {
+ {
+ { hash = "bkr_prop_coke_cutblock_01", animName = "break_weigh_"..ver.."box01"},
+ { hash = "bkr_prop_coke_fullmetalbowl_02", animName = "break_weigh_"..ver.."box01^1"},
+ { hash = "bkr_prop_coke_cutblock_01", animName = "break_weigh_"..ver.."methbag01"}
+ },
+ {
+ { hash = "xm3_prop_xm3_bag_coke_01a", animName = "break_weigh_"..ver.."methbag01^1"},
+ { hash = "xm3_prop_xm3_bag_coke_01a", animName = "break_weigh_"..ver.."methbag01^2"},
+ { hash = "xm3_prop_xm3_bag_coke_01a", animName = "break_weigh_"..ver.."methbag01^3"}
+ },
+ {
+ { hash = "bkr_prop_coke_fullscoop_01a", animName = "break_weigh_"..ver.."scoop"},
+ { hash = "bkr_prop_coke_scale_01", animName = "break_weigh_"..ver.."scale"},
+ { hash = "bkr_prop_fakeid_penclipboard", animName = "break_weigh_"..ver.."pen"}
+ },
+ {
+ { hash = "bkr_prop_fakeid_clipboard_01a", animName = "break_weigh_"..ver.."clipboard"},
+
+ }
+ }
+ local scenesList, entitiesList = {}, {}
+ for i=1, #scenes, 1 do
+ local scene = NetworkCreateSynchronisedScene(scenePos, sceneRot, 2, false, false, 1065353216, 0, 1.3)
+ NetworkAddPedToSynchronisedScene(ped, scene, animDict, animName, 1.5, -4.0, 1, 16, 1148846080, 0)
+ for j=1, #scenes[i], 1 do
+ local s = scenes[i][j]
+ RequestModel(s.hash)
+ while not HasModelLoaded(s.hash) do
+ Wait(0)
+ end
+ local obj = CreateObjectNoOffset(s.hash, coords, true, true, true)
+ SetModelAsNoLongerNeeded(s.hash)
+ entitiesList[#entitiesList+1] = obj
+ NetworkAddEntityToSynchronisedScene(obj, scene, animDict, s.animName, 4.0, -8.0, 1)
+ end
+ scenesList[#scenesList+1] = scene
+ end
+ DisableCamCollisionForEntity(ped)
+ FreezeEntityPosition(ped, true)
+ for i=1, #scenesList, 1 do
+ NetworkStartSynchronisedScene(scenesList[i])
+ end
+
+ Wait(animDuration-11000)
+ for i=1, #scenesList, 1 do
+ NetworkStopSynchronisedScene(scenesList[i])
+ end
+ for i=1, #entitiesList, 1 do
+ DeleteEntity(entitiesList[i])
+ end
+ RemoveAnimDict(animDict)
+ FreezeEntityPosition(ped, false)
+end
+
for k, v in pairs (GlobalState.MDDrugsLocs.MakePowder) do
ps.boxTarget('cocaplant'..k, v.loc, {length = v.l, width = v.w, height = 1.0, rotation = v.rot}, {
{
@@ -54,4 +163,11 @@ for k, v in pairs (GlobalState.MDDrugsLocs.BaggingCoke) do
end
}
})
-end
\ No newline at end of file
+end
+
+CreateThread(function()
+ BikerCocaine = exports['bob74_ipl']:GetBikerCocaineObject()
+ BikerCocaine.Style.Set(BikerCocaine.Style.upgrade)
+ BikerCocaine.Security.Set(BikerCocaine.Security.upgrade)
+ BikerCocaine.Details.Enable({BikerCocaine.Details.cokeBasic1, BikerCocaine.Details.cokeBasic2, BikerCocaine.Details.cokeBasic3}, true)
+end)
diff --git a/client/cornerselling.lua b/client/cornerselling.lua
index 0f03a89..e97ff43 100644
--- a/client/cornerselling.lua
+++ b/client/cornerselling.lua
@@ -76,7 +76,7 @@ local function checkItems()
return true
end
-function Cornersell()
+local function Cornersell()
if inZone then sell = false return end
if not sell then
diff --git a/client/lean.lua b/client/lean.lua
index a61a135..f47a2d8 100644
--- a/client/lean.lua
+++ b/client/lean.lua
@@ -2,11 +2,13 @@
local started = false
local hit = 0
-function SpawnCarPedChase()
+local function SpawnCarPedChase()
local stoploc = vector3(-1157.63, -3056.71, 13.94)
local start = GlobalState.MDDrugsLocs.StartLoc[math.random(1,#GlobalState.MDDrugsLocs.StartLoc)]
+
if started then ps.notify(Lang.lean.act,'error') return end
started = true
+
ps.callback('md-drugs:server:RegisterLean')
ps.requestModel("pounder", Config.RequestModelTime)
ps.requestModel("ig_priest", Config.RequestModelTime)
diff --git a/client/meth.lua b/client/meth.lua
index c20d164..7d847db 100644
--- a/client/meth.lua
+++ b/client/meth.lua
@@ -3,6 +3,86 @@ local tray = false
local heated = false
local active = false
local trays = nil
+
+--- meth heist
+local startedmeth = false
+
+local function SpawnMethCarPedChase()
+ local stoploc = vector3(-1157.63, -3056.71, 13.94)
+ local start = GlobalState.MDDrugsLocs.StartLoc[math.random(1,#GlobalState.MDDrugsLocs.StartLoc)]
+ if startedmeth then
+ ps.notify(ps.lang('meth.act'),'error')
+ else
+ startedmeth = true
+ ps.callback('md-drugs:server:RegisterMeth')
+
+ ps.requestModel("journey", Config.RequestModelTime)
+ ps.requestModel("a_m_m_hillbilly_02", Config.RequestModelTime)
+ ps.requestModel("cargobob3", Config.RequestModelTime)
+
+ local methcar = CreateVehicle("journey", start.x+3, start.y-2, start.z-1, 52.0, true, false)
+ local methdriver = CreatePed(26, "a_m_m_hillbilly_02", start.x, start.y, start.z, 268.9422, false, false)
+ local methpilot = CreatePed(26, "a_m_m_hillbilly_02", stoploc.x-3, stoploc.y-3, stoploc.z-1, 268.9422, false, false)
+
+ FreezeEntityPosition(methpilot, true)
+ SetEntityInvincible(methpilot, true)
+ SetEntityAsMissionEntity(methcar)
+ AddBlipForEntity(methcar)
+ SetPedIntoVehicle(methdriver, methcar, -1)
+ SetPedFleeAttributes(methdriver,false)
+ TaskVehicleDriveToCoordLongrange(methdriver, methcar, stoploc.x, stoploc.y, stoploc.z-1, 50.0, 524288, 25.0)
+ SetPedKeepTask(methdriver, true)
+
+ repeat
+ Wait(1000)
+ until #(GetEntityCoords(methdriver) - stoploc) < 20.0 or GetEntityHealth(methdriver) == 0
+
+ if GetEntityHealth(methdriver) == 0 then
+ ps.entityTarget(methcar, {
+ {
+ name = 'methcar',
+ icon = 'fa-solid fa-car',
+ label = Lang.targets.meth.stealfromcar,
+ action = function()
+ if not minigame() then return end
+ TriggerServerEvent('md-drugs:server:givemethingridients')
+ startedmeth = false
+ if math.random(1,100) <= 30 then
+ DeleteVehicle(methcar)
+ DeleteEntity(methdriver)
+ DeleteEntity(methpilot)
+ end
+ end,
+ }
+ })
+ else
+ DeleteVehicle(methcar)
+ DeleteEntity(methdriver)
+ DeleteEntity(methpilot)
+ end
+ end
+end
+
+local peds = {}
+for k, v in pairs (GlobalState.MDDrugsLocs.MethHeist) do
+ peds[k] = CreatePed(4, GetHashKey(v.ped), v.loc.x, v.loc.y, v.loc.z, v.loc.w, false, true)
+ Freeze(peds[k], true, v.loc.w)
+ ps.entityTarget(peds[k], {
+ {
+ name = 'methheist'..k,
+ icon = 'fa-solid fa-user-secret',
+ label = ps.lang('targets.meth.heist'),
+ action = function()
+ if startedmeth then ps.notify(ps.lang('meth.act'),'error') return end
+ SpawnMethCarPedChase()
+ end,
+ canInteract = function()
+ return handleGang(v.gang)
+ end
+ }
+ })
+end
+
---- start animation shit
local function loadParticle(dict)
if not HasNamedPtfxAssetLoaded(dict) then
diff --git a/client/oxyruns.lua b/client/oxyruns.lua
index 1661fa8..3eb8391 100644
--- a/client/oxyruns.lua
+++ b/client/oxyruns.lua
@@ -1,74 +1,90 @@
local carryPackage = nil
+local onMission = false
-RegisterNetEvent("md-drugs:client:GetOxyCar", function()
- lib.requestModel("burrito3", Config.RequestModelTime)
- local paid = ps.callback('md-drugs:server:payfortruck', false)
- if not paid then return end
- local loca = ps.callback('md-drugs:server:getLocs', false)
- local loc = loca.singleSpot.truckspawn
- local oxycar = CreateVehicle("burrito3",loc.x, loc.y,loc.z, loc.w, true, false)
- exports[Config.Fuel]:SetFuel(oxycar, 100.0)
- TriggerEvent("vehiclekeys:client:SetOwner", GetVehicleNumberPlateText(oxycar))
- ps.notify(Lang.oxy.truck, 'success')
- TriggerEvent("md-drugs:client:getoxylocationroute")
- AddSingleModel(oxycar, { event = "md-drugs:client:getfromtrunk", icon = "fa-solid fa-box", label = Lang.targets.oxy.pack}, nil )
-end)
+local function getRoute()
+ local Route = ps.callback('md-drugs:server:getRoute')
+ if not Route then
+ ps.notify(ps.lang('oxy.done'), "success")
+ onMission = false
+ return false
+ end
-RegisterNetEvent("md-drugs:client:getoxylocationroute", function()
- local config = ps.callback('md-drugs:server:getLocs', false)
- local loc = config.oxylocations[math.random(#config.oxylocations)]
- if loc ~= nil then
- SetNewWaypoint(loc.x, loc.y)
- local current = "g_m_y_famdnf_01"
- lib.requestModel(current, Config.RequestModelTime)
- local oxybuyer = CreatePed(0, current,loc.x,loc.y,loc.z-1, loc.w, false, false)
- Freeze(oxybuyer, true, loc.w)
- repeat
- Wait(1000)
- until #(GetEntityCoords(PlayerPedId()) - vector3(loc.x,loc.y,loc.z)) < 5.0
- PoliceCall(Config.PoliceAlertOxy)
- AddSingleModel(oxybuyer, { type = "client", label = Lang.targets.oxy.talk, icon = "fa-solid fa-dollar-sign",
- action = function()
- if carryPackage then
- if not ps.progressbar(Lang.oxy.hand, 4000, 'uncuff') then return end
- TriggerServerEvent("md-drugs:server:giveoxybox")
- DeleteEntity(oxybuyer)
- DetachEntity(carryPackage, true, true)
- DeleteObject(carryPackage)
- carryPackage = nil
- else
- ps.notify(Lang.oxy.empty, "error")
+ SetNewWaypoint(Route.x, Route.y)
+ ps.requestModel('g_m_y_famdnf_01', Config.RequestModelTime)
+ local oxybuyer = CreatePed(0, 'g_m_y_famdnf_01',Route.x,Route.y,Route.z-1, Route.w, false, false)
+ Freeze(oxybuyer, true, Route.w)
+ local timeOut = 300
+
+ repeat
+ Wait(1000)
+ timeOut = timeOut - 1
+ until #(GetEntityCoords(PlayerPedId()) - vector3(Route.x,Route.y,Route.z)) < 5.0 or timeOut == 0
+
+ PoliceCall(Config.PoliceAlertOxy)
+ ps.entityTarget(oxybuyer,{
+ {
+ label = ps.lang('targets.oxy.talk'),
+ icon = "fa-solid fa-dollar-sign",
+ action = function()
+ if carryPackage then
+ if not ps.progressbar(ps.lang('oxy.hand'), 4000, 'uncuff') then return end
+ TriggerServerEvent("md-drugs:server:giveoxybox")
+ DeleteEntity(oxybuyer)
+ DetachEntity(carryPackage, true, true)
+ DeleteObject(carryPackage)
+ carryPackage = nil
+ getRoute()
+ else
+ ps.notify(ps.lang('oxy.empty'), "error")
+ end
end
- end}, oxybuyer)
- end
-end)
+ }
+ })
+end
+for k, v in pairs(GlobalState.MDDrugsLocs.OxyPayForTruck) do
+ ps.boxTarget('oxyTruckPur' ..k , v.loc, {length = v.l, width = v.w, heading = v.rot}, {
+ {
+ icon = 'fa-solid fa-truck-fast',
+ label = ps.lang('targets.oxy.buytruck'),
+ action = function()
+ ps.requestModel("burrito3", Config.RequestModelTime)
-RegisterNetEvent("md-drugs:client:getfromtrunk", function()
- if carryPackage then
- ps.notify(Lang.oxy.cantcarry, "error")
- else
- local pos = GetEntityCoords(PlayerPedId(), true)
- lib.requestAnimDict('anim@heists@box_carry@')
- TaskPlayAnim(PlayerPedId(), 'anim@heists@box_carry@', 'idle', 5.0, -1, -1, 50, 0, false, false, false)
- lib.RequestModel("hei_prop_drug_statue_box_big")
- local object = CreateObject("hei_prop_drug_statue_box_big", pos.x, pos.y, pos.z, true, true, true)
- AttachEntityToEntity(object, PlayerPedId(), GetPedBoneIndex(PlayerPedId(), 57005), 0.05, 0.1, -0.3, 300.0, 250.0, 20.0, true, true, false, true, 1, true)
- carryPackage = object
- end
-end)
+ local paid = ps.callback('md-drugs:server:payfortruck', false)
+ if not paid then return end
+ local oxycar = CreateVehicle("burrito3",v.truckSpawn.x, v.truckSpawn.y, v.truckSpawn.z, v.truckSpawn.w, true, false)
+ exports[Config.Fuel]:SetFuel(oxycar, 100.0)
+ TriggerEvent("vehiclekeys:client:SetOwner", GetVehicleNumberPlateText(oxycar))
+ ps.notify(ps.lang('oxy.truck'), 'success')
+ onMission = true
+ getRoute()
-RegisterNetEvent("md-drugs:client:giveoxybox", function(data)
- if carryPackage then
- if not ps.progressbar(Lang.oxy.hand, 4000, 'uncuff') then return end
- TriggerServerEvent("md-drugs:server:giveoxybox")
- DeleteEntity(data.ped)
- DetachEntity(carryPackage, true, true)
- DeleteObject(carryPackage)
- carryPackage = nil
- else
- ps.notify(Lang.oxy.empty, "error")
- end
-end)
-
+ ps.entityTarget(oxycar, {
+ {
+ icon = "fa-solid fa-box",
+ label = ps.lang('targets.oxy.pack'),
+ action = function()
+ if carryPackage then
+ ps.notify(ps.lang('oxy.cantcarry'), "error")
+ else
+ local pos = GetEntityCoords(PlayerPedId(), true)
+ ps.requestAnim('anim@heists@box_carry@')
+ TaskPlayAnim(PlayerPedId(), 'anim@heists@box_carry@', 'idle', 5.0, -1, -1, 50, 0, false, false, false)
+ ps.requestModel("hei_prop_drug_statue_box_big")
+ carryPackage = CreateObject("hei_prop_drug_statue_box_big", pos.x, pos.y, pos.z, true, true, true)
+ AttachEntityToEntity(carryPackage, PlayerPedId(), GetPedBoneIndex(PlayerPedId(), 57005), 0.05, 0.1, -0.3, 300.0, 250.0, 20.0, true, true, false, true, 1, true)
+ end
+ end,
+ }
+ })
+ end,
+ canInteract = function()
+ if onMission then
+ return false
+ end
+ return true
+ end
+ }
+ })
+end
\ No newline at end of file
diff --git a/client/pharma.lua b/client/pharma.lua
index 7650c5e..9de6785 100644
--- a/client/pharma.lua
+++ b/client/pharma.lua
@@ -1,20 +1,35 @@
ps.registerCallback("md-drugs:client:prescriptionpad", function(data, op)
if ps.getJobType() ~= 'ems' then return end
- local input = lib.inputDialog('Who To Give A Prescription To?',{
- {type = 'select', label = 'Player Name', options = data},
- {type = 'select', label = 'Prescription', options = op}})
+ local input = exports.ps_lib:input('Who To Give A Prescription To?',{
+ {type = 'select', title = 'Player Name', options = data},
+ {type = 'select', title = 'Prescription', options = op}
+ })
if not input[1] then return end
- if not ps.progressbar(Lang.Pharma.write, 4000, 'notepad') then return end
- return {who = input[1], what = input[2]}
+ if not ps.progressbar(ps.lang('Pharma.write'), 4000, 'notepad') then return end
+ return {who = input[1], what = input[2]}
end)
RegisterNetEvent("md-drugs:client:fillprescription", function(data)
- if not ps.progressbar(Lang.Pharma.fill, 4000, 'uncuff') then return end
+ if not ps.progressbar(ps.lang('Pharma.fill'), 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:fillprescription", data.data)
end)
ps.registerCallback("md-drugs:client:unbottle", function()
- if not ps.progressbar(Lang.Pharma.open, 4000, 'uncuff') then return end
+ if not ps.progressbar(ps.lang('Pharma.open'), 4000, 'uncuff') then return end
return true
end)
+
+
+for k, v in pairs (GlobalState.MDDrugsLocs.FillPrescription) do
+ ps.boxTarget('pharma' ..k , v.loc, {length = v.l, width = v.w, heading = v.rot}, {
+ {
+ icon = 'fa-solid fa-capsules',
+ label = ps.lang('Pharma.fillprescription'),
+ action = function()
+ if not ps.progressbar(ps.lang('Pharma.fill'), 4000, 'uncuff') then return end
+ TriggerServerEvent("md-drugs:server:fillprescription", k)
+ end
+ }
+ })
+end
\ No newline at end of file
diff --git a/server/locations.lua b/server/locations.lua
index 3083dae..66e8e96 100644
--- a/server/locations.lua
+++ b/server/locations.lua
@@ -89,9 +89,15 @@ local Target = {
Methace = { -- get acetone
{loc = vector3(3535.41, 3661.05, 28.12), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
},
+ MethHeist = {
+ {loc = vector4(-1520.84, 827.72, 181.66, 184.13), ped = 'a_m_m_farmer_01', gang = ""},
+ },
SyrupVendor = {
{ped = 'a_m_m_farmer_01', loc = vector4(365.21, -578.77, 39.30, 347.23), l = 1.0, w = 1.0, rot = 347.23, gang = ""},
},
+ OxyPayForTruck = {
+ {loc = vector3(1437.64, -1491.91, 63.62), truckSpawn = vector4(1450.87, -1482.13, 63.22, 69.95), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
+ },
singleSpot = {
CokeTeleIn = vector3(198.16, -1276.92, 29.33), -- where you target to go inside coke
CokeTeleOut = vector3(1088.81, -3187.57, -38.99), -- where you target to leave coke
diff --git a/server/meth.lua b/server/meth.lua
index a1875b2..79cb2b9 100644
--- a/server/meth.lua
+++ b/server/meth.lua
@@ -1,6 +1,6 @@
local onRun = {}
-
+local cool = {}
local function setTimeout(identifier)
if onRun[identifier] then
CreateThread(function()
@@ -10,6 +10,19 @@ local function setTimeout(identifier)
end
end
+local function coolDown(identifier)
+ if cool[identifier] then
+ return false
+ else
+ cool[identifier] = true
+ CreateThread(function()
+ Wait(3500)
+ cool[identifier] = nil
+ end)
+ return true
+ end
+end
+
RegisterServerEvent('md-drugs:server:givemethingridients', function()
local src = source
local amount = math.random(1,5)
@@ -38,17 +51,19 @@ end)
RegisterServerEvent('md-drugs:server:geteph', function(num)
local src = source
- if not checkLoc(src, 'MethEph', num) then return end
- if AddItem(src, 'ephedrine', 1) then
+ if not ps.checkDistance(src, GlobalState.MDDrugsLocs.MethEph[num].loc, 2.5) then return end
+ if not coolDown(ps.getIdentifier(src)) then return ps.notify(src, ps.lang('meth.wait'), "error") end
+ if ps.addItem(src, 'ephedrine', 1) then
ps.notify(src, 'Got Ephedrine!', "success")
end
end)
-
+
RegisterServerEvent('md-drugs:server:getace', function(num)
local src = source
- if not checkLoc(src, 'Methace', num) then return end
- if AddItem(src, 'acetone', 1) then
- --Log(GetName(src) .. ' Got ' .. 1 .. 'Of Acetone', 'Meth')
+ if not ps.checkDistance(src, GlobalState.MDDrugsLocs.MethAce[num].loc, 2.5) then return end
+ if not coolDown(ps.getIdentifier(src)) then return ps.notify(src, ps.lang('meth.wait'), "error") end
+ if ps.addItem(src, 'acetone', 1) then
+ ps.notify(src, 'Got Acetone!', "success")
end
end)
@@ -56,6 +71,17 @@ ps.registerCallback('md-drugs:server:startcook', function(source, num)
local src = source
if not ps.checkDistance(src, GlobalState.MDDrugsLocs.CookMeth[num].loc, 2.5) then return false end
local recipe = GetRecipe(src, 'meth', 'cook', 'heat')
- ps.debug(recipe)
return recipe
-end)
\ No newline at end of file
+end)
+
+ps.registerCallback('md-drugs:server:registerMeth', function(source)
+ local identifier = ps.getIdentifier(source)
+ if not identifier then return false end
+ if onRun[identifier] then
+ return false
+ else
+ onRun[identifier] = 0
+ setTimeout(identifier)
+ return true
+ end
+end)
diff --git a/server/oxyruns.lua b/server/oxyruns.lua
index 82a77d3..165ff9d 100644
--- a/server/oxyruns.lua
+++ b/server/oxyruns.lua
@@ -1,17 +1,17 @@
-QBCore = exports['qb-core']:GetCoreObject()
local prices = {
payfortruck = 500,
hotchance = 30,
itemChance = 20,
}
-ps.registerCallback('md-drugs:server:payfortruck', function()
+local onRoute = {}
+ps.registerCallback('md-drugs:server:payfortruck', function(source)
local src = source
- local Player = getPlayer(src)
- if Player.Functions.RemoveMoney('cash', prices.payfortruck) or Player.Functions.RemoveMoney('bank', prices.payfortruck) then
- --Log(GetName(src) .. ' Rented A Van For OxyRuns', 'oxy')
+ if ps.removeMoney(src, 'cash', prices.payfortruck) or ps.removeMoney(src, 'bank', prices.payfortruck) then
+ onRoute[src] = true
+ ps.notify(src, ps.lang('oxy.paid') .. prices.payfortruck, "success")
return true
else
- ps.notify(src, Lang.oxy.broke, "error")
+ ps.notify(src, ps.lang('oxy.broke'), "error")
return false
end
end)
@@ -19,29 +19,38 @@ end)
RegisterServerEvent('md-drugs:server:giveoxybox', function()
local src = source
- local Player = getPlayer(src)
- local chance = math.random(1,100)
- local cash = 200
+ if not onRoute[src] then
+ ps.notify(src, ps.lang('oxy.notonroute'), "error")
+ return
+ end
+
+ if not ps.checkDistance(src, GlobalState.MDDrugsLocs.oxylocations[onRoute[src]], 3.5) then
+ ps.notify(src, ps.lang('oxy.toofar'), "error")
+ return
+ end
+
+ local cash = math.random(50, 200)
local itemchance = math.random(1,100)
local itemList = {
{item = 'oxy', amount = 2},
{item = 'houselockpick', amount = 1},
}
local item = itemList[math.random(1, #itemList)]
- if chance <= prices.hotchance then
- ps.notify(src, Lang.oxy.hot, "error")
- Player.Functions.AddMoney("cash", cash * 0.5)
- if itemchance <= prices.itemChance then
- AddItem(src, item.item, item.amount)
- end
- else
- ps.notify(Lang.oxy.next, "success")
- TriggerClientEvent("md-drugs:client:getoxylocationroute", src)
- Player.Functions.AddMoney("cash", cash)
- if itemchance <= prices.itemChance then
- AddItem(src, item.item, item.amount)
- end
+ ps.addMoney(src,"cash", cash)
+ if itemchance <= prices.itemChance then
+ ps.addItem(src, item.item, item.amount)
+ end
+end)
+
+ps.registerCallback('md-drugs:server:getRoute', function(source)
+ if not onRoute[source] then return false end
+ local giveLocation = math.random(1, 10)
+ if giveLocation == 10 then
+ onRoute[source] = nil
+ return false
+ else
+ onRoute[source] = math.random(1, #GlobalState.MDDrugsLocs.oxylocations)
+ return GlobalState.MDDrugsLocs.oxylocations[onRoute[source]]
end
-
end)
diff --git a/server/pharma.lua b/server/pharma.lua
index f0f3454..c08a08d 100644
--- a/server/pharma.lua
+++ b/server/pharma.lua
@@ -1,75 +1,67 @@
local QBCore = exports['qb-core']:GetCoreObject()
-local function GetJob(source)
+local function GetJob(source)
local src = source
- local Player = getPlayer(src)
- if Player.PlayerData.job.type == 'ems' then
- return true
- else
- ps.notify(src, 'You Must Be EMS To Do This', 'error')
- return false
- end
+ return ps.getJobType(src) == 'ems'
end
-CUI('prescription_pad', function(source, item)
+ps.createUseable('prescription_pad', function(source, item)
local src = source
local near = {}
- if GetJob(src) then
- for k, v in pairs (QBCore.Functions.GetQBPlayers()) do
- local targ = QBCore.Functions.GetPlayerByCitizenId(v.PlayerData.citizenid)
- local tname = GetName(v.PlayerData.source)
- local ped, tped = GetPlayerPed(src), GetPlayerPed(v.PlayerData.source)
- local dist = #(GetEntityCoords(ped) - GetEntityCoords(tped))
- if dist < 5.0 then
- table.insert(near, {label = tname, value = targ.PlayerData.citizenid})
- end
- end
- local options = { {label = 'Vicodin', value = 'vicodin_prescription'}, {label = 'Adderal', value = 'adderal_prescription'}, {label = 'Morphine', value = 'morphine_prescription'},{label = 'Xanax', value = 'xanax_prescription'}}
+ if GetJob(src) then
+ local near = ps.getNearbyPlayers(src, 5.0)
+
+ local options = {
+ {label = 'Vicodin', value = 'vicodin_prescription'},
+ {label = 'Adderal', value = 'adderal_prescription'},
+ {label = 'Morphine', value = 'morphine_prescription'},
+ {label = 'Xanax', value = 'xanax_prescription'}
+ }
local data = ps.callback('md-drugs:client:prescriptionpad', src, near, options)
- if type(data) == 'table' then
- local give = QBCore.Functions.GetPlayerByCitizenId(data.who)
- for i = 1, #options do
- if data.what == options[i].value then
- AddItem(give.PlayerData.source, data.what, 1)
- end
- end
- end
+ if not data then return ps.notify(src, ps.lang('Pharma.cancel'), "error") end
+ ps.addItem(ps.getSource(data.who), data.what, 1)
end
end)
local pharmabottle = {'vicodinbottle', 'adderalbottle','morphinebottle','xanaxbottle'}
for m, d in pairs (pharmabottle) do
-CUI(d, function(source, item)
- local src = source
- local Player = getPlayer(src)
- local check = ps.callback("md-drugs:client:unbottle", src)
- if check then
- local get = {
- ['vicodinbottle'] = 'vicodin',
- ['adderalbottle'] = 'adderal',
- ['morphinebottle'] = 'morphine',
- ['xanaxbottle'] = 'xanax'
- }
- for k, v in pairs (get) do
- if d == k then
- RemoveItem(src, d, 1)
- AddItem(src, v, math.random(10,30))
- ps.notify(src,Lang.Pharma.unbottle, "success")
- --Log(GetName(src) .. ' Unbottled 30 Of ' .. v .. '!', 'pharma')
+ ps.createUseable(d, function(source, item)
+ local src = source
+ local check = ps.callback("md-drugs:client:unbottle", src)
+ if check then
+ local get = {
+ ['vicodinbottle'] = 'vicodin',
+ ['adderalbottle'] = 'adderal',
+ ['morphinebottle'] = 'morphine',
+ ['xanaxbottle'] = 'xanax'
+ }
+ for k, v in pairs (get) do
+ if d == k then
+ ps.removeItem(src, d, 1)
+ ps.addItem(src, v, math.random(10,30))
+ ps.notify(src,ps.lang('Pharma.unbottle'), "success")
+ --Log(GetName(src) .. ' Unbottled 30 Of ' .. v .. '!', 'pharma')
+ end
end
end
- end
-end)
+ end)
end
-RegisterServerEvent('md-drugs:server:fillprescription', function()
+RegisterServerEvent('md-drugs:server:fillprescription', function(num)
local src = source
- local Player = getPlayer(src)
- local pres = {vicodin_prescription = 'vicodinbottle', adderal_prescription = 'adderalbottle', morphine_prescription = 'morphinebottle', xanax_prescription = 'xanaxbottle'}
+ if not ps.checkDistance(src, GlobalState.MDDrugsLocs.FillPrescription[num].loc, 3.5) then
+ return ps.notify(src, ps.lang('Pharma.toofar'), "error")
+ end
+ local pres = {
+ vicodin_prescription = 'vicodinbottle',
+ adderal_prescription = 'adderalbottle',
+ morphine_prescription = 'morphinebottle',
+ xanax_prescription = 'xanaxbottle'
+ }
for k, v in pairs (pres) do
- if Player.Functions.GetItemByName(k) then
- RemoveItem(src, k, 1 )
- AddItem(src,v, 1)
+ if ps.hasItem(src, k, 1) then
+ ps.removeItem(src, k, 1)
+ ps.addItem(src, v, 1)
break
end
end
diff --git a/shared/config.lua b/shared/config.lua
index a1b66cb..58df3b2 100644
--- a/shared/config.lua
+++ b/shared/config.lua
@@ -61,8 +61,8 @@ Config.Drugs = {
lsd = true,
mescaline = true,
meth = true,
- oxyruns = false,
- pharma = false,
+ oxyruns = true,
+ pharma = true,
shrooms = true,
weed = true,
wholesale = false,
From 3574ecef5b8fc05fd6e0c15f14781394636fc545 Mon Sep 17 00:00:00 2001
From: Mustache Dom <123716453+Mustachedom@users.noreply.github.com>
Date: Wed, 6 Aug 2025 02:25:06 -0600
Subject: [PATCH 10/37] jesussssss
---
client/cocaine.lua | 29 +++-
client/crack.lua | 6 +-
client/heroin.lua | 33 +++-
client/lean.lua | 6 +-
client/lsd.lua | 10 +-
client/mescaline.lua | 4 +-
client/meth.lua | 20 +--
client/oxyruns.lua | 4 +-
client/pedspawns.lua | 27 ---
client/pharma.lua | 11 +-
client/plantSpawns.lua | 14 +-
client/shrooms.lua | 12 +-
client/weed.lua | 183 +++++++++-----------
client/xtc.lua | 313 +++++++++++++++++----------------
locales/uwu.lua | 303 ++++++++++++++++++++++++++++++++
locales/wookie.lua | 302 ++++++++++++++++++++++++++++++++
server/cocaine.lua | 66 ++++++-
server/crack.lua | 38 +++-
server/heroin.lua | 87 ++++++++--
server/lean.lua | 27 ++-
server/locations.lua | 161 -----------------
server/lsd.lua | 55 ++++--
server/mescaline.lua | 13 +-
server/meth.lua | 45 ++++-
server/oxyruns.lua | 30 +++-
server/pharma.lua | 22 ++-
server/recipes.lua | 126 +++-----------
server/shops.lua | 31 ++--
server/shrooms.lua | 13 +-
server/weed.lua | 175 +++++++++++++++----
server/xtc.lua | 383 ++++++++++++++++++-----------------------
shared/config.lua | 4 +-
32 files changed, 1639 insertions(+), 914 deletions(-)
delete mode 100644 client/pedspawns.lua
create mode 100644 locales/uwu.lua
create mode 100644 locales/wookie.lua
delete mode 100644 server/locations.lua
diff --git a/client/cocaine.lua b/client/cocaine.lua
index 7986e29..50a79a3 100644
--- a/client/cocaine.lua
+++ b/client/cocaine.lua
@@ -1,7 +1,7 @@
local cuttingcoke = nil
local baggingcoke = nil
-
+local locations = ps.callback('md-drugs:server:GetCokeLocations')
local function CutCoke(coords, offset, rotation)
local animDict, animName = "anim@amb@business@coc@coc_unpack_cut_left@", "coke_cut_v5_coccutter"
ps.requestAnim(animDict, 500)
@@ -111,7 +111,7 @@ local function BagCoke(coords, offset, rotation)
FreezeEntityPosition(ped, false)
end
-for k, v in pairs (GlobalState.MDDrugsLocs.MakePowder) do
+for k, v in pairs (locations.MakePowder) do
ps.boxTarget('cocaplant'..k, v.loc, {length = v.l, width = v.w, height = 1.0, rotation = v.rot}, {
{
label = ps.lang('.targets.coke.pick'),
@@ -131,7 +131,7 @@ for k, v in pairs (GlobalState.MDDrugsLocs.MakePowder) do
})
end
-for k, v in pairs (GlobalState.MDDrugsLocs.CuttingCoke) do
+for k, v in pairs (locations.CuttingCoke) do
ps.boxTarget('cutcoke'..k, v.loc, {length = 1.0, width = 1.0, height = 1.0, rotation = 180.0}, {
{
label = ps.lang('targets.coke.cut'),
@@ -148,7 +148,7 @@ for k, v in pairs (GlobalState.MDDrugsLocs.CuttingCoke) do
})
end
-for k, v in pairs (GlobalState.MDDrugsLocs.BaggingCoke) do
+for k, v in pairs (locations.BaggingCoke) do
ps.boxTarget('bagcoke'..k, v.loc, {length = 1.0, width = 1.0, height = 1.0, rotation = 180.0}, {
{
label = ps.lang('targets.coke.bag'),
@@ -165,6 +165,27 @@ for k, v in pairs (GlobalState.MDDrugsLocs.BaggingCoke) do
})
end
+for k, v in pairs (locations.cokeTele) do
+ ps.boxTarget('coke_tele'..k, v.inside, {length = v.l, width = v.w, heading = v.rot}, {
+ {
+ icon = 'fa-solid fa-door-open',
+ label = ps.lang('targets.coke.telein'),
+ action = function()
+ SetEntityCoords(PlayerPedId(), v.outside)
+ end
+ }
+ })
+ ps.boxTarget('coke_teleout'..k, v.outside, {length = v.l, width = v.w, heading = v.rot}, {
+ {
+ icon = 'fa-solid fa-door-closed',
+ label = ps.lang('targets.coke.teleout'),
+ action = function()
+ SetEntityCoords(PlayerPedId(), v.inside)
+ end
+ }
+ })
+end
+
CreateThread(function()
BikerCocaine = exports['bob74_ipl']:GetBikerCocaineObject()
BikerCocaine.Style.Set(BikerCocaine.Style.upgrade)
diff --git a/client/crack.lua b/client/crack.lua
index df05518..825dfee 100644
--- a/client/crack.lua
+++ b/client/crack.lua
@@ -1,5 +1,5 @@
-
-for k, v in pairs (GlobalState.MDDrugsLocs.makecrack) do
+local locations = ps.callback('md-drugs:server:GetCrackLocations')
+for k, v in pairs (locations.makecrack) do
ps.boxTarget('makeCrack'..k, v.loc, {length = v.l, width = v.w, height = 1.0, rotation = v.rot}, {
{
label = ps.lang('targets.crack.makecrack'),
@@ -18,7 +18,7 @@ for k, v in pairs (GlobalState.MDDrugsLocs.makecrack) do
})
end
-for k, v in pairs (GlobalState.MDDrugsLocs.bagcrack) do
+for k, v in pairs (locations.bagcrack) do
ps.boxTarget('bagCrack'..k, v.loc, {length = v.l, width = v.w, height = 1.0, rotation = v.rot}, {
{
label = ps.lang('targets.crack.bagcrack'),
diff --git a/client/heroin.lua b/client/heroin.lua
index f6303fe..7e98113 100644
--- a/client/heroin.lua
+++ b/client/heroin.lua
@@ -1,7 +1,7 @@
local herointable = false
local dirty = false
-
+local locations = ps.callback('md-drugs:server:GetHeroinLocations')
local function createLabKit(coord, head)
local heroinlabkit = CreateObject("v_ret_ml_tablea", coord.x, coord.y, coord.z - 1, true, false,false)
SetEntityHeading(heroinlabkit, head)
@@ -59,7 +59,7 @@ local function createLabKit(coord, head)
}})
end
-for k, v in pairs (GlobalState.MDDrugsLocs.dryplant) do
+for k, v in pairs (locations.dryplant) do
ps.boxTarget('dryHeroin'..k, v.loc, {length = v.l, width = v.w, height = 1.0, rotation = v.rot}, {
{
label = ps.lang('targets.heroin.dry'),
@@ -75,7 +75,7 @@ for k, v in pairs (GlobalState.MDDrugsLocs.dryplant) do
})
end
-for k, v in pairs (GlobalState.MDDrugsLocs.cutheroinone) do
+for k, v in pairs (locations.cutheroinone) do
ps.boxTarget('cutHeroin'..k, v.loc, {length = v.l, width = v.w, height = 1.0, rotation = v.rot}, {
{
label = ps.lang('targets.heroin.cut'),
@@ -91,11 +91,28 @@ for k, v in pairs (GlobalState.MDDrugsLocs.cutheroinone) do
}
})
end
+local peds = {}
+for k, v in pairs (locations.buyKit) do
+ ps.requestModel(v.ped, 1000)
+ peds[k] = CreatePed(4, v.ped, v.loc.x, v.loc.y, v.loc.z, v.loc.w, false, false)
+ Freeze(peds[k], true, v.loc.w)
+ SetBlockingOfNonTemporaryEvents(peds[k], true)
+ SetEntityInvincible(peds[k], true)
+ ps.entityTarget(peds[k], {
+ {
+ label = ps.lang('targets.heroin.buykit'),
+ icon = 'fa-solid fa-box-open',
+ action = function()
+ if not ps.progressbar(ps.lang('Heroin.secret'), 4000, 'uncuff') then return end
+ TriggerServerEvent("md-drugs:server:getheroinlabkit", k)
+ end,
+ canInteract = function()
+ return true
+ end
+ }
+ })
+end
-RegisterNetEvent("md-drugs:client:buyheroinlabkit", function()
- if not ps.progressbar(ps.lang('Heroin.secret'), 4000, 'uncuff') then return end
- TriggerServerEvent("md-drugs:server:getheroinlabkit")
-end)
ps.registerCallback("md-drugs:client:setheroinlabkit", function()
if herointable then
@@ -111,7 +128,7 @@ ps.registerCallback("md-drugs:client:setheroinlabkit", function()
end
end)
-for k, v in pairs (GlobalState.MDDrugsLocs.fillneedle) do
+for k, v in pairs (locations.fillneedle) do
ps.boxTarget('fillNeedle'..k, v.loc, {length = v.l, width = v.w, height = 1.0, rotation = v.rot}, {
{
label = ps.lang('targets.heroin.fill'),
diff --git a/client/lean.lua b/client/lean.lua
index f47a2d8..d268f5d 100644
--- a/client/lean.lua
+++ b/client/lean.lua
@@ -1,10 +1,10 @@
local started = false
local hit = 0
-
+local location = ps.callback('md-drugs:server:GetLeanLocs')
local function SpawnCarPedChase()
local stoploc = vector3(-1157.63, -3056.71, 13.94)
- local start = GlobalState.MDDrugsLocs.StartLoc[math.random(1,#GlobalState.MDDrugsLocs.StartLoc)]
+ local start = location.StartLoc[math.random(1,#location.StartLoc)]
if started then ps.notify(Lang.lean.act,'error') return end
started = true
@@ -61,7 +61,7 @@ local function SpawnCarPedChase()
end
local leanPeds = {}
-for k, v in pairs (GlobalState.MDDrugsLocs.SyrupVendor) do
+for k, v in pairs (location.SyrupVendor) do
ps.requestModel(v.ped)
leanPeds[k] = CreatePed(0, v.ped, v.loc.x, v.loc.y, v.loc.z, false, false)
Freeze(leanPeds[k], true, v.loc.w)
diff --git a/client/lsd.lua b/client/lsd.lua
index 093031e..2b9d048 100644
--- a/client/lsd.lua
+++ b/client/lsd.lua
@@ -1,5 +1,7 @@
local tableout = false
local dirtylsd = false
+local locations = ps.callback('md-drugs:server:GetLSDLocations')
+
local function createLabKit(coord, head)
local labkit = CreateObject("v_ret_ml_tablea", coord.x, coord.y, coord.z - 1, true, false)
SetEntityHeading(labkit, head)
@@ -93,7 +95,7 @@ local function createLabKit(coord, head)
ps.entityTarget(labkit, options)
end
-for k, v in pairs (GlobalState.MDDrugsLocs.lysergicacid) do
+for k, v in pairs (locations.lysergicacid) do
ps.boxTarget('lysergicacid'..k, v.loc, {length = v.l, width = v.w, height = 1.0, rotation = v.rot}, {
{
label = ps.lang('targets.lsd.lys'),
@@ -112,7 +114,7 @@ for k, v in pairs (GlobalState.MDDrugsLocs.lysergicacid) do
})
end
-for k, v in pairs (GlobalState.MDDrugsLocs.diethylamide) do
+for k, v in pairs (locations.diethylamide) do
ps.boxTarget('diethylamide'..k, v.loc, {length = v.l, width = v.w, height = 1.0, rotation = v.rot}, {
{
label = ps.lang('targets.lsd.die'),
@@ -131,7 +133,7 @@ for k, v in pairs (GlobalState.MDDrugsLocs.diethylamide) do
})
end
-for k, v in pairs (GlobalState.MDDrugsLocs.gettabs) do
+for k, v in pairs (locations.gettabs) do
ps.boxTarget('gettabs'..k, v.loc, {length = v.l, width = v.w, height = 1.0, rotation = v.rot}, {
{
label = ps.lang('targets.lsd.buyt'),
@@ -148,7 +150,7 @@ for k, v in pairs (GlobalState.MDDrugsLocs.gettabs) do
})
end
local seller = {}
-for k, v in pairs (GlobalState.MDDrugsLocs.buyLSDkit) do
+for k, v in pairs (locations.buyLSDkit) do
ps.requestModel(v.ped, 1000)
seller[k] = CreatePed(4, v.ped, v.loc.x, v.loc.y, v.loc.z, v.loc.w, false, false)
Freeze(seller[k], true, v.loc.w)
diff --git a/client/mescaline.lua b/client/mescaline.lua
index 7a3992d..963a23f 100644
--- a/client/mescaline.lua
+++ b/client/mescaline.lua
@@ -1,5 +1,5 @@
-
-for k, v in pairs (GlobalState.MDDrugsLocs.DryOutMescaline) do
+local locations = ps.callback('md-drugs:server:GetMescalineLocs')
+for k, v in pairs (locations.DryOutMescaline) do
ps.boxTarget('dryoutMesc'..k, v.loc, {length = v.l, width = v.w, height = 1.0, rotation = v.rot}, {
{
label = ps.lang('mescaline.dry'),
diff --git a/client/meth.lua b/client/meth.lua
index 7d847db..584900a 100644
--- a/client/meth.lua
+++ b/client/meth.lua
@@ -3,13 +3,13 @@ local tray = false
local heated = false
local active = false
local trays = nil
-
+local locations = ps.callback('md-drugs:server:GetMethLocs')
--- meth heist
local startedmeth = false
local function SpawnMethCarPedChase()
local stoploc = vector3(-1157.63, -3056.71, 13.94)
- local start = GlobalState.MDDrugsLocs.StartLoc[math.random(1,#GlobalState.MDDrugsLocs.StartLoc)]
+ local start = locations.StartLoc[math.random(1,#locations.StartLoc)]
if startedmeth then
ps.notify(ps.lang('meth.act'),'error')
else
@@ -64,7 +64,7 @@ local function SpawnMethCarPedChase()
end
local peds = {}
-for k, v in pairs (GlobalState.MDDrugsLocs.MethHeist) do
+for k, v in pairs (locations.MethHeist) do
peds[k] = CreatePed(4, GetHashKey(v.ped), v.loc.x, v.loc.y, v.loc.z, v.loc.w, false, true)
Freeze(peds[k], true, v.loc.w)
ps.entityTarget(peds[k], {
@@ -276,7 +276,7 @@ local function smash(coords, offset, rotation, buckets, k)
amonia = false
heated = false
tray = false
- BagMeth(GlobalState.MDDrugsLocs.BagMeth[k].loc, GlobalState.MDDrugsLocs.BagMeth[k].offset, GlobalState.MDDrugsLocs.BagMeth[k].rotation)
+ BagMeth(locations.BagMeth[k].loc, locations.BagMeth[k].offset, locations.BagMeth[k].rotation)
TriggerServerEvent('md-drugs:server:getmeth', k)
end,
}
@@ -306,7 +306,7 @@ CreateThread(function()
RefreshInterior(BikerMethLab.interiorId)
end)
-for k, v in pairs (GlobalState.MDDrugsLocs.CookMeth) do
+for k, v in pairs (locations.CookMeth) do
ps.boxTarget('cookMeth'..k, v.loc, {length = v.l, width = v.w, rotation = v.rot, height = 1.0},{
{
label = 'Cook Meth',
@@ -333,14 +333,14 @@ for k, v in pairs (GlobalState.MDDrugsLocs.CookMeth) do
})
end
-for k, v in pairs (GlobalState.MDDrugsLocs.MethDials) do
+for k, v in pairs (locations.MethDials) do
ps.boxTarget('adjustMethDials'..k, v.loc, {length = v.l, width = v.w, rotation = v.rot, height = 1.0},{
{
name = 'adjustdials',
icon = "fa-solid fa-temperature-three-quarters",
label = ps.lang('targets.meth.adjust'),
action = function()
- dials(GlobalState.MDDrugsLocs.CookMeth[k].loc)
+ dials(locations.CookMeth[k].loc)
end,
canInteract = function()
if amonia and heated == false then return true end
@@ -349,7 +349,7 @@ for k, v in pairs (GlobalState.MDDrugsLocs.MethDials) do
})
end
-for k, v in pairs (GlobalState.MDDrugsLocs.MethSmash) do
+for k, v in pairs (locations.MethSmash) do
ps.boxTarget('smashMeth'..k, v.loc, {length = v.l, width = v.w, rotation = v.rot, height = 1.0},{
{
name = 'smash',
@@ -373,7 +373,7 @@ RegisterCommand('offset', function()
end)
if not Config.MethHeist then
- for k, v in pairs (GlobalState.MDDrugsLocs.MethEph) do
+ for k, v in pairs (locations.MethEph) do
ps.boxTarget('stealMethEph'..k, v.loc, {length = v.l, width = v.w, rotation = v.rot, height = 1.0},{
{
label = 'Steal Ephedrine',
@@ -386,7 +386,7 @@ if not Config.MethHeist then
})
end
- for k, v in pairs (GlobalState.MDDrugsLocs.Methace) do
+ for k, v in pairs (locations.Methace) do
ps.boxTarget('stealMethAce'..k, v.loc, {length = v.l, width = v.w, rotation = v.rot, height = 1.0},{
{
label = 'Steal Acetone',
diff --git a/client/oxyruns.lua b/client/oxyruns.lua
index 3eb8391..b33cfd6 100644
--- a/client/oxyruns.lua
+++ b/client/oxyruns.lua
@@ -1,6 +1,6 @@
local carryPackage = nil
local onMission = false
-
+local locations = ps.callback('md-drugs:server:GetOxyLocs')
local function getRoute()
local Route = ps.callback('md-drugs:server:getRoute')
if not Route then
@@ -42,7 +42,7 @@ local function getRoute()
})
end
-for k, v in pairs(GlobalState.MDDrugsLocs.OxyPayForTruck) do
+for k, v in pairs(locations.OxyPayForTruck) do
ps.boxTarget('oxyTruckPur' ..k , v.loc, {length = v.l, width = v.w, heading = v.rot}, {
{
icon = 'fa-solid fa-truck-fast',
diff --git a/client/pedspawns.lua b/client/pedspawns.lua
deleted file mode 100644
index 83498d2..0000000
--- a/client/pedspawns.lua
+++ /dev/null
@@ -1,27 +0,0 @@
-
-CreateThread(function()
- local config = ps.callback('md-drugs:server:getLocs', false)
- local num = ps.callback('md-drugs:server:GetMerchant', false)
- local model = {"g_m_y_famdnf_01", 's_m_m_doctor_01', 'u_m_m_jesus_01', "prop_cooker_03"}
- for k, v in pairs (model) do
- lib.requestModel(v, Config.RequestModelTime)
- end
- local tabdealer = CreatePed(0, 'g_m_y_famdnf_01',config.singleSpot.buylsdlabkit.x,config.singleSpot.buylsdlabkit.y,config.singleSpot.buylsdlabkit.z-1,config.singleSpot.buylsdlabkit.w, false, false)
- local heroinkitdealer = CreatePed(0,"g_m_y_famdnf_01",config.singleSpot.buyheroinlabkit.x, config.singleSpot.buyheroinlabkit.y, config.singleSpot.buyheroinlabkit.z-1, config.singleSpot.buyheroinlabkit.w, false, false)
- local SyrupLocation = CreatePed(0, 's_m_m_doctor_01', config.singleSpot.SyrupVendor.x,config.singleSpot.SyrupVendor.y,config.singleSpot.SyrupVendor.z-1, config.singleSpot.SyrupVendor.w, false, false)
- local WeedGuy = CreatePed(0,'u_m_m_jesus_01',config.singleSpot.WeedSaleman.x,config.singleSpot.WeedSaleman.y,config.singleSpot.WeedSaleman.z-1, config.singleSpot.WeedSaleman.w, false, false)
- local methdealer = CreatePed(0, "g_m_y_famdnf_01", config.singleSpot.MethHeistStart.x, config.singleSpot.MethHeistStart.y, config.singleSpot.MethHeistStart.z - 1, false, false)
- local travellingmerchant = CreatePed(0, "g_m_y_famdnf_01",num.x,num.y,num.z-1, num.w, false, false)
- Freeze(tabdealer, true,config.singleSpot.buylsdlabkit.w)
- Freeze(SyrupLocation, true, config.singleSpot.SyrupVendor.w)
- Freeze(heroinkitdealer, true, config.singleSpot.buyheroinlabkit.w)
- Freeze(WeedGuy, true, config.singleSpot.WeedSaleman.w)
- Freeze(methdealer, true, 220.0)
- Freeze(travellingmerchant, true, num.w)
- AddSingleModel(tabdealer,{ type = "client", label = Lang.targets.lsd.buy, icon = "fa-solid fa-money-bill", event = "md-drugs:client:buylabkit", distance = 2.0}, tabdealer )
- AddSingleModel(heroinkitdealer, { label = Lang.targets.heroin.kit, icon = "fa-solid fa-money-bill", event = "md-drugs:client:buyheroinlabkit", distance = 2.0}, nil )
- AddSingleModel(SyrupLocation, { type = "client", label = Lang.targets.lean.git, icon = "fa-solid fa-circle-info", event = "md-drugs:client:getsyruplocationtobuy", distance = 2.0}, nil )
- AddSingleModel(WeedGuy, {label = "Weed Shop",icon = "fa-solid fa-cannabis", action = function() makeMenu('WeedShop') lib.showContext('WeedShop')end}, nil)
- AddSingleModel(methdealer,{label = Lang.targets.meth.mission, icon = "fa-solid fa-circle-info", action = function() ps.notify(Lang.meth.mission, "success") SpawnMethCarPedChase() end,},nil )
- AddSingleModel(travellingmerchant, {label = Lang.targets.travel.travel, icon = "fa-solid fa-cart-shopping", action = function() makeMenu('travellingMerchant') lib.showContext('travellingMerchant') end}, nil)
-end)
\ No newline at end of file
diff --git a/client/pharma.lua b/client/pharma.lua
index 9de6785..52a81c1 100644
--- a/client/pharma.lua
+++ b/client/pharma.lua
@@ -1,4 +1,4 @@
-
+local locations = ps.callback('md-drugs:server:GetPharmaLocs')
ps.registerCallback("md-drugs:client:prescriptionpad", function(data, op)
if ps.getJobType() ~= 'ems' then return end
local input = exports.ps_lib:input('Who To Give A Prescription To?',{
@@ -7,12 +7,7 @@ ps.registerCallback("md-drugs:client:prescriptionpad", function(data, op)
})
if not input[1] then return end
if not ps.progressbar(ps.lang('Pharma.write'), 4000, 'notepad') then return end
- return {who = input[1], what = input[2]}
-end)
-
-RegisterNetEvent("md-drugs:client:fillprescription", function(data)
- if not ps.progressbar(ps.lang('Pharma.fill'), 4000, 'uncuff') then return end
- TriggerServerEvent("md-drugs:server:fillprescription", data.data)
+ return {who = input[1], what = input[2]}
end)
ps.registerCallback("md-drugs:client:unbottle", function()
@@ -21,7 +16,7 @@ ps.registerCallback("md-drugs:client:unbottle", function()
end)
-for k, v in pairs (GlobalState.MDDrugsLocs.FillPrescription) do
+for k, v in pairs (locations.FillPrescription) do
ps.boxTarget('pharma' ..k , v.loc, {length = v.l, width = v.w, heading = v.rot}, {
{
icon = 'fa-solid fa-capsules',
diff --git a/client/plantSpawns.lua b/client/plantSpawns.lua
index 104e61d..bcfdfaa 100644
--- a/client/plantSpawns.lua
+++ b/client/plantSpawns.lua
@@ -1,6 +1,6 @@
local DrugPlants = {
- {model = 'prop_plant_01a', label = 'coke', tbl = GlobalState.CocaPlant, plantTbl = {},
+ {model = 'prop_plant_01a', label = 'coke', langs = ps.lang('targets.coke.pick'), tbl = GlobalState.CocaPlant, plantTbl = {},
pick = function(loc)
if not ps.progressbar(ps.lang('Coke.picking'), 4000, 'uncuff') then return end
TriggerServerEvent("coke:pickupCane", loc)
@@ -12,7 +12,7 @@ local DrugPlants = {
},
allow = Config.Drugs.cocaine,
},
- {model = 'prop_plant_01b', label = 'heroin', tbl = GlobalState.PoppyPlants, plantTbl = {},
+ {model = 'prop_plant_01b', label = 'heroin',langs = ps.lang('targets.heroin.pick'), tbl = GlobalState.PoppyPlants, plantTbl = {},
pick = function(loc)
if not ps.progressbar(ps.lang('Heroin.pick'), 4000, 'uncuff') then return end
TriggerServerEvent("heroin:pickupCane", loc)
@@ -24,7 +24,7 @@ local DrugPlants = {
},
allow = Config.Drugs.heroin,
},
- {model = 'prop_cactus_03', label = 'Mescaline', tbl = GlobalState.Mescaline, plantTbl = {},
+ {model = 'prop_cactus_03', label = 'Mescaline', langs = ps.lang('targets.mescaline.pick'), tbl = GlobalState.Mescaline, plantTbl = {},
pick = function(loc)
if not ps.progressbar(ps.lang('mescaline.pick'), 4000, 'uncuff') then return end
TriggerServerEvent("Mescaline:pickupCane", loc)
@@ -37,7 +37,7 @@ local DrugPlants = {
allow = Config.Drugs.mescaline,
},
- {model = 'prop_weed_01', label = 'weed', tbl = GlobalState.WeedPlant, plantTbl = {},
+ {model = 'prop_weed_01', label = 'weed', langs = ps.lang('targets.weed.pick'), tbl = GlobalState.WeedPlant, plantTbl = {},
pick = function(loc)
if not ps.progressbar(ps.lang('Weed.picking'), 4000, 'uncuff') then return end
TriggerServerEvent("weed:pickupCane", loc)
@@ -49,7 +49,7 @@ local DrugPlants = {
},
allow = Config.Drugs.weed,
},
- {model = 'mushroom', label = 'shrooms', tbl = GlobalState.shrooms, plantTbl = {},
+ {model = 'mushroom', label = 'shrooms', langs = ps.lang('targets.shrooms.pick'), tbl = GlobalState.shrooms, plantTbl = {},
pick = function(loc)
if not ps.progressbar(ps.lang('Shrooms.pick'), 4000, 'uncuff') then return end
TriggerServerEvent("shrooms:pickupCane", loc)
@@ -75,7 +75,7 @@ for k, v in pairs (DrugPlants) do
ps.entityTarget(v.plantTbl[loc], {
{
icon = v.icon,
- label = v.label,
+ label = v.langs,
action = function()
if not v.pick(loc) then return end
end
@@ -99,7 +99,7 @@ for k, v in pairs (DrugPlants) do
ps.entityTarget(v.plantTbl[key], {
{
icon = v.icon,
- label = v.label,
+ label = v.langs,
action = function()
if not v.pick(key) then return end
end
diff --git a/client/shrooms.lua b/client/shrooms.lua
index 323798d..f226b17 100644
--- a/client/shrooms.lua
+++ b/client/shrooms.lua
@@ -1,6 +1,8 @@
-RegisterNetEvent('md-drugs:client:takeshrooms', function()
- if not ps.progressbar(Lang.Shrooms.eat, 500, 'eat') then return end
- TriggerEvent("evidence:client:SetStatus", "widepupils", 300)
- EcstasyEffect()
-end)
+ps.registerCallback("md-drugs:client:shrooms", function()
+ if not ps.progressbar(ps.lang('Shrooms.eat'), 5000, 'eat') then return end
+ CreateThread(function()
+ EcstasyEffect()
+ end)
+ return true
+end)
\ No newline at end of file
diff --git a/client/weed.lua b/client/weed.lua
index 0ba52cf..0d82716 100644
--- a/client/weed.lua
+++ b/client/weed.lua
@@ -1,88 +1,57 @@
local exploded, drying = false, false
-
-local function hasJob()
- if Config.Joblock then
- if getJobName() == Config.weedjob then
- return true else return false end
- else
- return true end
- end
-
-
-CreateThread(function()
- local config = ps.callback('md-drugs:server:getLocs', false)
- AddBoxZoneMulti('weeddry', config.WeedDry, {
- name = 'dryweed',
- icon = "fas fa-sign-in-alt",
- label = Lang.targets.weed.dry,
- distance = 1,
- action = function()
- if not ItemCheck('wetcannabis') then return end
- if drying then
- ps.notify(Lang.Weed.busy, "error")
- else
+local locations = ps.callback('md-drugs:server:GetWeedLocs')
+for k, v in pairs (locations.WeedDry) do
+ ps.boxTarget('weed_dry'..k, v.loc, {length = v.l, width = v.w, heading = v.rot}, {
+ {
+ icon = 'fa-solid fa-cannabis',
+ label = ps.lang('targets.weed.dry'),
+ action = function()
+ if not ps.hasItem('wetcannabis', 1) then
+ ps.notify(ps.lang('Weed.nodry'), "error")
+ return
+ end
+ if drying then return end
local loc = GetEntityCoords(PlayerPedId())
local weedplant = CreateObject("bkr_prop_weed_drying_01a", loc.x, loc.y+.2, loc.z, true, false)
drying = true
FreezeEntityPosition(weedplant, true)
- ps.notify(Lang.Weed.wait, "success")
+ ps.notify(ps.lang('Weed.wait'), "success")
Wait(math.random(1000,5000))
- ps.notify(Lang.Weed.take, "success")
- AddSingleModel(weedplant, {
+ ps.notify(ps.lang('Weed.take'), "success")
+ ps.entityTarget(weedplant, {
icon = "fa-solid fa-cannabis",
- label = Lang.targets.weed.dpick,
+ label = ps.lang('targets.weed.dpick'),
action = function()
DeleteEntity(weedplant)
drying = false
TriggerServerEvent('md-drugs:server:dryoutweed')
end,
- canInteract = function()
- if hasJob() then return true end end
- }, nil)
+ })
end
- end,
- canInteract = function()
- if hasJob() then return true end end
+ }
})
+end
-AddBoxZoneSingle('teleinweedout', config.singleSpot.weedTeleout, { name = 'teleout', icon = "fa-solid fa-door-closed", label = Lang.targets.coke.exit, distance = 2.0, action = function() SetEntityCoords(PlayerPedId(),config.singleSpot.weedTelein) end,
- canInteract = function() if hasJob() then return true end end
-})
-AddBoxZoneSingle('teleinweedin', config.singleSpot.weedTelein, { name = 'teleout', icon = "fa-solid fa-door-open", label = Lang.targets.coke.enter, distance = 2.0, action = function() SetEntityCoords(PlayerPedId(),config.singleSpot.weedTeleout) end,
- canInteract = function() if hasJob() then return true end end
-})
-AddBoxZoneSingle('MakeButterCrafting', config.singleSpot.MakeButter, {label = Lang.targets.weed.butt, action = function() lib.showContext('ButterCraft') end, icon = "fa-solid fa-cookie",
-canInteract = function() if hasJob() then return true end end
-})
-
-AddBoxZoneSingle('makeoil',config.singleSpot.MakeOil, {
- name = 'Oil',
- icon = "fa-solid fa-oil-can",
- label = Lang.targets.weed.oil,
- action = function()
- if not ItemCheckMulti({'butane', 'grindedweed'}) then return end
- if not minigame() then
- local loc = GetEntityCoords(PlayerPedId())
- AddExplosion(loc.x, loc.y, loc.z, 49, 10, true, false, true)
- exploded = true
- ps.notify(Lang.Weed.stovehot, "error")
- Wait(1000 * 30)
- exploded = false
- return end
- if not ps.progressbar(Lang.Weed.shat, 4000, 'uncuff') then return end
- TriggerServerEvent("md-drugs:server:makeoil")
- end,
- canInteract = function()
- if hasJob() and exploded == false then return true end
- end,
+for k, v in pairs (locations.WeedTele) do
+ ps.boxTarget('weed_tele'..k, v.inside, {length = v.l, width = v.w, heading = v.rot}, {
+ {
+ icon = 'fa-solid fa-door-open',
+ label = ps.lang('targets.weed.telein'),
+ action = function()
+ SetEntityCoords(PlayerPedId(), v.outside)
+ end
+ }
})
- local stove = CreateObject("prop_cooker_03",config.singleSpot.MakeButter.x, config.singleSpot.MakeButter.y, config.singleSpot.MakeButter.z-1, true, false)
- SetEntityHeading(stove, 270.00)
- FreezeEntityPosition(stove, true)
- local stove2 = CreateObject("prop_cooker_03",config.singleSpot.MakeOil.x,config.singleSpot.MakeOil.y, config.singleSpot.MakeOil.z-1, true, false)
- SetEntityHeading(stove2, 90.00)
- FreezeEntityPosition(stove2, true)
-end)
+ ps.boxTarget('weed_teleout'..k, v.outside, {length = v.l, width = v.w, heading = v.rot}, {
+ {
+ icon = 'fa-solid fa-door-closed',
+ label = ps.lang('targets.weed.teleout'),
+ action = function()
+ SetEntityCoords(PlayerPedId(), v.inside)
+ end
+ }
+ })
+end
CreateThread(function()
BikerWeedFarm = exports['bob74_ipl']:GetBikerWeedFarmObject()
@@ -103,46 +72,66 @@ end)
local function createBluntOptions(contextId, contextTitle, eventLabelPrefix, tableName)
local options = {}
- local items = ps.callback('md-drugs:server:GetRecipe', false,'weed',tableName)
+ local items = ps.callback('md-drugs:server:GetRecipe', 'weed',tableName)
for k, v in pairs(items) do
local label = {}
local item = ''
- for m, d in pairs(v.take) do table.insert(label, GetLabel(m) .. ' X ' .. d) end
+ for m, d in pairs(v.take) do table.insert(label, ps.getLabel(m) .. ' X ' .. d) end
for m, d in pairs(v.give) do item = m end
options[#options + 1] = {
- icon = GetImage(item),
+ icon = ps.getImage(item),
description = table.concat(label, ", "),
- title = GetLabel(item),
- event = "md-drugs:client:MakeWeedItems",
- args = {
- item = item,
- recipe = 'weed',
- num = k,
- label = eventLabelPrefix .. GetLabel(item),
- table = tableName
- }
+ title = ps.getLabel(item),
+ action = function()
+ if not minigame() then return end
+ if not ps.progressbar(eventLabelPrefix .. ps.getLabel(item), 4000, 'uncuff') then return end
+ TriggerServerEvent('md-drugs:server:MakeWeedItems', {item = item, recipe = 'weed', num = k, table = tableName})
+ end
}
end
sorter(options, 'title')
- lib.registerContext({ id = contextId, title = contextTitle, options = options})
+ ps.menu(contextTitle, contextTitle, options)
end
-CreateThread(function()
---createBluntOptions('ButterCraft', "Edible Cooking", 'Cooking A ', 'edibles')
---createBluntOptions('mddrugsblunts', "Roll Blunts", 'Rolling A ', 'blunts')
---createBluntOptions('mddrugsbluntwraps', "Dipping Syrup", 'Dipping Syrup To Make ', 'bluntwrap')
-end)
-
-RegisterNetEvent("md-drugs:client:MakeWeedItems", function(data)
- if not minigame() then return end
- if not ps.progressbar('Making ' .. data.item, 4000, 'uncuff') then return end
- TriggerServerEvent('md-drugs:server:MakeWeedItems', data)
-end)
-
RegisterNetEvent('md-drugs:client:makeBluntWrap', function(data)
- lib.showContext('mddrugsbluntwraps')
+ createBluntOptions('mddrugsbluntwraps', "Dipping Syrup", 'Dipping Syrup To Make ', 'bluntwrap')
end)
RegisterNetEvent('md-drugs:client:rollBlunt', function(data)
- lib.showContext('mddrugsblunts')
-end)
\ No newline at end of file
+ createBluntOptions('mddrugsblunts', "Roll Blunts", 'Rolling A ', 'blunts')
+end)
+
+for k, v in pairs (locations.WeedSalesman) do
+ ps.requestModel(v.ped)
+ local ped = CreatePed(4, v.ped, v.loc.x, v.loc.y, v.loc.z - 1.0, v.loc.w, false, true)
+ FreezeEntityPosition(ped, true)
+ SetEntityInvincible(ped, true)
+ SetBlockingOfNonTemporaryEvents(ped, true)
+ ps.entityTarget(ped, {
+ {
+ icon = "fa-solid fa-cannabis",
+ label = ps.lang('targets.weed.salesman'),
+ action = function()
+ local itemList = ps.callback('md-drugs:server:getWeedItems')
+ local options = {}
+ for m, d in pairs (itemList) do
+ options[#options + 1] = {
+ icon = ps.getImage(m),
+ title = ps.getLabel(m),
+ description = '$' .. d,
+ action = function()
+ local input = ps.input('Amount To Buy',{
+ {type = 'number', title = 'How Many To Buy', min = 1, max = 1000}
+ })
+ if not input and input[1] then return end
+ if not ps.progressbar('Buying ' .. ps.getLabel(m), 2000, 'uncuff') then return end
+ TriggerServerEvent('md-drugs:server:buyWeedItem', k, m, input[1])
+ end
+ }
+ end
+ ps.menu('Weed Shop', 'Weed Shop', options)
+ end
+ }
+ })
+end
+
diff --git a/client/xtc.lua b/client/xtc.lua
index f404d7b..182fd83 100644
--- a/client/xtc.lua
+++ b/client/xtc.lua
@@ -1,157 +1,180 @@
local xtcpress = false
+local locations = ps.callback('md-drugs:server:GetXtcLocs')
-RegisterNetEvent("md-drugs:client:setpress", function(type)
- if xtcpress then
+local function getRecipeList(tbl)
+ local rec = {}
+ for m, d in pairs(tbl) do table.insert(rec, ps.getLabel(m) .. ' X ' .. d) end
+ return table.concat(rec, ', ')
+end
+
+ps.registerCallback('md-drugs:client:setpress', function(xtcData)
+ if xtcpress then
ps.notify(Lang.xtc.out, 'error')
- else
- local coords, head = StartRay2()
- xtcpress = true
- ps.progressbar('Setting Press On The Ground', 4000, 'uncuff')
- local press = CreateObject("bkr_prop_coke_press_01aa", coords.x, coords.y, coords.z, true, false, false)
- PlaceObjectOnGroundProperly(press)
- Freeze(press, true, head)
- local options = {
- { icon = "fas fa-eye", label = Lang.targets.xtc.make, distance = 2.0, action = function() TriggerEvent("md-drugs:client:XTCMenu", type) end,
- canInteract = function() if xtcpress then return true end end
- },
- {icon = "fas fa-eye", label = Lang.targets.xtc.pick, action = function() TriggerEvent("md-drugs:client:GetPressBack", type, press) end, distance = 2.0,
- canInteract = function() if xtcpress then return true end end
- },
- }
- AddMultiModel(press, options, nil)
+ return
end
-end)
-
-ps.registerCallback('md-drugs:client:setpress', function(type)
- if xtcpress then
- ps.notify(Lang.xtc.out, 'error')
- return false
- else
local coords, head = StartRay2()
xtcpress = true
- ps.progressbar('Setting Press On The Ground', 4000, 'uncuff')
- local press = CreateObject("bkr_prop_coke_press_01aa", coords.x, coords.y, coords.z, true, false, false)
- PlaceObjectOnGroundProperly(press)
+ if not ps.progressbar('Setting Press On The Ground', 4000, 'uncuff') then return end
+ local press = CreateObject("bkr_prop_coke_press_01aa", coords.x, coords.y, coords.z, true, false, false)
+ PlaceObjectOnGroundProperly(press)
Freeze(press, true, head)
- local options = {
- { icon = "fa-solid fa-tablets", label = Lang.targets.xtc.make, distance = 2.0, action = function() TriggerEvent("md-drugs:client:XTCMenu", type) end,
- canInteract = function() if xtcpress then return true end end
- },
- {icon = "fas fa-eye", label = Lang.targets.xtc.pick, action = function() TriggerEvent("md-drugs:client:GetPressBack", type, press) end, distance = 2.0,
- canInteract = function() if xtcpress then return true end end
- },
- }
- AddMultiModel(press, options, nil)
- return true, GetEntityCoords(press)
- end
+ local options = {
+ {
+ icon = "fas fa-eye",
+ label = ps.lang('targets.xtc.make'),
+ distance = 2.0,
+ action = function()
+ local options = {}
+ for k, v in pairs(xtcData.recipes) do
+ local descript = getRecipeList(v.take)
+ options[#options + 1] = {
+ icon = ps.getImage(k),
+ title = ps.getLabel(k),
+ description = descript,
+ action = function()
+ if not minigame() then ps.notify(ps.lang('xtc.fail'), "error") return end
+ if not ps.progressbar(string.format(ps.lang('xtc.make'), ps.getLabel(k)), 4000, 'uncuff') then return end
+ TriggerServerEvent("md-drugs:server:makextc", k)
+ end,
+ distance = 2.0
+ }
+ end
+ ps.menu('XTC Recipes', 'XTC Recipes', options)
+ end,
+ canInteract = function()
+ if xtcpress then return true end
+ end
+ },
+ {
+ icon = "fas fa-eye",
+ label = ps.lang('targets.xtc.pick'),
+ action = function()
+ if not ps.progressbar(ps.lang('xtc.pickup'), 5000, 'uncuff') then return end
+ DeleteObject(press)
+ xtcpress = false
+ TriggerServerEvent("md-drugs:server:getpressback")
+ end,
+ canInteract = function()
+ if xtcpress then return true end
+ end
+ },
+ }
+ ps.entityTarget(press, options)
+ return true
end)
-RegisterNetEvent("md-drugs:client:XTCMenu", function(type)
- local event = "md-drugs:client:MakeXTC"
- lib.registerContext({
- id = 'XTCmenu',
- title = 'XTC Menu',
- options = {
- {icon = GetImage('white_xtc'), title = 'White XTC', description = '1 X Raw XTC', event = event, args = { data = type, color = 'white'}},
- {icon = GetImage('red_xtc'), title = 'Red XTC', description = '1 X Raw XTC and 1 X Loose Coke', event = event, args = { data = type, color = 'red'}},
- {icon = GetImage('orange_xtc'), title = 'Orange XTC', description = '1 X Raw XTC and 1 X Heroin Vial', event = event, args = { data = type, color = 'orange'}},
- {icon = GetImage('blue_xtc'), title = 'Blue XTC', description = '1 X Raw XTC and 1 X Crack Rock', event = event, args = { data = type, color = 'blue'}},
+for k, v in pairs(locations.mdp2p) do
+ ps.boxTarget('mdp2p'..k, v.loc, {length = v.l, width = v.w, heading = v.rot}, {
+ {
+ icon = 'fa-solid fa-flask',
+ label = ps.lang('targets.xtc.mdp2p'),
+ action = function()
+ if not minigame() then ps.notify(ps.lang('xtc.fail'), "error") return end
+ if not ps.progressbar(ps.lang('xtc.mdp2p'), 4000, 'uncuff') then return end
+ TriggerServerEvent("md-drugs:server:stealmdp2p", k)
+ end
}
- })
- lib.showContext('XTCmenu')
-end)
-
-RegisterNetEvent("md-drugs:client:GetPressBack", function(type, press)
- if not ps.progressbar(Lang.xtc.pickup, 5000, 'uncuff') then return end
- DeleteObject(press)
- xtcpress = false
- TriggerServerEvent("md-drugs:server:getpressback", type)
-end)
-
-RegisterNetEvent("md-drugs:client:stealisosafrole", function(data)
- if not minigame() then ps.notify(Lang.xtc.fail, "error") return end
- if not ps.progressbar(Lang.xtc.iso, 4000, 'uncuff') then return end
- TriggerServerEvent("md-drugs:server:stealisosafrole",data.data)
-end)
-
-RegisterNetEvent("md-drugs:client:stealmdp2p", function(data)
- if not minigame() then ps.notify(Lang.xtc.fail, "error") return end
- if not ps.progressbar(Lang.xtc.mdp2p, 4000, 'uncuff') then return end
- TriggerServerEvent("md-drugs:server:stealmdp2p", data.data)
-end)
-
-RegisterNetEvent("md-drugs:client:makingrawxtc", function(data)
- if not ItemCheck('isosafrole') then return end
- if not ItemCheck('mdp2p') then return end
- if not ps.progressbar(Lang.xtc.raw, 4000, 'uncuff') then return end
- TriggerServerEvent("md-drugs:server:makingrawxtc",data.data)
-end)
-
-RegisterNetEvent("md-drugs:client:MakeXTC", function(data)
- if not ItemCheck('raw_xtc') then return end
- if not ps.progressbar(Lang.xtc.pressing, 4000, 'uncuff') then return end
- TriggerServerEvent("md-drugs:server:makextc",data)
-end)
-
-RegisterNetEvent("md-drugs:client:stampwhite", function(data)
- lib.registerContext({ id = 'stampxtc', title = 'Stamp XTC Menu',
- options = {
- { icon = GetImage('white_xtc'), title = 'White XTC',
- onSelect = function()
- if not minigame() then ps.notify(Lang.xtc.fail, "error") return end
- if not ps.progressbar(string.format(Lang.xtc.stamp, 'White'), 4000, 'uncuff') then return end
- TriggerServerEvent("md-drugs:server:stampwhite",data.data)
- end
- },
- { icon = GetImage('red_xtc'), title = 'Red XTC',
- onSelect = function()
- if not minigame() then ps.notify(Lang.xtc.fail, "error") return end
- if not ps.progressbar(string.format(Lang.xtc.stamp, 'Red'), 4000, 'uncuff') then return end
- TriggerServerEvent("md-drugs:server:stampred", data.data)
- end
- },
- { icon = GetImage('orange_xtc'), title = 'Orange XTC',
- onSelect = function()
- if not minigame() then ps.notify(Lang.xtc.fail, "error") return end
- if not ps.progressbar(string.format(Lang.xtc.stamp, 'Orange'), 4000, 'uncuff') then return end
- TriggerServerEvent("md-drugs:server:stamporange", data.data)
- end,
- },
- { icon = GetImage('blue_xtc'), title = 'Blue XTC',
- onSelect = function()
- if not minigame() then ps.notify(Lang.xtc.fail, "error") return end
- if not ps.progressbar(string.format(Lang.xtc.stamp, 'Blue'), 4000, 'uncuff') then return end
- TriggerServerEvent("md-drugs:server:stampblue", data.data)
- end
- },
- }
- })
- lib.showContext('stampxtc')
-end)
-
-RegisterNetEvent("md-drugs:client:getsinglepress", function()
- if not ps.progressbar(Lang.xtc.buyp, 4000, 'uncuff') then return end
- TriggerServerEvent("md-drugs:server:buypress")
-end)
-
-
-RegisterNetEvent("md-drugs:client:exchangepresses", function(data)
- if not ps.progressbar(Lang.xtc.buyp, 4000, 'uncuff') then return end
- TriggerServerEvent("md-drugs:server:upgradepress", data.data)
-end)
-
-RegisterNetEvent("md-drugs:client:buypress", function()
- local img = GetImage('singlepress')
- lib.registerContext({
- id = 'buypresses',
- title = 'Purchase Presses',
- options = {
- {title = Lang.xtc.press.title.single, description = Lang.xtc.press.des.single, icon = img, event = 'md-drugs:client:getsinglepress'},
- {title = Lang.xtc.press.title.dual, description = Lang.xtc.press.des.dual, icon = img, event = 'md-drugs:client:exchangepresses', args = {data = 'dual'}},
- {title = Lang.xtc.press.title.triple, description = Lang.xtc.press.des.triple, icon = img, event = 'md-drugs:client:exchangepresses', args = {data = 'triple'}},
- {title = Lang.xtc.press.title.quad, description = Lang.xtc.press.des.quad, icon = img, event = 'md-drugs:client:exchangepresses', args = {data = 'quad'}}
- }
})
- lib.showContext('buypresses')
-end)
+end
+for k, v in pairs(locations.isosafrole) do
+ ps.boxTarget('isosafrole'..k, v.loc, {length = v.l, width = v.w, heading = v.rot}, {
+ {
+ icon = 'fa-solid fa-flask',
+ label = ps.lang('targets.xtc.isosafrole'),
+ action = function()
+ if not minigame() then ps.notify(ps.lang('xtc.fail'), "error") return end
+ if not ps.progressbar(ps.lang('xtc.isosafrole'), 4000, 'uncuff') then return end
+ TriggerServerEvent("md-drugs:server:stealisosafrole", k)
+ end
+ }
+ })
+end
+for k, v in pairs(locations.rawxtcloc) do
+ ps.boxTarget('xtc'..k, v.loc, {length = v.l, width = v.w, heading = v.rot}, {
+ {
+ icon = 'fa-solid fa-flask',
+ label = ps.lang('targets.xtc.raw'),
+ action = function()
+ if not minigame() then ps.notify(ps.lang('xtc.fail'), "error") return end
+ if not ps.progressbar(ps.lang('xtc.raw'), 4000, 'uncuff') then return end
+ TriggerServerEvent("md-drugs:server:makingrawxtc", k)
+ end
+ }
+ })
+end
+
+for k, v in pairs(locations.xtcpress) do
+ ps.requestModel(v.ped)
+ local ped = CreatePed(0, v.ped, v.loc, false, false)
+ Freeze(ped, true, v.loc.w)
+ ps.entityTarget(ped, {
+ {
+ icon = 'fa-solid fa-flask',
+ label = ps.lang('targets.xtc.press'),
+ action = function()
+ local options = {}
+ local recipeList = ps.callback('md-drugs:server:getpressrecipes')
+ for m, d in pairs(recipeList) do
+ if m == 'singlepress' then
+ options[#options + 1] = {
+ icon = ps.getImage(m),
+ title = ps.getLabel(m),
+ description = ps.lang('xtc.press.buysingle', d.cash),
+ action = function()
+ if not ps.progressbar(ps.lang('xtc.buyp'), 4000, 'uncuff') then return end
+ TriggerServerEvent('md-drugs:server:buypress', m)
+ end,
+ }
+ else
+ ps.debug(d.take)
+ local descript = getRecipeList(d.take)
+ options[#options + 1] = {
+ icon = ps.getImage(m),
+ title = ps.getLabel(m),
+ description = descript,
+ action = function()
+ if not ps.progressbar(ps.lang('xtc.buyp'), 4000, 'uncuff') then return end
+ TriggerServerEvent("md-drugs:server:upgradepress", k, m)
+ end,
+ distance = 2.0
+ }
+ end
+ end
+ ps.menu('XTC Presses', 'XTC Presses', options)
+ end
+ }
+ })
+end
+
+for k, v in pairs (locations.stamp) do
+ ps.boxTarget('xtc'..k, v.loc, {length = v.l, width = v.w, heading = v.rot}, {
+ {
+ icon = 'fa-solid fa-flask',
+ label = ps.lang('targets.xtc.' .. k),
+ action = function()
+ local item = {
+ {item = 'white_xtc', label = ps.getLabel('white_xtc'), color = 'white'},
+ {item = 'red_xtc', label = ps.getLabel('red_xtc'), color = 'red'},
+ {item = 'orange_xtc', label = ps.getLabel('orange_xtc'), color = 'orange'},
+ {item = 'blue_xtc', label = ps.getLabel('blue_xtc'), color = 'blue'},
+ }
+ local options = {}
+ for m, d in pairs (item) do
+ options[#options + 1] = {
+ icon = ps.getImage(d.item),
+ title = d.label,
+ description = ps.lang('xtc.stamp_desc', d.color),
+ action = function()
+ if not minigame() then ps.notify(ps.lang('xtc.fail'), "error") return end
+ if not ps.progressbar(string.format(ps.lang('xtc.stamp'), d.label), 4000, 'uncuff') then return end
+ TriggerServerEvent("md-drugs:server:stamp", k, d.color)
+ end,
+ distance = 2.0
+ }
+ end
+ ps.menu('Stamp Pills', 'Stamp Pills', options)
+ end
+ }
+ })
+end
diff --git a/locales/uwu.lua b/locales/uwu.lua
new file mode 100644
index 0000000..d52d9ac
--- /dev/null
+++ b/locales/uwu.lua
@@ -0,0 +1,303 @@
+Lang = {}
+
+Lang.targets = {
+ coke = {
+ pick = 'Pick Widdle Leafies 🌼',
+ cut = 'Cutty-Wutty Leaf-Powder',
+ bag = 'Baggie-Waggie Time!',
+ enter = 'Enter Snuggle Shack~ 🏠💕',
+ exit = 'Bye-Bye, Cozy Room! 👋✨',
+ chop = 'Chop-Chop Leafies Into Fluff! ✂️🍃',
+ },
+ CornerSell = {
+ sell = 'Sell %s Of Cuddle-Dust For $%s 💸💗',
+ deny = 'No Thx, Not Cute Enough Offer! 💢'
+ },
+ crack = {
+ cook = 'Cook Widdle Sparkle-Rocks 💫🔥',
+ bag = 'Baggie Up Shiny Pebbles! ✨🧺'
+ },
+ Delivery = {
+ Deliver = 'Deliver Wuv Parcel For %s 📦💞',
+ open = 'Open Cuddle-Cafe Shop~ 🍰🐾',
+ hand = 'Handie-Hand Over Giftie! 🎁🤗'
+ },
+ heroin = {
+ pick = 'Pick Poppies (So Fluffy! 🌸)',
+ up = 'Pick Up Widdle Table',
+ dry = 'Dry Poppies In Sunbeam ☀️🌼',
+ cut = 'Cut Heroin With Sugar-Puff ✨🍬',
+ cook = 'Cook Widdle Dream-Dust 💤🔥',
+ kit = 'Buy Dream-Lab Kit (So Cute! 🧪🎀)',
+ clean = 'Clean Widdle Lab Table 🧽✨',
+ fill = 'Fill Syringe (Itsy-Bitsy Poke!) 💉💖',
+ vial = 'Make Lil’ Sparkle-Vial 💎💉',
+ },
+ lean = {
+ git = 'Get Widdle Taskie',
+ st = 'Steal From Car (Shh! 👀🚗)'
+ },
+ lsd = {
+ buy = 'Buy Magic Lab Kit ✨🧪',
+ heat = 'Warm Widdle Liquids (Like Tea! 🫖)',
+ refine = 'Make Shiny-Quality Magic 💫✨',
+ paper = 'Make Magic-Paper Sheets 📜🌈',
+ back = 'Pick Up Magic Kit 🎒💫',
+ dab = 'Dab Magic On Paper (Gently! 💧🌸)',
+ clean = 'Clean Widdle Table 🧼✨',
+ lys = 'Steal Sparkle-Acid (Shh! 🤫✨)',
+ die = 'Steal Dream-Ether (Super Secret! 🌌)',
+ buyt = 'Buy Magic Tabs 🌈💊',
+ },
+ mescaline = {
+ pick = 'Pick Widdle Cactus (Ouchless!) 🌵🫶',
+ dry = 'Dry Cactus In Sunny Spot ☀️🌵',
+ },
+ meth = {
+ bag = 'Baggie Up Sparkle-Dust ✨🧺',
+ enter = 'Enter Cozy Lab Hut 🏡💖',
+ exit = 'Exit Snuggle Zone 👋💕',
+ cook = 'Cook Widdle Glitter-Bits 🔬🔥',
+ tray = 'Grab Shiny Tray ✨🍽️',
+ box = 'Box Up Cuddle-Crystals 📦💗',
+ adjust = 'Adjust Widdle Heat (Not Too Hot! 🔥😅)',
+ eph = 'Steal Widdle Ephedrine (Shhh! 🤫)',
+ ace = 'Steal Acetone (It Smells Funny! 👃✨)',
+ mission = 'Get Cute Mission Taskie 📝🐰',
+ stealfromcar = 'Grabby-Grab From Car (No One Saw! 👀🚗)',
+ },
+ oxy = {
+ pack = 'Get Cuddle-Package 📦🤗',
+ talk = 'Talk To Widdle Buyer (Be Nice! 🥺💬)',
+ pay = 'Pay For Truckie (With Sparkle-Cash! 💵✨)',
+ },
+ pha = {
+ fill = 'Fill Widdle Prescription (Doctor Mode! 🩺📋)',
+ },
+ shrooms = {
+ pick = 'Pick Widdle Mushies 🍄🫶',
+ },
+ travel = {
+ travel = 'Open Wandering Merchant Cart 🛺✨',
+ },
+ xtc = {
+ iso = 'Steal Isosafrole (Shiny Stuff! ✨)',
+ mdp = 'Steal MDP2P (Super Secret! 🤫🔬)',
+ raw = 'Make Raw Sparkle-Dust 💫🧪',
+ press = 'Buy Pill-Press (Cute Machine! 🤖💖)',
+ stamp = 'Stamp Widdle Pills (Like Cookies! 🍪)',
+ make = 'Make XTC (With Love! 💗)',
+ pick = 'Pick Up Press (It’s Heavy! 💪)',
+ },
+ weed = {
+ pick = 'Pick Widdle Weedies 🌿🫶',
+ dry = 'Dry Weed In Breezy Spot 🌬️🍃',
+ dpick = 'Pick Dried Weedies (Crunchy!) 🍂',
+ butt = 'Open Edible Bakery Menu 🧈🍪',
+ oil = 'Make Magic Oil (For Yummy Food! 🍲)'
+ },
+ Wholesale = {
+ talk = 'Talk To Big Cuddle Buyer 💬💞'
+ },
+}
+
+-- 💖 COKE: Widdle Leafie Fun 💖
+Lang.Coke = {
+ picking = "Picking Widdle Leafies~ 🍃🫶",
+ makepow = 'Chopping Leafies Into Fluffy Powder ✨✂️',
+ cutting = 'Cutting Cuddle-Dust With Sugar-Puff 🍬💫',
+ bagging = "Bilbo Baggins Mode: ACTIVATED! 🧳🐰",
+ cut = "You Cut Some Widdle Cuddle-Dust~ 💖",
+ nocutcoke = "No Leafies? No Cutty! Silly Billy! 😝",
+ bagcoke = "You Bagged Up Sparkle-Fluff! ✨🧺",
+ nobagcoke = "No Cuddle-Dust? No Baggin’! 😿",
+}
+
+-- 💎 CRACK: Sparkle-Rock Time 💎
+Lang.Crack = {
+ cookcrack = "Cooking Widdle Sparkle-Pebbles 💫🔥",
+ bagcrack = 'Bilbo Baggin’ Mode: GO! 🎒✨',
+ makecrack = 'Nice Sparkle-Rocks, Bestie! 💎💖',
+ nocoke = 'Can’t Make Sparkles Without Leafies, Silly! 🤪🍃'
+}
+
+-- 🌈 CORNER SELLING: Cuddle Salesperson Mode 🌈
+Lang.Cornerselling = {
+ inveh = 'STRANGER DANGER! No Car Rides! 🚫🚗',
+ toofar = "Too Far From Cuddle Corner, Cutie! 🏃♂️💔",
+ selling = 'Selling %s For $%s (With Hugs! 🤗)',
+ deny = "Nuh-Uh! Not Cute Enough! 💢",
+ start = "Let’s Get That Sparkle-Cash! 💵✨",
+ stop = "Lazy Muffin! Go Sell! 🥐💤",
+ nodrugs = "Selling Air? That’s Not Cute! 🌬️❌",
+ notcops = "Not Enough Cops Watching… Suspicious! 👮♂️👀",
+ no = 'You Can’t Sell Here, Snuggle-Puff! 🚫💕',
+ sell = "Selling Cuddle-Goods~ 🛍️💗",
+}
+
+-- 📦 DELIVERY: Wuv Parcel Hustle 📦
+Lang.Delivery = {
+ emailn = 'Not A Cuddle-Dealer… Yet! 😉',
+ emailsub = 'Hurry, Cutie! Deliver the Sparkle-Parcel! ⏳📦',
+ emailcon = 'If It Doesn’t Arrive, I’ll Tell Your Mom You Said “Fwump!” Just Bring %s Of %s!!! 😾💌',
+ search = "Looking For Widdle Delivery… 🕵️♀️💖",
+ none = "Nothin’ Near… Sad Pouty Face… (。;﹏;。)",
+ busy = "Still Doing The Last One, Silly! 🐢",
+ found = "Marked On Mapie-Wapie! 🗺️✨",
+ already = "Already Delivering, Bestie! 🚚💞",
+ checkrep = "Current Cuddle Rep: ",
+ pack = 'Handing Off Wuv Parcel 🎁🤗',
+}
+
+-- 💤 HEROIN: Dream-Dust Crafting 💤
+Lang.Heroin = {
+ pick = "Picking Up Poppies (So Soft! 🌸)",
+ tableout = 'You Already Have A Widdle Table Out! 🪑',
+ dryout = "Drying Poppies In Sunbeam ☀️🌼",
+ cutting = "Cutting Dream-Dust With Sugar-Puff 🍬✨",
+ secret = "SHHHHHHHHHH! 🤫💖",
+ table = "Placing Widdle Table Down 🪑🫶",
+ success = "Heated Dream-Dust Just Right! 💖🔥",
+ clean = 'Cleaning Widdle Dream Table 🧽✨',
+ needles = 'Filling Syringe (Itsy-Bitsy Poke!) 💉💗',
+ pickup = 'Picking Up Widdle Table (Heavy! 💪)',
+ cutheroin = 'You Made Some Cut Dream-Dust~ 💫',
+ noheroin = "No Dream-Dust? No Cutty! Silly! 😝",
+ vial = 'You Made A Sparkle-Vial! 💎💉',
+ novial = "No Dream-Dust? No Vials! 😿",
+ fail = 'You Over-Heated Them, Silly! 🔥😅',
+ fill = 'Filled The Syringe With Cuddle-Juice 💉💖',
+ nofill = 'No Dream-Dust? No Filly! 😾',
+ haskit = 'You Already Have A Dream Lab Kit! 🧪🎀'
+}
+
+-- 🟪 LEAN: Purple Hug Juice 🟪
+Lang.Lean = {
+ marked = 'Car Marked On Mapie-Wapie! 🚗📍',
+ lean = 'You Got Purple Hug Juice~ 💜🥤',
+ dextro = 'You Got Red Sparkle-Syrup! 🔴💉',
+ act = 'You Already Have A Lean Taskie! 📋🐰',
+}
+
+-- 🌈 LSD: Magic Paper Fun 🌈
+Lang.lsd = {
+ steallys = 'Stealing Sparkle-Acid (Shh! 🤫✨)',
+ stealdie = 'Stealing Dream-Ether (Super Secret! 🌌)',
+ tableout = 'You Already Have A Magic Table Out! 🪑💫',
+ tablepack = 'Packing Up Widdle Table 🧳✨',
+ heat = 'Warming Widdle Liquids (Like Tea! 🫖)',
+ clean = 'Cleaning Magic Table 🧽🌈',
+ refine = 'Making Magic Extra Shiny! ✨🌟',
+ dip = 'Dabbing Magic On Paper (Gently! 💧🌸)',
+ buypaper = 'Buying Magic-Paper Sheets 📜💖',
+ buykit = 'Buying Magic Lab Kit 🧪🎀',
+ place = 'Placing Widdle Table Down 🪑🫶',
+ hav = 'You Already Have A Magic Table! 🪑✨',
+ lys = 'You Got Sparkle-Acid! ✨🧪',
+ die = 'You Got Dream-Ether! 💫🌌',
+ cleaned = 'You Cleaned It Perfectly! 🧽💖',
+ madelsd = 'You Made Magic Paper! 🌈📄',
+ failed = 'You Over-Heated Them, Silly! 🔥😅',
+ refined = 'You Made It Extra Shiny! ✨🌟',
+ broke = 'Your Broke-Pants Can’t Afford This! 💸❌',
+ novial = 'No Magic Vials, Cutie! 😿',
+}
+
+-- 🌵 MESCALINE: Cactus Hugs 🌵
+Lang.mescaline = {
+ pick = "Picking Widdle Cactus (Ouchless! 🌵🫶)",
+ dry = 'Drying Cactus In Sunny Spot ☀️🌵',
+ nocactus = 'No Cactus Bulbs, Sad Pouty… (。;﹏;。)',
+ eat = 'Eating Mescaline (Have A Good Trip! 🌀✨)'
+}
+
+-- ✨ METH: Glitter-Bits Lab ✨
+Lang.meth = {
+ inside = 'Stuff Already Inside, Silly! 🧪📦',
+ increaseheat = 'Turning Up Widdle Heat 🔥😅',
+ mission = 'Car Marked On Mapie-Wapie! 🚗📍',
+ ace = 'You Got Some Acetone (Smells Funny! 👃✨)',
+ eph = 'You Got Some Ephedrine (Sparkle-Stuff! ✨)',
+ mix = 'Mixing Widdle Ingredients (Like Baking! 🧁)',
+ nobag = 'No Baggies, Sad Pouty… 😿',
+ act = 'You Already Have A Taskie! 📝🐰',
+}
+
+-- 💊 OXY: Cuddle-Pills 💊
+Lang.oxy = {
+ truck = 'Your Truckie Is Here! 🚚💖',
+ cantcarry = 'You Not Strong Enough, Cutie! 💪😅',
+ hand = 'Handing Over Cuddle-Pills 💊🤗',
+ empty = 'Can’t Be Empty-Handed, Silly! 🖐️❌',
+ broke = 'Your Broke-Pants Can’t Pay! 💸❌',
+ hot = 'Car Is Hot! Dump It Now! 🔥🚗',
+ next = 'Go To Next Wuv Spot! 🌟📍'
+}
+
+-- 🩺 PHARMA: Doctor Cuddle Mode 🩺
+Lang.Pharma = {
+ notems = 'You Not Doctor, Silly! 🩺❌',
+ write = 'Writing Widdle Prescription 📝🫶',
+ fill = 'Filling Cuddle-Prescription 💊💕',
+ open = 'Opening Widdle Bottle 🍼✨',
+ pills = 'You Got Widdle Pills! 💊💖',
+ no = 'No Prescription? No Pills! 😿'
+}
+
+-- 🍄 SHROOMS: Widdle Mushies 🍄
+Lang.Shrooms = {
+ pick = 'Picking Widdle Mushies 🍄🫶',
+ eat = 'Eating Mushies (Have A Nice Trip! 🌈✨)',
+ trip = 'Have A Super Cute Trip! 💖💫'
+}
+
+-- 🌿 WEED: Cuddle-Weed Bakery 🌿
+Lang.Weed = {
+ pick = 'Harvesting Widdle Weedies 🌿🫶',
+ busy = 'Already Drying, Silly! 🍂⏳',
+ canna = 'Making Canna-Butter (Yummy! 🧈)',
+ brown = 'Making Special Brownies 🍫',
+ cook = 'Making Special Cookies 🍪',
+ Choc = 'Making Special Chocolate 🍫💖',
+ muff = 'Making Special Muffin 🧁',
+ stovehot = 'Stove Too Hot! Wait 30s, Cutie! 🔥⏰',
+ shat = 'Making Shatter (Sparkle-Stuff! ✨)',
+ roll = 'Rolling Widdle Blunts 🚬🌸',
+ wait = 'Wait A Lil’ Bit Before Driving 🚗💤',
+ take = 'Taking Down Weedies 🌿🫶',
+ nodry = 'Need Wet Weedies To Dry, Silly! 🌿💧',
+ noweed = 'Can’t Roll With Air, Silly! 🌬️❌',
+ noshat = 'Need Shatter For Dab, Cutie! ✨💧',
+ notorch = 'Need Butane Torch, Bestie! 🔥🛠️'
+}
+
+-- 💊 XTC: Cute Pill Press 💊
+Lang.xtc = {
+ out = 'You Already Have A Press Out! 🤖❌',
+ pressing = 'Pressing Widdle Pills 🌀💖',
+ raw = 'Making Raw Sparkle-Dust ✨🧪',
+ mdp2p = 'Stealing MDP2P (Shh! 🤫)',
+ iso = 'Stealing Isosafrole (Sparkle-Chem! ✨)',
+ fail = 'Dude… It’s A Circle, Not Rocket Science! 🚀😅',
+ pickup = 'Picking Up Widdle Press 🤖🫶',
+ stamp = 'Stamping %s Pills (Like Cookies! 🍪)',
+ buyp = "Buying Cute Press 🤖💖",
+ cash = 'I Need 20k In Sparkle-Cash! 💵✨',
+ press = {
+ title = {single = 'Single Press', dual = 'Dual Press', triple = 'Triple Press', quad = 'Quad Press'},
+ des = {
+ single = 'Buy a single press for 20k 💖',
+ dual = '20 of each unstamped single stack pill and your single press 💫',
+ triple = '50 of each unstamped dual stack pill and your dual press ✨',
+ quad = '150 of each unstamped Triple stack pill and your triple press 🌟'
+ }
+ }
+}
+
+-- 💼 WHOLESale: Big Cuddle Deals 💼
+Lang.Wholesale = {
+ al = 'You Already Have A Delivery, Cutie! 📦⏳',
+ na = 'No One Answered… Try Later, Bestie! 📞❌',
+}
+
+return Lang
\ No newline at end of file
diff --git a/locales/wookie.lua b/locales/wookie.lua
new file mode 100644
index 0000000..1053d7f
--- /dev/null
+++ b/locales/wookie.lua
@@ -0,0 +1,302 @@
+Lang = {}
+
+Lang.targets = {
+ coke = {
+ pick = 'Rrrowr rraar rawr grrr', -- "Pick Wookie Leaf"
+ cut = 'Rraar gwah raarrrk', -- "Cut Leaf Dust"
+ bag = 'Rraar rawr wrooowr', -- "Bag Dust Fast"
+ enter = 'Rrrowr hnnnngg kashyyyk', -- "Enter Safe Den"
+ exit = 'Hrrooo kashyyyk', -- "Exit Den"
+ chop = 'Rraar rawr gwah rrrr', -- "Chop Leaf Into Dust"
+ },
+ CornerSell = {
+ sell = 'Rawr %s rraar %s grrr $%s', -- "Sell %s Of %s For $%s"
+ deny = 'Rrrowr rraarrrk' -- "Deny Offer"
+ },
+ crack = {
+ cook = 'Rraar rawr hrrrnngg', -- "Cook Fire Rock"
+ bag = 'Rrrowr rawr wrooowr' -- "Bag Rock Fast"
+ },
+ Delivery = {
+ Deliver = 'Rraar rawr %s', -- "Deliver For %s"
+ open = 'Rraar rawr %s kraar', -- "Open %s Shop"
+ hand = 'Rrrowr rawr' -- "Hand Over"
+ },
+ heroin = {
+ pick = 'Rrrowr rawr grrr', -- "Pick Poppy Flower"
+ up = 'Rrrowr rawr kraar', -- "Pick Up Table"
+ dry = 'Rraar rawr hnnnngg', -- "Dry Poppy In Sun"
+ cut = 'Rraar rawr grrr grrr', -- "Cut Dust With Sparkle"
+ cook = 'Rraar rawr hrrrnngg', -- "Cook Dream Dust"
+ kit = 'Rraar rawr lab kashyyyk', -- "Buy Heroin Lab Kit"
+ clean = 'Rraar rawr kraar grrr', -- "Clean Table Dust"
+ fill = 'Rraar rawr syringe', -- "Fill Syringe"
+ vial = 'Rraar rawr vial', -- "Make Vial"
+ },
+ lean = {
+ git = 'Rrrowr rawr task', -- "Get Task"
+ st = 'Rrrowr rawr car grrr' -- "Steal From Car"
+ },
+ lsd = {
+ buy = 'Rraar rawr lab kashyyyk', -- "Buy LSD Lab Kit"
+ heat = 'Rraar rawr fire', -- "Heat Liquid"
+ refine = 'Rraar rawr pure', -- "Refine Quality"
+ paper = 'Rraar rawr paper', -- "Make Tab Paper"
+ back = 'Rrrowr rawr lab kashyyyk', -- "Pick Up Lab Kit"
+ dab = 'Rraar rawr paper dab', -- "Dab LSD on sheets"
+ clean = 'Rraar rawr table grrr', -- "Clean Table"
+ lys = 'Rrrowr rawr acid', -- "Steal Lysergic Acid"
+ die = 'Rrrowr rawr ether', -- "Steal Diethylamide"
+ buyt = 'Rraar rawr tab', -- "Buy Tabs"
+ },
+ mescaline = {
+ pick = 'Rrrowr rawr cactus', -- "Pick Cactus"
+ dry = 'Rraar rawr cactus hnnnngg', -- "Dry Out Cactus"
+ },
+ meth = {
+ bag = 'Rrrowr rawr baggie', -- "Bag Up Meth"
+ enter = 'Rrrowr hnnnngg kraar', -- "Enter Building"
+ exit = 'Hrrooo kraar', -- "Exit Building"
+ cook = 'Rraar rawr fire dust', -- "Cook Meth"
+ tray = 'Rrrowr rawr tray', -- "Grab Tray"
+ box = 'Rrrowr rawr box', -- "Box Up Meth"
+ adjust = 'Rraar rawr heat', -- "Adjust Temperature"
+ eph = 'Rrrowr rawr ephedrine', -- "Steal Ephedrine"
+ ace = 'Rrrowr rawr acetone', -- "Steal Acetone"
+ mission = 'Rrrowr rawr mission', -- "Get Mission"
+ stealfromcar = 'Rrrowr rawr car grrr' -- "Steal From Car"
+ },
+ oxy = {
+ pack = 'Rrrowr rawr package', -- "Get Oxy Package"
+ talk = 'Rrrowr rawr buyer', -- "Talk To Buyer"
+ pay = 'Rrrowr rawr truck', -- "Pay For Truck"
+ },
+ pha = {
+ fill = 'Rrrowr rawr script', -- "Fill Prescription"
+ },
+ shrooms = {
+ pick = 'Rrrowr rawr mushie', -- "Pick Shrooms"
+ },
+ travel = {
+ travel = 'Rrrowr rawr merchant', -- "Open Travelling Merchant"
+ },
+ xtc = {
+ iso = 'Rrrowr rawr iso', -- "Steal Isosafrole"
+ mdp = 'Rrrowr rawr mdp2p', -- "Steal MDP2P"
+ raw = 'Rrrowr rawr raw xtc', -- "Make Raw XTC"
+ press = 'Rrrowr rawr press', -- "Buy XTC Press"
+ stamp = 'Rrrowr rawr stamp', -- "Stamp Pills"
+ make = 'Rrrowr rawr xtc', -- "Make XTC"
+ pick = 'Rrrowr rawr press up', -- "Pick Up Press"
+ },
+ weed = {
+ pick = 'Rrrowr rawr weed', -- "Pick Weed"
+ dry = 'Rraar rawr weed hnnnngg', -- "Dry Weed"
+ dpick = 'Rrrowr rawr dried weed', -- "Pick Dried Weed"
+ butt = 'Rrrowr rawr edible menu', -- "Open Edible Menu"
+ oil = 'Rrrowr rawr oil', -- "Make Oil"
+ },
+ Wholesale = {
+ talk = 'Rrrowr rawr buyer' -- "Talk To Buyer"
+ },
+}
+
+-- 🌿 COKE: Wookiee Leaf Dust Hustle
+Lang.Coke = {
+ picking = "Rrrowr rawr leaf",
+ makepow = 'Rraar rawr leaf dust',
+ cutting = 'Rraar rawr dust sparkle',
+ bagging = "Rraar rawr baggie wrooowr",
+ cut = "Rraar rawr dust cut",
+ nocutcoke = "Rrrowr rawr no dust? RRAAARRGH!",
+ bagcoke = "Rraar rawr bagged dust",
+ nobagcoke = "Rrrowr rawr no dust? RRAAARRGH!",
+}
+
+-- 💥 CRACK: Fire Rock Time
+Lang.Crack = {
+ cookcrack = "Rraar rawr fire rock",
+ bagcrack = 'Rraar rawr baggie wrooowr',
+ makecrack = 'Rraar rawr nice rock',
+ nocoke = 'Rrrowr rawr no dust? RRAAARRGH!',
+}
+
+-- 🛍️ CORNER SELLING: Street Hustle
+Lang.Cornerselling = {
+ inveh = 'Rrrowr rawr car danger! RRAAARRGH!',
+ toofar = "Rrrowr rawr too far den",
+ selling = 'Rrrowr rawr %s grrr $%s',
+ deny = "Rrrowr rawr no offer",
+ start = "Rraar rawr get cash",
+ stop = "Rrrowr rawr lazy",
+ nodrugs = "Rrrowr rawr sell air? RRAAARRGH!",
+ notcops = "Rrrowr rawr no cops",
+ no = 'Rrrowr rawr no sell here',
+ sell = "Rrrowr rawr selling",
+}
+
+-- 📦 DELIVERY: Wookiee Courier
+Lang.Delivery = {
+ emailn = 'Rrrowr rawr not dealer',
+ emailsub = 'Rraar rawr hurry package',
+ emailcon = 'Rrrowr rawr if no deliver, tell mom you say FUMP! Bring %s Of %s!',
+ search = "Rrrowr rawr find delivery",
+ none = "Rrrowr rawr nothing",
+ busy = "Rrrowr rawr already busy",
+ found = "Rrrowr rawr map mark",
+ already = "Rrrowr rawr already go",
+ checkrep = "Rrrowr rawr rep: ",
+ pack = 'Rrrowr rawr hand package',
+}
+
+-- 💤 HEROIN: Dream Dust of the Forest
+Lang.Heroin = {
+ pick = "Rrrowr rawr poppy",
+ tableout = 'Rrrowr rawr table out',
+ dryout = "Rraar rawr poppy sun",
+ cutting = "Rraar rawr dust sparkle",
+ secret = "Rrrowr rawr SHHHHHHH",
+ table = "Rrrowr rawr table down",
+ success = "Rraar rawr heated good",
+ clean = 'Rrrowr rawr table clean',
+ needles = 'Rrrowr rawr syringe fill',
+ pickup = 'Rrrowr rawr table up',
+ cutheroin = 'Rraar rawr cut dust',
+ noheroin = "Rrrowr rawr no dust? RRAAARRGH!",
+ vial = 'Rraar rawr made vial',
+ novial = "Rrrowr rawr no dust? RRAAARRGH!",
+ fail = 'Rraar rawr too hot! RRAAARRGH!',
+ fill = 'Rrrowr rawr syringe full',
+ nofill = 'Rrrowr rawr no dust? RRAAARRGH!',
+ haskit = 'Rrrowr rawr already have kit'
+}
+
+-- 🟪 LEAN: Purple Syrup of the Ancients
+Lang.Lean = {
+ marked = 'Rrrowr rawr car marked',
+ lean = 'Rrrowr rawr purple juice',
+ dextro = 'Rrrowr rawr red juice',
+ act = 'Rrrowr rawr already task',
+}
+
+-- 🌈 LSD: Magic of the Ancient Trees
+Lang.lsd = {
+ steallys = 'Rrrowr rawr acid steal',
+ stealdie = 'Rrrowr rawr ether steal',
+ tableout = 'Rrrowr rawr table out',
+ tablepack = 'Rrrowr rawr pack table',
+ heat = 'Rraar rawr heat liquid',
+ clean = 'Rrrowr rawr clean table',
+ refine = 'Rraar rawr refine pure',
+ dip = 'Rrrowr rawr dab paper',
+ buypaper = 'Rrrowr rawr buy paper',
+ buykit = 'Rrrowr rawr buy kit',
+ place = 'Rrrowr rawr place table',
+ hav = 'Rrrowr rawr already table',
+ lys = 'Rrrowr rawr got acid',
+ die = 'Rrrowr rawr got ether',
+ cleaned = 'Rrrowr rawr table clean',
+ madelsd = 'Rraar rawr made magic',
+ failed = 'Rraar rawr too hot! RRAAARRGH!',
+ refined = 'Rraar rawr refined good',
+ broke = 'Rrrowr rawr no cash! RRAAARRGH!',
+ novial = 'Rrrowr rawr no vials',
+}
+
+-- 🌵 MESCALINE: Desert Cactus of the Ancients
+Lang.mescaline = {
+ pick = "Rrrowr rawr cactus",
+ dry = 'Rraar rawr cactus sun',
+ nocactus = 'Rrrowr rawr no cactus',
+ eat = 'Rrrowr rawr eat cactus'
+}
+
+-- ✨ METH: Fire Dust of the Northern Clans
+Lang.meth = {
+ inside = 'Rrrowr rawr already full',
+ increaseheat = 'Rraar rawr heat up',
+ mission = 'Rrrowr rawr car marked',
+ ace = 'Rrrowr rawr got acetone',
+ eph = 'Rrrowr rawr got ephedrine',
+ mix = 'Rraar rawr mix dust',
+ nobag = 'Rrrowr rawr no bags',
+ act = 'Rrrowr rawr already task',
+}
+
+-- 💊 OXY: Healing Dust of the Elders
+Lang.oxy = {
+ truck = 'Rrrowr rawr truck here',
+ cantcarry = 'Rrrowr rawr too heavy',
+ hand = 'Rrrowr rawr hand over',
+ empty = 'Rrrowr rawr empty hands? RRAAARRGH!',
+ broke = 'Rrrowr rawr no cash! RRAAARRGH!',
+ hot = 'Rrrowr rawr car hot! Dump!',
+ next = 'Rrrowr rawr go next'
+}
+
+-- 🩺 PHARMA: Medicine of the Healers
+Lang.Pharma = {
+ notems = 'Rrrowr rawr not healer',
+ write = 'Rrrowr rawr write script',
+ fill = 'Rrrowr rawr fill script',
+ open = 'Rrrowr rawr open bottle',
+ pills = 'Rrrowr rawr got pills!',
+ no = 'Rrrowr rawr no script'
+}
+
+-- 🍄 SHROOMS: Forest Spirits' Gift
+Lang.Shrooms = {
+ pick = 'Rrrowr rawr pick mushie',
+ eat = 'Rrrowr rawr eat mushie',
+ trip = 'Rrrowr rawr good trip!'
+}
+
+-- 🌿 WEED: Green Gift of the Trees
+Lang.Weed = {
+ pick = 'Rrrowr rawr harvest weed',
+ busy = 'Rrrowr rawr already drying',
+ canna = 'Rrrowr rawr make butter',
+ brown = 'Rrrowr rawr make brownie',
+ cook = 'Rrrowr rawr make cookie',
+ Choc = 'Rrrowr rawr make chocolate',
+ muff = 'Rrrowr rawr make muffin',
+ stovehot = 'Rrrowr rawr stove hot! Wait!',
+ shat = 'Rrrowr rawr make shatter',
+ roll = 'Rrrowr rawr roll blunt',
+ wait = 'Rrrowr rawr wait drive',
+ take = 'Rrrowr rawr take weed',
+ nodry = 'Rrrowr rawr need wet weed',
+ noweed = 'Rrrowr rawr no weed? RRAAARRGH!',
+ noshat = 'Rrrowr rawr need shatter',
+ notorch = 'Rrrowr rawr need fire stick'
+}
+
+-- 💊 XTC: Sacred Pill of the Dance Clans
+Lang.xtc = {
+ out = 'Rrrowr rawr press out',
+ pressing = 'Rrrowr rawr pressing pills',
+ raw = 'Rrrowr rawr make raw xtc',
+ mdp2p = 'Rrrowr rawr steal mdp2p',
+ iso = 'Rrrowr rawr steal iso',
+ fail = 'Rrrowr rawr circle not hard!',
+ pickup = 'Rrrowr rawr pick up press',
+ stamp = 'Rrrowr rawr stamp %s pills',
+ buyp = "Rrrowr rawr buy press",
+ cash = 'Rrrowr rawr need 20k cash',
+ press = {
+ title = {single = 'Rrrowr rawr single', dual = 'Rrrowr rawr dual', triple = 'Rrrowr rawr triple', quad = 'Rrrowr rawr quad'},
+ des = {
+ single = 'Rrrowr rawr buy single press 20k',
+ dual = 'Rrrowr rawr 20 unstamped and press',
+ triple = 'Rrrowr rawr 50 unstamped and press',
+ quad = 'Rrrowr rawr 150 unstamped and press'
+ }
+ }
+}
+
+-- 💼 WHOLESALE: Great Trade of the Clans
+Lang.Wholesale = {
+ al = 'Rrrowr rawr already deliver',
+ na = 'Rrrowr rawr no answer'
+}
+return Lang
\ No newline at end of file
diff --git a/server/cocaine.lua b/server/cocaine.lua
index 746fdaa..80e2737 100644
--- a/server/cocaine.lua
+++ b/server/cocaine.lua
@@ -1,7 +1,47 @@
+local cocaineRecipes = {
+ cokepowder = {
+ tier1 = {take = {coca_leaf = 1}, give = {coke = 1}},
+ tier2 = {take = {coca_leaf = 1}, give = {cokestagetwo = 1}},
+ tier3 = {take = {coca_leaf = 1}, give = {cokestagethree = 1}},
+ },
+ cutcoke = {
+ tier1 = {take = {coke = 1, bakingsoda = 1}, give = {loosecoke = 1}},
+ tier2 = {take = {cokestagetwo = 1, bakingsoda = 1}, give = {loosecokestagetwo = 1}},
+ tier3 = {take = {cokestagethree = 1, bakingsoda = 1}, give = {loosecokestagethree = 1}},
+ },
+ bagcoke = {
+ tier1 = {take = {loosecoke = 1, empty_weed_bag = 1}, give = {cokebaggy = 1}},
+ tier2 = {take = {loosecokestagetwo = 1, empty_weed_bag = 1}, give = {cokebaggystagetwo = 1}},
+ tier3 = {take = {loosecokestagethree = 1, empty_weed_bag = 1}, give = {cokebaggystagethree = 1}},
+ }
+}
+local cocaineLocations = {
+ MakePowder = {
+ {loc = vector3(1086.20, -3195.30, -39.20), l = 1.0, w = 1.0, rot = 45.0, gang = "ballas"},
+ {loc = vector3(1090.15, -3199.5, -39.18), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
+ {loc = vector3(1093.09, -3199.53, -39.05), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
+ },
+ CuttingCoke = {
+ {loc = vector3(1095.61, -3195.62, -39.13), l = 1.0, w = 1.0, rot = 45.0, offset = vec3(-1.782227, 0.445068, -0.502701), rotation = vector3(0,0,0), gang = ""},
+ {loc = vector3(1092.74, -3196.68, -38.99), l = 1.0, w = 1.0, rot = 45.0, offset = vec3(1.983398, 0.407959, -0.642696), rotation = vector3(0,0,180.0), gang = ""},
+ },
+ BaggingCoke = {
+ {loc = vector3(1093.16, -3195.78, -39.19), l = 1.0, w = 1.0, rot = 45.0,offset = vec3(4.515137, 2.542969, -0.814194), rotation = vector3(0,0,180.0), gang = ""},
+ {loc = vector3(1090.17, -3196.59, -38.99), l = 1.0, w = 1.0, rot = 45.0, offset = vec3(-5.207642, -1.666504, -1.014198), rotation = vector3(0,0, 0.0), gang = ""},
+ },
+ cokeTele = {
+ {inside = vector3(1088.81, -3187.57, -38.99), outside = vector3(198.16, -1276.92, 29.33), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
+ }
+}
+
+ps.registerCallback('md-drugs:server:GetCokeLocations', function()
+ return cocaineLocations
+end)
+
RegisterServerEvent('md-drugs:server:makepowder', function(num)
local src = source
- if not ps.checkDistance(src, GlobalState.MDDrugsLocs.MakePowder[num].loc, 3.5) then
+ if not ps.checkDistance(src, cocaineLocations.MakePowder[num].loc, 3.5) then
ps.notify(src, 'You are not in the correct location', 'error')
return
end
@@ -14,13 +54,16 @@ RegisterServerEvent('md-drugs:server:makepowder', function(num)
tier = 'tier3'
end
end
- if not GetRecipe(src, 'cocaine', 'cokepowder', tier) then return end
+ if not ps.craftItem(src, cocaineRecipes['cocaine']['cokepowder'][tier]) then
+ ps.notify(src, 'You do not have the required items', 'error')
+ return
+ end
end)
RegisterServerEvent('md-drugs:server:cutcokeone', function(num)
local src = source
local tier = 'tier1'
- if not ps.checkDistance(src, GlobalState.MDDrugsLocs.CuttingCoke[num].loc, 2.5) then
+ if not ps.checkDistance(src, cocaineLocations.CuttingCoke[num].loc, 2.5) then
ps.notify(src, 'You are not in the correct location', 'error')
return
end
@@ -37,13 +80,16 @@ RegisterServerEvent('md-drugs:server:cutcokeone', function(num)
end
end
end
- if not GetRecipe(src, 'cocaine', 'cutcoke', tier) then return end
+ if not ps.craftItem(src, cocaineRecipes['cocaine']['cutcoke'][tier]) then
+ ps.notify(src, 'You do not have the required items', 'error')
+ return
+ end
end)
RegisterServerEvent('md-drugs:server:bagcoke', function(num)
local src = source
local tier = 'tier1'
- if not ps.checkDistance(src, GlobalState.MDDrugsLocs.BaggingCoke[num].loc, 2.5) then
+ if not ps.checkDistance(src, cocaineLocations.BaggingCoke[num].loc, 2.5) then
ps.notify(src, 'You are not in the correct location', 'error')
return
end
@@ -59,10 +105,16 @@ RegisterServerEvent('md-drugs:server:bagcoke', function(num)
break
end
end
- if not GetRecipe(src, 'cocaine', 'bagcoke', tier) then return end
+ if not ps.craftItem(src, cocaineRecipes['cocaine']['bagcoke'][tier]) then
+ ps.notify(src, 'You do not have the required items', 'error')
+ return
+ end
AddRep(src, 'coke')
else
- if not GetRecipe(src, 'cocaine', 'bagcoke', 'tier1') then return end
+ if not ps.craftItem(src, cocaineRecipes['cocaine']['bagcoke'][tier]) then
+ ps.notify(src, 'You do not have the required items', 'error')
+ return
+ end
end
end)
diff --git a/server/crack.lua b/server/crack.lua
index b957509..3cda068 100644
--- a/server/crack.lua
+++ b/server/crack.lua
@@ -1,8 +1,32 @@
+local crackRecipe = {
+ cookcrack = {
+ tier1 = {take = {loosecoke = 1, bakingsoda = 1}, give = {crackrock = 1}},
+ tier2 = {take = {loosecokestagetwo = 1, bakingsoda = 1}, give = {crackrockstagetwo = 1}},
+ tier3 = {take = {loosecokestagethree = 1,bakingsoda = 1}, give = {crackrockstagethree = 1}},
+ },
+ bagcrack = {
+ tier1 = {take = {crackrock = 1, empty_weed_bag = 1}, give = {baggedcracked = 1}},
+ tier2 = {take = {crackrockstagetwo = 1, empty_weed_bag = 1}, give = {baggedcrackedstagetwo = 1}},
+ tier3 = {take = {crackrockstagethree = 1, empty_weed_bag = 1}, give = {baggedcrackedstagethree = 1}},
+ }
+}
+local CrackLocations = {
+ makecrack = { -- make crack with baking soda with cut coke 1-3
+ {loc = vector3(2433.47, 4970.02, 42.18), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
+ },
+ bagcrack = { --- bag crack 1-3 stages
+ {loc = vector3(2436.55, 4964.96, 42.18), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
+ },
+}
+
+ps.registerCallback('md-drugs:server:GetCrackLocations', function()
+ return CrackLocations
+end)
RegisterServerEvent('md-drugs:server:makecrackone', function(num)
local src = source
local tier = 'tier1'
- if not ps.checkDistance(src, GlobalState.MDDrugsLocs.makecrack[num].loc, 2.0) then
+ if not ps.checkDistance(src, CrackLocations.makecrack[num].loc, 2.0) then
ps.notify(src, 'You are not in the correct location', 'error')
return
end
@@ -19,14 +43,17 @@ RegisterServerEvent('md-drugs:server:makecrackone', function(num)
end
end
end
- if not GetRecipe(src, 'crack', 'cookcrack', tier) then return end
+ if not ps.craftItem(src, crackRecipe['crack']['cookcrack'][tier]) then
+ ps.notify(src, 'You do not have the required items', 'error')
+ return
+ end
end)
RegisterServerEvent('md-drugs:server:bagcrack', function(num)
local src = source
local tier = 'tier1'
- if not ps.checkDistance(src, GlobalState.MDDrugsLocs.bagcrack[num].loc, 2.0) then
+ if not ps.checkDistance(src, CrackLocations.bagcrack[num].loc, 2.0) then
ps.notify(src, 'You are not in the correct location', 'error')
return
end
@@ -43,7 +70,10 @@ RegisterServerEvent('md-drugs:server:bagcrack', function(num)
end
end
end
- if not GetRecipe(src, 'crack', 'bagcrack', tier) then return end
+ if not ps.craftItem(src, crackRecipe['crack']['bagcrack'][tier]) then
+ ps.notify(src, 'You do not have the required items', 'error')
+ return
+ end
end)
local cokecut = {crackrockstagetwo = 2, crackrockstagethree = 3}
diff --git a/server/heroin.lua b/server/heroin.lua
index a4d3f7b..a465ed3 100644
--- a/server/heroin.lua
+++ b/server/heroin.lua
@@ -1,4 +1,46 @@
local heroinLabKits = {}
+local heroinRecipes = {
+ dryheroin = {
+ tier1 = {take = {poppyresin = 1}, give = {heroin = 1}},
+ tier2 = {take = {poppyresin = 1}, give = {heroinstagetwo = 1}},
+ tier3 = {take = {poppyresin = 1}, give = {heroinstagethree = 1}},
+ },
+ cutheroin = {
+ tier1 = {take = {heroin = 1, bakingsoda = 1}, give = {heroincut = 1}},
+ tier2 = {take = {heroinstagetwo = 1, bakingsoda = 1}, give = {heroincutstagetwo = 1}},
+ tier3 = {take = {heroinstagethree = 1, bakingsoda = 1}, give = {heroincutstagethree = 1}},
+ },
+ fillvial = {
+ tier1 = {take = {heroincut = 1, emptyvial = 1}, give = {heroinvial = 1}},
+ tier2 = {take = {heroincutstagetwo = 1, emptyvial = 1}, give = {heroinvialstagetwo = 1}},
+ tier3 = {take = {heroincutstagethree = 1, emptyvial = 1}, give = {heroinvialstagethree = 1}},
+ },
+ fillneedle = {
+ tier1 = {take = {heroinvial = 1, needle = 1}, give = {heroin_ready = 1}},
+ tier2 = {take = {heroinvialstagetwo = 1, needle = 1}, give = {heroin_readystagetwo = 1}},
+ tier3 = {take = {heroinvialstagethree = 1, needle = 1}, give = {heroin_readystagethree = 1}},
+ }
+}
+
+local heroinLocations = {
+ dryplant = { -- turn resin into powder
+ {loc = vector3(-1353.77, -335.58, 43.92), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
+ },
+ cutheroinone = { -- cut heroin stage 1-3 with baking soda
+ {loc = vector3(-1360.14, -337.03, 43.92), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
+ },
+ fillneedle = { -- fill needles with heroin
+ {loc = vector3(-1366.32, -334.40, 44.44), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
+ },
+ buyKit = {
+ {ped = 'a_m_m_farmer_01',loc = vector4(-1366.32, -334.40, 44.44,180.0), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
+ }
+}
+
+ps.registerCallback('md-drugs:server:GetHeroinLocations', function(source)
+ return heroinLocations
+end)
+
local prices = {
heroinlabkitprice = 10000
}
@@ -17,25 +59,28 @@ end)
RegisterServerEvent('md-drugs:server:dryplant', function(num)
local src = source
- if not ps.checkDistance(src, GlobalState.MDDrugsLocs.dryplant[num].loc, 3.0) then return end
+ if not ps.checkDistance(src, heroinLocations.dryplant[num].loc, 3.0) then return end
if not ps.hasItem(src, 'poppyresin', 1) then return end
+ local tier = 'tier1'
if Config.TierSystem then
local heroin = getRep(src, 'heroin')
if heroin <= Config.Tier1 then
- if not GetRecipe(src, 'heroin', 'dryheroin', 'tier1') then return end
+ tier = 'tier1'
elseif heroin >= Config.Tier1 and heroin <= Config.Tier2 then
- if not GetRecipe(src, 'heroin', 'dryheroin', 'tier2') then return end
+ tier = 'tier2'
else
- if not GetRecipe(src, 'heroin', 'dryheroin', 'tier3') then return end
+ tier = 'tier3'
end
+ end
+ if not ps.craftItem(src, heroinRecipes['dryheroin'][tier]) then
+ ps.notify(src, 'You do not have the required items', 'error')
return
end
- if not GetRecipe(src, 'heroin', 'dryheroin', 'tier1') then return end
end)
RegisterServerEvent('md-drugs:server:cutheroin', function(num)
local src = source
- if not ps.checkDistance(src, GlobalState.MDDrugsLocs.cutheroinone[num].loc, 3.0) then return end
+ if not ps.checkDistance(src, heroinLocations.cutheroinone[num].loc, 3.0) then return end
if not ps.hasItem(src, 'bakingsoda', 1) then return end
if Config.TierSystem then
local itemList = {
@@ -45,20 +90,26 @@ RegisterServerEvent('md-drugs:server:cutheroin', function(num)
}
for k, v in pairs(itemList) do
local cuth = ps.hasItem(src, k)
- if cuth then
- if not GetRecipe(src, 'heroin', 'cutheroin', v) then return end
+ if cuth then
+ if not ps.craftItem(src, heroinRecipes['cutheroin'][v]) then
+ ps.notify(src, 'You do not have the required items', 'error')
+ return
+ end
AddRep(src, 'heroin')
return
end
end
else
- if not GetRecipe(src, 'heroin', 'cutheroin', 'tier1') then return end
+ if not ps.craftItem(src, heroinRecipes['cutheroin']['tier1']) then
+ ps.notify(src, 'You do not have the required items', 'error')
+ return
+ end
end
end)
-RegisterServerEvent('md-drugs:server:getheroinlabkit', function()
+RegisterServerEvent('md-drugs:server:getheroinlabkit', function(num)
local src = source
- if not ps.checkDistance(src, GlobalState.MDDrugsLocs.singleSpot.buyheroinlabkit, 3.0) then return end
+ if not ps.checkDistance(src, heroinLocations.buyKit[num].loc, 3.0) then return end
local has = ps.hasItem(src, 'heroinlabkit')
if has then ps.notify(src, Lang.Heroin.haskit, 'error') return end
if ps.removeMoney(src, 'cash', prices.heroinlabkitprice) then
@@ -93,7 +144,7 @@ ps.createUseable('heroinlabkit', function(source, item)
local src = source
if not ps.hasItem(src, 'heroinlabkit', 1) then return end
local placed, loc = ps.callback('md-drugs:client:setheroinlabkit', src)
- if placed then
+ if placed then
ps.removeItem(src, 'heroinlabkit', 1)
table.insert(heroinLabKits, {
src = src,
@@ -118,13 +169,16 @@ RegisterServerEvent('md-drugs:server:heatliquidheroin', function()
for k, v in pairs(itemList) do
local cuth = ps.hasItem(src, k)
if cuth then
- if not GetRecipe(src, 'heroin', 'fillvial', v) then return end
+ if not ps.craftItem(src, heroinRecipes['fillvial'][v]) then
+ ps.notify(src, 'You do not have the required items', 'error')
+ return
+ end
AddRep(src, 'heroin')
return
end
end
else
- if not GetRecipe(src, 'heroin', 'fillvial', 'tier1') then return end
+ if not ps.craftItem(src, heroinRecipes['fillvial']['tier1']) then return end
end
end)
@@ -162,15 +216,14 @@ RegisterServerEvent('md-drugs:server:fillneedle', function(num)
for k, v in pairs(itemList) do
local vh = ps.hasItem(src, v.item)
if vh then
- if not GetRecipe(src, 'heroin', 'fillneedle', v.tier) then return end
+ if not ps.craftItem(src, heroinRecipes['fillneedle'][v.tier]) then return end
AddRep(src, 'heroin')
- --Log(ps.getPlayerName(src) .. v.log, 'heroin')
return
end
end
ps.notify(src,Lang.Heroin.nofill, "error")
else
- if not GetRecipe(src, 'heroin', 'fillneedle', 'tier1') then return end
+ if not ps.craftItem(src, heroinRecipes['fillneedle']['tier1']) then return end
end
end)
diff --git a/server/lean.lua b/server/lean.lua
index 4e90041..6c7d1a9 100644
--- a/server/lean.lua
+++ b/server/lean.lua
@@ -1,5 +1,30 @@
local onRun = {}
+local leanLocs = {
+ MakeLean = {
+ {
+ loc = vector3(2635.81, 4240.57, 45.32),
+ checks = { -- these can be arrays like {'police', 'ambulance'} or just a single string like 'police'
+ --gang = {},
+ --item = {},
+ --job = {},
+ --citizenid = {}
+ }
+ },
+ },
+ SyrupVendor = {
+ {ped = 'a_m_m_farmer_01', loc = vector4(365.21, -578.77, 39.30, 347.23), l = 1.0, w = 1.0, rot = 347.23, gang = ""},
+ },
+ StartLoc = { -- where truck spawns for lean and meth missions
+ vector3(-2307.22, 434.77, 174.47),
+ vector3(614.75, 1786.26, 199.39),
+ vector3(-224.89, 6388.32, 31.59)
+ },
+}
+
+ps.registerCallback('md-drugs:server:GetLeanLocs', function(source)
+ return leanLocs
+end)
local function setTimeout(identifier)
if onRun[identifier] then
@@ -25,7 +50,7 @@ RegisterServerEvent('md-drugs:server:givelean', function()
end)
exports.ps_lib:registerCrafter({
- loc = GlobalState.MDDrugsLocs.MakeLean,
+ loc = leanLocs.MakeLean,
recipes = {
cupoflean = {
amount = 1,
diff --git a/server/locations.lua b/server/locations.lua
deleted file mode 100644
index 66e8e96..0000000
--- a/server/locations.lua
+++ /dev/null
@@ -1,161 +0,0 @@
-local Target = {
- MakePowder = { -- where you chop your coca leaves to make powder
- {loc = vector3(1086.20, -3195.30, -39.20), l = 1.0, w = 1.0, rot = 45.0, gang = "ballas"},
- {loc = vector3(1090.15, -3199.5, -39.18), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
- {loc = vector3(1093.09, -3199.53, -39.05), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
- },
- CuttingCoke = { -- only active if Config.FancyCokeAnims = false
- {loc = vector3(1095.61, -3195.62, -39.13), l = 1.0, w = 1.0, rot = 45.0, offset = vec3(-1.782227, 0.445068, -0.502701), rotation = vector3(0,0,0), gang = ""},
- {loc = vector3(1092.74, -3196.68, -38.99), l = 1.0, w = 1.0, rot = 45.0, offset = vec3(1.983398, 0.407959, -0.642696), rotation = vector3(0,0,180.0), gang = ""},
- },
- BaggingCoke = { -- only active if Config.FancyCokeAnims = false
- {loc = vector3(1093.16, -3195.78, -39.19), l = 1.0, w = 1.0, rot = 45.0,offset = vec3(4.515137, 2.542969, -0.814194), rotation = vector3(0,0,180.0), gang = ""},
- {loc = vector3(1090.17, -3196.59, -38.99), l = 1.0, w = 1.0, rot = 45.0, offset = vec3(-5.207642, -1.666504, -1.014198), rotation = vector3(0,0, 0.0), gang = ""},
- },
- makecrack = { -- make crack with baking soda with cut coke 1-3
- {loc = vector3(2433.47, 4970.02, 42.18), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
- },
- bagcrack = { --- bag crack 1-3 stages
- {loc = vector3(2436.55, 4964.96, 42.18), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
- },
- lysergicacid = { -- get lysergic acid
- {loc = vector3(-1381.21, -327.75, 39.85), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
- {loc = vector3(2405.53, 5008.39, 46.02), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
- },
- diethylamide = { -- get diethylamide
- {loc = vector3(-1371.71, -316.02, 39.53), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
- {loc = vector3(2408.38, 5011.18, 46.08), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
- },
- gettabs = { -- buy tab paper
- {loc = vector3(-1370.77, -314.51, 39.58), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
- {loc = vector3(2409.59, 5012.45, 46.09), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
- },
- buyLSDkit = {
- {ped = 'g_f_y_families_01', loc = vector4(2598.47, 5033.06, 105.86, 283.51), l = 1.0, w = 1.0, rot = 283.51, gang = ""},
- },
- dryplant = { -- turn resin into powder
- {loc = vector3(-1353.77, -335.58, 43.92), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
- },
- cutheroinone = { -- cut heroin stage 1-3 with baking soda
- {loc = vector3(-1360.14, -337.03, 43.92), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
- },
- fillneedle = { -- fill needles with heroin
- {loc = vector3(-1366.32, -334.40, 44.44), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
- },
- isosafrole = { -- where to steal isosafrole
- {loc = vector3(844.39, -902.92, 25.42), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
- },
- mdp2p = { -- where to steal mdp2p
- {loc = vector3(844.4, -898.79, 25.23), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
- },
- rawxtcloc = { -- where to combine the 2 ingridents to make raw xtc
- {loc = vector3(844.71, -910.33, 25.37), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
- },
- stamp = { -- where to stamp pills
- {loc = vector3(844.71, -900.56, 25.43), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
- },
- FillPrescription = { -- where to fill out your prescription
- {loc = vector3(2855.62, 4446.73, 48.53), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
- },
- DryOutMescaline = { -- where to dry out mescaline
- {loc = vector3(2638.22, 4237.93, 44.78), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
- },
- MakeLean = {
- {
- loc = vector3(2635.81, 4240.57, 45.32),
- checks = { -- these can be arrays like {'police', 'ambulance'} or just a single string like 'police'
- --gang = {},
- --item = {},
- --job = {},
- --citizenid = {}
- }
- },
- },
- CookMeth = {
- {loc = vector3(1006.09, -3200.59, -38.52), l = 1.0, w = 1.0, rot = 45.0, offset = vec3(4.79, 2.13, -0.41), rotation = vector3(0,0,0.0), gang = ""},
- },
- MethDials = {
- {loc = vector3(1007.89, -3201.17, -38.99),l = 1.0, w = 1.0, rot = 45.0, gang = ""},
- },
- MethSmash = {
- {loc = vector3(1012.04, -3194.96, -38.99), bucket = vector4(1012.86, -3194.13, -39.20, 90.00), l = 1.0, w = 1.0, rot = 45.0, offset = vec3(-3.143311, -1.666748, -1.010128), rotation = vector3(0,0,0.0), gang = ""},
- },
- BagMeth = {
- {loc = vector3(1014.25, -3194.93, -38.99), l = 1.0, w = 1.0, rot = 45.0, offset = vec3(-4.9, -1.70, -1.01), rotation = vector3(0,0,0.0), gang = ""},
- },
- MethEph = { -- get ephedrine
- {loc = vector3(3559.86, 3673.9, 28.13), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
- },
- Methace = { -- get acetone
- {loc = vector3(3535.41, 3661.05, 28.12), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
- },
- MethHeist = {
- {loc = vector4(-1520.84, 827.72, 181.66, 184.13), ped = 'a_m_m_farmer_01', gang = ""},
- },
- SyrupVendor = {
- {ped = 'a_m_m_farmer_01', loc = vector4(365.21, -578.77, 39.30, 347.23), l = 1.0, w = 1.0, rot = 347.23, gang = ""},
- },
- OxyPayForTruck = {
- {loc = vector3(1437.64, -1491.91, 63.62), truckSpawn = vector4(1450.87, -1482.13, 63.22, 69.95), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
- },
- singleSpot = {
- CokeTeleIn = vector3(198.16, -1276.92, 29.33), -- where you target to go inside coke
- CokeTeleOut = vector3(1088.81, -3187.57, -38.99), -- where you target to leave coke
- buylsdlabkit = vector4(2598.47, 5033.06, 105.86, 283.51), -- buy lab kit for lsd
- buyheroinlabkit = vector4(-1358.77, -339.12, 43.92, 302.13), -- buy lab kit for heroin
- buypress = vector3(845.82, -884.79, 25.18), -- buy lab kit for xtc
- weedTelein = vector3(244.74, 374.54, 105.74), -- where you target to tele in
- weedTeleout = vector3(1066.31, -3183.36, -39.16), -- where you target to tele out
- MakeButter = vector3(1045.48, -3198.49, -38.22), -- where you make cannabutter and baked edibles
- MakeOil = vector3(1038.90, -3198.66, -38.17), -- where you make shatter
- WeedSaleman = vector4(1030.77, -3203.18, -38.2, 262.37), -- where the weed saleman is
- MethTeleIn = vector3(-2222.04, 303.99, 174.6), -- where you target to tele in meth
- MethTeleOut = vector3(996.91, -3200.83, -36.39), -- where you target to tele out meth
- MethHeistStart = vector4(-1520.84, 827.72, 181.66, 184.13), -- where you get the mission to get ingridients if meth heist = true
- truckspawn = vector4(1450.87, -1482.13, 63.22, 69.95), --- where the truck will spawn when you pay for it
- Payfortruck = vector3(1437.64, -1491.91, 63.62), --- where you pay for the truck
- },
-
- StartLoc = { -- where truck spawns for lean and meth missions
- vector3(-2307.22, 434.77, 174.47),
- vector3(614.75, 1786.26, 199.39),
- vector3(-224.89, 6388.32, 31.59)
- },
- WeedDry = {
- {loc = vector3(1043.0, -3191.59, -38.39),},
- {loc = vector3(1041.0, -3191.59, -38.39),},
- {loc = vector3(1045.0, -3191.59, -38.39),},
- {loc = vector3(1039.0, -3191.59, -38.39),},
- },
- Travellingmerchant = { -- where the travelling merchant can spawn
- vector4(-119.66, -977.43, 304.25, 88.21),
- vector4(-1522.93, 1476.01, 111.45, 41.25),
- vector4(-3278.98, 973.38, 5.35, 101.53),
- },
- oxylocations = {
- vector4(-2352.32, 266.78, 165.3, 23.46),
- vector4(-1467.49, 874.01, 183.59, 298.45),
- vector4(-856.71, 874.26, 202.85, 205.3),
- vector4(950.58, -128.49, 74.42, 205.3),
- vector4(1152.71, -328.43, 69.21, 205.3),
- vector4(112.66, -1955.67, 20.75, 37.94),
- vector4(-544.4, -1684.8, 19.89, 252.07),
- vector4(-1185.02, -1805.4, 3.91, 184.83),
- vector4(-1641.4, -981.99, 7.58, 35.38),
- vector4(-1827.93, 782.36, 138.29, 219.99),
- vector4(-320.84, 2818.73, 59.45, 337.22),
- vector4(474.88, 2609.56, 44.48, 357.0),
- }
-}
-GlobalState.MDDrugsLocs = Target
-
-local loc = Target.Travellingmerchant[math.random(1, #Target.Travellingmerchant)]
-
-ps.registerCallback('md-drugs:server:GetMerchant', function(source)
- return loc
-end)
-
-function getRandW(src)
- local rand = math.random(1, #Target.oxylocations)
- return Target.oxylocations[rand]
-end
\ No newline at end of file
diff --git a/server/lsd.lua b/server/lsd.lua
index 67f1526..205f4de 100644
--- a/server/lsd.lua
+++ b/server/lsd.lua
@@ -3,6 +3,34 @@ local prices = {
tabcost = 100, -- price per piece of tab paper event does 10 at a time
lsdlabkitcost = 10000 -- price of the lsd lab kit
}
+local lsdRecipes = {
+ vial = {
+ heat = {take = {lysergic_acid = 1, diethylamide = 1,}, give = {lsd_one_vial = 1}}
+ },
+}
+
+local lsdLocations = {
+ lysergicacid = { -- get lysergic acid
+ {loc = vector3(-1381.21, -327.75, 39.85), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
+ {loc = vector3(2405.53, 5008.39, 46.02), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
+ },
+ diethylamide = { -- get diethylamide
+ {loc = vector3(-1371.71, -316.02, 39.53), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
+ {loc = vector3(2408.38, 5011.18, 46.08), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
+ },
+ gettabs = { -- buy tab paper
+ {loc = vector3(-1370.77, -314.51, 39.58), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
+ {loc = vector3(2409.59, 5012.45, 46.09), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
+ },
+ buyLSDkit = {
+ {ped = 'g_f_y_families_01', loc = vector4(2598.47, 5033.06, 105.86, 283.51), l = 1.0, w = 1.0, rot = 283.51, gang = ""},
+ },
+}
+
+ps.registerCallback('md-drugs:server:GetLSDLocations', function(source)
+ return lsdLocations
+end)
+
local timedOut = {}
local function timeout(src, time)
@@ -18,7 +46,7 @@ local lsdTables = {}
RegisterServerEvent('md-drugs:server:getlysergic', function(num)
local src = source
if timedOut[src] then return end
- if not ps.checkDistance(src, GlobalState.MDDrugsLocs.lysergicacid[num].loc, 2.0) then
+ if not ps.checkDistance(src, lsdLocations.lysergicacid[num].loc, 2.0) then
ps.notify(src, ps.lang('lsd.notinloc'), "error")
return
end
@@ -29,7 +57,7 @@ end)
RegisterServerEvent('md-drugs:server:getdiethylamide', function(num)
local src = source
if timedOut[src] then return end
- if not ps.checkDistance(src, GlobalState.MDDrugsLocs.diethylamide[num].loc, 2.0) then
+ if not ps.checkDistance(src, lsdLocations.diethylamide[num].loc, 2.0) then
ps.notify(src, Lang.lsd.notinloc, "error")
return
end
@@ -80,7 +108,10 @@ end)
RegisterServerEvent('md-drugs:server:heatliquid', function()
local src = source
if not hasLabKit(src) then return end
- if not GetRecipe(src, 'lsd', 'vial', 'heat') then return end
+ if not ps.craftItem(src, lsdRecipes['vial']['heat']) then
+ ps.notify(src, ps.lang('lsd.noliquid'), "error")
+ return
+ end
end)
RegisterServerEvent('md-drugs:server:failheating', function()
@@ -89,7 +120,6 @@ RegisterServerEvent('md-drugs:server:failheating', function()
ps.removeItem(src, 'lysergic_acid', 1)
ps.removeItem(src, 'diethylamide', 1)
ps.notify(src, ps.lang('prices.lsd.failed'), "error")
- --Log(ps.getPlayerName(src) ..' Failed Basic LSD Like An Idiot!', 'lsd')
end)
@@ -107,28 +137,26 @@ if not ps.hasItem(src, 'lsd_one_vial', 1) then return end
elseif lsd >= 61 and lsd <= 90 then
ps.addItem(src,'lsd_vial_four', 1)
elseif lsd >= 91 and lsd <= 120 then
- ps.addItem(src,'lsd_vial_five', 1)
+ ps.addItem(src,'lsd_vial_five', 1)
else
ps.addItem(src,'lsd_vial_six', 1)
end
AddRep(src,'lsd')
- --ps.log(ps.getPlayerName(src) ..' Refined Acid and Now Has A Rep Of ' .. lsd + 1 .. '!', 'lsd')
end
else
local randomchance = math.random(1,100)
- if ps.removeItem(src,'lsd_one_vial', 1) then
+ if ps.removeItem(src,'lsd_one_vial', 1) then
if randomchance <= 60 then
ps.addItem(src,'lsd_vial_two', 1)
elseif randomchance >= 61 and randomchance <= 75 then
ps.addItem(src,'lsd_vial_three', 1)
elseif randomchance >= 76 and randomchance <= 85 then
- ps.addItem(src,'lsd_vial_four', 1)
+ ps.addItem(src,'lsd_vial_four', 1)
elseif randomchance >= 86 and randomchance <= 93 then
- ps.addItem(src,'lsd_vial_five', 1)
- else
+ ps.addItem(src,'lsd_vial_five', 1)
+ else
ps.addItem(src,'lsd_vial_six', 1)
end
- --ps.log(ps.getPlayerName(src) ..' Refined Acid!', 'lsd')
end
end
end)
@@ -142,7 +170,7 @@ end)
RegisterServerEvent('md-drugs:server:gettabpaper', function(num)
local src = source
- if not ps.checkDistance(src, GlobalState.MDDrugsLocs.gettabs[num].loc, 3.0) then return end
+ if not ps.checkDistance(src, lsdLocations.gettabs[num].loc, 3.0) then return end
if ps.removeMoney(src, 'cash', prices.tabcost * 10) then
ps.addItem(src,'tab_paper', 10)
else
@@ -156,7 +184,7 @@ RegisterServerEvent('md-drugs:server:getlabkit', function(num)
ps.notify(src, ps.lang('lsd.havlabkit'), 'error')
return
end
- if not ps.checkDistance(src, GlobalState.MDDrugsLocs.buyLSDkit[num].loc, 3.0) then return end
+ if not ps.checkDistance(src, lsdLocations.buyLSDkit[num].loc, 3.0) then return end
if ps.removeMoney(src, 'cash', prices.lsdlabkitcost) then
ps.addItem(src,'lsdlabkit', 1)
else
@@ -201,7 +229,6 @@ for k, v in pairs (sheets) do
local math = math.random(1,10)
if ps.removeItem(src, v.item, 1) then
ps.addItem(src, v.recieve, math)
- --ps.log(ps.getPlayerName(src) ..' Made ' .. math .. 'Tabs of ' .. v.recieve .. '!', 'lsd')
end
end)
end
diff --git a/server/mescaline.lua b/server/mescaline.lua
index b859868..9fb6b2f 100644
--- a/server/mescaline.lua
+++ b/server/mescaline.lua
@@ -1,8 +1,15 @@
+local mescalineLocation = {
+ DryOutMescaline = { -- where to dry out your mescaline
+ {loc = vector3(1850.12, 2595.23, 45.67), l = 1.0, w = 1.0, rot = 0.0, gang = ""},
+ },
+}
-
+ps.registerCallback('md-drugs:server:GetMescalineLocs', function(source)
+ return mescalineLocation
+end)
RegisterNetEvent("md-drugs:server:drymescaline", function(num)
local src = source
- if not ps.checkDistance(src, GlobalState.MDDrugsLocs.DryOutMescaline[num].loc, 3.0) then
+ if not ps.checkDistance(src, mescalineLocation.DryOutMescaline[num].loc, 3.0) then
ps.notify(src, "You are not in the right location", "error")
return
end
@@ -13,6 +20,6 @@ ps.createUseable("driedmescaline", function(source, item)
local src = source
if ps.removeItem(src, "driedmescaline", 1) then
TriggerClientEvent("md-drugs:client:takemescaline", src)
- --Log(GetName(source) .. ' Consumed Mescaline', 'consume')
+
end
end)
\ No newline at end of file
diff --git a/server/meth.lua b/server/meth.lua
index 79cb2b9..45b47dc 100644
--- a/server/meth.lua
+++ b/server/meth.lua
@@ -1,6 +1,42 @@
local onRun = {}
local cool = {}
+
+local methLocs = {
+ CookMeth = {
+ {loc = vector3(1006.09, -3200.59, -38.52), l = 1.0, w = 1.0, rot = 45.0, offset = vec3(4.79, 2.13, -0.41), rotation = vector3(0,0,0.0), gang = ""},
+ },
+ MethDials = {
+ {loc = vector3(1007.89, -3201.17, -38.99),l = 1.0, w = 1.0, rot = 45.0, gang = ""},
+ },
+ MethSmash = {
+ {loc = vector3(1012.04, -3194.96, -38.99), bucket = vector4(1012.86, -3194.13, -39.20, 90.00), l = 1.0, w = 1.0, rot = 45.0, offset = vec3(-3.143311, -1.666748, -1.010128), rotation = vector3(0,0,0.0), gang = ""},
+ },
+ BagMeth = {
+ {loc = vector3(1014.25, -3194.93, -38.99), l = 1.0, w = 1.0, rot = 45.0, offset = vec3(-4.9, -1.70, -1.01), rotation = vector3(0,0,0.0), gang = ""},
+ },
+ MethEph = { -- get ephedrine
+ {loc = vector3(3559.86, 3673.9, 28.13), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
+ },
+ Methace = { -- get acetone
+ {loc = vector3(3535.41, 3661.05, 28.12), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
+ },
+ MethHeist = {
+ {loc = vector4(-1520.84, 827.72, 181.66, 184.13), ped = 'a_m_m_farmer_01', gang = ""},
+ },
+ StartLoc = { -- where truck spawns for lean and meth missions
+ vector3(-2307.22, 434.77, 174.47),
+ vector3(614.75, 1786.26, 199.39),
+ vector3(-224.89, 6388.32, 31.59)
+ },
+ MethTele = {
+ {inside = vector3(996.91, -3200.83, -36.39), outside = vector3(-2222.04, 303.99, 174.6), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
+ }
+}
+
+ps.registerCallback('md-drugs:server:GetMethLocs', function(source)
+ return methLocs
+end)
local function setTimeout(identifier)
if onRun[identifier] then
CreateThread(function()
@@ -37,6 +73,7 @@ RegisterServerEvent('md-drugs:server:givemethingridients', function()
onRun[ps.getIdentifier(src)] = nil
end
end)
+
RegisterServerEvent('md-drugs:server:startcook', function(num)
local src = source
if not GetRecipe(source, 'meth', 'cook', 'heat') then return end
@@ -45,13 +82,13 @@ end)
RegisterServerEvent('md-drugs:server:getmeth', function(num)
local src = source
- if not ps.checkDistance(src, GlobalState.MDDrugsLocs.BagMeth[num].loc, 2.5) then return end
+ if not ps.checkDistance(src, methLocs.BagMeth[num].loc, 2.5) then return end
if not GetRecipe(src, 'meth', 'bag', 'bags') then return end
end)
RegisterServerEvent('md-drugs:server:geteph', function(num)
local src = source
- if not ps.checkDistance(src, GlobalState.MDDrugsLocs.MethEph[num].loc, 2.5) then return end
+ if not ps.checkDistance(src, methLocs.MethEph[num].loc, 2.5) then return end
if not coolDown(ps.getIdentifier(src)) then return ps.notify(src, ps.lang('meth.wait'), "error") end
if ps.addItem(src, 'ephedrine', 1) then
ps.notify(src, 'Got Ephedrine!', "success")
@@ -60,7 +97,7 @@ end)
RegisterServerEvent('md-drugs:server:getace', function(num)
local src = source
- if not ps.checkDistance(src, GlobalState.MDDrugsLocs.MethAce[num].loc, 2.5) then return end
+ if not ps.checkDistance(src, methLocs.MethAce[num].loc, 2.5) then return end
if not coolDown(ps.getIdentifier(src)) then return ps.notify(src, ps.lang('meth.wait'), "error") end
if ps.addItem(src, 'acetone', 1) then
ps.notify(src, 'Got Acetone!', "success")
@@ -69,7 +106,7 @@ end)
ps.registerCallback('md-drugs:server:startcook', function(source, num)
local src = source
- if not ps.checkDistance(src, GlobalState.MDDrugsLocs.CookMeth[num].loc, 2.5) then return false end
+ if not ps.checkDistance(src, methLocs.CookMeth[num].loc, 2.5) then return false end
local recipe = GetRecipe(src, 'meth', 'cook', 'heat')
return recipe
end)
diff --git a/server/oxyruns.lua b/server/oxyruns.lua
index 165ff9d..2dd8b02 100644
--- a/server/oxyruns.lua
+++ b/server/oxyruns.lua
@@ -4,6 +4,30 @@ local prices = {
itemChance = 20,
}
local onRoute = {}
+
+local oxyLocs = {
+ OxyPayForTruck = {
+ {loc = vector3(1437.64, -1491.91, 63.62), truckSpawn = vector4(1450.87, -1482.13, 63.22, 69.95), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
+ },
+ oxylocations = {
+ vector4(-2352.32, 266.78, 165.3, 23.46),
+ vector4(-1467.49, 874.01, 183.59, 298.45),
+ vector4(-856.71, 874.26, 202.85, 205.3),
+ vector4(950.58, -128.49, 74.42, 205.3),
+ vector4(1152.71, -328.43, 69.21, 205.3),
+ vector4(112.66, -1955.67, 20.75, 37.94),
+ vector4(-544.4, -1684.8, 19.89, 252.07),
+ vector4(-1185.02, -1805.4, 3.91, 184.83),
+ vector4(-1641.4, -981.99, 7.58, 35.38),
+ vector4(-1827.93, 782.36, 138.29, 219.99),
+ vector4(-320.84, 2818.73, 59.45, 337.22),
+ vector4(474.88, 2609.56, 44.48, 357.0),
+ }
+}
+
+ps.registerCallback('md-drugs:server:GetOxyLocs', function(source)
+ return oxyLocs
+end)
ps.registerCallback('md-drugs:server:payfortruck', function(source)
local src = source
if ps.removeMoney(src, 'cash', prices.payfortruck) or ps.removeMoney(src, 'bank', prices.payfortruck) then
@@ -24,7 +48,7 @@ RegisterServerEvent('md-drugs:server:giveoxybox', function()
return
end
- if not ps.checkDistance(src, GlobalState.MDDrugsLocs.oxylocations[onRoute[src]], 3.5) then
+ if not ps.checkDistance(src, oxyLocs.oxylocations[onRoute[src]], 3.5) then
ps.notify(src, ps.lang('oxy.toofar'), "error")
return
end
@@ -49,8 +73,8 @@ ps.registerCallback('md-drugs:server:getRoute', function(source)
onRoute[source] = nil
return false
else
- onRoute[source] = math.random(1, #GlobalState.MDDrugsLocs.oxylocations)
- return GlobalState.MDDrugsLocs.oxylocations[onRoute[source]]
+ onRoute[source] = math.random(1, #oxyLocs.oxylocations)
+ return oxyLocs.oxylocations[onRoute[source]]
end
end)
diff --git a/server/pharma.lua b/server/pharma.lua
index c08a08d..75ccdc6 100644
--- a/server/pharma.lua
+++ b/server/pharma.lua
@@ -1,5 +1,12 @@
-local QBCore = exports['qb-core']:GetCoreObject()
+local pharmaLocations = {
+ FillPrescription = { -- where to fill out your prescription
+ {loc = vector3(2855.62, 4446.73, 48.53), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
+ },
+}
+ps.registerCallback('md-drugs:server:GetPharmaLocs', function()
+ return pharmaLocations
+end)
local function GetJob(source)
local src = source
return ps.getJobType(src) == 'ems'
@@ -9,7 +16,7 @@ ps.createUseable('prescription_pad', function(source, item)
local src = source
local near = {}
if GetJob(src) then
- local near = ps.getNearbyPlayers(src, 5.0)
+ near = ps.getNearbyPlayers(src, 5.0)
local options = {
{label = 'Vicodin', value = 'vicodin_prescription'},
@@ -37,10 +44,10 @@ for m, d in pairs (pharmabottle) do
}
for k, v in pairs (get) do
if d == k then
- ps.removeItem(src, d, 1)
- ps.addItem(src, v, math.random(10,30))
- ps.notify(src,ps.lang('Pharma.unbottle'), "success")
- --Log(GetName(src) .. ' Unbottled 30 Of ' .. v .. '!', 'pharma')
+ if ps.removeItem(src, d, 1) then
+ ps.addItem(src, v, math.random(10,30))
+ ps.notify(src,ps.lang('Pharma.unbottle'), "success")
+ end
end
end
end
@@ -49,7 +56,7 @@ end
RegisterServerEvent('md-drugs:server:fillprescription', function(num)
local src = source
- if not ps.checkDistance(src, GlobalState.MDDrugsLocs.FillPrescription[num].loc, 3.5) then
+ if not ps.checkDistance(src, pharmaLocations.FillPrescription[num].loc, 3.5) then
return ps.notify(src, ps.lang('Pharma.toofar'), "error")
end
local pres = {
@@ -65,5 +72,4 @@ RegisterServerEvent('md-drugs:server:fillprescription', function(num)
break
end
end
- --Log(GetName(src) .. ' Filled A Prescription!', 'pharma')
end)
diff --git a/server/recipes.lua b/server/recipes.lua
index d46e3b7..9c436d6 100644
--- a/server/recipes.lua
+++ b/server/recipes.lua
@@ -1,63 +1,6 @@
-local QBCore = exports['qb-core']:GetCoreObject()
-local recipe = {
- cocaine = {
- cokepowder = {
- tier1 = {take = {coca_leaf = 1}, give = {coke = 1}},
- tier2 = {take = {coca_leaf = 1}, give = {cokestagetwo = 1}},
- tier3 = {take = {coca_leaf = 1}, give = {cokestagethree = 1}},
- },
- cutcoke = {
- tier1 = {take = {coke = 1, bakingsoda = 1}, give = {loosecoke = 1}},
- tier2 = {take = {cokestagetwo = 1, bakingsoda = 1}, give = {loosecokestagetwo = 1}},
- tier3 = {take = {cokestagethree = 1, bakingsoda = 1}, give = {loosecokestagethree = 1}},
- },
- bagcoke = {
- tier1 = {take = {loosecoke = 1, empty_weed_bag = 1}, give = {cokebaggy = 1}},
- tier2 = {take = {loosecokestagetwo = 1, empty_weed_bag = 1}, give = {cokebaggystagetwo = 1}},
- tier3 = {take = {loosecokestagethree = 1, empty_weed_bag = 1}, give = {cokebaggystagethree = 1}},
- }
- },
- crack = {
- cookcrack = {
- tier1 = {take = {loosecoke = 1, bakingsoda = 1}, give = {crackrock = 1}},
- tier2 = {take = {loosecokestagetwo = 1, bakingsoda = 1}, give = {crackrockstagetwo = 1}},
- tier3 = {take = {loosecokestagethree = 1,bakingsoda = 1}, give = {crackrockstagethree = 1}},
- },
- bagcrack = {
- tier1 = {take = {crackrock = 1, empty_weed_bag = 1}, give = {baggedcracked = 1}},
- tier2 = {take = {crackrockstagetwo = 1, empty_weed_bag = 1}, give = {baggedcrackedstagetwo = 1}},
- tier3 = {take = {crackrockstagethree = 1, empty_weed_bag = 1}, give = {baggedcrackedstagethree = 1}},
- }
- },
- heroin = {
- dryheroin = {
- tier1 = {take = {poppyresin = 1}, give = {heroin = 1}},
- tier2 = {take = {poppyresin = 1}, give = {heroinstagetwo = 1}},
- tier3 = {take = {poppyresin = 1}, give = {heroinstagethree = 1}},
- },
- cutheroin = {
- tier1 = {take = {heroin = 1, bakingsoda = 1}, give = {heroincut = 1}},
- tier2 = {take = {heroinstagetwo = 1, bakingsoda = 1}, give = {heroincutstagetwo = 1}},
- tier3 = {take = {heroinstagethree = 1, bakingsoda = 1}, give = {heroincutstagethree = 1}},
- },
- fillvial = {
- tier1 = {take = {heroincut = 1, emptyvial = 1}, give = {heroinvial = 1}},
- tier2 = {take = {heroincutstagetwo = 1, emptyvial = 1}, give = {heroinvialstagetwo = 1}},
- tier3 = {take = {heroincutstagethree = 1, emptyvial = 1}, give = {heroinvialstagethree = 1}},
- },
- fillneedle = {
- tier1 = {take = {heroinvial = 1, needle = 1}, give = {heroin_ready = 1}},
- tier2 = {take = {heroinvialstagetwo = 1, needle = 1}, give = {heroin_readystagetwo = 1}},
- tier3 = {take = {heroinvialstagethree = 1, needle = 1}, give = {heroin_readystagethree = 1}},
- }
- },
- lsd = {
- vial = {
- heat = {take = {lysergic_acid = 1, diethylamide = 1,}, give = {lsd_one_vial = 1}}
- },
-
- },
+
+recipe = {
mescaline = {
dry = {
dried = {take = {cactusbulb = 1}, give = {driedmescaline = 1} }
@@ -78,13 +21,6 @@ local recipe = {
}
},
weed = {
- edibles = {
- cannabutter = {take = { mdbutter = 1, grindedweed = 1}, give = {cannabutter = 1}},
- specialbrownie = {take = { cannabutter = 1, flour = 1, chocolate = 1}, give = {specialbrownie = 1}},
- specialcookie = { take = { cannabutter = 1, flour = 1}, give = {specialcookie = 1}},
- specialchocolate = { take = { cannabutter = 1, chocolate = 1}, give = {specialchocolate = 1}},
- specialmuffin = { take = { cannabutter = 1, flour = 1}, give = {specialmuffin = 1}},
- },
oil = {
shatter = {take = {butane = 1, grindedweed = 1}, give = {shatter = 1}}
},
@@ -99,48 +35,32 @@ local recipe = {
dextrobluntwrap = {take = {bluntwrap = 5, mdreddextro = 1}, give = {dextrobluntwrap = 5}},
}
},
- xtc = {
- raw = {
- raw_xtc = {take = {mdp2p = 1, isosafrole = 1}, give = {raw_xtc = 1}}
- },
- singlestack = {
- white = {take = {raw_xtc = 1}, give = {white_xtc = 1}},
- red = {take = {raw_xtc = 1, loosecoke = 1 }, give = {red_xtc = 1}},
- orange = {take = {raw_xtc = 1, heroinvial = 1}, give = {orange_xtc = 1}},
- blue = {take = {raw_xtc = 1, crackrock = 1 }, give = {blue_xtc = 1}},
- },
- dualstack = {
- white = {take = {raw_xtc = 1}, give = {white_xtc2 = 1}},
- red = {take = {raw_xtc = 1, loosecoke = 1}, give = {red_xtc2 = 1}},
- orange = {take = {raw_xtc = 1, heroinvial = 1}, give = {orange_xtc2 = 1}},
- blue = {take = {raw_xtc = 1, crackrock = 1}, give = {blue_xtc2 = 1}},
- },
- triplestack = {
- white = {take = {raw_xtc = 1}, give = {white_xtc3 = 1}},
- red = {take = {raw_xtc = 1, loosecoke = 1}, give = {red_xtc3 = 1}},
- orange = {take = {raw_xtc = 1, heroinvial = 1}, give = {orange_xtc3 = 1}},
- blue = {take = {raw_xtc = 1, crackrock = 1}, give = {blue_xtc3 = 1}},
- },
- quadstack = {
- white = {take = {raw_xtc = 1}, give = {white_xtc4 = 1}},
- red = {take = {raw_xtc = 1, loosecoke = 1}, give = {red_xtc4 = 1}},
- orange = {take = {raw_xtc = 1, heroinvial = 1}, give = {orange_xtc4 = 1}},
- blue = {take = {raw_xtc = 1, crackrock = 1}, give = {blue_xtc4 = 1}},
- },
- press = {
- dual = {take = {white_xtc = 20, blue_xtc = 20, red_xtc = 20, orange_xtc = 20, singlepress = 1}, give = {dualpress = 1}},
- triple = {take = {white_xtc2 = 50, blue_xtc2 = 50, red_xtc2 = 50, orange_xtc2 = 50, dualpress = 1}, give = {triplepres = 1}},
- quad = { take = {white_xtc3 = 50, blue_xtc3 = 50, red_xtc3 = 50, orange_xtc3 = 50, triplepress = 1}, give = {quadpress = 1}}
- }
- }
}
function GetRecipe(source, type, method, tier)
- print(ps.craftItem(source,recipe[type][method][tier]))
- return ps.craftItem(source,recipe[type][method][tier])
+ return ps.craftItem(source, recipe[type][method][tier])
end
ps.registerCallback('md-drugs:server:GetRecipe', function(source, type, cat)
if not source then return false end
return recipe[type][cat]
-end)
\ No newline at end of file
+end)
+
+function craft(source, tbl, item)
+ local src = source
+ local need, have = 0,0
+ for k, v in pairs(tbl.take) do
+ if ps.hasItem(src, k, v) then
+ have = have + v
+ end
+ need = need + v
+ end
+ if need == have then
+ for k, v in pairs (tbl.take) do
+ ps.removeItem(src, k, v)
+ end
+ ps.addItem(src, item , tbl.amount)
+ return true
+ end
+ return false
+end
\ No newline at end of file
diff --git a/server/shops.lua b/server/shops.lua
index 39b5f4f..2646b2f 100644
--- a/server/shops.lua
+++ b/server/shops.lua
@@ -1,4 +1,22 @@
-local QBCore = exports['qb-core']:GetCoreObject()
+
+local Target = {
+ Travellingmerchant = { -- where the travelling merchant can spawn
+ vector4(-119.66, -977.43, 304.25, 88.21),
+ vector4(-1522.93, 1476.01, 111.45, 41.25),
+ vector4(-3278.98, 973.38, 5.35, 101.53),
+ },
+}
+
+local loc = Target.Travellingmerchant[math.random(1, #Target.Travellingmerchant)]
+
+ps.registerCallback('md-drugs:server:GetMerchant', function(source)
+ return loc
+end)
+
+function getRandW(src)
+ local rand = math.random(1, #Target.oxylocations)
+ return Target.oxylocations[rand]
+end
local stores = {
travel = {
@@ -27,16 +45,7 @@ local stores = {
{name = "leancup", price = 25, amount = 50, },
{name = "xtcburner", price = 25, amount = 50, },
},
- Weed = {
- {name = "weedgrinder", price = 25, amount = 50, },
- {name = "mdbutter", price = 25, amount = 50, },
- {name = "flour", price = 25, amount = 50, },
- {name = "chocolate", price = 25, amount = 50, },
- {name = "butane", price = 25, amount = 50, },
- {name = "butanetorch", price = 2, amount = 1000,},
- {name = "dabrig", price = 2, amount = 1000,},
- {name = "mdwoods", price = 2, amount = 1000},
- },
+
Products = {
{name = "weed_white-widow_seed", price = 15, amount = 150, minrep = 0},
{name = "weed_skunk_seed", price = 15, amount = 150, minrep = 0},
diff --git a/server/shrooms.lua b/server/shrooms.lua
index 72a76f6..1184ad4 100644
--- a/server/shrooms.lua
+++ b/server/shrooms.lua
@@ -1,10 +1,11 @@
-CUI('shrooms', function(source, item)
-local src = source
-if TriggerClientEvent('md-drugs:client:takeshrooms', src, item.name) then
- RemoveItem(src, 'shrooms', 1)
- --Log(GetName(source) .. ' Took Some Mushrooms', 'shrooms')
+ps.createUseable('shrooms', function(source, item)
+ local src = source
+ if not ps.callback("md-drugs:client:shrooms", src) then
+ ps.notify(src, ps.lang('Shrooms.cancel'), "error")
+ return
+ end
+ ps.removeItem(src, 'shrooms', 1)
ps.notify(src, 'You Took Some Shrooms!', 'success')
- end
end)
diff --git a/server/weed.lua b/server/weed.lua
index e980c41..0bdcf5e 100644
--- a/server/weed.lua
+++ b/server/weed.lua
@@ -1,51 +1,90 @@
+local weedLocs = {
+ WeedTele = { -- where you tele out of weed
+ {inside = vector3(1066.31, -3183.36, -39.16), outside = vector3(244.74, 374.54, 105.74), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
+ },
+ MakeButter = {
+ {loc = vector3(1045.48, -3198.49, -38.22), checks = {}},
+ },
+ MakeOil = {
+ {loc = vector3(1038.90, -3198.66, -38.17), checks = {}},
+ },
+ WeedDry = {
+ {loc = vector3(1043.0, -3191.59, -38.39),},
+ {loc = vector3(1041.0, -3191.59, -38.39),},
+ {loc = vector3(1045.0, -3191.59, -38.39),},
+ {loc = vector3(1039.0, -3191.59, -38.39),},
+ },
+ WeedSalesman = {
+ {loc = vector4(1030.77, -3203.18, -38.2, 262.37), ped = 'a_m_m_farmer_01', gang = ""},
+ },
+}
+local weedStore = {
+ weedgrinder =25,
+ mdbutter =25,
+ flour =25,
+ chocolate =25,
+ butane =25,
+ butanetorch =2,
+ dabrig =2,
+ mdwoods =2,
+}
---------------- events
+ps.registerCallback('md-drugs:server:GetWeedLocs', function(source)
+ return weedLocs
+end)
+
+ps.registerCallback('md-drugs:server:getWeedItems', function(source)
+ return weedStore
+end)
+RegisterNetEvent('md-drugs:server:buyWeedItem', function(loc, name, amount)
+ local src = source
+ if not ps.checkDistance(src, weedLocs.WeedSalesman[loc].loc, 3.5) then
+ ps.notify(src, ps.lang('Weed.notHere'), "error")
+ return
+ end
+ if not weedStore[name] then
+ ps.notify(src, ps.lang('Weed.notHere'), "error")
+ return
+ end
+ if ps.removeMoney(src, 'cash', weedStore[name] * amount) or ps.removeMoney(src, 'bank', weedStore[name] * amount) then
+ ps.addItem(src, name, amount)
+ else
+ ps.notify(src, ps.lang('Weed.noMoney'), "error")
+ end
+end)
RegisterServerEvent('md-drugs:server:dryoutweed', function()
local src = source
- local Player = getPlayer(src)
- if RemoveItem(src,"wetcannabis", 1) then
- AddItem(src,"drycannabis", 1)
- --Log(GetName(source) .. ' Dried Weed', 'weed')
+ if ps.removeItem(src,"wetcannabis", 1) then
+ ps.addItem(src,"drycannabis", 1)
else
- ps.notify(src, Lang.Weed.nodry, "error")
+ ps.notify(src, ps.lang('Weed.nodry'), "error")
end
end)
local bluntwrap = {'mdreddextro','mdlean'}
for k, v in pairs (bluntwrap) do
- CUI(v, function(source, item) TriggerClientEvent('md-drugs:client:makeBluntWrap', source) end)
+ ps.createUseable(v, function(source, item) TriggerClientEvent('md-drugs:client:makeBluntWrap', source) end)
end
local bluntwraps = {'leanbluntwrap', 'dextrobluntwrap', 'bluntwrap'}
for k, v in pairs (bluntwraps) do
- CUI(v, function(source, item) TriggerClientEvent('md-drugs:client:rollBlunt', source) end)
+ ps.createUseable(v, function(source, item) TriggerClientEvent('md-drugs:client:rollBlunt', source) end)
end
RegisterServerEvent('md-drugs:server:MakeWeedItems', function(data)
local src = source
- local Player = getPlayer(src)
- if not Player then return end
if not GetRecipe(src, data.recipe, data.table, data.item) then return end
end)
-RegisterServerEvent('md-drugs:server:makeoil', function(data)
- local src = source
- local Player = getPlayer(src)
- if not Player then return end
- if not GetRecipe(src, 'weed', 'oil', 'shatter') then return end
-end)
-
-CUI("dabrig", function(source, item)
+ps.createUseable("dabrig", function(source, item)
local src = source
- local Player = getPlayer(src)
-
- if Player.Functions.GetItemByName("butanetorch") then
- if RemoveItem(src, "shatter", 1) then
+ if ps.hasItem(src, "butanetorch") then
+ if ps.removeItem(src, "shatter", 1) then
TriggerClientEvent("md-drugs:client:dodabs", src)
end
else
@@ -53,25 +92,93 @@ CUI("dabrig", function(source, item)
end
end)
-CUI("weedgrinder", function(source, item)
+ps.createUseable("weedgrinder", function(source, item)
local src = source
- local Player = getPlayer(src)
- local has = Player.Functions.GetItemByName("drycannabis")
- if not has then ps.notify(src, 'You Need Dried Cannabis', 'error') return end
- local check = ps.callback('md-drugs:client:uncuff', src, 'Grinding Weed')
+ if not ps.hasItem(src, "drycannabis") then ps.notify(src, 'You Need Dried Cannabis', 'error') return end
+ local check = ps.callback('md-drugs:client:uncuff', src, 'Grinding Weed')
if not check then return end
- if RemoveItem(src, "drycannabis",1 ) then
- AddItem(src, "grindedweed", 1)
+ if ps.removeItem(src, "drycannabis",1 ) then
+ ps.addItem(src, "grindedweed", 1)
end
end)
-CUI("mdwoods", function(source, item)
+ps.createUseable("mdwoods", function(source, item)
local src = source
- local Player = getPlayer(src)
local check = ps.callback('md-drugs:client:uncuff', src, 'Breaking Blunt Open')
if not check then return end
- if RemoveItem(src, "mdwoods",1 ) then
- AddItem(src, "bluntwrap", 5)
- AddItem(src, "tobacco", 5)
+ if ps.removeItem(src, "mdwoods",1 ) then
+ ps.addItem(src, "bluntwrap", 5)
+ ps.addItem(src, "tobacco", 5)
end
end)
+
+
+exports['ps_lib']:registerCrafter({
+ loc = weedLocs.MakeButter,
+ recipes = {
+ cannabutter = {
+ amount = 1,
+ time = 4000,
+ anim = 'uncuff',
+ recipe = {
+ mdbutter = 1,
+ grindedweed = 1
+ }
+ },
+ specialbrownie = {
+ amount = 1,
+ time = 4000,
+ anim = 'uncuff',
+ recipe = {
+ cannabutter = 1,
+ flour = 1,
+ chocolate = 1
+ }
+ },
+ specialcookie = {
+ amount = 1,
+ time = 4000,
+ anim = 'uncuff',
+ recipe = {
+ cannabutter = 1,
+ flour = 1
+ }
+ },
+ specialchocolate = {
+ amount = 1,
+ time = 4000,
+ anim = 'uncuff',
+ recipe = {
+ cannabutter = 1,
+ chocolate = 1
+ }
+ },
+ specialmuffin = {
+ amount = 1,
+ time = 4000,
+ anim = 'uncuff',
+ recipe = {
+ cannabutter = 1,
+ flour = 1
+ }
+ }
+
+ }
+})
+
+exports['ps_lib']:registerCrafter({
+ loc = weedLocs.MakeOil,
+ recipes = {
+ shatter = {
+ amount = 1,
+ time = 4000,
+ anim = 'uncuff',
+ recipe = {
+ butane = 1,
+ grindedweed = 1
+ }
+ }
+ }
+})
+
+
diff --git a/server/xtc.lua b/server/xtc.lua
index 326a6cd..848844f 100644
--- a/server/xtc.lua
+++ b/server/xtc.lua
@@ -1,251 +1,212 @@
-local QBCore = exports['qb-core']:GetCoreObject()
+
-------------------- stealing ingridients
+local RecipeList = {
+ raw = {
+ raw_xtc = {take = {mdp2p = 1, isosafrole = 1}, give = {raw_xtc = 1}}
+ },
+ singlestack = {
+ white_xtc = {amount = 1, take = {raw_xtc = 1}},
+ red_xtc = {amount = 1, take = {raw_xtc = 1, loosecoke = 1},},
+ orange_xtc = {amount = 1, take = {raw_xtc = 1, heroinvial = 1},},
+ blue_xtc = {amount = 1, take = {raw_xtc = 1, crackrock = 1},},
+ },
+ dualstack = {
+ white_xtc2 = {amount = 1, take = {raw_xtc = 1},},
+ red_xtc2 = {amount = 1, take = {raw_xtc = 1, loosecoke = 1},},
+ orange_xtc2 = {amount = 1, take = {raw_xtc = 1, heroinvial = 1},},
+ blue_xtc2 = {amount = 1, take = {raw_xtc = 1, crackrock = 1},},
+ },
+ triplestack = {
+ white_xtc3 = {amount = 1, take = {raw_xtc = 1},},
+ red_xtc3 = {amount = 1, take = {raw_xtc = 1, loosecoke = 1},},
+ orange_xtc3 = {amount = 1, take = {raw_xtc = 1, heroinvial = 1},},
+ blue_xtc3 = {amount = 1, take = {raw_xtc = 1, crackrock = 1},},
+ },
+ quadstack = {
+ white_xtc4 = {amount = 1, take = {raw_xtc = 1},},
+ red_xtc4 = {amount = 1, take = {raw_xtc = 1, loosecoke = 1},},
+ orange_xtc4 = {amount = 1, take = {raw_xtc = 1, heroinvial = 1},},
+ blue_xtc4 = {amount = 1, take = {raw_xtc = 1, crackrock = 1},},
+ },
+ presses = {
+ singlepress = {cash = 10000},
+ dualpress = {amount = 1, take = {white_xtc = 20, blue_xtc = 20, red_xtc = 20, orange_xtc = 20, singlepress = 1}},
+ triplepress = {amount = 1, take = {white_xtc2 = 50, blue_xtc2 = 50, red_xtc2 = 50, orange_xtc2 = 50, dualpress = 1}},
+ quadpress = {amount = 1, take = {white_xtc3 = 50, blue_xtc3 = 50, red_xtc3 = 50, orange_xtc3 = 50, triplepress = 1}},
+ }
+}
+
+local xtcLocations = {
+ isosafrole = { -- where to steal isosafrole
+ {loc = vector3(844.39, -902.92, 25.42), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
+ },
+ mdp2p = { -- where to steal mdp2p
+ {loc = vector3(844.4, -898.79, 25.23), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
+ },
+ rawxtcloc = { -- where to combine the 2 ingridents to make raw xtc
+ {loc = vector3(844.71, -910.33, 25.37), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
+ },
+ xtcpress = {
+ {ped = 'g_f_y_families_01',loc = vector4(845.82, -884.79, 25.18, 180.0), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
+ },
+ stamp = { -- where to stamp pills
+ {loc = vector3(844.71, -900.56, 25.43), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
+ },
+}
+ps.registerCallback('md-drugs:server:GetXtcLocs', function(source)
+ return xtcLocations
+end)
local activePresses = {}
+local timeout = {}
+
+local function timeOut(src)
+ CreateThread(function()
+ timeout[ps.getIdentifier(src)] = true
+ Wait(3000)
+ timeout[ps.getIdentifier(src)] = nil
+ end)
+end
+
RegisterServerEvent('md-drugs:server:stealisosafrole', function(num)
local src = source
- if not checkLoc(src, 'isosafrole',num) then return end
- if AddItem(src, "isosafrole", 1) then
-
- end
+ if not ps.checkDistance(src, xtcLocations.isosafrole[num].loc, 3.0) then return end
+ if timeout[ps.getIdentifier(src)] then
+ ps.notify(src, 'You are still waiting for the last minigame to finish', 'error')
+ return
+ end
+ timeOut(src)
+ ps.addItem(src, "isosafrole", 1)
end)
RegisterServerEvent('md-drugs:server:stealmdp2p', function(num)
local src = source
- local Player = getPlayer(src)
- if not checkLoc(src, 'mdp2p',num) then return end
- if AddItem(src,"mdp2p", 1) then
- end
+ if not ps.checkDistance(src, xtcLocations.mdp2p[num].loc, 3.0) then return end
+ if timeout[ps.getIdentifier(src)] then
+ ps.notify(src, 'You are still waiting for the last minigame to finish', 'error')
+ return
+ end
+ timeOut(src)
+ ps.addItem(src, "mdp2p", 1)
end)
local presses = {
- {item = 'singlepress', data = 'single'},
- {item = 'dualpress', data = 'dual'},
- {item = 'triplepress', data = 'triple'},
- {item = 'quadpress', data = 'quad'},
+ {item = 'singlepress', data = 'singlestack', recipes = RecipeList.singlestack},
+ {item = 'dualpress', data = 'dualstack', recipes = RecipeList.dualstack},
+ {item = 'triplepress', data = 'triplestack', recipes = RecipeList.triplestack},
+ {item = 'quadpress', data = 'quadstack', recipes = RecipeList.quadstack},
}
-for k, v in pairs (presses) do
-CUI(v.item, function(source, item)
-local src = source
-local Player = getPlayer(src)
-local check, loc = ps.callback('md-drugs:client:setpress', src, v.data)
- if check then
- if RemoveItem(src, v.item, 1) then
- table.insert(activePresses, {
- press = v.data,
- get = v.item,
- owner = GetName(src),
- ownerid = Player.PlayerData.citizenid,
- src = src,
- loc = loc
- })
- end
- end
-end)
-end
-RegisterServerEvent('md-drugs:server:getpressback', function(type)
-local src = source
-local Player = getPlayer(src)
- for k, v in pairs (activePresses) do
- if v.ownerid == Player.PlayerData.citizenid then
- if v.press == type then
- table.remove(activePresses, k)
- AddItem(src, v.get, 1)
- end
- end
- end
-end)
-
-local function pressout(source)
+for k, v in pairs (presses) do
+ps.createUseable(v.item, function(source, item)
local src = source
- local Player = getPlayer(src)
- local ped = GetPlayerPed(src)
- local coords = GetEntityCoords(ped)
- for k, v in pairs (activePresses) do
- if v.ownerid == Player.PlayerData.citizenid then
- if #(coords - v.loc) < 3.0 then
- return v.press
+ local check, loc = ps.callback('md-drugs:client:setpress', src, v)
+ if check then
+ if ps.removeItem(src, v.item, 1) then
+ activePresses[ps.getIdentifier(src)] = {
+ press = v.data,
+ get = v.item,
+ owner = ps.getPlayerName(src),
+ ownerid = ps.getIdentifier(src),
+ src = src,
+ loc = loc
+ }
end
end
- end
- return 'none'
+ end)
end
+RegisterServerEvent('md-drugs:server:getpressback', function()
+ local src = source
+ if not activePresses[ps.getIdentifier(src)] then return end
+ local press = activePresses[ps.getIdentifier(src)]
+ ps.addItem(src, press.get, 1)
+ activePresses[ps.getIdentifier(src)] = nil
+end)
+
RegisterServerEvent('md-drugs:server:makextc', function(data)
- local src = source
- local Player = getPlayer(src)
- if not Itemcheck(src, 'raw_xtc', 1) then return end
- if pressout(src) == 'none' then return end
- if pressout(src) == 'single' then
- if data.color == 'white' then
- if not GetRecipe(src, 'xtc', 'singlestack', 'white') then return end
- elseif data.color == 'red' then
- if not GetRecipe(src, 'xtc', 'singlestack', 'red') then return end
- elseif data.color == 'orange' then
- if not GetRecipe(src, 'xtc', 'singlestack', 'orange') then return end
- elseif data.color == 'blue' then
- if not GetRecipe(src, 'xtc', 'singlestack', 'blue') then return end
- end
- elseif pressout(src) == 'dual' then
- if data.color == 'white' then
- if not GetRecipe(src, 'xtc', 'dualstack', 'white') then return end
- elseif data.color == 'red' then
- if not GetRecipe(src, 'xtc', 'dualstack', 'red') then return end
- elseif data.color == 'orange' then
- if not GetRecipe(src, 'xtc', 'dualstack', 'orange') then return end
- elseif data.color == 'blue' then
- if not GetRecipe(src, 'xtc', 'dualstack', 'blue') then return end
- end
- elseif pressout(src) == 'triple' then
- if data.color == 'white' then
- if not GetRecipe(src, 'xtc', 'triplestack', 'white') then return end
- elseif data.color == 'red' then
- if not GetRecipe(src, 'xtc', 'triplestack', 'red') then return end
- elseif data.color == 'orange' then
- if not GetRecipe(src, 'xtc', 'triplestack', 'orange') then return end
- elseif data.color == 'blue' then
- if not GetRecipe(src, 'xtc', 'triplestack', 'blue') then return end
- end
- elseif pressout(src) == 'quad' then
- if data.color == 'white' then
- if not GetRecipe(src, 'xtc', 'quadstack', 'white') then return end
- elseif data.color == 'red' then
- if not GetRecipe(src, 'xtc', 'quadstack', 'red') then return end
- elseif data.color == 'orange' then
- if not GetRecipe(src, 'xtc', 'quadstack', 'orange') then return end
- elseif data.color == 'blue' then
- if not GetRecipe(src, 'xtc', 'quadstack', 'blue') then return end
- end
- end
+ local src = source
+ if not activePresses[ps.getIdentifier(src)] then
+ ps.notify(src, 'You Dont Have A Pill Press', 'error')
+ return
+ end
+ craft(src, RecipeList[activePresses[ps.getIdentifier(src)].press][data], data)
end)
RegisterServerEvent('md-drugs:server:buypress', function()
local src = source
- local Player = getPlayer(src)
-
- if Player.Functions.RemoveMoney("cash", 20000) then
- AddItem(src, "singlepress", 1)
- --Log(GetName(source) .. ' Bought A Pill Press', 'xtc')
- else
- ps.notify(Lang.xtc.cash, "error")
- end
- end)
-
-RegisterServerEvent('md-drugs:server:upgradepress', function(data)
- local src = source
- if data == 'dual' then
- if not GetRecipe(src, 'xtc', 'press', 'dual') then return end
- elseif data == 'triple' then
- if not GetRecipe(src, 'xtc', 'press', 'triple') then return end
- elseif data == 'quad' then
- if not GetRecipe(src, 'xtc', 'press', 'quad') then return end
+ if ps.removeMoney(src,"cash", RecipeList.presses['singlepress'].cash) then
+ ps.addItem(src, "singlepress", 1)
else
- ps.notify(src, 'huh', 'error')
+ ps.notify(ps.lang('xtc.cash'), "error")
end
end)
+RegisterServerEvent('md-drugs:server:upgradepress', function(data)
+ local src = source
+ if not ps.checkDistance(src, xtcLocations.xtcpress[data].loc, 2.0) then
+ ps.notify(src, ps.lang('xtc.toofar'), "error")
+ return
+ end
+ craft(src, RecipeList.presses[data], data)
+end)
+
+ps.registerCallback('md-drugs:server:getpressrecipes', function(source)
+ return RecipeList.presses
+end)
------------- making powder
RegisterServerEvent('md-drugs:server:makingrawxtc', function(num)
local src = source
- local Player = getPlayer(src)
- if not checkLoc(src, 'rawxtcloc',num) then return end
- if not GetRecipe(src, 'xtc', 'raw', 'raw_xtc') then return end
-end)
-
-RegisterServerEvent('md-drugs:server:stampwhite', function(num)
- local src = source
- local one = {'white_playboys', 'white_aliens', 'white_pl', 'white_trolls', 'white_cats'}
- local chance = math.random(#one)
- local two = {'white_playboys2', 'white_aliens2', 'white_pl2', 'white_trolls2', 'white_cats2'}
- local three = {'white_playboys3', 'white_aliens3', 'white_pl3', 'white_trolls3', 'white_cats3'}
- local four = {'white_playboys4', 'white_aliens4', 'white_pl4', 'white_trolls4', 'white_cats4'}
- if not checkLoc(src, 'stamp', num) then return end
-
- if RemoveItem(src, "white_xtc", 1) then
- AddItem(src, one[chance], 1)
- elseif RemoveItem(src, "white_xtc2", 1) then
- AddItem(src, two[chance], 1)
- elseif RemoveItem(src, "white_xtc3", 1) then
- AddItem(src, three[chance], 1)
- elseif RemoveItem(src, "white_xtc4", 1) then
- AddItem(src, four[chance], 1)
- else
- ps.notify('You Dont Have Unstamped White Pills', 'error')
+ if not ps.checkDistance(src, xtcLocations.rawxtcloc[num].loc, 3.0) then return end
+ if timeout[ps.getIdentifier(src)] then
+ ps.notify(src, 'You are still waiting for the last minigame to finish', 'error')
+ return
end
+ timeOut(src)
+ if not ps.craftItem(src, RecipeList.raw.raw_xtc) then return end
end)
-RegisterServerEvent('md-drugs:server:stampred', function(num)
- local src = source
- local one = {'red_playboys', 'red_aliens', 'red_pl', 'red_trolls', 'red_cats'}
- local chance = math.random(#one)
- local two = {'red_playboys2', 'red_aliens2', 'red_pl2', 'red_trolls2', 'red_cats2'}
- local three = {'red_playboys3', 'red_aliens3', 'red_pl3', 'red_trolls3', 'red_cats3'}
- local four = {'red_playboys4', 'red_aliens4', 'red_pl4', 'red_trolls4', 'red_cats4'}
- if not checkLoc(src, 'stamp', num) then return end
-
- if RemoveItem(src, "red_xtc", 1) then
- AddItem(src, one[chance], 1)
- elseif RemoveItem(src, "red_xtc2", 1) then
- AddItem(src, two[chance], 1)
- elseif RemoveItem(src, "red_xtc3", 1) then
- AddItem(src, three[chance], 1)
- elseif RemoveItem(src, "red_xtc4", 1) then
- AddItem(src, four[chance], 1)
- else
- ps.notify('You Dont Have Unstamped red Pills', 'error')
- end
-end)
+local function getColor(color)
+ local colors = {
+ white = {'white_playboys', 'white_aliens', 'white_pl', 'white_trolls', 'white_cats'},
+ red = {'red_playboys', 'red_aliens', 'red_pl', 'red_trolls', 'red_cats'},
+ orange = {'orange_playboys', 'orange_aliens', 'orange_pl', 'orange_trolls', 'orange_cats'},
+ blue = {'blue_playboys', 'blue_aliens', 'blue_pl', 'blue_trolls', 'blue_cats'}
+ }
+ if colors[color] then
+ return colors[color][math.random(#colors[color])]
+ else
+ ps.notify('Invalid color specified', 'error')
+ return nil
+ end
+end
-RegisterServerEvent('md-drugs:server:stamporange', function(num)
- local src = source
- local one = {'orange_playboys', 'orange_aliens', 'orange_pl', 'orange_trolls', 'orange_cats'}
- local two = {'orange_playboys2', 'orange_aliens2', 'orange_pl2', 'orange_trolls2', 'orange_cats2'}
- local three = {'orange_playboys3', 'orange_aliens3', 'orange_pl3', 'orange_trolls3', 'orange_cats3'}
- local four = {'orange_playboys4', 'orange_aliens4', 'orange_pl4', 'orange_trolls4', 'orange_cats4'}
- local chance = math.random(#one)
- if not checkLoc(src, 'stamp', num) then return end
-
- if RemoveItem(src, "orange_xtc", 1) then
- AddItem(src, one[chance], 1)
- elseif RemoveItem(src, "orange_xtc2", 1) then
- AddItem(src, two[chance], 1)
- elseif RemoveItem(src, "orange_xtc3", 1) then
- AddItem(src, three[chance], 1)
- elseif RemoveItem(src, "orange_xtc4", 1) then
- AddItem(src, four[chance], 1)
- else
- ps.notify('You Dont Have Unstamped orange Pills', 'error')
- end
-end)
-
-RegisterServerEvent('md-drugs:server:stampblue', function(num)
- local src = source
- local one = {'blue_playboys', 'blue_aliens', 'blue_pl', 'blue_trolls', 'blue_cats'}
- local chance = math.random(#one)
- local two = {'blue_playboys2', 'blue_aliens2', 'blue_pl2', 'blue_trolls2', 'blue_cats2'}
- local three = {'blue_playboys3', 'blue_aliens3', 'blue_pl3', 'blue_trolls3', 'blue_cats3'}
- local four = {'blue_playboys4', 'blue_aliens4', 'blue_pl4', 'blue_trolls4', 'blue_cats4'}
- if not checkLoc(src, 'stamp', num) then return end
- if RemoveItem(src, "blue_xtc", 1) then
- AddItem(src, one[chance], 1)
- elseif RemoveItem(src, "blue_xtc2", 1) then
- AddItem(src, two[chance], 1)
- elseif RemoveItem(src, "blue_xtc3", 1) then
- AddItem(src, three[chance], 1)
- elseif RemoveItem(src, "blue_xtc4", 1) then
- AddItem(src, four[chance], 1)
- else
- ps.notify('You Dont Have Unstamped blue Pills', 'error')
- end
+RegisterServerEvent('md-drugs:server:stamp', function(num, color)
+ local src = source
+ if not ps.checkDistance(src, xtcLocations.stamp[num].loc, 3.0) then return end
+ local item = getColor(color)
+ local colors = {
+ white = 'white_xtc',
+ red = 'red_xtc',
+ orange = 'orange_xtc',
+ blue = 'blue_xtc'
+ }
+ if ps.removeItem(src, colors[color], 1) then
+ ps.addItem(src, item, 1)
+ elseif ps.removeItem(src, colors[color].."2", 1) then
+ ps.addItem(src, item..'2', 1)
+ elseif ps.removeItem(src, colors[color].."3", 1) then
+ ps.addItem(src, item..'3', 1)
+ elseif ps.removeItem(src, colors[color].."4", 1) then
+ ps.addItem(src, item..'4', 1)
+ else
+ ps.notify('You Dont Have Unstamped '..color..' Pills', 'error')
+ end
end)
AddEventHandler('playerDropped', function()
local src = source
- local Player = getPlayer(src)
- for k, v in pairs (activePresses) do
- if v.ownerid == Player.PlayerData.citizenid then
- table.remove(activePresses, k)
- AddItem(src, v.get, 1)
- end
+ if activePresses[ps.getIdentifier(src)] then
+ ps.addItem(src, activePresses[ps.getIdentifier(src)].get, 1)
+ activePresses[ps.getIdentifier(src)] = nil
end
end)
\ No newline at end of file
diff --git a/shared/config.lua b/shared/config.lua
index 58df3b2..2a748a3 100644
--- a/shared/config.lua
+++ b/shared/config.lua
@@ -1,6 +1,6 @@
Config = {} --Ignore.
ps = exports.ps_lib:init()
-ps.loadLangs("en")
+ps.loadLangs("wookie")
Config.respawnTime = 3 -- Seconds
Config.Fuel = "LegacyFuel" -- type the name of script you use i.e. ps-fuel, cdn-fuel, LegacyFuel
Config.TierSystem = true -- allows for three tiers of certain drugs ( coke, heroin, crack, lsd)
@@ -66,5 +66,5 @@ Config.Drugs = {
shrooms = true,
weed = true,
wholesale = false,
- xtc = false,
+ xtc = true,
}
\ No newline at end of file
From 37f86bf50dd3eb8b72d5271fd7bd763d3a4d56c8 Mon Sep 17 00:00:00 2001
From: Mustache Dom <123716453+Mustachedom@users.noreply.github.com>
Date: Wed, 6 Aug 2025 02:35:25 -0600
Subject: [PATCH 11/37] - add support for bzz props
---
server/plantSpawns.lua | 136 +++++++++++++++++++++++------------------
shared/config.lua | 7 +++
2 files changed, 85 insertions(+), 58 deletions(-)
diff --git a/server/plantSpawns.lua b/server/plantSpawns.lua
index eacd835..f830430 100644
--- a/server/plantSpawns.lua
+++ b/server/plantSpawns.lua
@@ -1,34 +1,54 @@
+local drugModels = {
+ cocaine = "prop_plant_01a",
+ heroin = "prop_plant_01b",
+ mescaline = "prop_cactus_03",
+ shrooms = "mushroom",
+ weed = "bkr_prop_weed_lrg_01b"
+}
+local drugModelsBuzz = {
+ cocaine = "bzzz_plant_coca_c",
+ heroin = "bzzz_plants_poppy_1c",
+ shrooms = "bzzz_mushrooms_amanita_a",
+ weed = "bzzz_plant_weed_pot_green_d"
+}
+local function propsLabels(drugType)
+ if Config.Buzz[drugType] then
+ return drugModelsBuzz[drugType]
+ else
+ return drugModels[drugType]
+ end
+end
local plants = {
cocaine = {
- { location = vector3(1474.25, -2643.87, 42.88), heading = 334.49, model = "prop_plant_01a", taken = false },
- { location = vector3(1472.35, -2649.3, 41.87), heading = 329.56, model = "prop_plant_01a", taken = false },
- { location = vector3(1475.7, -2652.9, 40.8), heading = 25.16, model = "prop_plant_01a", taken = false },
- { location = vector3(1481.0, -2654.99, 39.86), heading = 21.52, model = "prop_plant_01a", taken = false },
- { location = vector3(1480.9, -2660.63, 38.68), heading = 202.97, model = "prop_plant_01a", taken = false },
- { location = vector3(1477.18, -2666.53, 38.19), heading = 202.97, model = "prop_plant_01a", taken = false },
- { location = vector3(1477.58, -2670.82, 37.73), heading = 202.97, model = "prop_plant_01a", taken = false },
- { location = vector3(1476.56, -2675.82, 37.46), heading = 202.97, model = "prop_plant_01a", taken = false },
- { location = vector3(1474.8, -2680.19, 37.03), heading = 202.97, model = "prop_plant_01a", taken = false },
- { location = vector3(1471.52, -2685.0, 36.82), heading = 202.97, model = "prop_plant_01a", taken = false },
- { location = vector3(1462.82, -2676.58, 38.83), heading = 202.97, model = "prop_plant_01a", taken = false },
- { location = vector3(1461.31, -2667.74, 39.67), heading = 202.97, model = "prop_plant_01a", taken = false },
- { location = vector3(1456.3, -2647.61, 43.39), heading = 202.97, model = "prop_plant_01a", taken = false },
- { location = vector3(1453.65, -2641.56, 45.0), heading = 202.97, model = "prop_plant_01a", taken = false },
+ { location = vector3(1474.25, -2643.87, 42.88), heading = 334.49, model = propsLabels('cocaine'), taken = false },
+ { location = vector3(1472.35, -2649.3, 41.87), heading = 329.56, model = propsLabels('cocaine'), taken = false },
+ { location = vector3(1475.7, -2652.9, 40.8), heading = 25.16, model = propsLabels('cocaine'), taken = false },
+ { location = vector3(1481.0, -2654.99, 39.86), heading = 21.52, model = propsLabels('cocaine'), taken = false },
+ { location = vector3(1480.9, -2660.63, 38.68), heading = 202.97, model = propsLabels('cocaine'), taken = false },
+ { location = vector3(1477.18, -2666.53, 38.19), heading = 202.97, model = propsLabels('cocaine'), taken = false },
+ { location = vector3(1477.58, -2670.82, 37.73), heading = 202.97, model = propsLabels('cocaine'), taken = false },
+ { location = vector3(1476.56, -2675.82, 37.46), heading = 202.97, model = propsLabels('cocaine'), taken = false },
+ { location = vector3(1474.8, -2680.19, 37.03), heading = 202.97, model = propsLabels('cocaine'), taken = false },
+ { location = vector3(1471.52, -2685.0, 36.82), heading = 202.97, model = propsLabels('cocaine'), taken = false },
+ { location = vector3(1462.82, -2676.58, 38.83), heading = 202.97, model = propsLabels('cocaine'), taken = false },
+ { location = vector3(1461.31, -2667.74, 39.67), heading = 202.97, model = propsLabels('cocaine'), taken = false },
+ { location = vector3(1456.3, -2647.61, 43.39), heading = 202.97, model = propsLabels('cocaine'), taken = false },
+ { location = vector3(1453.65, -2641.56, 45.0), heading = 202.97, model = propsLabels('cocaine'), taken = false },
},
heroin = {
- { location = vector3(-2251.3, -99.18, 100.11), heading = 334.49, model = "prop_plant_01b", taken = false},
- { location = vector3(-2249.63, -92.97, 101.8), heading = 329.56, model = "prop_plant_01b", taken = false},
- { location = vector3(-2245.57, -85.12, 104.5), heading = 25.16, model = "prop_plant_01b", taken = false},
- { location = vector3(-2240.81, -88.48, 105.88), heading = 21.52, model = "prop_plant_01b", taken = false},
- { location = vector3(-2240.87, -93.36, 103.88), heading = 334.49, model = "prop_plant_01b", taken = false},
- { location = vector3(-2236.0, -95.34, 102.55), heading = 329.56, model = "prop_plant_01b", taken = false},
- { location = vector3(-2240.6, -100.01, 100.49), heading = 25.16, model = "prop_plant_01b", taken = false},
- { location = vector3(-2246.29, -104.92, 99.27), heading = 21.52, model = "prop_plant_01b", taken = false},
- { location = vector3(-2243.64, -107.99, 96.71), heading = 334.49, model = "prop_plant_01b", taken = false},
- { location = vector3(-2254.22, -108.76, 97.25), heading = 329.56, model = "prop_plant_01b", taken = false},
- { location = vector3(-2247.33, -108.92, 97.70), heading = 25.16, model = "prop_plant_01b", taken = false},
- { location = vector3(-2250.96, -111.22, 97.50), heading = 21.52, model = "prop_plant_01b", taken = false},
- { location = vector3(465.95, -1021.32, 31.78), heading = 21.52, model = "prop_plant_01b", taken = false},
+ { location = vector3(-2251.3, -99.18, 100.11), heading = 334.49, model = propsLabels('heroin'), taken = false},
+ { location = vector3(-2249.63, -92.97, 101.8), heading = 329.56, model = propsLabels('heroin'), taken = false},
+ { location = vector3(-2245.57, -85.12, 104.5), heading = 25.16, model = propsLabels('heroin'), taken = false},
+ { location = vector3(-2240.81, -88.48, 105.88), heading = 21.52, model = propsLabels('heroin'), taken = false},
+ { location = vector3(-2240.87, -93.36, 103.88), heading = 334.49, model = propsLabels('heroin'), taken = false},
+ { location = vector3(-2236.0, -95.34, 102.55), heading = 329.56, model = propsLabels('heroin'), taken = false},
+ { location = vector3(-2240.6, -100.01, 100.49), heading = 25.16, model = propsLabels('heroin'), taken = false},
+ { location = vector3(-2246.29, -104.92, 99.27), heading = 21.52, model = propsLabels('heroin'), taken = false},
+ { location = vector3(-2243.64, -107.99, 96.71), heading = 334.49, model = propsLabels('heroin'), taken = false},
+ { location = vector3(-2254.22, -108.76, 97.25), heading = 329.56, model = propsLabels('heroin'), taken = false},
+ { location = vector3(-2247.33, -108.92, 97.70), heading = 25.16, model = propsLabels('heroin'), taken = false},
+ { location = vector3(-2250.96, -111.22, 97.50), heading = 21.52, model = propsLabels('heroin'), taken = false},
+ { location = vector3(465.95, -1021.32, 31.78), heading = 21.52, model = propsLabels('heroin'), taken = false},
},
mescaline = {
{ location = vector3(2598.73, 4207.89, 41.02), heading = 334.49, model = "prop_cactus_03", taken = false},
@@ -50,39 +70,39 @@ local plants = {
{ location = vector3(2623.82, 4189.97, 41.44), heading = 21.52, model = "prop_cactus_03", taken = false},
},
shrooms = {
- { location = vector3(2185.14, 5183.81, 57.48), heading = 334.49, model = "mushroom", taken = false},
- { location = vector3(2174.45, 5187.85, 57.43), heading = 329.56, model = "mushroom", taken = false},
- { location = vector3(2166.22, 5196.56, 58.0), heading = 25.16, model = "mushroom", taken = false},
- { location = vector3(2166.82, 5204.83, 58.63), heading = 21.52, model = "mushroom", taken = false},
- { location = vector3(2174.84, 5205.82, 59.19), heading = 334.49, model = "mushroom", taken = false},
- { location = vector3(2184.46, 5201.23, 59.2), heading = 329.56, model = "mushroom", taken = false},
- { location = vector3(2192.45, 5194.89, 58.86), heading = 25.16, model = "mushroom", taken = false},
- { location = vector3(2207.53, 5187.81, 58.95), heading = 21.52, model = "mushroom", taken = false},
- { location = vector3(2213.46, 5191.11, 59.81), heading = 334.49, model = "mushroom", taken = false},
- { location = vector3(2218.31, 5180.0, 58.18), heading = 329.56, model = "mushroom", taken = false},
- { location = vector3(2212.75, 5172.35, 57.2), heading = 25.16, model = "mushroom", taken = false},
- { location = vector3(2208.56, 5167.06, 56.34), heading = 21.52, model = "mushroom", taken = false},
- { location = vector3(2196.9, 5158.59, 54.84), heading = 21.52, model = "mushroom", taken = false},
- { location = vector3(2191.62, 5174.91, 56.68), heading = 21.52, model = "mushroom", taken = false},
- { location = vector3(2190.18, 5182.54, 57.47), heading = 21.52, model = "mushroom", taken = false},
- { location = vector3(2185.85, 5190.49, 58.1), heading = 21.52, model = "mushroom", taken = false},
- { location = vector3(2179.95, 5194.19, 58.26), heading = 21.52, model = "mushroom", taken = false},
+ { location = vector3(2185.14, 5183.81, 57.48), heading = 334.49, model = propsLabels('shroom'), taken = false},
+ { location = vector3(2174.45, 5187.85, 57.43), heading = 329.56, model = propsLabels('shroom'), taken = false},
+ { location = vector3(2166.22, 5196.56, 58.0), heading = 25.16, model = propsLabels('shroom'), taken = false},
+ { location = vector3(2166.82, 5204.83, 58.63), heading = 21.52, model = propsLabels('shroom'), taken = false},
+ { location = vector3(2174.84, 5205.82, 59.19), heading = 334.49, model = propsLabels('shroom'), taken = false},
+ { location = vector3(2184.46, 5201.23, 59.2), heading = 329.56, model = propsLabels('shroom'), taken = false},
+ { location = vector3(2192.45, 5194.89, 58.86), heading = 25.16, model = propsLabels('shroom'), taken = false},
+ { location = vector3(2207.53, 5187.81, 58.95), heading = 21.52, model = propsLabels('shroom'), taken = false},
+ { location = vector3(2213.46, 5191.11, 59.81), heading = 334.49, model = propsLabels('shroom'), taken = false},
+ { location = vector3(2218.31, 5180.0, 58.18), heading = 329.56, model = propsLabels('shroom'), taken = false},
+ { location = vector3(2212.75, 5172.35, 57.2), heading = 25.16, model = propsLabels('shroom'), taken = false},
+ { location = vector3(2208.56, 5167.06, 56.34), heading = 21.52, model = propsLabels('shroom'), taken = false},
+ { location = vector3(2196.9, 5158.59, 54.84), heading = 21.52, model = propsLabels('shroom'), taken = false},
+ { location = vector3(2191.62, 5174.91, 56.68), heading = 21.52, model = propsLabels('shroom'), taken = false},
+ { location = vector3(2190.18, 5182.54, 57.47), heading = 21.52, model = propsLabels('shroom'), taken = false},
+ { location = vector3(2185.85, 5190.49, 58.1), heading = 21.52, model = propsLabels('shroom'), taken = false},
+ { location = vector3(2179.95, 5194.19, 58.26), heading = 21.52, model = propsLabels('shroom'), taken = false},
},
weed = {
- { location = vector3(1064.84, -3199.84, -42.70), heading = 334.49, model = "bkr_prop_weed_lrg_01b", taken = false},
- { location = vector3(1063.88, -3198.69, -42.70), heading = 329.56, model = "bkr_prop_weed_lrg_01b", taken = false},
- { location = vector3(1061.68, -3196.46, -42.70), heading = 25.16, model = "bkr_prop_weed_lrg_01b", taken = false},
- { location = vector3(1061.62, -3199.63, -42.70), heading = 21.52, model = "bkr_prop_weed_lrg_01b", taken = false},
- { location = vector3(1062.82, -3197.70, -42.70), heading = 202.97, model = "bkr_prop_weed_lrg_01b", taken = false},
- { location = vector3(1064.69, -3196.31, -42.70), heading = 202.97, model = "bkr_prop_weed_lrg_01b", taken = false},
- { location = vector3(1062.92, -3198.78, -42.70), heading = 202.97, model = "bkr_prop_weed_lrg_01b", taken = false},
- { location = vector3(1049.73, -3201.92, -42.70), heading = 202.97, model = "bkr_prop_weed_lrg_01b", taken = false},
- { location = vector3(1052.94, -3202.21, -42.70), heading = 202.97, model = "bkr_prop_weed_lrg_01b", taken = false},
- { location = vector3(1051.93, -3201.17, -42.70), heading = 202.97, model = "bkr_prop_weed_lrg_01b", taken = false},
- { location = vector3(1050.98, -3201.13, -42.70), heading = 202.97, model = "bkr_prop_weed_lrg_01b", taken = false},
- { location = vector3(1050.89, -3200.07, -42.70), heading = 202.97, model = "bkr_prop_weed_lrg_01b", taken = false},
- { location = vector3(1050.89, -3198.95, -42.70), heading = 202.97, model = "bkr_prop_weed_lrg_01b", taken = false},
- { location = vector3(1049.72, -3198.95, -42.70), heading = 202.97, model = "bkr_prop_weed_lrg_01b", taken = false},
+ { location = vector3(1064.84, -3199.84, -42.70), heading = 334.49, model = propsLabels('weed'), taken = false},
+ { location = vector3(1063.88, -3198.69, -42.70), heading = 329.56, model = propsLabels('weed'), taken = false},
+ { location = vector3(1061.68, -3196.46, -42.70), heading = 25.16, model = propsLabels('weed'), taken = false},
+ { location = vector3(1061.62, -3199.63, -42.70), heading = 21.52, model = propsLabels('weed'), taken = false},
+ { location = vector3(1062.82, -3197.70, -42.70), heading = 202.97, model = propsLabels('weed'), taken = false},
+ { location = vector3(1064.69, -3196.31, -42.70), heading = 202.97, model = propsLabels('weed'), taken = false},
+ { location = vector3(1062.92, -3198.78, -42.70), heading = 202.97, model = propsLabels('weed'), taken = false},
+ { location = vector3(1049.73, -3201.92, -42.70), heading = 202.97, model = propsLabels('weed'), taken = false},
+ { location = vector3(1052.94, -3202.21, -42.70), heading = 202.97, model = propsLabels('weed'), taken = false},
+ { location = vector3(1051.93, -3201.17, -42.70), heading = 202.97, model = propsLabels('weed'), taken = false},
+ { location = vector3(1050.98, -3201.13, -42.70), heading = 202.97, model = propsLabels('weed'), taken = false},
+ { location = vector3(1050.89, -3200.07, -42.70), heading = 202.97, model = propsLabels('weed'), taken = false},
+ { location = vector3(1050.89, -3198.95, -42.70), heading = 202.97, model = propsLabels('weed'), taken = false},
+ { location = vector3(1049.72, -3198.95, -42.70), heading = 202.97, model = propsLabels('weed'), taken = false},
}
}
diff --git a/shared/config.lua b/shared/config.lua
index 2a748a3..3820cd8 100644
--- a/shared/config.lua
+++ b/shared/config.lua
@@ -67,4 +67,11 @@ Config.Drugs = {
weed = true,
wholesale = false,
xtc = true,
+}
+
+Config.Bzz = {
+ cocaine = false,
+ heroin =false,
+ shrooms = false,
+ weed = false,
}
\ No newline at end of file
From 683eaff7debe58cf4c6bee25d779359947fd6d1f Mon Sep 17 00:00:00 2001
From: Mustache Dom <123716453+Mustachedom@users.noreply.github.com>
Date: Sat, 9 Aug 2025 03:10:00 -0600
Subject: [PATCH 12/37] finished locales EN
---
client/TravellingMerchant.lua | 27 ++
client/animationsandfunctions.lua | 22 --
client/cocaine.lua | 24 +-
client/consumables.lua | 6 +-
client/cornerselling.lua | 16 +-
client/crack.lua | 8 +-
client/deliveries.lua | 61 ++--
client/functions.lua | 152 ++--------
client/heroin.lua | 39 ++-
client/lean.lua | 8 +-
client/lsd.lua | 51 ++--
client/mescaline.lua | 6 +-
client/meth.lua | 82 +++---
client/oxyruns.lua | 20 +-
client/pharma.lua | 17 +-
client/plantSpawns.lua | 40 +--
client/shrooms.lua | 2 +-
client/weed.lua | 26 +-
client/wholesale.lua | 43 ++-
client/xtc.lua | 48 +--
clientRun.lua | 2 +-
fxmanifest.lua | 3 -
locales/en.lua | 473 +++++++++++++-----------------
server/TravellingMerchant.lua | 64 ++++
server/cocaine.lua | 16 +-
server/consumables.lua | 17 +-
server/cornerselling.lua | 17 +-
server/crack.lua | 12 +-
server/deliveries.lua | 103 ++++---
server/functions.lua | 99 +++----
server/heroin.lua | 54 ++--
server/lean.lua | 2 +-
server/lsd.lua | 29 +-
server/mescaline.lua | 18 +-
server/meth.lua | 58 ++--
server/oxyruns.lua | 8 +-
server/pharma.lua | 16 +-
server/plantSpawns.lua | 2 +-
server/recipes.lua | 66 -----
server/shops.lua | 89 ------
server/shrooms.lua | 4 +-
server/weed.lua | 40 ++-
server/wholesale.lua | 49 +++-
server/xtc.lua | 56 +++-
serverRun.lua | 1 -
shared/config.lua | 18 +-
46 files changed, 965 insertions(+), 1049 deletions(-)
create mode 100644 client/TravellingMerchant.lua
create mode 100644 server/TravellingMerchant.lua
delete mode 100644 server/recipes.lua
delete mode 100644 server/shops.lua
diff --git a/client/TravellingMerchant.lua b/client/TravellingMerchant.lua
new file mode 100644
index 0000000..c877c28
--- /dev/null
+++ b/client/TravellingMerchant.lua
@@ -0,0 +1,27 @@
+
+local function spawn()
+ local location, menus = ps.callback('md-drugs:server:GetMerchant')
+ local model = 's_m_m_trucker_01'
+ ps.requestModel(model)
+ local ped = CreatePed(4, model, location.x, location.y, location.z, location.w, false, true)
+ Freeze(ped, true, location.w)
+ ps.entityTarget(ped, {
+ {
+ label = ps.lang('merchant.targetOpen'),
+ action = function()
+ local options = {}
+ for k, v in pairs (menus) do
+ options[#options+1] = {
+ title = ps.getLabel(k),
+ description = '$'..v,
+ action = function()
+ ps.triggerServerEvent('md-drugs:server:purchaseGoods', k)
+ end
+ }
+ end
+ ps.menu('Travelling Merchant', 'Travelling Merchant', options)
+ end
+ }
+ })
+end
+spawn()
diff --git a/client/animationsandfunctions.lua b/client/animationsandfunctions.lua
index e8fef1a..a0b4c15 100644
--- a/client/animationsandfunctions.lua
+++ b/client/animationsandfunctions.lua
@@ -86,26 +86,4 @@ function AlienEffect()
StopScreenEffect("DrugsMichaelAliensFightIn")
StopScreenEffect("DrugsMichaelAliensFight")
StopScreenEffect("DrugsMichaelAliensFightOut")
-end
-
-function SetUpPeds()
- AddRelationshipGroup('setups')
- local ped = GetEntityCoords(PlayerPedId())
- local peds = {
- {x = ped.x+3, y = ped.y-5, z = ped.z-1, },
- {x = ped.x+6, y = ped.y-10, z = ped.z-1,},
- {x = ped.x+-2,y = ped.y+5, z = ped.z-1,},
- {x = ped.x+8, y = ped.y-12, z = ped.z-1,},
- {x = ped.x+5, y = ped.y-2, z = ped.z-1, },
- {x = ped.x+2, y = ped.y-20, z = ped.z-1,},
- {x = ped.x+1, y = ped.y-10, z = ped.z-1,},
- }
- for i = 1, #peds do
- local k = peds[i]
- i = CreatePed(0, "g_m_y_famdnf_01", k.x, k.y, k.z, 90.0, true, true)
- SetPedRelationshipGroupHash(i, 'setups')
- GiveWeaponToPed(i, "weapon_pistol", 1, false, true)
- TaskCombatPed(i, PlayerPedId(), 0, 16)
- SetPedCombatAttributes(i, 46, true)
- end
end
\ No newline at end of file
diff --git a/client/cocaine.lua b/client/cocaine.lua
index 50a79a3..0c904be 100644
--- a/client/cocaine.lua
+++ b/client/cocaine.lua
@@ -114,14 +114,14 @@ end
for k, v in pairs (locations.MakePowder) do
ps.boxTarget('cocaplant'..k, v.loc, {length = v.l, width = v.w, height = 1.0, rotation = v.rot}, {
{
- label = ps.lang('.targets.coke.pick'),
+ label = ps.lang('coke.makePow'),
icon = 'fa-solid fa-seedling',
action = function()
if not ps.hasItem('coca_leaf') then
- ps.notify('You Need A Coke Leaf')
+ ps.notify(ps.lang('coke.noleaf'), 'error')
return
end
- if not ps.progressbar(ps.lang('Coke.makepow'), 4000, 'uncuff') then return end
+ if not ps.progressbar(ps.lang('coke.makePow'), 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:makepowder", k)
end,
canInteract = function()
@@ -134,7 +134,7 @@ end
for k, v in pairs (locations.CuttingCoke) do
ps.boxTarget('cutcoke'..k, v.loc, {length = 1.0, width = 1.0, height = 1.0, rotation = 180.0}, {
{
- label = ps.lang('targets.coke.cut'),
+ label = ps.lang('coke.targetCutCoke'),
icon = 'fa-solid fa-mortar-pestle',
action = function()
CutCoke(v.loc, v.offset, v.rotation)
@@ -151,7 +151,7 @@ end
for k, v in pairs (locations.BaggingCoke) do
ps.boxTarget('bagcoke'..k, v.loc, {length = 1.0, width = 1.0, height = 1.0, rotation = 180.0}, {
{
- label = ps.lang('targets.coke.bag'),
+ label = ps.lang('coke.targetBagCoke'),
icon = 'fa-solid fa-sack-xmark',
action = function()
BagCoke(v.loc, v.offset, v.rotation)
@@ -169,19 +169,25 @@ for k, v in pairs (locations.cokeTele) do
ps.boxTarget('coke_tele'..k, v.inside, {length = v.l, width = v.w, heading = v.rot}, {
{
icon = 'fa-solid fa-door-open',
- label = ps.lang('targets.coke.telein'),
+ label = ps.lang('coke.teleOut'),
action = function()
SetEntityCoords(PlayerPedId(), v.outside)
- end
+ end,
+ canInteract = function()
+ return handleGang(v.gang)
+ end
}
})
ps.boxTarget('coke_teleout'..k, v.outside, {length = v.l, width = v.w, heading = v.rot}, {
{
icon = 'fa-solid fa-door-closed',
- label = ps.lang('targets.coke.teleout'),
+ label = ps.lang('coke.teleIn'),
action = function()
SetEntityCoords(PlayerPedId(), v.inside)
- end
+ end,
+ canInteract = function()
+ return handleGang(v.gang)
+ end
}
})
end
diff --git a/client/consumables.lua b/client/consumables.lua
index ae93b3c..a4340b9 100644
--- a/client/consumables.lua
+++ b/client/consumables.lua
@@ -1,8 +1,8 @@
ps.registerCallback('md-drugs:client:consumedrugs', function(time, effect, anim, progresstext, status, item)
- if not progressbar(progresstext .. GetLabel(item).. "!", time, anim ) then return end
- for k, v in pairs (status) do
+ if not progressbar(progresstext .. ps.getLabel(item).. "!", time, anim ) then return end
+ for k, v in pairs (status) do
if k == 'health' then
local cur = GetEntityHealth(PlayerPedId())
SetEntityHealth(PlayerPedId(), cur + v)
@@ -56,7 +56,5 @@ RegisterNetEvent('md-drugs:client:applyFeeling', function(effect)
CokeBaggyEffect()
elseif effect == "trevor" then
TrevorEffect()
- else
-
end
end)
\ No newline at end of file
diff --git a/client/cornerselling.lua b/client/cornerselling.lua
index e97ff43..a0f7154 100644
--- a/client/cornerselling.lua
+++ b/client/cornerselling.lua
@@ -10,7 +10,7 @@ end
local function sellDrug(item, amount, price, targ)
-- PoliceCall(20)
if ps.vehicleData() then
- ps.notify(ps.lang('Cornerselling.inveh', 'error'))
+ ps.notify(ps.lang('Cornerselling.inVeh'), 'error')
walkAway(targ)
return
end
@@ -47,7 +47,7 @@ local function findPed()
buyers[targ] = true
- ps.drawText('Waiting For Customer')
+ ps.drawText(ps.lang('Cornerselling.wait'))
repeat
Wait(1000)
@@ -89,7 +89,7 @@ local function Cornersell()
return
end
- ps.drawText('Searching For Nearby Customers')
+ ps.drawText(ps.lang('Cornerselling.searching'))
local targ = findPed()
local data = ps.callback('md-drugs:server:cornerselling:getAvailableDrugs', targ)
@@ -105,7 +105,7 @@ local function Cornersell()
local got = false
ps.entityTarget(targ, {
{
- label = "Take Back Drugs",
+ label = ps.lang('Cornerselling.targetTakeBack'),
icon ="fa-solid fa-money-bill",
action = function()
got = true
@@ -124,7 +124,7 @@ local function Cornersell()
FreezeEntityPosition(targ, true)
ps.entityTarget(data.ped, {
{
- label = string.format(ps.lang('targets.CornerSell.sell', data.amount, ps.getLabel(data.item), data.price)),
+ label = string.format(ps.lang('Cornerselling.targetSell'), data.amount, ps.getLabel(data.item), data.price),
icon ="fa-solid fa-money-bill",
action = function()
sellDrug(data.item, data.amount, data.price, targ)
@@ -137,7 +137,7 @@ local function Cornersell()
end,
},
{
- label = ps.lang('targets.CornerSell.deny'),
+ label = ps.lang('Cornerselling.targetDeny'),
icon = "fa-solid fa-person-harassing",
action = function()
deny(targ)
@@ -161,14 +161,14 @@ RegisterNetEvent('md-drugs:client:cornerselling', function()
ps.notify(ps.lang('Cornerselling.stopped', 'error'))
else
sell = true
- ps.notify(ps.lang('Cornerselling.started', 'success'))
+ ps.notify(ps.lang('Cornerselling.start', 'success'))
Cornersell()
end
end)
CreateThread(function()
for k, v in pairs (QBConfig.NoSellZones) do
- local box = lib.zones.box({ coords = v.loc, size = vec3(v.width, v.length, v.height), rotation = 180.0, debug = false,
+ local box = ps.zones.box({ coords = v.loc, size = vec3(v.width, v.length, v.height), rotation = 180.0, debug = false,
onEnter = function() inZone = true end, onExit = function() inZone = false end})
end
end)
\ No newline at end of file
diff --git a/client/crack.lua b/client/crack.lua
index 825dfee..85d0259 100644
--- a/client/crack.lua
+++ b/client/crack.lua
@@ -2,12 +2,12 @@ local locations = ps.callback('md-drugs:server:GetCrackLocations')
for k, v in pairs (locations.makecrack) do
ps.boxTarget('makeCrack'..k, v.loc, {length = v.l, width = v.w, height = 1.0, rotation = v.rot}, {
{
- label = ps.lang('targets.crack.makecrack'),
+ label = ps.lang('crack.targetMake'),
icon = 'fa-solid fa-temperature-high',
action = function()
if not ps.hasItem('bakingsoda') then return end
if not minigame() then TriggerServerEvent("md-drugs:server:failcrackone", k) return end
- if not ps.progressbar(ps.lang('Crack.makecrack'), 4000, 'uncuff') then return end
+ if not ps.progressbar(ps.lang('crack.cook'), 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:makecrack", k)
end,
canInteract = function()
@@ -21,11 +21,11 @@ end
for k, v in pairs (locations.bagcrack) do
ps.boxTarget('bagCrack'..k, v.loc, {length = v.l, width = v.w, height = 1.0, rotation = v.rot}, {
{
- label = ps.lang('targets.crack.bagcrack'),
+ label = ps.lang('crack.targetBag'),
icon = 'fa-solid fa-weight-scale',
action = function()
if not ps.hasItem('empty_weed_bag') then return end
- if not ps.progressbar(ps.lang('Crack.bagcrack'), 4000, 'uncuff') then return end
+ if not ps.progressbar(ps.lang('crack.bag'), 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:bagcrack", k)
end,
canInteract = function()
diff --git a/client/deliveries.lua b/client/deliveries.lua
index 817c66c..c1c46c6 100644
--- a/client/deliveries.lua
+++ b/client/deliveries.lua
@@ -1,33 +1,48 @@
local isActive = false
local dealer = {}
-RegisterNetEvent('md-drugs:client:opendealermenu', function()
- local rep = GetRep()
- makeMenu('dealermenu', rep)
- lib.showContext('dealermenu')
-end)
-
local function SpawnDealer()
local getDealers = ps.callback('md-drugs:server:getDealers')
for k,v in pairs(getDealers) do
local Ped = "g_m_y_famdnf_01"
- lib.requestModel(Ped, Config.RequestModelTime)
+ ps.requestModel(Ped, Config.RequestModelTime)
local loc = json.decode(v.coords)
dealer[k] = CreatePed(0, Ped,loc.x,loc.y, loc.z-1, loc.h, false, false)
Freeze(dealer[k], true, loc.h)
- AddMultiModel(dealer[k], {
- { icon = 'fas fa-user-secret', label = string.format(Lang.targets.Delivery.Deliver, v.name),
- action = function()
- local bool, item, amount, coords = ps.callback('md-drugs:server:GetDeliveryItem', false, k)
- if bool then
- Email(Lang.Delivery.emailn, Lang.Delivery.emailsub, string.format(Lang.Delivery.emailcon, amount, GetLabel(item)))
- TriggerEvent('md-drugs:client:setLocation', {bool = bool, item = item, amount = amount, coords = coords})
- end
- end,
- },
- { icon = "fa-solid fa-store", label = string.format(Lang.targets.Delivery.open, v.name),
- action = function() TriggerEvent('md-drugs:client:opendealermenu') end,
- }}, dealer[k])
+ ps.entityTarget(dealer[k], {
+ {
+ icon = 'fas fa-user-secret',
+ label = ps.lang('Deliveries.targetGetDel'),
+ action = function()
+ local bool, item, amount, coords = ps.callback('md-drugs:server:GetDeliveryItem', false, k)
+ if bool then
+ TriggerEvent('md-drugs:client:setLocation', {bool = bool, item = item, amount = amount, coords = coords})
+ end
+ end,
+ },
+ {
+ icon = "fa-solid fa-store",
+ label = ps.lang('Deliveries.targetOpenShop'),
+ action = function()
+ local rep = GetRep()
+ local items = ps.callback('md-drugs:server:dealerList')
+ local options = {}
+ for m, d in pairs (items) do
+ if rep.dealerrep >= d.minrep then
+ options[#options+1] = {
+ title = ps.getLabel(d.name),
+ description = '$' .. d.price,
+ icon = ps.getImage(d.name),
+ action = function()
+ TriggerServerEvent('md-drugs:server:buyItemDealer', m)
+ end,
+ }
+ end
+ end
+ ps.menu(ps.lang('Deliveries.shopHeader'), ps.lang('Deliveries.shopHeader'), options)
+ end,
+ }
+ })
end
end
@@ -46,11 +61,11 @@ RegisterNetEvent('md-drugs:client:setLocation', function(data)
isActive = true
local Buyer = CreatePed(0, "g_m_y_famdnf_01",coord.x, coord.y, coord.z-1, coord.w, false, false)
Freeze(Buyer, true, coord.w)
- AddSingleModel(Buyer, {
+ ps.entityTarget(Buyer, {
icon = 'fas fa-user-secret',
- label = Lang.targets.Delivery.hand,
+ label = ps.lang('Deliveries.targetHandOff'),
action = function()
- if not progressbar(Lang.Delivery.pack, 4000, 'uncuff') then return end
+ if not progressbar(ps.lang('Deliveries.delivering'), 4000, 'uncuff') then return end
isActive = false
DeletePed(Buyer)
TriggerServerEvent('md-drugs:server:giveDeliveryItems', data.item, data.amount)
diff --git a/client/functions.lua b/client/functions.lua
index 25e58c3..f8d0f22 100644
--- a/client/functions.lua
+++ b/client/functions.lua
@@ -13,50 +13,24 @@ function loadParticle(dict)
SetPtfxAssetNextCall(dict)
end
-function LoadModel(hash)
- RequestModel(hash)
- while not HasModelLoaded(hash) do
- Wait(0)
- end
-end
-
function minigame()
local time = 0
local game = Config.Minigames
if minigametype == 'ps_circle' then
- local check
- exports['ps-ui']:Circle(function(success)
- check = success
- end, game['ps_circle'].amount, game['ps_circle'].speed)
+ local check = exports['ps-ui']:Circle(false, game['ps_circle'].amount, game['ps_circle'].speed)
return check
elseif minigametype == 'ps_maze' then
- local check
- exports['ps-ui']:Maze(function(success)
- check = success
- end, game['ps_maze'].timelimit)
- repeat Wait(10) until check ~= nil
+ local check = exports['ps-ui']:Maze(false, game['ps_maze'].timelimit)
return check
elseif minigametype == 'ps_scrambler' then
- local check
- exports['ps-ui']:Scrambler(function(success)
- check = success
- end, game['ps_scrambler'].type, game['ps_scrambler'].time, game['ps_scrambler'].mirrored)
- repeat Wait(10) until check ~= nil
+ local check = exports['ps-ui']:Scrambler(false, game['ps_scrambler'].type, game['ps_scrambler'].time, game['ps_scrambler'].mirrored)
return check
elseif minigametype == 'ps_var' then
- local check
- exports['ps-ui']:VarHack(function(success)
- check = success
- end, game['ps_var'].numBlocks, game['ps_var'].time)
- repeat Wait(10) until check ~= nil
+ local check = exports['ps-ui']:VarHack(false, game['ps_var'].numBlocks, game['ps_var'].time)
return check
elseif minigametype == 'ps_thermite' then
- local check
- exports['ps-ui']:Thermite(function(success)
- check = success
- end, game['ps_thermite'].time, game['ps_thermite'].gridsize, game['ps_thermite'].incorrect)
- repeat Wait(10) until check ~= nil
- return check
+ local check = exports['ps-ui']:Thermite(false, game['ps_thermite'].time, game['ps_thermite'].gridsize, game['ps_thermite'].incorrect)
+ return check
elseif minigametype == 'ox' then
local success = lib.skillCheck(game['ox'], {'1', '2', '3', '4'})
return success
@@ -129,63 +103,6 @@ function sorter(sorting, value)
table.sort(sorting, function(a, b) return a[value] < b[value] end)
end
-function makeMenu(name, rep)
- local menu = {}
- local data = ps.callback('md-drugs:server:menu', name)
- for k, v in pairs (data.table) do
- local allow = false
- if rep == nil then
- allow = true
- else
- if rep.dealerrep >= v.minrep then allow = true end
- end
- if allow then
- menu[#menu + 1] = {
- icon = GetImage(v.name),
- description = '$'.. v.price,
- title = GetLabel(v.name),
- onSelect = function()
- local settext = "Cost: $"..v.price
- local dialog = exports.ox_lib:inputDialog(v.name .."!", {
- { type = 'select', label = "Payment Type", default = "cash", options = { { value = "cash"}, { value = "bank"},}},
- { type = 'number', label = "Amount to buy", description = settext, min = 0, max = v.amount, default = 1 },
- })
- if not dialog[1] then return end
- TriggerServerEvent("md-drugs:server:purchaseGoods", dialog[2], dialog[1], v.name, v.price, data.table, k)
- end,
- }
- end
- end
- sorter(menu, 'title')
- lib.registerContext({id = data.id, title = data.title, options = menu})
-end
-
-
-function Email(sender, subject, message)
- if Config.Phone == 'yflip' then
- local receiver = GetPlayerServerId(PlayerId())
- local insertId, received = exports["yflip-phone"]:SendMail({
- title = subject,
- sender = sender,
- senderDisplayName = sender,
- content = message,
- }, 'phoneNumber', receiver)
- elseif Config.Phone == 'qs' then
- TriggerServerEvent('qs-smartphone:server:sendNewMail', {
- sender = sender,
- subject = subject,
- message = message,
- button = {}
- })
- else
- TriggerServerEvent('qb-phone:server:sendNewMail', {
- sender = sender,
- subject = subject,
- message = message,
- })
- end
-end
-
function PoliceCall(chance)
local math = math.random(1,100)
if math <= chance then
@@ -242,28 +159,18 @@ function Freeze(entity, toggle, head)
SetBlockingOfNonTemporaryEvents(entity, toggle)
end
-function tele(coords)
- DoScreenFadeOut(500)
- Wait(1000)
- SetEntityCoords(PlayerPedId(),coords.x, coords.y, coords.z)
- Wait(1000)
- DoScreenFadeIn(500)
-end
-
-
-
local created = false
local heading = 180.0
function StartRay()
local run = true
local pedcoord = GetEntityCoords(PlayerPedId())
- lib.requestModel('v_ret_ml_tablea', 30000)
+ ps.requestModel('v_ret_ml_tablea', 30000)
local table = CreateObject('v_ret_ml_tablea', pedcoord.x, pedcoord.y, pedcoord.z+1, heading, false, false)
repeat
- local hit, entityHit, endCoords, surfaceNormal, matHash = lib.raycast.cam(511, 4, 10)
+ local hit, endCoords, surfaceNormal, entityHit = ps.raycast()
if not created then
created = true
- lib.showTextUI([[[E] To Place
+ ps.drawText([[[E] To Place
[DEL] To Cancel
[<-] To Move Left
[->] To Move Right]])
@@ -280,7 +187,7 @@ function StartRay()
heading = heading + 2
end
if IsControlPressed(0, 38) then
- lib.hideTextUI()
+ ps.hideText()
run = false
DeleteObject(table)
created = false
@@ -288,7 +195,7 @@ function StartRay()
end
if IsControlPressed(0, 178) then
- lib.hideTextUI()
+ ps.hideText()
run = false
created = false
DeleteObject(table)
@@ -301,13 +208,13 @@ end
function StartRay2()
local run = true
local pedcoord = GetEntityCoords(PlayerPedId())
- lib.requestModel('bkr_prop_coke_press_01aa', 30000)
+ ps.requestModel('bkr_prop_coke_press_01aa', 30000)
local table = CreateObject('bkr_prop_coke_press_01aa', pedcoord.x, pedcoord.y, pedcoord.z+1, heading, false, false)
repeat
- local hit, entityHit, endCoords, surfaceNormal, matHash = lib.raycast.cam(511, 4, 10)
+ local hit, endCoords, surfaceNormal, entityHit = ps.raycast()
if not created then
created = true
- lib.showTextUI([[[E] To Place
+ ps.drawText([[[E] To Place
[DEL] To Cancel
[<-] To Move Left
[->] To Move Right]])
@@ -324,7 +231,7 @@ function StartRay2()
heading = heading + 2
end
if IsControlPressed(0, 38) then
- lib.hideTextUI()
+ ps.hideText()
run = false
DeleteObject(table)
created = false
@@ -332,7 +239,7 @@ function StartRay2()
end
if IsControlPressed(0, 178) then
- lib.hideTextUI()
+ ps.hideText()
run = false
created = false
DeleteObject(table)
@@ -343,10 +250,10 @@ function StartRay2()
end
CreateThread(function()
- LoadModel('prop_plant_01b')
- LoadModel('prop_plant_01a')
- LoadModel('prop_cactus_03')
- LoadModel('prop_weed_01')
+ ps.requestModel('prop_plant_01b')
+ ps.requestModel('prop_plant_01a')
+ ps.requestModel('prop_cactus_03')
+ ps.requestModel('prop_weed_01')
TriggerEvent('weed:init')
TriggerEvent('heroin:init')
TriggerEvent('coke:init')
@@ -363,18 +270,13 @@ end)
RegisterCommand('DrugRep', function()
if not Config.TierSystem then return end
local rep = ps.callback('md-drugs:server:GetRep', false)
- lib.registerContext({
- id = 'DrugRep',
- title = 'Drug Reputation',
- options = {
- {icon = "fa-solid fa-face-flushed", title = 'Cocaine: '..rep.coke},
- {icon = "fa-solid fa-syringe", title = 'Heroin: '..rep.heroin},
- {icon = "fa-solid fa-vial", title = 'LSD: '..rep.lsd},
- {icon = "fa-solid fa-plug", title = 'Dealer: '..rep.dealerrep},
- {icon = "fa-solid fa-money-bill", title = 'Corner Selling: ' .. rep.cornerselling.rep, description = 'Rank: ' .. rep.cornerselling.label }
- }
- })
- lib.showContext('DrugRep')
+ ps.menu('Drug Rep', 'Drug Rep', {
+ {icon = "fa-solid fa-face-flushed", title = 'Cocaine: '..rep.coke},
+ {icon = "fa-solid fa-syringe", title = 'Heroin: '..rep.heroin},
+ {icon = "fa-solid fa-vial", title = 'LSD: '..rep.lsd},
+ {icon = "fa-solid fa-plug", title = 'Dealer: '..rep.dealerrep},
+ {icon = "fa-solid fa-money-bill", title = 'Corner Selling: ' .. rep.cornerselling.rep, description = 'Rank: ' .. rep.cornerselling.label }
+ })
end, false)
function handleGang(gang)
diff --git a/client/heroin.lua b/client/heroin.lua
index 7e98113..5142730 100644
--- a/client/heroin.lua
+++ b/client/heroin.lua
@@ -9,19 +9,18 @@ local function createLabKit(coord, head)
ps.entityTarget(heroinlabkit, {
{
icon = "fa-solid fa-temperature-high",
- label = ps.lang('Heroin.cook'),
+ label = ps.lang('heroin.targetCook'),
action = function()
if not ps.hasItem('emptyvial') then return end
if not minigame() then
dirty = true
TriggerServerEvent("md-drugs:server:failheatingheroin")
ps.requestPTFX("core")
- lib.requestNamedPtfxAsset("core")
local heroinkit = StartParticleFxLoopedOnEntity("exp_air_molotov", heroinlabkit, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.5, false, false, false)
SetParticleFxLoopedAlpha(heroinkit, 3.0)
SetPedToRagdoll(PlayerPedId(), 1300, 1300, 0, 0, 0, 0)
return end
- if not ps.progressbar(ps.lang('Heroin.success'), 4000, 'uncuff') then return end
+ if not ps.progressbar(ps.lang('heroin.pbCook'), 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:heatliquidheroin")
end,
canInteract = function()
@@ -30,9 +29,9 @@ local function createLabKit(coord, head)
},
{
icon = "fas fa-box-circle-check",
- label = ps.lang('Heroin.up'),
+ label = ps.lang('heroin.targetPickup'),
action = function()
- if not ps.progressbar(ps.lang('Heroin.pickup'), 4000, 'uncuff') then return end
+ if not ps.progressbar(ps.lang('heroin.pbPickup'), 4000, 'uncuff') then return end
herointable = false
DeleteObject(heroinlabkit)
TriggerServerEvent("md-drugs:server:getheroinlabkitback")
@@ -43,12 +42,11 @@ local function createLabKit(coord, head)
end
},
{
- event = "md-drugs:client:cleanheroinlabkit",
icon = "fa-solid fa-hand-sparkles",
- label = ps.lang('Heroin.clean'),
+ label = ps.lang('heroin.targetClean'),
action = function()
if not ps.hasItem('cleaningkit') then return end
- if not ps.progressbar(ps.lang('Heroin.clean'), 4000, 'clean') then return end
+ if not ps.progressbar(ps.lang('heroin.pbClean'), 4000, 'clean') then return end
local done = ps.callback('removeCleaningkit', false)
if done then dirty = false end
end,
@@ -62,10 +60,10 @@ end
for k, v in pairs (locations.dryplant) do
ps.boxTarget('dryHeroin'..k, v.loc, {length = v.l, width = v.w, height = 1.0, rotation = v.rot}, {
{
- label = ps.lang('targets.heroin.dry'),
+ label = ps.lang('heroin.targetDry'),
icon = 'fa-solid fa-temperature-high',
action = function()
- if not ps.progressbar(ps.lang('Heroin.dryout'), 4000, 'uncuff') then return end
+ if not ps.progressbar(ps.lang('heroin.pbDry'), 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:dryplant", k)
end,
canInteract = function()
@@ -78,11 +76,11 @@ end
for k, v in pairs (locations.cutheroinone) do
ps.boxTarget('cutHeroin'..k, v.loc, {length = v.l, width = v.w, height = 1.0, rotation = v.rot}, {
{
- label = ps.lang('targets.heroin.cut'),
+ label = ps.lang('heroin.targetCutHeroin'),
icon = 'fa-solid fa-seedling',
action = function()
if not ps.hasItem('bakingsoda') then return end
- if not ps.progressbar(ps.lang('Heroin.cutting'), 4000, 'uncuff') then return end
+ if not ps.progressbar(ps.lang('heroin.pbCutHeroin'), 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:cutheroin", k)
end,
canInteract = function()
@@ -100,15 +98,16 @@ for k, v in pairs (locations.buyKit) do
SetEntityInvincible(peds[k], true)
ps.entityTarget(peds[k], {
{
- label = ps.lang('targets.heroin.buykit'),
+ label = ps.lang('heroin.targetBuyKit'),
icon = 'fa-solid fa-box-open',
action = function()
- if not ps.progressbar(ps.lang('Heroin.secret'), 4000, 'uncuff') then return end
+ if not ps.progressbar(ps.lang('heroin.pbBuyKit'), 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:getheroinlabkit", k)
end,
canInteract = function()
- return true
- end
+ if not handleGang(v.gang) then return false end
+ return true
+ end
}
})
end
@@ -116,13 +115,13 @@ end
ps.registerCallback("md-drugs:client:setheroinlabkit", function()
if herointable then
- ps.notify(ps.lang('Heroin.tableout'), 'error')
+ ps.notify(ps.lang('heroin.tableout'), 'error')
return false
else
herointable = true
local location, head = StartRay()
if not location then herointable = false return end
- if not ps.progressbar(ps.lang('Heroin.table'), 4000, 'uncuff') then return end
+ if not ps.progressbar(ps.lang('heroin.placing'), 4000, 'uncuff') then return end
createLabKit(location, head)
return true, location
end
@@ -131,11 +130,11 @@ end)
for k, v in pairs (locations.fillneedle) do
ps.boxTarget('fillNeedle'..k, v.loc, {length = v.l, width = v.w, height = 1.0, rotation = v.rot}, {
{
- label = ps.lang('targets.heroin.fill'),
+ label = ps.lang('heroin.targetFill'),
icon = 'fa-solid fa-syringe',
action = function()
if not minigame() then TriggerServerEvent("md-drugs:server:failheroin", k) return end
- if not ps.progressbar(ps.lang('Heroin.needles'), 4000, 'uncuff') then return end
+ if not ps.progressbar(ps.lang('heroin.pbFill'), 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:fillneedle", k)
end,
canInteract = function()
diff --git a/client/lean.lua b/client/lean.lua
index d268f5d..c7ba289 100644
--- a/client/lean.lua
+++ b/client/lean.lua
@@ -38,7 +38,7 @@ local function SpawnCarPedChase()
{
name = 'leancar',
icon = 'fa-solid fa-car',
- label = Lang.targets.lean.st,
+ label = ps.lang('lean.stealFromTruck'),
action = function()
hit = hit + 1
if not minigame() then return end
@@ -68,10 +68,14 @@ for k, v in pairs (location.SyrupVendor) do
ps.entityTarget(leanPeds[k], {
{
icon = "fa-solid fa-hand-holding-medical",
- label = ps.lang('Lean.buylean'),
+ label = ps.lang('lean.startMission'),
action = function()
SpawnCarPedChase()
end,
+ canInteract = function()
+ if not handleGang(v.gang) then return false end
+ return true
+ end
},
})
end
\ No newline at end of file
diff --git a/client/lsd.lua b/client/lsd.lua
index 2b9d048..a51dd8d 100644
--- a/client/lsd.lua
+++ b/client/lsd.lua
@@ -11,16 +11,9 @@ local function createLabKit(coord, head)
local options = {
{
icon = "fa-solid fa-temperature-high",
- label = ps.lang('targets.lsd.heat'),
+ label = ps.lang('lsd.targetHeat'),
action = function()
local dict = "scr_ie_svm_technical2"
- if not ps.hasItems({
- lysergic_acid = 1,
- diethylamide = 1
- }) then
- ps.notify(ps.lang('lsd.need'), 'error')
- return
- end
if not minigame() then
dirtylsd = true
loadParticle(dict)
@@ -28,7 +21,7 @@ local function createLabKit(coord, head)
SetParticleFxLoopedAlpha(exitPtfx, 3.0)
return
end
- if not ps.progressbar(ps.lang('lsd.heat'), 7000, 'uncuff') then return end
+ if not ps.progressbar(ps.lang('lsd.heating'), 7000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:heatliquid")
end,
canInteract = function()
@@ -37,11 +30,11 @@ local function createLabKit(coord, head)
},
{
icon = "fa-solid fa-temperature-high",
- label = ps.lang('targets.lsd.refine'),
+ label = ps.lang('lsd.targetRefine'),
action = function()
if not ps.hasItem('lsd_one_vial') then return end
if not minigame() then TriggerServerEvent("md-drugs:server:failrefinequality") return end
- if not ps.progressbar(ps.lang('lsd.refine'), 4000, 'uncuff') then return end
+ if not ps.progressbar(ps.lang('lsd.refining'), 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:refinequalityacid")
end,
canInteract = function()
@@ -50,11 +43,11 @@ local function createLabKit(coord, head)
},
{
icon = "fa-regular fa-note-sticky",
- label = ps.lang('targets.lsd.dab'),
+ label = ps.lang('lsd.targetDipping'),
action = function()
- if not ps.hasItem('tab_paper') then return end
+ if not ps.hasItem('tab_paper') then return end
if not minigame() then TriggerServerEvent("md-drugs:server:failtabs") return end
- if not ps.progressbar(ps.lang('lsd.dip'), 4000, 'uncuff') then return end
+ if not ps.progressbar(ps.lang('lsd.dipping'), 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:maketabpaper")
end,
canInteract = function()
@@ -64,9 +57,9 @@ local function createLabKit(coord, head)
{
event = "md-drugs:client:getlabkitback",
icon = "fas fa-box-circle-check",
- label = ps.lang('targets.lsd.back'),
+ label = ps.lang('lsd.targetPickup'),
action = function()
- if not ps.progressbar(ps.lang('lsd.tablepack'), 4000, 'uncuff') then return end
+ if not ps.progressbar(ps.lang('lsd.packup'), 4000, 'uncuff') then return end
DeleteObject(labkit)
TriggerServerEvent('md-drugs:server:getlabkitback')
tableout = false
@@ -77,13 +70,13 @@ local function createLabKit(coord, head)
},
{
icon = "fa-solid fa-hand-sparkles",
- label = ps.lang('targets.lsd.clean'),
+ label = ps.lang('lsd.targetClean'),
action = function()
if not ps.hasItem('cleaningkit') then
- ps.notify(ps.lang('lsd.needclean'), 'error')
+ ps.notify(ps.lang('lsd.needCleaning'), 'error')
return
end
- if not ps.progressbar(ps.lang('lsd.clean'), 4000, 'clean') then return end
+ if not ps.progressbar(ps.lang('lsd.cleaning'), 4000, 'clean') then return end
local check = ps.callback('md-drugs:server:removecleaningkit')
if check then
dirtylsd = false
@@ -98,12 +91,11 @@ end
for k, v in pairs (locations.lysergicacid) do
ps.boxTarget('lysergicacid'..k, v.loc, {length = v.l, width = v.w, height = 1.0, rotation = v.rot}, {
{
- label = ps.lang('targets.lsd.lys'),
+ label = ps.lang('lsd.targetLys'),
icon = 'fa-solid fa-temperature-high',
action = function()
- if not ps.hasItem('empty_weed_bag') then return end
if not minigame() then TriggerServerEvent("md-drugs:server:faillysergic") return end
- if not ps.progressbar(ps.lang('lsd.steallys'), 4000, 'uncuff') then return end
+ if not ps.progressbar(ps.lang('lsd.stealLys'), 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:getlysergic", k)
end,
canInteract = function()
@@ -117,12 +109,12 @@ end
for k, v in pairs (locations.diethylamide) do
ps.boxTarget('diethylamide'..k, v.loc, {length = v.l, width = v.w, height = 1.0, rotation = v.rot}, {
{
- label = ps.lang('targets.lsd.die'),
+ label = ps.lang('lsd.targetDie'),
icon = 'fa-solid fa-temperature-high',
action = function()
if not ps.hasItem('empty_weed_bag') then return end
if not minigame() then TriggerServerEvent("md-drugs:server:faildiethylamide") return end
- if not ps.progressbar(ps.lang('lsd.stealdie'), 4000, 'uncuff') then return end
+ if not ps.progressbar(ps.lang('lsd.stealDie'), 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:getdiethylamide", k)
end,
canInteract = function()
@@ -136,10 +128,9 @@ end
for k, v in pairs (locations.gettabs) do
ps.boxTarget('gettabs'..k, v.loc, {length = v.l, width = v.w, height = 1.0, rotation = v.rot}, {
{
- label = ps.lang('targets.lsd.buyt'),
+ label = ps.lang('lsd.targetBuyTab'),
icon = 'fa-solid fa-hand-holding-dollar',
action = function()
- if not ps.hasItem('lsdlabkit') then ps.notify(ps.lang('lsd.havlabkit'), 'error') return end
TriggerEvent("md-drugs:client:buytabs", k)
end,
canInteract = function()
@@ -156,11 +147,11 @@ for k, v in pairs (locations.buyLSDkit) do
Freeze(seller[k], true, v.loc.w)
ps.entityTarget(seller[k], {
{
- label = ps.lang('targets.lsd.buy'),
+ label = ps.lang('lsd.targetBuyKit'),
icon = 'fa-solid fa-hand-holding-dollar',
action = function()
- if ps.hasItem('lsdlabkit') then ps.notify(ps.lang('lsd.havlabkit'), 'error') return end
- if not ps.progressbar(ps.lang('lsd.buykit'), 4000, 'uncuff') then return end
+ if ps.hasItem('lsdlabkit') then ps.notify(ps.lang('lsd.alreadyOwn'), 'error') return end
+ if not ps.progressbar(ps.lang('lsd.buyingKit'), 4000, 'uncuff') then return end
TriggerServerEvent('md-drugs:server:getlabkit', k)
end,
canInteract = function()
@@ -179,7 +170,7 @@ ps.registerCallback("md-drugs:client:setlsdlabkit", function()
tableout = true
local loc, head = StartRay()
if not loc then tableout = false return end
- if not ps.progressbar(ps.lang('lsd.place'), 4000, 'uncuff') then return end
+ if not ps.progressbar(ps.lang('lsd.placing'), 4000, 'uncuff') then return end
createLabKit(loc, head)
return true, loc
end
diff --git a/client/mescaline.lua b/client/mescaline.lua
index 963a23f..64a35e6 100644
--- a/client/mescaline.lua
+++ b/client/mescaline.lua
@@ -2,11 +2,11 @@ local locations = ps.callback('md-drugs:server:GetMescalineLocs')
for k, v in pairs (locations.DryOutMescaline) do
ps.boxTarget('dryoutMesc'..k, v.loc, {length = v.l, width = v.w, height = 1.0, rotation = v.rot}, {
{
- label = ps.lang('mescaline.dry'),
+ label = ps.lang('mesc.targetDry'),
icon = 'fa-solid fa-temperature-high',
action = function()
- if not ps.hasItem('cactusbulb') then ps.notify(ps.lang('mescaline.needbulb'), 'error') return end
- if not ps.progressbar(ps.lang('mescaline.dry'), 4000, 'drymescaline') then return end
+ if not ps.hasItem('cactusbulb') then ps.notify(ps.lang('Catches.itemNeeded', ps.getLabel('cactusbulb')), 'error') return end
+ if not ps.progressbar(ps.lang('mescaline.dry'), 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:drymescaline", k)
end,
canInteract = function()
diff --git a/client/meth.lua b/client/meth.lua
index 584900a..dacc97a 100644
--- a/client/meth.lua
+++ b/client/meth.lua
@@ -11,7 +11,7 @@ local function SpawnMethCarPedChase()
local stoploc = vector3(-1157.63, -3056.71, 13.94)
local start = locations.StartLoc[math.random(1,#locations.StartLoc)]
if startedmeth then
- ps.notify(ps.lang('meth.act'),'error')
+ ps.notify(ps.lang('meth.alreadyChasing'),'error')
else
startedmeth = true
ps.callback('md-drugs:server:RegisterMeth')
@@ -42,7 +42,7 @@ local function SpawnMethCarPedChase()
{
name = 'methcar',
icon = 'fa-solid fa-car',
- label = Lang.targets.meth.stealfromcar,
+ label = ps.lang('meth.targetStealFromCar'),
action = function()
if not minigame() then return end
TriggerServerEvent('md-drugs:server:givemethingridients')
@@ -71,9 +71,9 @@ for k, v in pairs (locations.MethHeist) do
{
name = 'methheist'..k,
icon = 'fa-solid fa-user-secret',
- label = ps.lang('targets.meth.heist'),
+ label = ps.lang('meth.targetHeist'),
action = function()
- if startedmeth then ps.notify(ps.lang('meth.act'),'error') return end
+ if startedmeth then ps.notify(ps.lang('meth.alreadyChasing'),'error') return end
SpawnMethCarPedChase()
end,
canInteract = function()
@@ -239,7 +239,7 @@ local function startcook(num, coords, offset, rotation)
MethCooking(coords, offset, rotation)
amonia = true
else
- ps.notify(ps.lang('meth.inside'), "error")
+ ps.notify(ps.lang('meth.started'), "error")
end
end
@@ -251,7 +251,7 @@ local function dials(coords)
amonia = false
active = false
return end
- ps.notify(ps.lang('meth.increaseheat'), "success")
+ ps.notify(ps.lang('meth.increaseHeat'), "success")
heated = true
end
end
@@ -266,7 +266,7 @@ local function smash(coords, offset, rotation, buckets, k)
{
name = 'bucket',
icon = "fa-solid fa-sack-xmark",
- label = ps.lang('targets.meth.bag'),
+ label = ps.lang('meth.targetBag'),
canInteract = function()
if active == false then return false end
end,
@@ -309,22 +309,25 @@ end)
for k, v in pairs (locations.CookMeth) do
ps.boxTarget('cookMeth'..k, v.loc, {length = v.l, width = v.w, rotation = v.rot, height = 1.0},{
{
- label = 'Cook Meth',
+ label = ps.lang('meth.targetCook'),
icon = 'fa-solid fa-temperature-high',
action = function()
startcook(k, v.loc, v.offset or vec3(0,0,0), v.rotation or vector3(0,0,180.0))
end,
canInteract = function()
+ if not handleGang(v.gang) then return false end
if not amonia and not active then
return true
end
+
end,
},
{
icon = "fas fa-sign-in-alt",
- label = ps.lang('targets.meth.tray'),
+ label = ps.lang('meth.targetGrabTray'),
action = function() trayscarry() end,
canInteract = function()
+ if not handleGang(v.gang) then return false end
if heated and amonia and not tray then
return true
end
@@ -338,11 +341,12 @@ for k, v in pairs (locations.MethDials) do
{
name = 'adjustdials',
icon = "fa-solid fa-temperature-three-quarters",
- label = ps.lang('targets.meth.adjust'),
+ label = ps.lang('meth.targetHeat'),
action = function()
dials(locations.CookMeth[k].loc)
end,
canInteract = function()
+ if not handleGang(v.gang) then return false end
if amonia and heated == false then return true end
end
}
@@ -354,11 +358,12 @@ for k, v in pairs (locations.MethSmash) do
{
name = 'smash',
icon = "fa-solid fa-weight-scale",
- label = ps.lang('targets.meth.smash'),
+ label = ps.lang('meth.targetSmash'),
action = function()
smash(v.loc, v.offset, v.rotation, v.bucket,k)
end,
canInteract = function()
+ if not handleGang(v.gang) then return false end
if heated and amonia and tray then return true end
end
}
@@ -372,30 +377,33 @@ RegisterCommand('offset', function()
print("Offset: ", offset)
end)
-if not Config.MethHeist then
- for k, v in pairs (locations.MethEph) do
- ps.boxTarget('stealMethEph'..k, v.loc, {length = v.l, width = v.w, rotation = v.rot, height = 1.0},{
- {
- label = 'Steal Ephedrine',
- icon = 'fa-solid fa-bucket',
- action = function()
- if not ps.progressbar('Stealing Ephedrine', 4000, 'uncuff') then return end
- TriggerServerEvent("md-drugs:server:geteph", k)
- end,
- }
- })
- end
-
- for k, v in pairs (locations.Methace) do
- ps.boxTarget('stealMethAce'..k, v.loc, {length = v.l, width = v.w, rotation = v.rot, height = 1.0},{
- {
- label = 'Steal Acetone',
- icon = 'fa-solid fa-bucket',
- action = function()
- if not ps.progressbar('Stealing Acetone', 4000, 'uncuff') then return end
- TriggerServerEvent("md-drugs:server:getace", k)
- end,
- }
- })
- end
+for k, v in pairs (locations.MethEph) do
+ ps.boxTarget('stealMethEph'..k, v.loc, {length = v.l, width = v.w, rotation = v.rot, height = 1.0},{
+ {
+ label = ps.lang('meth.targetStealEPH'),
+ icon = 'fa-solid fa-bucket',
+ action = function()
+ if not ps.progressbar(ps.lang('meth.stealingEPH'), 4000, 'uncuff') then return end
+ TriggerServerEvent("md-drugs:server:geteph", k)
+ end,
+ canInteract = function()
+ return handleGang(v.gang)
+ end
+ }
+ })
+end
+for k, v in pairs (locations.Methace) do
+ ps.boxTarget('stealMethAce'..k, v.loc, {length = v.l, width = v.w, rotation = v.rot, height = 1.0},{
+ {
+ label = ps.lang('meth.targetStealACE'),
+ icon = 'fa-solid fa-bucket',
+ action = function()
+ if not ps.progressbar(ps.lang('meth.stealingACE'), 4000, 'uncuff') then return end
+ TriggerServerEvent("md-drugs:server:getace", k)
+ end,
+ canInteract = function()
+ return handleGang(v.gang)
+ end
+ }
+ })
end
\ No newline at end of file
diff --git a/client/oxyruns.lua b/client/oxyruns.lua
index b33cfd6..47e6b02 100644
--- a/client/oxyruns.lua
+++ b/client/oxyruns.lua
@@ -1,10 +1,11 @@
local carryPackage = nil
local onMission = false
local locations = ps.callback('md-drugs:server:GetOxyLocs')
+
local function getRoute()
local Route = ps.callback('md-drugs:server:getRoute')
if not Route then
- ps.notify(ps.lang('oxy.done'), "success")
+ ps.notify(ps.lang('oxy.ditchCar'), "error")
onMission = false
return false
end
@@ -23,11 +24,11 @@ local function getRoute()
PoliceCall(Config.PoliceAlertOxy)
ps.entityTarget(oxybuyer,{
{
- label = ps.lang('targets.oxy.talk'),
+ label = ps.lang('oxy.targetHandoff'),
icon = "fa-solid fa-dollar-sign",
action = function()
if carryPackage then
- if not ps.progressbar(ps.lang('oxy.hand'), 4000, 'uncuff') then return end
+ if not ps.progressbar(ps.lang('oxy.handingoff'), 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:giveoxybox")
DeleteEntity(oxybuyer)
DetachEntity(carryPackage, true, true)
@@ -35,7 +36,7 @@ local function getRoute()
carryPackage = nil
getRoute()
else
- ps.notify(ps.lang('oxy.empty'), "error")
+ ps.notify(ps.lang('oxy.emptyHands'), "error")
end
end
}
@@ -46,7 +47,7 @@ for k, v in pairs(locations.OxyPayForTruck) do
ps.boxTarget('oxyTruckPur' ..k , v.loc, {length = v.l, width = v.w, heading = v.rot}, {
{
icon = 'fa-solid fa-truck-fast',
- label = ps.lang('targets.oxy.buytruck'),
+ label = ps.lang('oxy.targetPay'),
action = function()
ps.requestModel("burrito3", Config.RequestModelTime)
@@ -56,17 +57,17 @@ for k, v in pairs(locations.OxyPayForTruck) do
exports[Config.Fuel]:SetFuel(oxycar, 100.0)
TriggerEvent("vehiclekeys:client:SetOwner", GetVehicleNumberPlateText(oxycar))
- ps.notify(ps.lang('oxy.truck'), 'success')
+ ps.notify(ps.lang('oxy.keys'), 'success')
onMission = true
getRoute()
ps.entityTarget(oxycar, {
{
icon = "fa-solid fa-box",
- label = ps.lang('targets.oxy.pack'),
+ label = ps.lang('oxy.targetGetPackage'),
action = function()
if carryPackage then
- ps.notify(ps.lang('oxy.cantcarry'), "error")
+ ps.notify(ps.lang('oxy.alreadyCarrying'), "error")
else
local pos = GetEntityCoords(PlayerPedId(), true)
ps.requestAnim('anim@heists@box_carry@')
@@ -76,6 +77,9 @@ for k, v in pairs(locations.OxyPayForTruck) do
AttachEntityToEntity(carryPackage, PlayerPedId(), GetPedBoneIndex(PlayerPedId(), 57005), 0.05, 0.1, -0.3, 300.0, 250.0, 20.0, true, true, false, true, 1, true)
end
end,
+ canInteract = function()
+ return handleGang(v.gang)
+ end
}
})
end,
diff --git a/client/pharma.lua b/client/pharma.lua
index 52a81c1..aee3fad 100644
--- a/client/pharma.lua
+++ b/client/pharma.lua
@@ -1,17 +1,18 @@
local locations = ps.callback('md-drugs:server:GetPharmaLocs')
+
ps.registerCallback("md-drugs:client:prescriptionpad", function(data, op)
if ps.getJobType() ~= 'ems' then return end
- local input = exports.ps_lib:input('Who To Give A Prescription To?',{
- {type = 'select', title = 'Player Name', options = data},
- {type = 'select', title = 'Prescription', options = op}
+ local input = ps.input(ps.lang('pharma.input.header'), {
+ {type = 'select', title = ps.lang('pharma.input.title1'), options = data},
+ {type = 'select', title = ps.lang('pharma.input.title2'), options = op}
})
if not input[1] then return end
- if not ps.progressbar(ps.lang('Pharma.write'), 4000, 'notepad') then return end
+ if not ps.progressbar(ps.lang('pharma.write'), 4000, 'notepad') then return end
return {who = input[1], what = input[2]}
end)
ps.registerCallback("md-drugs:client:unbottle", function()
- if not ps.progressbar(ps.lang('Pharma.open'), 4000, 'uncuff') then return end
+ if not ps.progressbar(ps.lang('pharma.opening'), 4000, 'uncuff') then return end
return true
end)
@@ -20,11 +21,11 @@ for k, v in pairs (locations.FillPrescription) do
ps.boxTarget('pharma' ..k , v.loc, {length = v.l, width = v.w, heading = v.rot}, {
{
icon = 'fa-solid fa-capsules',
- label = ps.lang('Pharma.fillprescription'),
+ label = ps.lang('pharma.targetFill'),
action = function()
- if not ps.progressbar(ps.lang('Pharma.fill'), 4000, 'uncuff') then return end
+ if not ps.progressbar(ps.lang('pharma.fill'), 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:fillprescription", k)
- end
+ end,
}
})
end
\ No newline at end of file
diff --git a/client/plantSpawns.lua b/client/plantSpawns.lua
index bcfdfaa..756d0d7 100644
--- a/client/plantSpawns.lua
+++ b/client/plantSpawns.lua
@@ -1,64 +1,44 @@
local DrugPlants = {
- {model = 'prop_plant_01a', label = 'coke', langs = ps.lang('targets.coke.pick'), tbl = GlobalState.CocaPlant, plantTbl = {},
+ {model = 'prop_plant_01a', label = 'coke', langs = ps.lang('coke.targetPick'), tbl = GlobalState.CocaPlant, plantTbl = {},
pick = function(loc)
- if not ps.progressbar(ps.lang('Coke.picking'), 4000, 'uncuff') then return end
+ if not ps.progressbar(ps.lang('coke.picking'), 4000, 'uncuff') then return end
TriggerServerEvent("coke:pickupCane", loc)
return true
end,
- target = {
- icon = "fa-solid fa-seedling",
- label = ps.lang('targets.coke.pick'),
- },
allow = Config.Drugs.cocaine,
},
- {model = 'prop_plant_01b', label = 'heroin',langs = ps.lang('targets.heroin.pick'), tbl = GlobalState.PoppyPlants, plantTbl = {},
+ {model = 'prop_plant_01b', label = 'heroin',langs = ps.lang('heroin.targetPick'), tbl = GlobalState.PoppyPlants, plantTbl = {},
pick = function(loc)
- if not ps.progressbar(ps.lang('Heroin.pick'), 4000, 'uncuff') then return end
+ if not ps.progressbar(ps.lang('heroin.picking'), 4000, 'uncuff') then return end
TriggerServerEvent("heroin:pickupCane", loc)
return true
end,
- target = {
- icon = "fa-solid fa-seedling",
- label = ps.lang('targets.heroin.pick'),
- },
allow = Config.Drugs.heroin,
},
- {model = 'prop_cactus_03', label = 'Mescaline', langs = ps.lang('targets.mescaline.pick'), tbl = GlobalState.Mescaline, plantTbl = {},
+ {model = 'prop_cactus_03', label = 'Mescaline', langs = ps.lang('mesc.targetPick'), tbl = GlobalState.Mescaline, plantTbl = {},
pick = function(loc)
- if not ps.progressbar(ps.lang('mescaline.pick'), 4000, 'uncuff') then return end
+ if not ps.progressbar(ps.lang('mesc.picking'), 4000, 'uncuff') then return end
TriggerServerEvent("Mescaline:pickupCane", loc)
return true
end,
- target = {
- icon = "fa-solid fa-seedling",
- label = ps.lang('targets.mescaline.pick'),
- },
allow = Config.Drugs.mescaline,
},
- {model = 'prop_weed_01', label = 'weed', langs = ps.lang('targets.weed.pick'), tbl = GlobalState.WeedPlant, plantTbl = {},
+ {model = 'prop_weed_01', label = 'weed', langs = ps.lang('weed.targetPick'), tbl = GlobalState.WeedPlant, plantTbl = {},
pick = function(loc)
- if not ps.progressbar(ps.lang('Weed.picking'), 4000, 'uncuff') then return end
+ if not ps.progressbar(ps.lang('weed.picking'), 4000, 'uncuff') then return end
TriggerServerEvent("weed:pickupCane", loc)
return true
end,
- target = {
- icon = "fa-solid fa-seedling",
- label = ps.lang('targets.weed.pick'),
- },
allow = Config.Drugs.weed,
},
- {model = 'mushroom', label = 'shrooms', langs = ps.lang('targets.shrooms.pick'), tbl = GlobalState.shrooms, plantTbl = {},
+ {model = 'mushroom', label = 'shrooms', langs = ps.lang('shrooms.targetPick'), tbl = GlobalState.shrooms, plantTbl = {},
pick = function(loc)
- if not ps.progressbar(ps.lang('Shrooms.pick'), 4000, 'uncuff') then return end
+ if not ps.progressbar(ps.lang('shrooms.picking'), 4000, 'uncuff') then return end
TriggerServerEvent("shrooms:pickupCane", loc)
return true
end,
- target = {
- icon = "fa-solid fa-hand",
- label = ps.lang('targets.shrooms.pick'),
- },
allow = Config.Drugs.shrooms,
},
}
diff --git a/client/shrooms.lua b/client/shrooms.lua
index f226b17..e8c0622 100644
--- a/client/shrooms.lua
+++ b/client/shrooms.lua
@@ -1,6 +1,6 @@
ps.registerCallback("md-drugs:client:shrooms", function()
- if not ps.progressbar(ps.lang('Shrooms.eat'), 5000, 'eat') then return end
+ if not ps.progressbar(ps.lang('shrooms.eat'), 5000, 'eat') then return end
CreateThread(function()
EcstasyEffect()
end)
diff --git a/client/weed.lua b/client/weed.lua
index 0d82716..c33ef4d 100644
--- a/client/weed.lua
+++ b/client/weed.lua
@@ -4,10 +4,10 @@ for k, v in pairs (locations.WeedDry) do
ps.boxTarget('weed_dry'..k, v.loc, {length = v.l, width = v.w, heading = v.rot}, {
{
icon = 'fa-solid fa-cannabis',
- label = ps.lang('targets.weed.dry'),
+ label = ps.lang('weed.targetDry'),
action = function()
if not ps.hasItem('wetcannabis', 1) then
- ps.notify(ps.lang('Weed.nodry'), "error")
+ ps.notify(ps.lang('weed.nodry'), "error")
return
end
if drying then return end
@@ -15,12 +15,12 @@ for k, v in pairs (locations.WeedDry) do
local weedplant = CreateObject("bkr_prop_weed_drying_01a", loc.x, loc.y+.2, loc.z, true, false)
drying = true
FreezeEntityPosition(weedplant, true)
- ps.notify(ps.lang('Weed.wait'), "success")
+ ps.notify(ps.lang('weed.wait'), "success")
Wait(math.random(1000,5000))
- ps.notify(ps.lang('Weed.take'), "success")
+ ps.notify(ps.lang('weed.take'), "success")
ps.entityTarget(weedplant, {
icon = "fa-solid fa-cannabis",
- label = ps.lang('targets.weed.dpick'),
+ label = ps.lang('weed.targetDryed'),
action = function()
DeleteEntity(weedplant)
drying = false
@@ -36,7 +36,7 @@ for k, v in pairs (locations.WeedTele) do
ps.boxTarget('weed_tele'..k, v.inside, {length = v.l, width = v.w, heading = v.rot}, {
{
icon = 'fa-solid fa-door-open',
- label = ps.lang('targets.weed.telein'),
+ label = ps.lang('weed.teleportOut'),
action = function()
SetEntityCoords(PlayerPedId(), v.outside)
end
@@ -45,7 +45,7 @@ for k, v in pairs (locations.WeedTele) do
ps.boxTarget('weed_teleout'..k, v.outside, {length = v.l, width = v.w, heading = v.rot}, {
{
icon = 'fa-solid fa-door-closed',
- label = ps.lang('targets.weed.teleout'),
+ label = ps.lang('weed.teleportIn'),
action = function()
SetEntityCoords(PlayerPedId(), v.inside)
end
@@ -66,13 +66,13 @@ CreateThread(function()
end)
RegisterNetEvent("md-drugs:client:dodabs", function()
- if not ps.progressbar('Doing Dabs', 4000, 'bong2') then AlienEffect() return end
+ if not ps.progressbar(ps.lang('weed.dabs'), 4000, 'bong2') then AlienEffect() return end
AlienEffect()
end)
local function createBluntOptions(contextId, contextTitle, eventLabelPrefix, tableName)
local options = {}
- local items = ps.callback('md-drugs:server:GetRecipe', 'weed',tableName)
+ local items = ps.callback('md-drugs:server:GetWeedRecipe', 'weed', tableName)
for k, v in pairs(items) do
local label = {}
local item = ''
@@ -94,11 +94,11 @@ local function createBluntOptions(contextId, contextTitle, eventLabelPrefix, tab
end
RegisterNetEvent('md-drugs:client:makeBluntWrap', function(data)
- createBluntOptions('mddrugsbluntwraps', "Dipping Syrup", 'Dipping Syrup To Make ', 'bluntwrap')
+ createBluntOptions('mddrugsbluntwraps', "Dipping Syrup", ps.lang('weed.bluntWrap'), 'bluntwrap')
end)
RegisterNetEvent('md-drugs:client:rollBlunt', function(data)
- createBluntOptions('mddrugsblunts', "Roll Blunts", 'Rolling A ', 'blunts')
+ createBluntOptions('mddrugsblunts', "Roll Blunts", ps.lang('weed.blunts'), 'blunts')
end)
for k, v in pairs (locations.WeedSalesman) do
@@ -110,7 +110,7 @@ for k, v in pairs (locations.WeedSalesman) do
ps.entityTarget(ped, {
{
icon = "fa-solid fa-cannabis",
- label = ps.lang('targets.weed.salesman'),
+ label = ps.lang('weed.targetSales'),
action = function()
local itemList = ps.callback('md-drugs:server:getWeedItems')
local options = {}
@@ -124,7 +124,7 @@ for k, v in pairs (locations.WeedSalesman) do
{type = 'number', title = 'How Many To Buy', min = 1, max = 1000}
})
if not input and input[1] then return end
- if not ps.progressbar('Buying ' .. ps.getLabel(m), 2000, 'uncuff') then return end
+ if not ps.progressbar(ps.lang('weed.buying', ps.getLabel(m)), 2000, 'uncuff') then return end
TriggerServerEvent('md-drugs:server:buyWeedItem', k, m, input[1])
end
}
diff --git a/client/wholesale.lua b/client/wholesale.lua
index f97d129..c76bb0e 100644
--- a/client/wholesale.lua
+++ b/client/wholesale.lua
@@ -1,30 +1,49 @@
local miss = false
-
+local function SetUpPeds()
+ AddRelationshipGroup('setups')
+ local ped = GetEntityCoords(PlayerPedId())
+ local peds = {
+ {x = ped.x+3, y = ped.y-5, z = ped.z-1, },
+ {x = ped.x+6, y = ped.y-10, z = ped.z-1,},
+ {x = ped.x+-2,y = ped.y+5, z = ped.z-1,},
+ {x = ped.x+8, y = ped.y-12, z = ped.z-1,},
+ {x = ped.x+5, y = ped.y-2, z = ped.z-1, },
+ {x = ped.x+2, y = ped.y-20, z = ped.z-1,},
+ {x = ped.x+1, y = ped.y-10, z = ped.z-1,},
+ }
+ for i = 1, #peds do
+ local k = peds[i]
+ i = CreatePed(0, "g_m_y_famdnf_01", k.x, k.y, k.z, 90.0, true, true)
+ SetPedRelationshipGroupHash(i, 'setups')
+ GiveWeaponToPed(i, "weapon_pistol", 1, false, true)
+ TaskCombatPed(i, PlayerPedId(), 0, 16)
+ SetPedCombatAttributes(i, 46, true)
+ end
+end
RegisterNetEvent("md-drugs:client:GetLocation", function(drug)
if not GetCops(Config.PoliceCount) then return end
if miss then
- ps.notify(Lang.Wholesale.al, 'error')
- else
+ ps.notify(ps.lang('wholesale.alreadyWholesale'), 'error')
+ else
local loc = drug.location
local timer = 0
miss = true
SetNewWaypoint(loc.x, loc.y)
- lib.requestModel("g_m_y_famdnf_01", Config.RequestModelTime)
- local current = "g_m_y_famdnf_01"
- local drugdealer = CreatePed(0, current,loc.x,loc.y,loc.z-1, 90.0, false, false)
+ ps.requestModel("g_m_y_famdnf_01", Config.RequestModelTime)
+ local drugdealer = CreatePed(0, "g_m_y_famdnf_01",loc.x,loc.y,loc.z-1, 90.0, false, false)
FreezeEntityPosition(drugdealer, true)
SetEntityInvincible(drugdealer, true)
- AddMultiModel(drugdealer, {{
- label = Lang.targets.Wholesale.talk,
+ ps.entityTarget(drugdealer, {{
+ label = ps.lang('wholesale.targetBuyer'),
icon = "fas fa-eye",
action = function()
local luck = math.random(1,100)
if luck <= Config.SuccessfulChance then
- if not ps.progressbar("Wholesaling Drugs", 4000, 'uncuff') then return end
+ if not ps.progressbar(ps.lang('wholesale.wholesaling'), 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:SuccessSale", drug)
else
- ps.progressbar("YOU FUCKED NOW", 4000, 'uncuff')
- SetUpPeds()
+ ps.notify(ps.lang('wholesale.uhoh'), 'error')
+ SetUpPeds()
end
Wait(3000)
DeleteEntity(drugdealer)
@@ -39,7 +58,7 @@ RegisterNetEvent("md-drugs:client:GetLocation", function(drug)
if timer <= Config.WholesaleTimeout or #(GetEntityCoords(PlayerPedId()) - vector3(loc.x, loc.y, loc.z) ) < 4.0 then
timer = 0
else
- ps.notify('The Buyer Waited To Long', 'error')
+ ps.notify(ps.lang('wholesale.tooLong'), 'error')
DeleteEntity(drugdealer)
end
end
diff --git a/client/xtc.lua b/client/xtc.lua
index 182fd83..e180d82 100644
--- a/client/xtc.lua
+++ b/client/xtc.lua
@@ -9,19 +9,19 @@ end
ps.registerCallback('md-drugs:client:setpress', function(xtcData)
if xtcpress then
- ps.notify(Lang.xtc.out, 'error')
+ ps.notify(ps.lang('xtc.alreadyOut'), 'error')
return
end
local coords, head = StartRay2()
xtcpress = true
- if not ps.progressbar('Setting Press On The Ground', 4000, 'uncuff') then return end
+ if not ps.progressbar(ps.lang('xtc.settingDown'), 4000, 'uncuff') then return end
local press = CreateObject("bkr_prop_coke_press_01aa", coords.x, coords.y, coords.z, true, false, false)
PlaceObjectOnGroundProperly(press)
Freeze(press, true, head)
local options = {
{
icon = "fas fa-eye",
- label = ps.lang('targets.xtc.make'),
+ label = ps.lang('xtc.targetMake'),
distance = 2.0,
action = function()
local options = {}
@@ -33,7 +33,7 @@ ps.registerCallback('md-drugs:client:setpress', function(xtcData)
description = descript,
action = function()
if not minigame() then ps.notify(ps.lang('xtc.fail'), "error") return end
- if not ps.progressbar(string.format(ps.lang('xtc.make'), ps.getLabel(k)), 4000, 'uncuff') then return end
+ if not ps.progressbar(ps.lang('xtc.making', ps.getLabel(k)), 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:makextc", k)
end,
distance = 2.0
@@ -47,9 +47,9 @@ ps.registerCallback('md-drugs:client:setpress', function(xtcData)
},
{
icon = "fas fa-eye",
- label = ps.lang('targets.xtc.pick'),
+ label = ps.lang('xtc.targetPickup'),
action = function()
- if not ps.progressbar(ps.lang('xtc.pickup'), 5000, 'uncuff') then return end
+ if not ps.progressbar(ps.lang('xtc.picking'), 5000, 'uncuff') then return end
DeleteObject(press)
xtcpress = false
TriggerServerEvent("md-drugs:server:getpressback")
@@ -67,11 +67,14 @@ for k, v in pairs(locations.mdp2p) do
ps.boxTarget('mdp2p'..k, v.loc, {length = v.l, width = v.w, heading = v.rot}, {
{
icon = 'fa-solid fa-flask',
- label = ps.lang('targets.xtc.mdp2p'),
+ label = ps.lang('xtc.targetStealMDP2P'),
action = function()
if not minigame() then ps.notify(ps.lang('xtc.fail'), "error") return end
- if not ps.progressbar(ps.lang('xtc.mdp2p'), 4000, 'uncuff') then return end
+ if not ps.progressbar(ps.lang('xtc.stealingMDP2P'), 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:stealmdp2p", k)
+ end,
+ canInteract = function()
+ return handleGang(v.gang)
end
}
})
@@ -80,11 +83,14 @@ for k, v in pairs(locations.isosafrole) do
ps.boxTarget('isosafrole'..k, v.loc, {length = v.l, width = v.w, heading = v.rot}, {
{
icon = 'fa-solid fa-flask',
- label = ps.lang('targets.xtc.isosafrole'),
+ label = ps.lang('xtc.targetStealIsosafrole'),
action = function()
if not minigame() then ps.notify(ps.lang('xtc.fail'), "error") return end
- if not ps.progressbar(ps.lang('xtc.isosafrole'), 4000, 'uncuff') then return end
+ if not ps.progressbar(ps.lang('xtc.stealingIsosafrole'), 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:stealisosafrole", k)
+ end,
+ canInteract = function()
+ return handleGang(v.gang)
end
}
})
@@ -94,11 +100,14 @@ for k, v in pairs(locations.rawxtcloc) do
ps.boxTarget('xtc'..k, v.loc, {length = v.l, width = v.w, heading = v.rot}, {
{
icon = 'fa-solid fa-flask',
- label = ps.lang('targets.xtc.raw'),
+ label = ps.lang('xtc.targetRaw'),
action = function()
if not minigame() then ps.notify(ps.lang('xtc.fail'), "error") return end
- if not ps.progressbar(ps.lang('xtc.raw'), 4000, 'uncuff') then return end
+ if not ps.progressbar(ps.lang('xtc.makingRaw'), 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:makingrawxtc", k)
+ end,
+ canInteract = function()
+ return handleGang(v.gang)
end
}
})
@@ -111,7 +120,7 @@ for k, v in pairs(locations.xtcpress) do
ps.entityTarget(ped, {
{
icon = 'fa-solid fa-flask',
- label = ps.lang('targets.xtc.press'),
+ label = ps.lang('xtc.getPress'),
action = function()
local options = {}
local recipeList = ps.callback('md-drugs:server:getpressrecipes')
@@ -120,14 +129,13 @@ for k, v in pairs(locations.xtcpress) do
options[#options + 1] = {
icon = ps.getImage(m),
title = ps.getLabel(m),
- description = ps.lang('xtc.press.buysingle', d.cash),
+ description = ps.lang('xtc.buySingle', d.cash),
action = function()
if not ps.progressbar(ps.lang('xtc.buyp'), 4000, 'uncuff') then return end
TriggerServerEvent('md-drugs:server:buypress', m)
end,
}
else
- ps.debug(d.take)
local descript = getRecipeList(d.take)
options[#options + 1] = {
icon = ps.getImage(m),
@@ -142,7 +150,8 @@ for k, v in pairs(locations.xtcpress) do
end
end
ps.menu('XTC Presses', 'XTC Presses', options)
- end
+ end,
+ canInteract = function() return handleGang(v.gang) end
}
})
end
@@ -151,7 +160,7 @@ for k, v in pairs (locations.stamp) do
ps.boxTarget('xtc'..k, v.loc, {length = v.l, width = v.w, heading = v.rot}, {
{
icon = 'fa-solid fa-flask',
- label = ps.lang('targets.xtc.' .. k),
+ label = ps.lang('xtc.targetStamp'),
action = function()
local item = {
{item = 'white_xtc', label = ps.getLabel('white_xtc'), color = 'white'},
@@ -167,14 +176,15 @@ for k, v in pairs (locations.stamp) do
description = ps.lang('xtc.stamp_desc', d.color),
action = function()
if not minigame() then ps.notify(ps.lang('xtc.fail'), "error") return end
- if not ps.progressbar(string.format(ps.lang('xtc.stamp'), d.label), 4000, 'uncuff') then return end
+ if not ps.progressbar(ps.lang('xtc.stamping'), d.label, 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:stamp", k, d.color)
end,
distance = 2.0
}
end
ps.menu('Stamp Pills', 'Stamp Pills', options)
- end
+ end,
+ canInteract = function() return handleGang(v.gang) end
}
})
end
diff --git a/clientRun.lua b/clientRun.lua
index 5e816ee..31c4e46 100644
--- a/clientRun.lua
+++ b/clientRun.lua
@@ -16,7 +16,7 @@ function loadFile(filePath)
ps.error("Error executing Lua chunk from '" .. filePath .. "': " .. tostring(execErr))
return false
end
- ps.success("Successfully loaded module '" .. filePath .. "' from resource '" .. resourceName .. "'.")
+
return true
end
diff --git a/fxmanifest.lua b/fxmanifest.lua
index 8c85ffe..b169a11 100644
--- a/fxmanifest.lua
+++ b/fxmanifest.lua
@@ -13,8 +13,6 @@ client_scripts {
server_scripts {
'server/functions.lua',
- 'server/locations.lua',
- 'server/recipes.lua',
'server/plantSpawns.lua',
'serverRun.lua',
'@oxmysql/lib/MySQL.lua',
@@ -22,7 +20,6 @@ server_scripts {
shared_scripts {
'shared/**.lua',
- '@ox_lib/init.lua',
}
lua54 'yes'
diff --git a/locales/en.lua b/locales/en.lua
index febdf07..1bce1ed 100644
--- a/locales/en.lua
+++ b/locales/en.lua
@@ -1,298 +1,247 @@
Lang = {}
-Lang.targets = {
- coke = {
- pick = 'Pick Cocaine',
- cut = 'Cut Cocaine',
- bag = 'Bag Cocaine',
- enter = 'Enter Building',
- exit = 'Exit Building',
- chop = 'Chop Coca Leaves',
-
- },
- CornerSell = {
- sell = 'Sell %s Of %s For $%s',
- deny = 'Deny Price'
- },
- crack = {
- cook = 'Cook Crack',
- bag = 'Bag Crack'
- },
- Delivery = {
- Deliver = 'Deliver For %s',
- open = 'Open %s Shop',
- hand = 'Hand Over'
- },
- heroin = {
- pick = 'Pick Poppies',
- up = 'Pick Up Table',
- dry = 'Dry Poppies',
- cut = 'Cut Heroin',
- cook = 'Cook Heroin',
- kit = 'Buy Heroin Lab Kit',
- clean = 'Clean Table',
- fill = 'Fill Syringe',
- vial = 'Make Vial',
- },
- lean = {
- git = 'Get Task',
- st = 'Steal From Car'
- },
- lsd = {
- buy = 'Buy LSD Lab Kit',
- heat = 'Heat Liquid',
- refine = 'Refine Quality',
- paper = 'Make Tab Paper',
- back = 'Pick Up Lab Kit',
- dab = 'Dab LSD on sheets',
- clean = 'Clean Table',
- lys = 'Steal Lysergic Acid',
- die = 'Steal Diethylamide',
- buyt = 'Buy Tabs',
- },
- mescaline = {
- pick = 'Pick Cactus',
- dry = 'Dry Out Cactus',
- },
- meth = {
- bag = 'Bag Up Meth',
- enter = 'Enter Buidling',
- exit = 'Exit Building',
- cook = 'Cook Meth',
- tray = 'Grab Tray',
- box = 'Box Up Meth',
- adjust = 'Adjust Temperature',
- eph = 'Steal Ephedrine',
- ace = 'Steal Acetone',
- mission = 'Get Mission',
- stealfromcar = 'Steal From Car',
- },
- oxy = {
- pack = 'Get Oxy Package',
- talk = 'Talk To Buyer',
- pay = 'Pay For Truck',
- },
- pha = {
- fill = 'Fill Prescription',
- },
- shrooms = {
- pick = 'Pick Shrooms',
- },
- travel = {
- travel = 'Open Travelling Merchant',
- },
- xtc = {
- iso = 'Steal Isosafrole',
- mdp = 'Steal MDP2P',
- raw = 'Make Raw XTC',
- press = 'Buy XTC Press',
- stamp = 'Stamp Pills',
- make = 'Make XTC',
- pick = 'Pick Up Press',
- },
- weed = {
- pick = 'Pick Weed',
- dry = 'Dry Weed',
- dpick = 'Pick Dried Weed',
- butt = 'Open Edible Menu',
- oil = 'Make Oil'
- },
- Wholesale = {
- talk = 'Talk To Buyer'
- },
-
+Lang.Catches = {
+ notIn = 'You Are Not In The Correct Location',
+ needItems = 'You Do Not Have The Required Items',
+ notEnoughMoney = 'Youre To Broke',
+ buySuccess = 'You Bought %s %s For $%s',
+ itemMissings = 'You Need \n',
+ itemNeeded = 'You Need %s',
+ cooldown = 'Slow Down Speed Racer',
+ invalidItem = 'This Item Is Not Sold Here',
}
-Lang.Coke = {
- -- client side progressbars
- picking = "Picking Leaves",
- makepow = 'Chopping Leaves Into A Powder',
- cutting = 'Cutting Coke With Baking Soda',
- bagging = "Bilbo Baggins This Bitch",
- -- end progressbars
- cut = "You Cut Some Coke",
- nocutcoke = "You Cant Cut Coke With No Coke Idiot",
- bagcoke = "You Bagged Up Coke",
- nobagcoke = "You Cant Bag Up Coke Without Coke Idiot",
-}
-Lang.Crack = {
- --client side
- cookcrack = "Cooking Some Crack",
- bagcrack = 'Bilbo Baggin This Bitch',
- -- server
- makecrack = 'Nice Crack',
- nocoke = 'You Cant Make This Without Coke'
+Lang.coke = {
+ targetPick = 'Pick Coca Leaf',
+ picking = 'Picking Coca Leaf',
+ targetMakePow = 'Make Cocaine Powder',
+ noleaf = 'You Need A Coke Leaf',
+ makePow = 'Chopping Leaves into Powder',
+ targetCutCoke = 'Cut Cocaine',
+ targetBagCoke = 'Bag Cocaine',
+ teleIn = 'Enter the Lab',
+ teleOut = 'Exit the Lab',
+ needBakingSoda = 'You Need Baking Soda For This',
}
+
Lang.Cornerselling = {
- -- client side notifys
- inveh = 'STRANGER DANGER, I WONT GET IN THE CAR WITH YOU',
- toofar = "To Far From Your Corner Homie",
- selling = 'Selling %s For $%s',
- deny = "Fuck That Offer",
- start = "Get That Paper",
- stop = "Lazy Ass Cant Even Sell Drugs",
- nodrugs = "What You Gonna sell? Air?",
- notcops = "Not Enough Cops",
- no = 'You Cant Sell Drugs Here!',
- -- end client side notifys
- -- progressbars
- sell = "Selling Drugs",
-}
-Lang.Delivery = {
- -- client side
- emailn = 'Not A Drug Dealer',
- emailsub = 'Hurry Up And Get The Package To The Buyer',
- emailcon = 'I Swear To God If It Doesnt Get There I Will Tell Your Mom You Said Fuck Just Bring %s Of %s',
- search = "Searching For A Delivery ...",
- none = "Nothing Close By",
- busy = "You Havent Even Finished The One I Told You Too",
- found = "Marked On Your Map",
- already = "Already Deliverying",
- checkrep = "Current Dealer Rep: ",
- -- progressbars
- pack = 'Handing Off Package',
- -- end client side
+ inVeh = 'Stranger Danger!',
+ selling = 'Selling %s for $%s',
+ deny = 'Fuck That Offer',
+ wait = 'Waiting For Customer',
+ nodrugs = 'You Do Not Have Any Drugs To Sell',
+ searching = 'Searching For Nearby Customers',
+ targetTakeBack = 'Take Back Drugs',
+ targetSell = 'Sell %s Of %s For $%s',
+ targetDeny = 'Deny Offer',
+ stopped = 'Your Lazy Ass Cant Even Sell Drugs!',
+ start = 'Go Make Your Mom Proud',
+ gotRobbed = 'You Got Robbed Nerd!',
+ gotBack = 'You Got Your Stuff Back!',
+ notEnough = 'You Dont Have Enough Of This Item',
+ comDes = 'Sell Things On The Corner'
}
-Lang.Heroin = {
- --client
- pick = " Picking Poppies Up",
- tableout = 'You Already Have A Table Out',
- dryout = "Drying Out Poppies",
- cutting = "Cutting Heroin With Baking Soda",
- secret = "SHHHHHHHHH",
- table = "Placing Table Down",
- success = "Heated Heroin Properly",
- clean = 'Cleaning Heroin Table',
- needles = 'Filling Syringe',
- pickup = 'Picking Up The Heroin Table',
- --
- cutheroin = 'You Made Some Cut Heroin',
- noheroin = "How Can You Cut Heroin Without Heroin Idiot",
- vial = 'You Made A Vial Of Heroin',
- novial = "How Can You Make Heroin Vials Without Heroin Idiot",
- fail = 'You Over Heated Them Idiot',
- fill = 'Filled The Syringe',
- nofill = 'How Are You Going To Fill Needles Of Heroin Without Heroin',
- haskit = 'You Already Have A Heroin Lab Kit'
+Lang.crack = {
+ targetMake = 'Cook Some Crack',
+ cook = 'Cooking Crack',
+ targetBag = 'Bag Crack',
+ bag = 'Bagging Crack',
}
-Lang.Lean = {
- marked = ' Car Has Been Marked On Your Map',
- lean = 'You Got Purple Lean',
- dextro = ' You Got Red Dextro',
- act = 'You Already Have A Lean Task',
+
+Lang.Deliveries = {
+ targetGetDel = 'Get Delivery Mission',
+ targetOpenShop = 'Open Dealer Shop',
+ shopHeader = 'Dealer Shop',
+ targetHandOff = 'Hand Off Delivery',
+ delivering = 'Handing The Package To Drug Dealer',
+ alreadyDelivering = 'You Are Already Delivering A Package',
+ slowAf = 'You Took To Long!',
+ newDealerHelp = {
+ help = 'Place A Dealer',
+ name = 'Dealer Name',
+ timeMin = 'Minimum Time',
+ timeMax = 'Maximum Time'
+ },
+ DealerExists = 'Dealer Already Exists',
+ deleteDealer = {
+ help = 'Delete A Dealer',
+ name = 'Dealer Name',
+ },
+ deleteDealerSuccess = 'Deleted Dealer',
+ deleteDealerFail = 'Failed To Delete Dealer',
+}
+
+Lang.heroin = {
+ targetPick = 'Pick Heroin',
+ picking = 'Picking Heroin',
+ targetCook = 'Cook Heroin',
+ pbCook = 'Cooking Up Heroin',
+ targetPickup = 'Pick Up Lab',
+ pbPickup = 'Picking Up Lab',
+ targetClean = 'Clean Lab',
+ pbClean = 'Cleaning Lab',
+ targetDry = 'Dry Out Plant',
+ pbDry = 'Drying Out Plant',
+ targetCutHeroin = 'Cut Heroin',
+ pbCutHeroin = 'Cutting Heroin',
+ targetBuyKit = 'Buy Heroin Lab Kit',
+ pbBuyKit = 'Buying Heroin Lab Kit',
+ tableout = 'You Already Have A Table Out',
+ placing = 'Placing Down Table',
+ targetFill = 'Fill Syringe',
+ pbFill = 'Filling Syringe',
+ hasKitAlready = 'You Already Have A Heroin Lab Kit',
+ notEnoughMoney = 'You Need $%s In Cash For This',
+ placedKit = 'You Placed Down Your Heroin Lab Kit',
+ failed = 'You Failed To Make Heroin And Lost Your Ingredients',
+}
+
+Lang.lean = {
+ stealFromTruck = 'Steal From Truck',
+ startMission = 'Start Lean Mission',
+ notOnRun = 'You Are Not On A Lean Run'
}
Lang.lsd = {
- steallys = 'Stealing Lysergic Acid',
- stealdie = 'Stealing Lysergic Acid',
+ targetHeat = 'Heating LSD',
+ heating = 'Heating Up LSD',
+ targetRefine = 'Refine The Acid',
+ refining = 'Refining The Acid',
+ targetDipping = 'Dip Tabs',
+ dipping = 'Dipping Tabs',
+ targetPickup = 'Pick Up Lab Kit',
+ packup = 'Packing Up Lab Kit',
+ targetClean = 'Clean Lab Kit',
+ needCleaning = 'You Need A Cleaning Kit To Clean The Lab',
+ cleaning = 'Cleaning Lab Kit',
+ targetLys = 'Steal Lysergic Acid',
+ stealLys = 'Stealing Lysergic Acid',
+ targetDie = 'Steal Diethylamide',
+ stealDie = 'Stealing Diethylamide',
+ targetBuyTab = 'Buy Tab Paper',
+ targetBuyKit = 'Buy LSD Lab Kit',
+ alreadyOwn = 'You Already Own This Item',
+ buyingKit = 'Buying LSD Lab Kit',
tableout = 'You Already Have A Table Out',
- tablepack = 'Packing Table Up',
- heat = 'Heating Up Liquids',
- clean = 'Cleaning The Table',
- refine = 'Refining The Quality',
- dip = 'Dipping LSD On The Paper',
- buypaper = 'Buying Tab Paper',
- buykit = 'Buying Lab Kit',
- place = 'Placing Table Down',
- hav = 'You Already Have A Table',
- -- server
- lys = 'You Got Lysergic Acid',
- die = 'You Got Diethylamide',
- cleaned = 'You Cleaned It Perfectly',
- madelsd = 'You Made LSD!',
- failed = 'You Over Heated Them Idiot',
- refined = 'You Refined Them!',
- broke = 'Your Broke Ass Cant Afford these!',
- novial = 'No LSD Vials Idiot',
+ placing = 'Placing Lab Kit Down!',
+ failed = 'You Suck At Making Drugs',
}
-Lang.mescaline = {
- pick = "Picking Cactus",
- dry = 'Drying Out Cactus',
- nocactus = 'No Cactus Bulbs',
- eat = 'eating mescaline'
+
+Lang.mesc = {
+ targetPick = 'Pick Cactus',
+ picking = 'Picking Cactus',
+ targetDry = 'Dry Cactus',
+ dry = 'Drying Cactus',
}
Lang.meth = {
- inside = 'Stuff Inside Already',
- increaseheat = 'Increasing Heat',
- mission = 'Car Has Been Marked On Your Map',
- ace = 'You Got Some Acetone',
- eph = 'You Got Some Ephedrine',
- mix = 'Adding Things To The Mix',
- nobag = 'No Bags',
- act = 'You Already Have A Meth Task',
+ alreadyChasing = 'You Already Are Chasing A Truck',
+ targetStealFromCar = 'Steal From Meth Car',
+ targetHeist = 'Start Meth Mission',
+ started = 'You Already Have Meth Cooking',
+ increaseHeat = 'You Increased The Heat',
+ targetBag = 'Bag Meth',
+ targetCook = 'Cook Meth',
+ targetGrabTray = 'Grab Meth Tray',
+ targetHeat = 'Adjust The Dials',
+ targetSmash = 'Smash The Tray',
+ targetStealEPH = 'Steal Ephedrine',
+ stealingEPH = 'Stealing Ephedrine',
+ targetStealACE = 'Steal Acetone',
+ stealingACE = 'Stealing Acetone',
+ notOnRun = 'You Are Not On A Meth Run',
+ onCooldown = 'You Are On A Cooldown'
}
Lang.oxy = {
- truck = 'Your Truck Is Here',
- cantcarry = 'You Aint That Strong, You Can Only Carry One',
- hand = 'Handing Over oxy',
- empty = 'You Cant Be Empty Handed Idiot',
- broke = 'Your Broke Ass Cant Afford This',
- hot = 'Car Is Hot Dump It Now',
- next = 'Get To the Next Location'
+ ditchCar = 'The Van Is Hot, Leave It Somewhere',
+ targetHandoff = 'Hand Off The Package',
+ handingoff = 'Handing Off The Package',
+ emptyHands = 'You Are Not Carrying Anything',
+ targetPay = 'Rent Oxy Van',
+ keys = 'The Keys Are In The Van',
+ targetGetPackage = 'Grab Package',
+ alreadyCarrying = 'You Are Already Carrying A Package',
+ paid = 'You Paid $%s To Rent The Van',
+ notOn = 'You Are Not On A Route',
}
-Lang.Pharma = {
- notems = 'You Are Not A Medical Person',
+Lang.pharma = {
+ input = {
+ header = 'Who To Give A Prescription To?',
+ title1 = 'Player Name',
+ title2 = 'Prescription',
+ },
write = 'Writing Prescription',
- fill = 'Filling Prescription',
- open = 'Opening Bottle',
- pills = 'You Got Some Pills!',
- no = 'You Dont Have A Prescription'
+ opening = 'Opening Prescription Bottle',
+ targetFill = 'Fill Prescription',
+ fill = 'Getting Prescription Filled',
+ canceled = 'You Canceled The Prescription',
+ unbottle = 'You Opened The Bottle',
}
-Lang.Shrooms = {
- pick = 'Picking Shrooms',
+Lang.shrooms = {
+ targetPick = 'Pick Shrooms',
+ picking = 'Picking Shrooms',
eat = 'Eating Shrooms',
- trip = 'Have A Good Trip!'
+ cancel = 'Decided To Not Do Shrooms',
+ took = 'You Took Some Shrooms!'
}
-Lang.Weed = {
- pick = 'Harvesting Weed',
- busy = 'Already Drying One Out',
- canna = 'Making Canna-butter',
- brown = 'Making Special Brownies',
- cook = 'Making Special Cookies',
- Choc = 'Making Special Chocolate',
- muff = 'Making Special Muffin',
- stovehot = 'Stove Is Too Hot Wait 30 Seconds To Cool Down',
- shat = 'Making Shatter',
- roll = 'Rolling Blunts',
- wait = 'Wait A Little Bit For To Drive',
- take = 'Taking Down The Weed',
- --
- nodry = 'You Need Wet Cannabis To Dry',
- noweed = 'Cant Roll A Blunt With Air',
- noshat = 'You Need Shatter To Do A Dab',
- notorch = 'You Need A butane Torch'
+Lang.weed = {
+ targetPick = 'Pick Weed',
+ picking = 'Picking Weed',
+ targetDry = 'Dry Weed',
+ noDry = 'You Need Wet Weed For This',
+ wait = 'Waiting For Weed To Dry...',
+ take = 'Ready To Take Weed',
+ targetDryed = 'Pickup Weed',
+ teleportIn = 'Enter The Grow House',
+ teleportOut = 'Leave The Grow House',
+ dabs = 'Doing Some Dabs',
+ bluntWrap = 'Dipping Syrup To Make %s',
+ rollBlunt = 'Rolling A %s',
+ targetSales = 'Buy From Dealer',
+ buying = 'Buying %s From Dealer',
+ itemDoesntExist = 'This Item Does Not Exist Here',
+ needItem = 'You Need A %s For This',
+ crackBlunt = 'Cracking Open A Blunt'
+}
+
+Lang.wholesale = {
+ alreadyWholesale = 'Already Wholesaling',
+ targetBuyer = 'Talk To The Buyer',
+ wholesaling = 'Wholesaling Drugs',
+ uhoh = 'The Buyer Is Getting Sketchy',
+ tooLong = 'The Buyer Waited Too Long',
+ notEnoughCops = 'Not Enough Cops On Duty'
}
Lang.xtc = {
- out = 'You Have A Press Out Already',
- pressing = 'Pressing Pills',
- raw = 'Making Raw XTC',
- mdp2p = 'Stealing MDP2P',
- iso = 'Stealing Isosafrole',
- fail = 'Dude Its A Circle Not Rocket Science',
- pickup = 'Picking Up The Press',
- stamp = 'Stamping %s Pills',
- buyp = "Buying Press",
- --
- cash = 'I need 20k In Cash',
- press = {
- title = {single = 'Single Press', dual = 'Dual Press', triple = 'Triple Press', quad = 'Quad Press'},
- des = {single ='Buy a single press for 20k', dual = '20 of each unstamped single stack pill and your single press ',
- triple = '50 of each unstamped dual stack pill and your dual press ', quad = '150 of each unstamped Triple stack pill and your triple press'
- }
- }
+ alreadyOut = 'You Have A Press Out Already',
+ settingDown = 'Setting Down The Press',
+ noPressOut = 'You Do Not Have A Press Out',
+ targetMake = 'Press Pills',
+ making = 'Pressing A %s',
+ targetPickup = 'Pick Up Press',
+ picking = 'Picking Up Press',
+ targetStealMDP2P = 'Steal MDP2P',
+ stealingMDP2P = 'Stealing MDP2P',
+ fail = 'Damn Dude You Suck',
+ targetStealIsosafrole = 'Steal Isosafrole',
+ stealingIsosafrole = 'Stealing Isosafrole',
+ targetRaw = 'Make Raw XTC',
+ makingRaw = 'Making Raw XTC',
+ getPress = 'Get Press',
+ buySingle = 'Buy Single Press For $%s',
+ buyp = 'Buying Press',
+ targetStamp = 'Stamp XTC',
+ stamp_desc = 'Stamp %s Pills',
+ stamping = 'Stamping %s Pills',
+ noPills = 'You Dont Have Any Unstamped Pills'
}
-Lang.Wholesale = {
- al = 'You Already Have A Delivery To Make',
- na = 'No One Answered, Try Again Later',
-}
return Lang
\ No newline at end of file
diff --git a/server/TravellingMerchant.lua b/server/TravellingMerchant.lua
new file mode 100644
index 0000000..e9a1d80
--- /dev/null
+++ b/server/TravellingMerchant.lua
@@ -0,0 +1,64 @@
+
+local Target = {
+ Travellingmerchant = {
+ vector4(-119.66, -977.43, 304.25, 88.21),
+ vector4(-1522.93, 1476.01, 111.45, 41.25),
+ vector4(-3278.98, 973.38, 5.35, 101.53),
+ },
+}
+
+local loc = Target.Travellingmerchant[math.random(1, #Target.Travellingmerchant)]
+
+
+
+local stores = {
+ travel = {
+ tab_paper = 50,
+ bakingsoda = 25,
+ isosafrole = 25,
+ mdp2p = 25,
+ lysergic_acid = 25,
+ diethylamide = 25,
+ lockpick = 2,
+ emptyvial = 2,
+ needle = 2,
+ cokeburner = 25,
+ crackburner = 2,
+ lsdburner = 2,
+ heroinburner = 2,
+ mdlean = 50,
+ weedgrinder = 25,
+ mdbutter = 25,
+ flour = 25,
+ chocolate = 25,
+ butane = 25,
+ butanetorch = 2,
+ dabrig = 2,
+ mdwoods = 2,
+ leancup = 25,
+ xtcburner = 25,
+ },
+}
+
+ps.registerCallback('md-drugs:server:GetMerchant', function(source)
+ return loc, stores.travel
+end)
+
+
+
+RegisterServerEvent("md-drugs:server:purchaseGoods", function(item)
+ local src = source
+ if not ps.checkDistance(src, loc, 10) then
+ ps.notify(src, ps.lang('Catches.notIn'), "error")
+ return
+ end
+ if not stores.travel[item] then
+ ps.notify(src, ps.lang('Catches.invalidItem'), "error")
+ return
+ end
+ if ps.removeMoney(src, 'cash', stores.travel[item]) then
+ ps.addItem(src, item, 1)
+ else
+ ps.notify(src, ps.lang('Catches.notEnoughMoney'), "error")
+ end
+end)
diff --git a/server/cocaine.lua b/server/cocaine.lua
index 80e2737..f1d5e93 100644
--- a/server/cocaine.lua
+++ b/server/cocaine.lua
@@ -42,7 +42,7 @@ end)
RegisterServerEvent('md-drugs:server:makepowder', function(num)
local src = source
if not ps.checkDistance(src, cocaineLocations.MakePowder[num].loc, 3.5) then
- ps.notify(src, 'You are not in the correct location', 'error')
+ ps.notify(src, ps.lang('Catches.notIn'), 'error')
return
end
local tier = 'tier1'
@@ -55,7 +55,7 @@ RegisterServerEvent('md-drugs:server:makepowder', function(num)
end
end
if not ps.craftItem(src, cocaineRecipes['cocaine']['cokepowder'][tier]) then
- ps.notify(src, 'You do not have the required items', 'error')
+ verifyHas(src, cocaineRecipes['cocaine']['cokepowder'][tier].take)
return
end
end)
@@ -64,7 +64,7 @@ RegisterServerEvent('md-drugs:server:cutcokeone', function(num)
local src = source
local tier = 'tier1'
if not ps.checkDistance(src, cocaineLocations.CuttingCoke[num].loc, 2.5) then
- ps.notify(src, 'You are not in the correct location', 'error')
+ ps.notify(src, ps.lang('Catches.notIn'), 'error')
return
end
if Config.TierSystem then
@@ -81,7 +81,7 @@ RegisterServerEvent('md-drugs:server:cutcokeone', function(num)
end
end
if not ps.craftItem(src, cocaineRecipes['cocaine']['cutcoke'][tier]) then
- ps.notify(src, 'You do not have the required items', 'error')
+ verifyHas(src, cocaineRecipes['cocaine']['cutcoke'][tier].take)
return
end
end)
@@ -90,7 +90,7 @@ RegisterServerEvent('md-drugs:server:bagcoke', function(num)
local src = source
local tier = 'tier1'
if not ps.checkDistance(src, cocaineLocations.BaggingCoke[num].loc, 2.5) then
- ps.notify(src, 'You are not in the correct location', 'error')
+ ps.notify(src, ps.lang('Catches.notIn'), 'error')
return
end
if Config.TierSystem then
@@ -106,13 +106,13 @@ RegisterServerEvent('md-drugs:server:bagcoke', function(num)
end
end
if not ps.craftItem(src, cocaineRecipes['cocaine']['bagcoke'][tier]) then
- ps.notify(src, 'You do not have the required items', 'error')
+ verifyHas(src, cocaineRecipes['cocaine']['bagcoke'][tier].take)
return
end
AddRep(src, 'coke')
else
if not ps.craftItem(src, cocaineRecipes['cocaine']['bagcoke'][tier]) then
- ps.notify(src, 'You do not have the required items', 'error')
+ verifyHas(src, cocaineRecipes['cocaine']['bagcoke'][tier].take)
return
end
end
@@ -122,7 +122,7 @@ local cokecut = {loosecokestagetwo = 2, loosecokestagethree = 3}
for k, v in pairs (cokecut) do
ps.createUseable(k, function(source, item)
local src = source
- if not ps.hasItem(src, 'bakingsoda') then ps.notify(src, 'You Need Baking Soda For this', 'error') return end
+ if not ps.hasItem(src, 'bakingsoda') then ps.notify(src, ps.lang('coke.needBakingSoda'), 'error') return end
if ps.hasItem(src,item.name) then
local check = ps.callback('md-drugs:client:uncuff', src, 'Cutting It Further')
if not check then return end
diff --git a/server/consumables.lua b/server/consumables.lua
index 5436544..e18b0c0 100644
--- a/server/consumables.lua
+++ b/server/consumables.lua
@@ -21,8 +21,8 @@ strength = number -- how long you are strong boi
]]
local Consume = {
-- meth
-methbags = { time = 4000, effect = 'meth', anim = "smoke", ps.progressbartext = "Injesting",
- add = {health = -20, stress = -10, speed = 40, strength = 10, thirst = -30}},
+methbags = { time = 4000, effect = 'meth', anim = "smoke", progressbartext = "Injesting",
+ add = {health = -20, stress = -10, speed = 40, strength = 10, thirst = -30}},
cokebaggy = { anim = 'smell', time = 1000, effect = 'coke', add = { stress = -10 }},
cokebaggystagetwo = { anim = 'smell', time = 1000, effect = 'coke', add = { stress = -10 }},
cokebaggystagethree = { anim = 'smell', time = 1000, effect = 'coke', add = { stress = -10 }},
@@ -143,22 +143,22 @@ xanax = { anim = 'pill', effect = 'none', add = { stress = -40
}
for k, v in pairs(Consume) do
- CUI(k, function(source, item)
- if not Itemcheck(source, k, 1) then return end
+ ps.createUseable(k, function(source, item)
+ if not ps.hasItem(source, k, 1) then return end
local time = v.time or Consumables.defaulttime
local effect = v.effect or 0
local anim = v.anim or Consumables.defaultanim
- local ps.progressbartext = v.ps.progressbartext or Consumables.defaultprogresstext
+ local progressbartext = v.progressbartext or Consumables.defaultprogresstext
local add = v.add or {hunger = 0}
- local done = ps.callback('md-drugs:client:consumedrugs', source, time, effect, anim, ps.progressbartext, add, k)
+ local done = ps.callback('md-drugs:client:consumedrugs', source, time, effect, anim, progressbartext, add, k)
if done then
- RemoveItem(source, k, 1)
+ ps.removeItem(source, k, 1)
end
end)
end
RegisterNetEvent('md-drugs:server:updatestatus', function(stat, statval)
- local Player = getPlayer(source)
+ local Player = ps.getPlayer(source)
local hunger, thirst = Player.PlayerData.metadata.hunger, Player.PlayerData.metadata.thirst
if stat == "thirst" then
local value = thirst + statval
@@ -176,6 +176,5 @@ RegisterNetEvent('md-drugs:server:updatestatus', function(stat, statval)
local value = Player.PlayerData.metadata.armor + statval
TriggerEvent('hospital:server:SetArmor', value)
TriggerClientEvent('hud:client:UpdateStress', source, Player.PlayerData.metadata.armor, value)
- else
end
end)
diff --git a/server/cornerselling.lua b/server/cornerselling.lua
index f5beb47..751ebaf 100644
--- a/server/cornerselling.lua
+++ b/server/cornerselling.lua
@@ -135,7 +135,7 @@ local function beingRobbed(source, item, amount, ped)
local math = math.random(1,100)
if math <= robChance then
ps.removeItem(src, item, amount)
- ps.notify(src, 'You Got Robbed Nerd', 'error')
+ ps.notify(src, ps.lang('Cornerselling.gotRobbed'), 'error')
RobbedDrugs[ps.getIdentifier(source)] = {item = item, amount = amount, ped = ped}
return true
else
@@ -148,7 +148,7 @@ local function getDrugBack(source, item, amount)
if RobbedDrugs[ps.getIdentifier(source)] then
if RobbedDrugs[ps.getIdentifier(source)].item == item and RobbedDrugs[ps.getIdentifier(source)].amount == amount then
ps.addItem(src, item, amount)
- ps.notify(src, 'You Got Your Drugs Back', 'success')
+ ps.notify(src, ps.lang('Cornerselling.gotBack'), 'success')
RobbedDrugs[ps.getIdentifier(source)] = nil
return true
end
@@ -170,7 +170,7 @@ ps.registerCallback('md-drugs:server:cornerselling:getAvailableDrugs', function(
if item > 15 then item = 15 end
local amount = math.random(1, item)
local price = (math.random(Drugs[k]['min'], Drugs[k]['max']) * amount) * rep.price
- DrugDeals[ps.getIdentifier(source)] = {item = k, amount = amount, price = math.floor(price), ped = ped}
+ DrugDeals[ps.getIdentifier(source)] = {item = k, amount = amount, price = math.floor(price), ped = ped}
return DrugDeals[ps.getIdentifier(source)]
end
end
@@ -180,7 +180,7 @@ end)
ps.registerCallback('md-drugs:server:hasDrugs', function(source)
for k, v in pairs(Drugs) do
- if hasItem(source, k, 1) then
+ if ps.hasItem(source, k, 1) then
return true
end
end
@@ -204,16 +204,15 @@ local function csCheck(src, item, amount, price)
return false
end
-RegisterNetEvent('md-drugs:server:sellCornerDrugs', function(item, amount, price)
+RegisterNetEvent('md-drugs:server:sellCornerDrugs', function(item, amount, price)
local src = source
if not csCheck(src, item, amount, price) then return end
if not ps.removeItem(src, item, amount) then
- ps.notify(src, 'You Do Not Have Enough Of This Item', 'error')
+ ps.notify(src, ps.lang('Cornerselling.notEnough'), 'error')
DrugDeals[ps.getIdentifier(src)] = nil
return
end
AddRep(src, 'cornerselling', Drugs[item].rep * amount)
- --Log(string.format('%s Sold %s Of %s For A Price Of $%s !', GetName(src),amount, item, price), 'cornerselling')
DrugDeals[ps.getIdentifier(src)] = nil
ps.addMoney(src, 'cash', price)
end)
@@ -225,8 +224,8 @@ RegisterNetEvent('md-drugs:server:getBackRobbed', function()
RobbedDrugs[ps.getIdentifier(source)] = nil
end)
-lib.addCommand('cornersell', {
- help = 'Sell Things On The Corner',
+ps.registerCommand('cornersell', {
+ help = ps.lang('Cornerselling.comDes'),
params = {
},
}, function(source, args, raw)
diff --git a/server/crack.lua b/server/crack.lua
index 3cda068..800676d 100644
--- a/server/crack.lua
+++ b/server/crack.lua
@@ -27,7 +27,7 @@ RegisterServerEvent('md-drugs:server:makecrackone', function(num)
local src = source
local tier = 'tier1'
if not ps.checkDistance(src, CrackLocations.makecrack[num].loc, 2.0) then
- ps.notify(src, 'You are not in the correct location', 'error')
+ ps.notify(src, ps.lang('Catches.notIn'), 'error')
return
end
if Config.TierSystem then
@@ -44,7 +44,7 @@ RegisterServerEvent('md-drugs:server:makecrackone', function(num)
end
end
if not ps.craftItem(src, crackRecipe['crack']['cookcrack'][tier]) then
- ps.notify(src, 'You do not have the required items', 'error')
+ verifyHas(src, crackRecipe['crack']['cookcrack'][tier].take)
return
end
end)
@@ -54,7 +54,7 @@ RegisterServerEvent('md-drugs:server:bagcrack', function(num)
local src = source
local tier = 'tier1'
if not ps.checkDistance(src, CrackLocations.bagcrack[num].loc, 2.0) then
- ps.notify(src, 'You are not in the correct location', 'error')
+ ps.notify(src, ps.lang('Catches.notIn'), 'error')
return
end
if Config.TierSystem then
@@ -71,7 +71,7 @@ RegisterServerEvent('md-drugs:server:bagcrack', function(num)
end
end
if not ps.craftItem(src, crackRecipe['crack']['bagcrack'][tier]) then
- ps.notify(src, 'You do not have the required items', 'error')
+ verifyHas(src, crackRecipe['crack']['bagcrack'][tier].take)
return
end
end)
@@ -93,8 +93,8 @@ end
RegisterNetEvent("md-drugs:server:failcrackone", function(num)
local src = source
- if not ps.checkDistance(src, GlobalState.MDDrugsLocs.makecrack[num].loc, 2.0) then
- ps.notify(src, 'You are not in the correct location', 'error')
+ if not ps.checkDistance(src, CrackLocations.makecrack[num].loc, 2.0) then
+ ps.notify(src, ps.lang('Catches.notIn'), 'error')
return
end
local items = {
diff --git a/server/deliveries.lua b/server/deliveries.lua
index 82b52af..e8edeeb 100644
--- a/server/deliveries.lua
+++ b/server/deliveries.lua
@@ -80,13 +80,25 @@ local dloc = {
{coords = vector4(223.98, 121.53, 102.76, 259.68)},
{coords = vector4(102.19, -255.02, 50.05, 83.59)},
}
-ps.registerCallback('md-drugs:server:getDealers', function(data)
+local Products = {
+ {name = "weed_whitewidow_seed", price = 15, amount = 150, minrep = 0},
+ {name = "weed_skunk_seed", price = 15, amount = 150, minrep = 0},
+ {name = "weed_purplehaze_seed", price = 15, amount = 150, minrep = 0},
+ {name = "weed_ogkush_seed", price = 15, amount = 150, minrep = 0},
+ {name = "weed_amnesia_seed", price = 15, amount = 150, minrep = 0},
+}
+
+ps.registerCallback('md-drugs:server:dealerList', function()
+ return Products
+end)
+
+ps.registerCallback('md-drugs:server:getDealers', function(source)
local check = MySQL.query.await('SELECT * FROM dealers', {})
local loc = json.encode({x = 899.98, y = -2603.24, z = 6.11, h = 176.12 })
- if not check[1] then
+ if not check[1] then
MySQL.insert('INSERT INTO dealers SET name = ?, coords = ?, time = ?, createdby = ?', {'MD', loc, 'any', 'code Newb'})
- Wait(2000)
- local check2 = MySQL.query.await('SELECT * FROM dealers', {})
+ Wait(2000)
+ local check2 = MySQL.query.await('SELECT * FROM dealers', {})
return check2
else
return check
@@ -99,9 +111,9 @@ local DeliveryItems = {
{ item = "coke_brick", minrep = 0, payout = {min = 10, max = 50}},
}
-ps.registerCallback('md-drugs:server:GetDeliveryItem', function(data)
+ps.registerCallback('md-drugs:server:GetDeliveryItem', function(source, data)
local src = source
- local Player = getPlayer(src)
+ local Player = ps.getPlayer(src)
local itemnum = math.random(1, #DeliveryItems)
local item = DeliveryItems[itemnum].item
local amount = math.random(1,4)
@@ -115,61 +127,70 @@ ps.registerCallback('md-drugs:server:GetDeliveryItem', function(data)
})
if not check[1] then
MySQL.insert('INSERT INTO deliveriesdealer SET cid = ?, itemdata = ?, timestart = ?, maxtime = ?, location = ?',
- {Player.PlayerData.citizenid, json.encode({item = item, amount = amount}), os.time(), os.time() + (15 * 60), coord })
- AddItem(Player.PlayerData.source, item, amount)
+ {ps.getIdentifier(src), json.encode({item = item, amount = amount}), os.time(), os.time() + (15 * 60), coord })
+ ps.addItem(src, item, amount)
return true, item, amount, coord
else
local time = os.time()
local timeout = math.floor(os.difftime(time, check[1].maxtime) / 60)
-
- if timeout > 15 then MySQL.query.await('DELETE FROM deliveriesdealer WHERE cid = ?', {Player.PlayerData.citizenid}) ps.notify(src, 'You Failed To Make It In Time!', 'error' ) return false end
- ps.notify(src,'You Already Have A Delivery To Make', 'error' ) return false, item, amount, coord
+
+ if timeout > 15 then
+ MySQL.query.await('DELETE FROM deliveriesdealer WHERE cid = ?', {ps.getIdentifier(src)})
+ ps.notify(src, ps.lang('Deliveries.slowAf'), 'error' )
+ return false
+ end
+ ps.notify(src,ps.lang('Deliveries.alreadyDelivering'), 'error' )
+ return false, item, amount, coord
end
end)
RegisterNetEvent('md-drugs:server:giveDeliveryItems', function(item, amount)
local src = source
- local Player = getPlayer(src)
- local check = MySQL.query.await('SELECT * FROM deliveriesdealer WHERE cid = ?', {Player.PlayerData.citizenid})
+ local Player = ps.getPlayer(src)
+ local check = MySQL.query.await('SELECT * FROM deliveriesdealer WHERE cid = ?', {ps.getIdentifier(src)})
if not check[1] then return end
local time = os.time()
local timeout = math.floor(os.difftime(time, check[1].maxtime) / 60)
local itemData = json.decode(check[1].itemdata)
- if timeout >= 15 then MySQL.query.await('DELETE FROM deliveriesdealer WHERE cid = ?', {Player.PlayerData.citizenid}) ps.notify(source, 'You Failed To Make It In Time!', 'error' ) return end
+ if timeout >= 15 then
+ MySQL.query.await('DELETE FROM deliveriesdealer WHERE cid = ?', {ps.getIdentifier(src)})
+ ps.notify(src, ps.lang('Deliveries.slowAf'), 'error' )
+ return
+ end
if item ~= itemData.item then return end
if amount ~= itemData.amount then return end
- if RemoveItem(src, item, amount) then
+ if ps.removeItem(src, item, amount) then
for k, v in pairs (DeliveryItems) do
if v.item == item then
local income = math.random(v.payout.min, v.payout.max)
- Player.Functions.AddMoney('cash', income)
+ ps.addMoney(src, 'cash', income)
AddRep(src, 'dealerrep')
end
end
- MySQL.query.await('DELETE FROM deliveriesdealer WHERE cid = ?', {Player.PlayerData.citizenid})
+ MySQL.query.await('DELETE FROM deliveriesdealer WHERE cid = ?', {ps.getIdentifier(src)})
end
end)
-lib.addCommand("newdealer", {
- help = "Place a dealer (Admin Only)",
- params = {
- { name = "name", help = "Dealer Name", type = "string" },
- { name = "min", help = "Minimum Time", type = "number" },
- { name = "max", help = "Maximum Time", type = "number" }
+ps.registerCommand("newdealer", {
+ help = ps.lang('Deliveries.newDealerHelp.help'),
+ description = {
+ { name = "name", help = ps.lang('Deliveries.newDealerHelp.name'), type = "string" },
+ { name = "min", help = ps.lang('Deliveries.newDealerHelp.timeMin'), type = "number" },
+ { name = "max", help = ps.lang('Deliveries.newDealerHelp.timeMax'), type = "number" }
},
- restricted = "admin"
+ admin = true,
}, function(source, args)
local ped = GetPlayerPed(source)
local coords = GetEntityCoords(ped)
- local Player = getPlayer(source)
+ local Player = ps.getPlayer(source)
if not Player then return end
local dealerName = args.name
local pos = json.encode({x = coords.x, y = coords.y, z = coords.z})
-
+
local result = MySQL.scalar.await('SELECT name FROM dealers WHERE name = ?', { dealerName })
if result then
- return ps.notify(source,"Already Exists", "error")
+ return ps.notify(source,ps.lang('Deliveries.DealerExists'), "error")
end
MySQL.insert('INSERT INTO dealers (name, coords, time, createdby) VALUES (?, ?, ?, ?)', {
@@ -188,12 +209,12 @@ lib.addCommand("newdealer", {
end)
end)
-lib.addCommand("deletedealer", {
- help = "Delete a dealer (Admin Only)",
- params = {
- { name = "name", help = "Dealer Name", type = "string" }
+ps.registerCommand("deletedealer", {
+ help = ps.lang('Deliveries.deleteDealerHelp.help'),
+ description = {
+ { name = "name", help = ps.lang('Deliveries.deleteDealerHelp.name'), type = "string" }
},
- restricted = 'group.admin'
+ admin = true
}, function(source, args)
local dealerName = args.name
local result = MySQL.scalar.await('SELECT * FROM dealers WHERE name = ?', { dealerName })
@@ -202,8 +223,22 @@ lib.addCommand("deletedealer", {
MySQL.query('DELETE FROM dealers WHERE name = ?', { dealerName })
QBConfig.Dealers[dealerName] = nil
TriggerClientEvent('md-drugs:client:RefreshDealers', -1, QBConfig.Dealers)
- TriggerClientEvent('QBCore:ps.notify', source, "Dealer Deleted", "success")
+ ps.notify(source, ps.lang('Deliveries.deleteDealerSuccess'), "success")
else
- TriggerClientEvent('QBCore:ps.notify', source, "Who You Tryna Delete", "error")
+ ps.notify(source, ps.lang('Deliveries.deleteDealerFail'), "error")
end
+end)
+
+RegisterNetEvent('md-drugs:server:buyItemDealer', function(num)
+ local src = source
+ local itemData = Products[num]
+ if not itemData then return end
+ local Player = ps.getPlayer(src)
+ if not Player then return end
+ if not ps.removeMoney(src, 'cash', itemData.price) or not ps.removeMoney(src,'bank', itemData.price) then
+ ps.notify(src, ps.lang('Catches.notEnoughMoney'), 'error')
+ return
+ end
+ ps.addItem(src, itemData.name, 1)
+ ps.notify(src, string.format(ps.lang('Deliveries.buyItemSuccess'), 1, ps.getLabel(itemData.name), itemData.price), 'success')
end)
\ No newline at end of file
diff --git a/server/functions.lua b/server/functions.lua
index f46a821..a736781 100644
--- a/server/functions.lua
+++ b/server/functions.lua
@@ -1,13 +1,36 @@
+function verifyHas(source, items)
+ local need = 0
+ local have = 0
+ local missingList = {}
------------------------------------------- logging stuff
-local logs = false
-local logapi = GetConvar("fivemerrLogs", "")
-local endpoint = 'https://api.fivemerr.com/v1/logs'
-local headers = {
- ['Authorization'] = logapi,
- ['Content-Type'] = 'application/json',
-}
+ for k, v in pairs(items) do
+ need = need + 1
+ if ps.hasItem(source, k, v) then
+ have = have + 1
+ else
+ local label = ps.getItemLabel(k) or k
+ table.insert(missingList, v .. " " .. label)
+ end
+ end
+ if need == have then
+ return true
+ end
+
+ local message = ps.lang('Catches.itemMissings') .. table.concat(missingList, "\n")
+ ps.notify(source, message, 'error')
+ return false
+end
+
+RegisterCommand('TestMissing', function(source)
+ local items = {
+ coke = 5,
+ heroin = 2,
+ lsd = 1
+ }
+ local src = source
+ verifyHas(src, items)
+end)
local function handleFresh(source)
local table = json.encode({
@@ -68,66 +91,12 @@ function AddRep(source, type, amount)
end
end
-lib.addCommand('addCornerSellingTOREP', {
- help = 'RUN THIS ONCE AND DELETE',
- restricted = 'group.admin'
-}, function(source, args, raw)
- local sql = MySQL.query.await('SELECT * FROM drugrep', {})
- for k, v in pairs (sql) do
- local new = {}
- local old = json.decode(v.drugrep)
- local get = old[1] or old
- table.insert(new, {
- coke = get.coke,
- lsd = get.lsd,
- heroin = get.heroin,
- dealerrep = get.dealerrep,
- cornerselling = {
- price = QBConfig.SellLevel[1].price,
- rep = 0,
- label = QBConfig.SellLevel[1].label,
- level = 1
- }
- })
- local news = json.encode(new)
- MySQL.query.await('UPDATE drugrep SET drugrep = ? WHERE cid = ?', {news, v.cid})
- end
-end)
-
-function sortTab(tbl, type)
- table.sort(tbl, function(a, b)
- return a[type] < b[type]
- end)
-end
-
-function handleCornersell(source, item, amount, price)
- if RemoveItem(source, item, amount) then
- if inventory == 'qb' then
- local Player = getPlayer(source)
- if QBConfig.MarkedBills == true then
- Player.Functions.AddItem('markedbills',1,false, {worth = price})
- return true
- end
- if QBConfig.CustomDirtyMoney == true then
- AddItem(source, QBConfig.CustomDirtyMoneyitem,price)
- return true
- end
- Player.Functions.AddMoney('cash', price)
- elseif inventory == 'ox' then
- AddItem(source, 'black_money', price)
- return true
- end
- else
- return false
- end
-end
-
-lib.callback.register('md-drugs:server:GetCoppers', function(source, cb, args)
- return getCops()
+ps.registerCallback('md-drugs:server:GetCoppers', function(source, cb, args)
+ return ps.getJobTypeCount('leo')
end)
ps.registerCallback('md-drugs:server:GetRep', function(source, cb, args)
- local rep = GetAllRep(source)
+ local rep = GetAllRep(source)
return rep
end)
diff --git a/server/heroin.lua b/server/heroin.lua
index a465ed3..21c74c3 100644
--- a/server/heroin.lua
+++ b/server/heroin.lua
@@ -59,8 +59,11 @@ end)
RegisterServerEvent('md-drugs:server:dryplant', function(num)
local src = source
- if not ps.checkDistance(src, heroinLocations.dryplant[num].loc, 3.0) then return end
- if not ps.hasItem(src, 'poppyresin', 1) then return end
+ if not ps.checkDistance(src, heroinLocations.dryplant[num].loc, 3.0) then
+ ps.notify(src, ps.lang('Catches.notIn'), 'error')
+ return
+ end
+
local tier = 'tier1'
if Config.TierSystem then
local heroin = getRep(src, 'heroin')
@@ -73,15 +76,17 @@ RegisterServerEvent('md-drugs:server:dryplant', function(num)
end
end
if not ps.craftItem(src, heroinRecipes['dryheroin'][tier]) then
- ps.notify(src, 'You do not have the required items', 'error')
+ verifyHas(src, heroinRecipes['dryheroin'][tier].take)
return
end
end)
RegisterServerEvent('md-drugs:server:cutheroin', function(num)
local src = source
- if not ps.checkDistance(src, heroinLocations.cutheroinone[num].loc, 3.0) then return end
- if not ps.hasItem(src, 'bakingsoda', 1) then return end
+ if not ps.checkDistance(src, heroinLocations.cutheroinone[num].loc, 3.0) then
+ ps.notify(src, ps.lang('Catches.notIn'), 'error')
+ return
+ end
if Config.TierSystem then
local itemList = {
heroin = 'tier1',
@@ -92,7 +97,7 @@ RegisterServerEvent('md-drugs:server:cutheroin', function(num)
local cuth = ps.hasItem(src, k)
if cuth then
if not ps.craftItem(src, heroinRecipes['cutheroin'][v]) then
- ps.notify(src, 'You do not have the required items', 'error')
+ verifyHas(src, heroinRecipes['cutheroin'][v].take)
return
end
AddRep(src, 'heroin')
@@ -101,7 +106,7 @@ RegisterServerEvent('md-drugs:server:cutheroin', function(num)
end
else
if not ps.craftItem(src, heroinRecipes['cutheroin']['tier1']) then
- ps.notify(src, 'You do not have the required items', 'error')
+ verifyHas(src, heroinRecipes['cutheroin']['tier1'].take)
return
end
end
@@ -109,13 +114,16 @@ end)
RegisterServerEvent('md-drugs:server:getheroinlabkit', function(num)
local src = source
- if not ps.checkDistance(src, heroinLocations.buyKit[num].loc, 3.0) then return end
+ if not ps.checkDistance(src, heroinLocations.buyKit[num].loc, 3.0) then
+ ps.notify(src, ps.lang('Catches.notIn'), 'error')
+ return
+ end
local has = ps.hasItem(src, 'heroinlabkit')
- if has then ps.notify(src, Lang.Heroin.haskit, 'error') return end
+ if has then ps.notify(src, ps.lang('heroin.hasKitAlready'), 'error') return end
if ps.removeMoney(src, 'cash', prices.heroinlabkitprice) then
ps.addItem(src, 'heroinlabkit', 1)
else
- ps.notify(src, 'You Need '.. prices.heroinlabkitprice .. ' In Cash For This', 'error')
+ ps.notify(src, ps.lang('heroin.notEnoughMoney', prices.heroinlabkitprice), 'error')
end
end)
@@ -152,7 +160,7 @@ ps.createUseable('heroinlabkit', function(source, item)
coords = loc,
name = ps.getPlayerName(src)
})
- ps.notify(src, ps.lang('Heroin.placed'), "success")
+ ps.notify(src, ps.lang('heroin.placedKit'), "success")
end
end)
@@ -170,7 +178,7 @@ RegisterServerEvent('md-drugs:server:heatliquidheroin', function()
local cuth = ps.hasItem(src, k)
if cuth then
if not ps.craftItem(src, heroinRecipes['fillvial'][v]) then
- ps.notify(src, 'You do not have the required items', 'error')
+ verifyHas(src, heroinRecipes['fillvial'][v].take)
return
end
AddRep(src, 'heroin')
@@ -178,7 +186,10 @@ RegisterServerEvent('md-drugs:server:heatliquidheroin', function()
end
end
else
- if not ps.craftItem(src, heroinRecipes['fillvial']['tier1']) then return end
+ if not ps.craftItem(src, heroinRecipes['fillvial']['tier1']) then
+ verifyHas(src, heroinRecipes['fillvial']['tier1'].take)
+ return
+ end
end
end)
@@ -194,7 +205,7 @@ RegisterServerEvent('md-drugs:server:failheatingheroin', function()
local cuth = ps.hasItem(src, k)
if cuth then
ps.removeItem(src, k, v)
- ps.notify(src, ps.lang('Heroin.fail'), "error")
+ ps.notify(src, ps.lang('heroin.failed'), "error")
return
end
end
@@ -202,8 +213,8 @@ end)
RegisterServerEvent('md-drugs:server:fillneedle', function(num)
local src = source
- if not ps.checkDistance(src, GlobalState.MDDrugsLocs.fillneedle[num].loc, 3.0) then
- ps.notify(src, ps.lang('Heroin.noloc'), 'error')
+ if not ps.checkDistance(src, heroinLocations.fillNeedle[num].loc, 3.0) then
+ ps.notify(src, ps.lang('Catches.notIn'), 'error')
return
end
if not ps.hasItem(src, 'needle', 1) then return end
@@ -216,14 +227,19 @@ RegisterServerEvent('md-drugs:server:fillneedle', function(num)
for k, v in pairs(itemList) do
local vh = ps.hasItem(src, v.item)
if vh then
- if not ps.craftItem(src, heroinRecipes['fillneedle'][v.tier]) then return end
+ if not ps.craftItem(src, heroinRecipes['fillneedle'][v.tier]) then
+ verifyHas(src, heroinRecipes['fillneedle'][v.tier].take)
+ return
+ end
AddRep(src, 'heroin')
return
end
end
- ps.notify(src,Lang.Heroin.nofill, "error")
else
- if not ps.craftItem(src, heroinRecipes['fillneedle']['tier1']) then return end
+ if not ps.craftItem(src, heroinRecipes['fillneedle']['tier1']) then
+ verifyHas(src, heroinRecipes['fillneedle']['tier1'].take)
+ return
+ end
end
end)
diff --git a/server/lean.lua b/server/lean.lua
index 6c7d1a9..6c3aada 100644
--- a/server/lean.lua
+++ b/server/lean.lua
@@ -37,7 +37,7 @@ end
RegisterServerEvent('md-drugs:server:givelean', function()
local src = source
local amount = math.random(1,5)
- if not onRun[ps.getIdentifier(src)] then return ps.notify(src, Lang.lean.err, "error") end
+ if not onRun[ps.getIdentifier(src)] then return ps.notify(src, ps.lang('lean.notOnRun'), "error") end
onRun[ps.getIdentifier(src)] = onRun[ps.getIdentifier(src)] + 1
if math.random(1,100) <= 50 then
ps.addItem(src, "mdlean", amount)
diff --git a/server/lsd.lua b/server/lsd.lua
index 205f4de..7aa3881 100644
--- a/server/lsd.lua
+++ b/server/lsd.lua
@@ -47,7 +47,7 @@ RegisterServerEvent('md-drugs:server:getlysergic', function(num)
local src = source
if timedOut[src] then return end
if not ps.checkDistance(src, lsdLocations.lysergicacid[num].loc, 2.0) then
- ps.notify(src, ps.lang('lsd.notinloc'), "error")
+ ps.notify(src, ps.lang('Catches.notIn'), "error")
return
end
timeout(src, 3000)
@@ -58,7 +58,7 @@ RegisterServerEvent('md-drugs:server:getdiethylamide', function(num)
local src = source
if timedOut[src] then return end
if not ps.checkDistance(src, lsdLocations.diethylamide[num].loc, 2.0) then
- ps.notify(src, Lang.lsd.notinloc, "error")
+ ps.notify(src, ps.lang('Catches.notIn'), "error")
return
end
timeout(src, 3000)
@@ -109,7 +109,7 @@ RegisterServerEvent('md-drugs:server:heatliquid', function()
local src = source
if not hasLabKit(src) then return end
if not ps.craftItem(src, lsdRecipes['vial']['heat']) then
- ps.notify(src, ps.lang('lsd.noliquid'), "error")
+ verifyHas(src, lsdRecipes['vial']['heat'].take)
return
end
end)
@@ -119,14 +119,14 @@ RegisterServerEvent('md-drugs:server:failheating', function()
if not hasLabKit(src) then return end
ps.removeItem(src, 'lysergic_acid', 1)
ps.removeItem(src, 'diethylamide', 1)
- ps.notify(src, ps.lang('prices.lsd.failed'), "error")
+ ps.notify(src, ps.lang('lsd.failed'), "error")
end)
RegisterServerEvent('md-drugs:server:refinequalityacid', function()
-local src = source
-if not hasLabKit(src) then return end
-if not ps.hasItem(src, 'lsd_one_vial', 1) then return end
+ local src = source
+ if not hasLabKit(src) then return end
+ if not ps.hasItem(src, 'lsd_one_vial', 1) then return end
if Config.TierSystem then
local lsd = getRep(src, 'lsd')
if ps.removeItem(src, 'lsd_one_vial', 1) then
@@ -170,25 +170,30 @@ end)
RegisterServerEvent('md-drugs:server:gettabpaper', function(num)
local src = source
- if not ps.checkDistance(src, lsdLocations.gettabs[num].loc, 3.0) then return end
+ if not ps.checkDistance(src, lsdLocations.gettabs[num].loc, 3.0) then
+ ps.notify(src, ps.lang('Catches.notIn'), "error")
+ return
+ end
if ps.removeMoney(src, 'cash', prices.tabcost * 10) then
ps.addItem(src,'tab_paper', 10)
else
- ps.notify(src, Lang.lsd.broke, "error")
+ ps.notify(src, ps.lang('Catches.notEnoughMoney'), "error")
end
end)
RegisterServerEvent('md-drugs:server:getlabkit', function(num)
local src = source
if ps.hasItem(src,'lsdlabkit', 1) then
- ps.notify(src, ps.lang('lsd.havlabkit'), 'error')
return
end
- if not ps.checkDistance(src, lsdLocations.buyLSDkit[num].loc, 3.0) then return end
+ if not ps.checkDistance(src, lsdLocations.buyLSDkit[num].loc, 3.0) then
+ ps.notify(src, ps.lang('Catches.notIn'), "error")
+ return
+ end
if ps.removeMoney(src, 'cash', prices.lsdlabkitcost) then
ps.addItem(src,'lsdlabkit', 1)
else
- ps.notify(src, Lang.lsd.broke, "error")
+ ps.notify(src, ps.lang('Catches.notEnoughMoney'), "error")
end
end)
diff --git a/server/mescaline.lua b/server/mescaline.lua
index 9fb6b2f..c9a3ddf 100644
--- a/server/mescaline.lua
+++ b/server/mescaline.lua
@@ -3,23 +3,33 @@ local mescalineLocation = {
{loc = vector3(1850.12, 2595.23, 45.67), l = 1.0, w = 1.0, rot = 0.0, gang = ""},
},
}
+local mescalineRecipes = {
+ mescaline = {
+ dry = {
+ dried = {take = {cactusbulb = 1}, give = {driedmescaline = 1} }
+ }
+ },
+}
ps.registerCallback('md-drugs:server:GetMescalineLocs', function(source)
return mescalineLocation
end)
+
RegisterNetEvent("md-drugs:server:drymescaline", function(num)
local src = source
if not ps.checkDistance(src, mescalineLocation.DryOutMescaline[num].loc, 3.0) then
- ps.notify(src, "You are not in the right location", "error")
+ ps.notify(src, ps.lang('Catches.notIn'), "error")
+ return
+ end
+ if not ps.craftItem(src, mescalineRecipes.mescaline.dry.dried) then
+ verifyHas(src, mescalineRecipes.mescaline.dry.dried.take)
return
end
- if not GetRecipe(src, 'mescaline', 'dry', 'dried') then return end
end)
ps.createUseable("driedmescaline", function(source, item)
local src = source
- if ps.removeItem(src, "driedmescaline", 1) then
+ if ps.removeItem(src, "driedmescaline", 1) then
TriggerClientEvent("md-drugs:client:takemescaline", src)
-
end
end)
\ No newline at end of file
diff --git a/server/meth.lua b/server/meth.lua
index 45b47dc..acbc724 100644
--- a/server/meth.lua
+++ b/server/meth.lua
@@ -34,9 +34,19 @@ local methLocs = {
}
}
+local methRecipes = {
+ cook = {
+ heat = {take = {ephedrine = 1, acetone = 1}, give = {}}
+ },
+ bag = {
+ bags = {take = {empty_weed_bag = 5}, give = {methbags = 5} }
+ }
+}
+
ps.registerCallback('md-drugs:server:GetMethLocs', function(source)
return methLocs
end)
+
local function setTimeout(identifier)
if onRun[identifier] then
CreateThread(function()
@@ -62,7 +72,7 @@ end
RegisterServerEvent('md-drugs:server:givemethingridients', function()
local src = source
local amount = math.random(1,5)
- if not onRun[ps.getIdentifier(src)] then return ps.notify(src, Lang.lean.err, "error") end
+ if not onRun[ps.getIdentifier(src)] then return ps.notify(src, ps.lang('meth.notOnRun'), "error") end
onRun[ps.getIdentifier(src)] = onRun[ps.getIdentifier(src)] + 1
if math.random(1,100) <= 50 then
ps.addItem(src, "ephedrine", amount)
@@ -74,41 +84,51 @@ RegisterServerEvent('md-drugs:server:givemethingridients', function()
end
end)
-RegisterServerEvent('md-drugs:server:startcook', function(num)
- local src = source
- if not GetRecipe(source, 'meth', 'cook', 'heat') then return end
- ps.notify(src, "Adding Things To The Mix", "success")
-end)
RegisterServerEvent('md-drugs:server:getmeth', function(num)
local src = source
- if not ps.checkDistance(src, methLocs.BagMeth[num].loc, 2.5) then return end
- if not GetRecipe(src, 'meth', 'bag', 'bags') then return end
+ if not ps.checkDistance(src, methLocs.BagMeth[num].loc, 2.5) then
+ ps.notify(src, ps.lang('Catches.notIn'), "error")
+ return
+ end
+ if not ps.craftItem(src, methRecipes.meth.bag.bags) then
+ verifyHas(src, methRecipes.meth.bag.bags.take)
+ return
+ end
end)
RegisterServerEvent('md-drugs:server:geteph', function(num)
local src = source
- if not ps.checkDistance(src, methLocs.MethEph[num].loc, 2.5) then return end
- if not coolDown(ps.getIdentifier(src)) then return ps.notify(src, ps.lang('meth.wait'), "error") end
- if ps.addItem(src, 'ephedrine', 1) then
- ps.notify(src, 'Got Ephedrine!', "success")
+ if not ps.checkDistance(src, methLocs.MethEph[num].loc, 2.5) then
+ ps.notify(src, ps.lang('Catches.notIn'), "error")
+ return
end
+ if not coolDown(ps.getIdentifier(src)) then return ps.notify(src, ps.lang('meth.onCooldown'), "error") end
+ ps.addItem(src, 'ephedrine', 1)
end)
RegisterServerEvent('md-drugs:server:getace', function(num)
local src = source
- if not ps.checkDistance(src, methLocs.MethAce[num].loc, 2.5) then return end
- if not coolDown(ps.getIdentifier(src)) then return ps.notify(src, ps.lang('meth.wait'), "error") end
- if ps.addItem(src, 'acetone', 1) then
- ps.notify(src, 'Got Acetone!', "success")
+ if not ps.checkDistance(src, methLocs.MethAce[num].loc, 2.5) then
+ ps.notify(src, ps.lang('Catches.notIn'), "error")
+ return
end
+ if not coolDown(ps.getIdentifier(src)) then return ps.notify(src, ps.lang('meth.onCooldown'), "error") end
+ ps.addItem(src, 'acetone', 1)
end)
ps.registerCallback('md-drugs:server:startcook', function(source, num)
local src = source
- if not ps.checkDistance(src, methLocs.CookMeth[num].loc, 2.5) then return false end
- local recipe = GetRecipe(src, 'meth', 'cook', 'heat')
- return recipe
+ if not ps.checkDistance(src, methLocs.CookMeth[num].loc, 2.5) then
+ ps.notify(src, ps.lang('Catches.notIn'), "error")
+ return false
+ end
+ local recipe = ps.craftItem(src, methRecipes.meth.cook.heat)
+ if not recipe then
+ verifyHas(src, methRecipes.meth.cook.heat.take)
+ return false
+ end
+ return true
end)
ps.registerCallback('md-drugs:server:registerMeth', function(source)
diff --git a/server/oxyruns.lua b/server/oxyruns.lua
index 2dd8b02..da3ce1a 100644
--- a/server/oxyruns.lua
+++ b/server/oxyruns.lua
@@ -32,10 +32,10 @@ ps.registerCallback('md-drugs:server:payfortruck', function(source)
local src = source
if ps.removeMoney(src, 'cash', prices.payfortruck) or ps.removeMoney(src, 'bank', prices.payfortruck) then
onRoute[src] = true
- ps.notify(src, ps.lang('oxy.paid') .. prices.payfortruck, "success")
+ ps.notify(src, ps.lang('oxy.paid', prices.payfortruck), "success")
return true
else
- ps.notify(src, ps.lang('oxy.broke'), "error")
+ ps.notify(src, ps.lang('Catches.notEnoughMoney'), "error")
return false
end
end)
@@ -44,12 +44,12 @@ end)
RegisterServerEvent('md-drugs:server:giveoxybox', function()
local src = source
if not onRoute[src] then
- ps.notify(src, ps.lang('oxy.notonroute'), "error")
+ ps.notify(src, ps.lang('oxy.notOn'), "error")
return
end
if not ps.checkDistance(src, oxyLocs.oxylocations[onRoute[src]], 3.5) then
- ps.notify(src, ps.lang('oxy.toofar'), "error")
+ ps.notify(src, ps.lang('Catches.notIn'), "error")
return
end
diff --git a/server/pharma.lua b/server/pharma.lua
index 75ccdc6..340ebf6 100644
--- a/server/pharma.lua
+++ b/server/pharma.lua
@@ -7,6 +7,7 @@ local pharmaLocations = {
ps.registerCallback('md-drugs:server:GetPharmaLocs', function()
return pharmaLocations
end)
+
local function GetJob(source)
local src = source
return ps.getJobType(src) == 'ems'
@@ -17,15 +18,14 @@ ps.createUseable('prescription_pad', function(source, item)
local near = {}
if GetJob(src) then
near = ps.getNearbyPlayers(src, 5.0)
-
local options = {
- {label = 'Vicodin', value = 'vicodin_prescription'},
- {label = 'Adderal', value = 'adderal_prescription'},
- {label = 'Morphine', value = 'morphine_prescription'},
- {label = 'Xanax', value = 'xanax_prescription'}
+ {label = ps.getItemLabel('vicodin_prescription'), value = 'vicodin_prescription'},
+ {label = ps.getItemLabel('adderal_prescription'), value = 'adderal_prescription'},
+ {label = ps.getItemLabel('morphine_prescription'), value = 'morphine_prescription'},
+ {label = ps.getItemLabel('xanax_prescription'), value = 'xanax_prescription'}
}
local data = ps.callback('md-drugs:client:prescriptionpad', src, near, options)
- if not data then return ps.notify(src, ps.lang('Pharma.cancel'), "error") end
+ if not data then return ps.notify(src, ps.lang('pharma.canceled'), "error") end
ps.addItem(ps.getSource(data.who), data.what, 1)
end
end)
@@ -46,7 +46,7 @@ for m, d in pairs (pharmabottle) do
if d == k then
if ps.removeItem(src, d, 1) then
ps.addItem(src, v, math.random(10,30))
- ps.notify(src,ps.lang('Pharma.unbottle'), "success")
+ ps.notify(src,ps.lang('pharma.unbottle'), "success")
end
end
end
@@ -57,7 +57,7 @@ end
RegisterServerEvent('md-drugs:server:fillprescription', function(num)
local src = source
if not ps.checkDistance(src, pharmaLocations.FillPrescription[num].loc, 3.5) then
- return ps.notify(src, ps.lang('Pharma.toofar'), "error")
+ return ps.notify(src, ps.lang('Catches.notIn'), "error")
end
local pres = {
vicodin_prescription = 'vicodinbottle',
diff --git a/server/plantSpawns.lua b/server/plantSpawns.lua
index f830430..c59f470 100644
--- a/server/plantSpawns.lua
+++ b/server/plantSpawns.lua
@@ -12,7 +12,7 @@ local drugModelsBuzz = {
weed = "bzzz_plant_weed_pot_green_d"
}
local function propsLabels(drugType)
- if Config.Buzz[drugType] then
+ if Config.Bzz[drugType] then
return drugModelsBuzz[drugType]
else
return drugModels[drugType]
diff --git a/server/recipes.lua b/server/recipes.lua
deleted file mode 100644
index 9c436d6..0000000
--- a/server/recipes.lua
+++ /dev/null
@@ -1,66 +0,0 @@
-
-
-recipe = {
- mescaline = {
- dry = {
- dried = {take = {cactusbulb = 1}, give = {driedmescaline = 1} }
- }
- },
- lean = {
- cups = {
- cupoflean = {take = {leancup = 1, sprunk = 1, mdlean = 1}, give = {cupoflean = 1}},
- cupofdextro = {take = {leancup = 1, sprunk = 1, mdreddextro = 1}, give = {cupofdextro = 1}},
- }
- },
- meth = {
- cook = {
- heat = {take = {ephedrine = 1, acetone = 1}, give = {}}
- },
- bag = {
- bags = {take = {empty_weed_bag = 5}, give = {methbags = 5} }
- }
- },
- weed = {
- oil = {
- shatter = {take = {butane = 1, grindedweed = 1}, give = {shatter = 1}}
- },
- blunts = {
- blunt = {take = {bluntwrap = 1, grindedweed = 1}, give = {blunt = 1}},
- chewyblunt = {take = {bluntwrap = 1, grindedweed = 1, loosecoke = 1}, give = {chewyblunt = 1}},
- leanblunts = {take = {leanbluntwrap = 1, grindedweed = 1}, give = {leanblunts = 1}},
- dextroblunts = {take = {dextrobluntwrap = 1, grindedweed = 1}, give = {dextroblunts = 1}}
- },
- bluntwrap = {
- leanbluntwrap = {take = {bluntwrap = 5, mdlean = 1}, give = {leanbluntwrap = 5}},
- dextrobluntwrap = {take = {bluntwrap = 5, mdreddextro = 1}, give = {dextrobluntwrap = 5}},
- }
- },
-}
-
-function GetRecipe(source, type, method, tier)
- return ps.craftItem(source, recipe[type][method][tier])
-end
-
-ps.registerCallback('md-drugs:server:GetRecipe', function(source, type, cat)
- if not source then return false end
- return recipe[type][cat]
-end)
-
-function craft(source, tbl, item)
- local src = source
- local need, have = 0,0
- for k, v in pairs(tbl.take) do
- if ps.hasItem(src, k, v) then
- have = have + v
- end
- need = need + v
- end
- if need == have then
- for k, v in pairs (tbl.take) do
- ps.removeItem(src, k, v)
- end
- ps.addItem(src, item , tbl.amount)
- return true
- end
- return false
-end
\ No newline at end of file
diff --git a/server/shops.lua b/server/shops.lua
deleted file mode 100644
index 2646b2f..0000000
--- a/server/shops.lua
+++ /dev/null
@@ -1,89 +0,0 @@
-
-local Target = {
- Travellingmerchant = { -- where the travelling merchant can spawn
- vector4(-119.66, -977.43, 304.25, 88.21),
- vector4(-1522.93, 1476.01, 111.45, 41.25),
- vector4(-3278.98, 973.38, 5.35, 101.53),
- },
-}
-
-local loc = Target.Travellingmerchant[math.random(1, #Target.Travellingmerchant)]
-
-ps.registerCallback('md-drugs:server:GetMerchant', function(source)
- return loc
-end)
-
-function getRandW(src)
- local rand = math.random(1, #Target.oxylocations)
- return Target.oxylocations[rand]
-end
-
-local stores = {
- travel = {
- {name = "tab_paper", price = 50, amount = 50, },
- {name = "bakingsoda", price = 25, amount = 50, },
- {name = "isosafrole", price = 25, amount = 50, },
- {name = "mdp2p", price = 25, amount = 50, },
- {name = "lysergic_acid", price = 25, amount = 50, },
- {name = "diethylamide", price = 25, amount = 50, },
- {name = "lockpick", price = 2, amount = 1000, },
- {name = "emptyvial", price = 2, amount = 1000, },
- {name = "needle", price = 2, amount = 1000, },
- {name = "cokeburner", price = 25, amount = 50, },
- {name = "crackburner", price = 2, amount = 50, },
- {name = "lsdburner", price = 2, amount = 50, },
- {name = "heroinburner", price = 2, amount = 50, },
- {name = "mdlean", price = 50, amount = 50, },
- {name = "weedgrinder", price = 25, amount = 50, },
- {name = "mdbutter", price = 25, amount = 50, },
- {name = "flour", price = 25, amount = 50, },
- {name = "chocolate", price = 25, amount = 50, },
- {name = "butane", price = 25, amount = 50, },
- {name = "butanetorch", price = 2, amount = 1000, },
- {name = "dabrig", price = 2, amount = 1000, },
- {name = "mdwoods", price = 2, amount = 1000, },
- {name = "leancup", price = 25, amount = 50, },
- {name = "xtcburner", price = 25, amount = 50, },
- },
-
- Products = {
- {name = "weed_white-widow_seed", price = 15, amount = 150, minrep = 0},
- {name = "weed_skunk_seed", price = 15, amount = 150, minrep = 0},
- {name = "weed_purple-haze_seed", price = 15, amount = 150, minrep = 0},
- {name = "weed_og-kush_seed", price = 15, amount = 150, minrep = 0},
- {name = "weed_amnesia_seed", price = 15, amount = 150, minrep = 0},
- },
- ProductsStupidNameRewrite = {
- {name = "weed_whitewidow_seed", price = 15, amount = 150, minrep = 0},
- {name = "weed_skunk_seed", price = 15, amount = 150, minrep = 0},
- {name = "weed_purplehaze_seed", price = 15, amount = 150, minrep = 0},
- {name = "weed_ogkush_seed", price = 15, amount = 150, minrep = 0},
- {name = "weed_amnesia_seed", price = 15, amount = 150, minrep = 0},
- }
-}
-
-ps.registerCallback('md-drugs:server:menu', function(source, data)
- local src = source
- if data == 'travellingMerchant' then
- return {table = stores.travel, des = '$', id = 'travellingMerchant', title = 'travelling Merchant'}
- elseif data == 'dealermenu' then
- local table
- if Config.StupidassNewQbItemName then table = stores.ProductsStupidNameRewrite else table = stores.Products end
- return {table = table, id = 'dealermenu', title = "Dealer Menu"}
- elseif data == 'WeedShop' then
- return {table = stores.Weed, id = 'WeedShop', title = "Weed Shop"}
- end
-end)
-
-RegisterServerEvent("md-drugs:server:purchaseGoods", function(amount, money, item, price,table,num)
- local src = source local Player = getPlayer(src)
- for i = 1, #table do
- if table[i].name == item then
- if not table[i].price == price then return end
- if Player.Functions.RemoveMoney(tostring(money), tonumber(table[i].price) * tonumber(amount)) then
- AddItem(src, item, amount)
- --Log(GetName(src) .. ' Bought ' .. amount .. ' Of ' .. item .. ' For ' .. tonumber(price) * tonumber(amount) .. '!', 'merchant')
- end
- end
- end
-end)
diff --git a/server/shrooms.lua b/server/shrooms.lua
index 1184ad4..4720c32 100644
--- a/server/shrooms.lua
+++ b/server/shrooms.lua
@@ -2,10 +2,10 @@
ps.createUseable('shrooms', function(source, item)
local src = source
if not ps.callback("md-drugs:client:shrooms", src) then
- ps.notify(src, ps.lang('Shrooms.cancel'), "error")
+ ps.notify(src, ps.lang('shrooms.cancel'), "error")
return
end
ps.removeItem(src, 'shrooms', 1)
- ps.notify(src, 'You Took Some Shrooms!', 'success')
+ ps.notify(src, ps.lang('shrooms.took'), 'success')
end)
diff --git a/server/weed.lua b/server/weed.lua
index 0bdcf5e..ada2aab 100644
--- a/server/weed.lua
+++ b/server/weed.lua
@@ -30,6 +30,24 @@ local weedStore = {
mdwoods =2,
}
+local weed = {
+ blunts = {
+ blunt = {take = {bluntwrap = 1, grindedweed = 1}, give = {blunt = 1}},
+ chewyblunt = {take = {bluntwrap = 1, grindedweed = 1, loosecoke = 1}, give = {chewyblunt = 1}},
+ leanblunts = {take = {leanbluntwrap = 1, grindedweed = 1}, give = {leanblunts = 1}},
+ dextroblunts = {take = {dextrobluntwrap = 1, grindedweed = 1}, give = {dextroblunts = 1}}
+ },
+ bluntwrap = {
+ leanbluntwrap = {take = {bluntwrap = 5, mdlean = 1}, give = {leanbluntwrap = 5}},
+ dextrobluntwrap = {take = {bluntwrap = 5, mdreddextro = 1}, give = {dextrobluntwrap = 5}},
+ }
+}
+
+ps.registerCallback('md-drugs:server:GetWeedRecipe', function(source, tableName)
+ if not source then return false end
+ return weed[tableName]
+end)
+
ps.registerCallback('md-drugs:server:GetWeedLocs', function(source)
return weedLocs
end)
@@ -37,20 +55,21 @@ end)
ps.registerCallback('md-drugs:server:getWeedItems', function(source)
return weedStore
end)
+
RegisterNetEvent('md-drugs:server:buyWeedItem', function(loc, name, amount)
local src = source
if not ps.checkDistance(src, weedLocs.WeedSalesman[loc].loc, 3.5) then
- ps.notify(src, ps.lang('Weed.notHere'), "error")
+ ps.notify(src, ps.lang('Checks.notIn'), "error")
return
end
if not weedStore[name] then
- ps.notify(src, ps.lang('Weed.notHere'), "error")
+ ps.notify(src, ps.lang('weed.itemDoesntExist'), "error")
return
end
if ps.removeMoney(src, 'cash', weedStore[name] * amount) or ps.removeMoney(src, 'bank', weedStore[name] * amount) then
ps.addItem(src, name, amount)
else
- ps.notify(src, ps.lang('Weed.noMoney'), "error")
+ ps.notify(src, ps.lang('Catches.notEnoughMoney'), "error")
end
end)
@@ -59,12 +78,12 @@ RegisterServerEvent('md-drugs:server:dryoutweed', function()
if ps.removeItem(src,"wetcannabis", 1) then
ps.addItem(src,"drycannabis", 1)
else
- ps.notify(src, ps.lang('Weed.nodry'), "error")
+ ps.notify(src, ps.lang('weed.noDry'), "error")
end
end)
local bluntwrap = {'mdreddextro','mdlean'}
-for k, v in pairs (bluntwrap) do
+for k, v in pairs (bluntwrap) do
ps.createUseable(v, function(source, item) TriggerClientEvent('md-drugs:client:makeBluntWrap', source) end)
end
@@ -77,7 +96,10 @@ end
RegisterServerEvent('md-drugs:server:MakeWeedItems', function(data)
local src = source
- if not GetRecipe(src, data.recipe, data.table, data.item) then return end
+ if not ps.craftItem(src, weed[data.table][data.item]) then
+ verifyHas(src, weed[data.table][data.item].take)
+ return
+ end
end)
@@ -88,13 +110,13 @@ ps.createUseable("dabrig", function(source, item)
TriggerClientEvent("md-drugs:client:dodabs", src)
end
else
- ps.notify(src, 'You Need A Butane Torch', 'error')
+ ps.notify(src, ps.lang('weed.needItem', ps.getItemLabel("butanetorch")), 'error')
end
end)
ps.createUseable("weedgrinder", function(source, item)
local src = source
- if not ps.hasItem(src, "drycannabis") then ps.notify(src, 'You Need Dried Cannabis', 'error') return end
+ if not ps.hasItem(src, "drycannabis") then ps.notify(src, ps.lang('weed.needItem', ps.getItemLabel("drycannabis")), 'error') return end
local check = ps.callback('md-drugs:client:uncuff', src, 'Grinding Weed')
if not check then return end
if ps.removeItem(src, "drycannabis",1 ) then
@@ -104,7 +126,7 @@ end)
ps.createUseable("mdwoods", function(source, item)
local src = source
- local check = ps.callback('md-drugs:client:uncuff', src, 'Breaking Blunt Open')
+ local check = ps.callback('md-drugs:client:uncuff', src, ps.lang('weed.crackBlunt'))
if not check then return end
if ps.removeItem(src, "mdwoods",1 ) then
ps.addItem(src, "bluntwrap", 5)
diff --git a/server/wholesale.lua b/server/wholesale.lua
index 9f3f8eb..5e35334 100644
--- a/server/wholesale.lua
+++ b/server/wholesale.lua
@@ -14,15 +14,33 @@ local Price = {
heroin = {min = 20, max = 60},
xtc = {min = 20, max = 60},
}
+local locs = {
+ vector4(-2352.32, 266.78, 165.3, 23.46),
+ vector4(-1467.49, 874.01, 183.59, 298.45),
+ vector4(-856.71, 874.26, 202.85, 205.3),
+ vector4(950.58, -128.49, 74.42, 205.3),
+ vector4(1152.71, -328.43, 69.21, 205.3),
+ vector4(112.66, -1955.67, 20.75, 37.94),
+ vector4(-544.4, -1684.8, 19.89, 252.07),
+ vector4(-1185.02, -1805.4, 3.91, 184.83),
+ vector4(-1641.4, -981.99, 7.58, 35.38),
+ vector4(-1827.93, 782.36, 138.29, 219.99),
+ vector4(-320.84, 2818.73, 59.45, 337.22),
+ vector4(474.88, 2609.56, 44.48, 357.0),
+}
+function getRandW(src)
+ local rand = math.random(1, #locs)
+ return locs[rand]
+end
for k, v in pairs (burners) do
- CUI(k, function(source, item)
+ ps.createUseable(k, function(source, item)
local src = source
local Player = getPlayer(src)
- if getCops() < Config.PoliceCount then return ps.notify(src, Lang.Wholesale.na, 'error') end
+ if getCops() < Config.PoliceCount then return ps.notify(src, ps.lang('wholesale.notEnoughCops'), 'error') end
for m, d in pairs (active) do
if d.cid == Player.PlayerData.citizenid then
- return ps.notify(src, Lang.Wholesale.al, 'error' )
+ return ps.notify(src, ps.lang('wholesale.alreadyWholesale'), 'error' )
end
end
local tab = ''
@@ -31,17 +49,17 @@ for k, v in pairs (burners) do
if k == 'lsdburner' then tab = 'lsd' end
if k == 'heroinburner' then tab = 'heroin' end
if k == 'xtcburner' then tab = 'xtc' end
- if RemoveItem(src, k, 1) then
+ if ps.removeItem(src, k, 1) then
table.insert(active, {
src = src,
item = k,
location = getRandW(src),
- cid = Player.PlayerData.citizenid,
+ cid = ps.getIdentifier(src),
type = v,
price = Price[tab]
})
for m, d in pairs (active) do
- if d.cid == Player.PlayerData.citizenid then
+ if d.cid == ps.getIdentifier(src) then
TriggerClientEvent("md-drugs:client:GetLocation", src, active[m])
end
end
@@ -51,15 +69,18 @@ end
RegisterNetEvent('md-drugs:server:SuccessSale', function(data)
local src = source
- local Player = getPlayer(src)
- for k, v in pairs (active) do
- if v.cid == Player.PlayerData.citizenid then
+ for k, v in pairs (active) do
+ if v.cid == ps.getIdentifier(src) then
+ if not ps.checkDistance(src, v.location, 4.0) then
+ return ps.notify(src, ps.lang('Catches.notIn'), "error")
+ end
local payout = math.random(v.price.min, v.price.max)
- for m, d in pairs (v.type) do
- local git = Player.Functions.GetItemByName(d)
- if git and git.amount >= 1 then
- RemoveItem(src, d, git.amount)
- Player.Functions.AddMoney('cash', git.amount * payout)
+ for m, d in pairs (v.type) do
+ local git = ps.getItemCount(src, d)
+ if git >= 1 then
+ if ps.removeItem(src, d, git) then
+ ps.addMoney('cash', git * payout)
+ end
end
table.remove(active, k)
end
diff --git a/server/xtc.lua b/server/xtc.lua
index 848844f..77a57aa 100644
--- a/server/xtc.lua
+++ b/server/xtc.lua
@@ -53,9 +53,30 @@ local xtcLocations = {
{loc = vector3(844.71, -900.56, 25.43), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
},
}
+
ps.registerCallback('md-drugs:server:GetXtcLocs', function(source)
return xtcLocations
end)
+
+local function craft(source, tbl, item)
+ local src = source
+ local need, have = 0,0
+ for k, v in pairs(tbl.take) do
+ if ps.hasItem(src, k, v) then
+ have = have + v
+ end
+ need = need + v
+ end
+ if need == have then
+ for k, v in pairs (tbl.take) do
+ ps.removeItem(src, k, v)
+ end
+ ps.addItem(src, item , tbl.amount)
+ return true
+ end
+ return false
+end
+
local activePresses = {}
local timeout = {}
@@ -69,20 +90,26 @@ end
RegisterServerEvent('md-drugs:server:stealisosafrole', function(num)
local src = source
- if not ps.checkDistance(src, xtcLocations.isosafrole[num].loc, 3.0) then return end
+ if not ps.checkDistance(src, xtcLocations.isosafrole[num].loc, 3.0) then
+ ps.notify(src, ps.lang('Checks.notIn'), "error")
+ return
+ end
if timeout[ps.getIdentifier(src)] then
- ps.notify(src, 'You are still waiting for the last minigame to finish', 'error')
+ ps.notify(src, ps.lang('Catches.cooldown'), 'error')
return
end
timeOut(src)
- ps.addItem(src, "isosafrole", 1)
+ ps.addItem(src, "isosafrole", 1)
end)
RegisterServerEvent('md-drugs:server:stealmdp2p', function(num)
local src = source
- if not ps.checkDistance(src, xtcLocations.mdp2p[num].loc, 3.0) then return end
+ if not ps.checkDistance(src, xtcLocations.mdp2p[num].loc, 3.0) then
+ ps.notify(src, ps.lang('Checks.notIn'), "error")
+ return
+ end
if timeout[ps.getIdentifier(src)] then
- ps.notify(src, 'You are still waiting for the last minigame to finish', 'error')
+ ps.notify(src, ps.lang('Catches.cooldown'), 'error')
return
end
timeOut(src)
@@ -126,7 +153,7 @@ end)
RegisterServerEvent('md-drugs:server:makextc', function(data)
local src = source
if not activePresses[ps.getIdentifier(src)] then
- ps.notify(src, 'You Dont Have A Pill Press', 'error')
+ ps.notify(src, ps.lang('xtc.noPressOut'), 'error')
return
end
craft(src, RecipeList[activePresses[ps.getIdentifier(src)].press][data], data)
@@ -137,14 +164,14 @@ RegisterServerEvent('md-drugs:server:buypress', function()
if ps.removeMoney(src,"cash", RecipeList.presses['singlepress'].cash) then
ps.addItem(src, "singlepress", 1)
else
- ps.notify(ps.lang('xtc.cash'), "error")
+ ps.notify(src, ps.lang('Catches.notEnoughMoney'), "error")
end
end)
RegisterServerEvent('md-drugs:server:upgradepress', function(data)
local src = source
if not ps.checkDistance(src, xtcLocations.xtcpress[data].loc, 2.0) then
- ps.notify(src, ps.lang('xtc.toofar'), "error")
+ ps.notify(src, ps.lang('Catches.notIn'), "error")
return
end
craft(src, RecipeList.presses[data], data)
@@ -156,9 +183,12 @@ end)
------------- making powder
RegisterServerEvent('md-drugs:server:makingrawxtc', function(num)
local src = source
- if not ps.checkDistance(src, xtcLocations.rawxtcloc[num].loc, 3.0) then return end
+ if not ps.checkDistance(src, xtcLocations.rawxtcloc[num].loc, 3.0) then
+ ps.notify(src, ps.lang('Checks.notIn'), "error")
+ return
+ end
if timeout[ps.getIdentifier(src)] then
- ps.notify(src, 'You are still waiting for the last minigame to finish', 'error')
+ ps.notify(src, ps.lang('Catches.cooldown'), 'error')
return
end
timeOut(src)
@@ -174,10 +204,8 @@ local function getColor(color)
}
if colors[color] then
return colors[color][math.random(#colors[color])]
- else
- ps.notify('Invalid color specified', 'error')
- return nil
end
+ return nil
end
RegisterServerEvent('md-drugs:server:stamp', function(num, color)
@@ -199,7 +227,7 @@ RegisterServerEvent('md-drugs:server:stamp', function(num, color)
elseif ps.removeItem(src, colors[color].."4", 1) then
ps.addItem(src, item..'4', 1)
else
- ps.notify('You Dont Have Unstamped '..color..' Pills', 'error')
+ ps.notify(src, ps.lang('xtc.noPills'), 'error')
end
end)
diff --git a/serverRun.lua b/serverRun.lua
index 42cf07c..37febbe 100644
--- a/serverRun.lua
+++ b/serverRun.lua
@@ -16,7 +16,6 @@ function loadFile(filePath)
ps.error("Error executing Lua chunk from '" .. filePath .. "': " .. tostring(execErr))
return false
end
- ps.success("Successfully loaded module '" .. filePath .. "' from resource '" .. resourceName .. "'.")
return true
end
diff --git a/shared/config.lua b/shared/config.lua
index 3820cd8..0989d61 100644
--- a/shared/config.lua
+++ b/shared/config.lua
@@ -1,17 +1,12 @@
Config = {} --Ignore.
ps = exports.ps_lib:init()
-ps.loadLangs("wookie")
-Config.respawnTime = 3 -- Seconds
+ps.loadLangs("en")
+
+Config.respawnTime = 100 -- Seconds
Config.Fuel = "LegacyFuel" -- type the name of script you use i.e. ps-fuel, cdn-fuel, LegacyFuel
Config.TierSystem = true -- allows for three tiers of certain drugs ( coke, heroin, crack, lsd)
-Config.StupidassNewQbItemName = true -- true if you have updated your items.lua from base qb after november 2023 because changing item names this far in a framework is 3 IQ points total
Config.RequestModelTime = 30000 -- if you need more time than this, uhhhh wow
-Config.FancyCokeAnims = true -- if you want multi location this needs to be false
-
-Config.Joblock = false -- if you want weed to be a job
-Config.weedjob = "" -- what the job name is
Config.Badtrip = 20 -- number means % chance to spawn a clone that chases and attacks while on mescaline
-Config.MethHeist = false
Config.SuccessfulChance = 90 --- this is the chance of a Success wholesale 1-100
Config.AlertPoliceWholesale = 90 -- 1-100 of how often it will alert police
Config.WholesaleTimeout = 600 -- time in seconds to get to the location
@@ -52,11 +47,11 @@ Config.minigametype = 'ox' -- look above for options or choose none if you dont
---
Config.Drugs = {
cocaine = true,
- consumables =false,
- crack = true,
+ consumables = true,
cornerselling = true,
+ crack = true,
+ deliveries = true,
heroin = true,
- deliveries = false,
lean = true,
lsd = true,
mescaline = true,
@@ -64,6 +59,7 @@ Config.Drugs = {
oxyruns = true,
pharma = true,
shrooms = true,
+ TravelingMerchant = true,
weed = true,
wholesale = false,
xtc = true,
From 51059f6aed3a6f4a81416b9fec1610eff9cfa5b8 Mon Sep 17 00:00:00 2001
From: Mustache Dom <123716453+Mustachedom@users.noreply.github.com>
Date: Sat, 9 Aug 2025 03:25:40 -0600
Subject: [PATCH 13/37] - uwu and wookie
---
locales/es.lua | 0
locales/uwu.lua | 476 ++++++++++++++++++++-------------------------
locales/wookie.lua | 474 ++++++++++++++++++++------------------------
3 files changed, 417 insertions(+), 533 deletions(-)
create mode 100644 locales/es.lua
diff --git a/locales/es.lua b/locales/es.lua
new file mode 100644
index 0000000..e69de29
diff --git a/locales/uwu.lua b/locales/uwu.lua
index d52d9ac..47bb922 100644
--- a/locales/uwu.lua
+++ b/locales/uwu.lua
@@ -1,303 +1,245 @@
Lang = {}
-Lang.targets = {
- coke = {
- pick = 'Pick Widdle Leafies 🌼',
- cut = 'Cutty-Wutty Leaf-Powder',
- bag = 'Baggie-Waggie Time!',
- enter = 'Enter Snuggle Shack~ 🏠💕',
- exit = 'Bye-Bye, Cozy Room! 👋✨',
- chop = 'Chop-Chop Leafies Into Fluff! ✂️🍃',
- },
- CornerSell = {
- sell = 'Sell %s Of Cuddle-Dust For $%s 💸💗',
- deny = 'No Thx, Not Cute Enough Offer! 💢'
- },
- crack = {
- cook = 'Cook Widdle Sparkle-Rocks 💫🔥',
- bag = 'Baggie Up Shiny Pebbles! ✨🧺'
- },
- Delivery = {
- Deliver = 'Deliver Wuv Parcel For %s 📦💞',
- open = 'Open Cuddle-Cafe Shop~ 🍰🐾',
- hand = 'Handie-Hand Over Giftie! 🎁🤗'
- },
- heroin = {
- pick = 'Pick Poppies (So Fluffy! 🌸)',
- up = 'Pick Up Widdle Table',
- dry = 'Dry Poppies In Sunbeam ☀️🌼',
- cut = 'Cut Heroin With Sugar-Puff ✨🍬',
- cook = 'Cook Widdle Dream-Dust 💤🔥',
- kit = 'Buy Dream-Lab Kit (So Cute! 🧪🎀)',
- clean = 'Clean Widdle Lab Table 🧽✨',
- fill = 'Fill Syringe (Itsy-Bitsy Poke!) 💉💖',
- vial = 'Make Lil’ Sparkle-Vial 💎💉',
- },
- lean = {
- git = 'Get Widdle Taskie',
- st = 'Steal From Car (Shh! 👀🚗)'
- },
- lsd = {
- buy = 'Buy Magic Lab Kit ✨🧪',
- heat = 'Warm Widdle Liquids (Like Tea! 🫖)',
- refine = 'Make Shiny-Quality Magic 💫✨',
- paper = 'Make Magic-Paper Sheets 📜🌈',
- back = 'Pick Up Magic Kit 🎒💫',
- dab = 'Dab Magic On Paper (Gently! 💧🌸)',
- clean = 'Clean Widdle Table 🧼✨',
- lys = 'Steal Sparkle-Acid (Shh! 🤫✨)',
- die = 'Steal Dream-Ether (Super Secret! 🌌)',
- buyt = 'Buy Magic Tabs 🌈💊',
- },
- mescaline = {
- pick = 'Pick Widdle Cactus (Ouchless!) 🌵🫶',
- dry = 'Dry Cactus In Sunny Spot ☀️🌵',
- },
- meth = {
- bag = 'Baggie Up Sparkle-Dust ✨🧺',
- enter = 'Enter Cozy Lab Hut 🏡💖',
- exit = 'Exit Snuggle Zone 👋💕',
- cook = 'Cook Widdle Glitter-Bits 🔬🔥',
- tray = 'Grab Shiny Tray ✨🍽️',
- box = 'Box Up Cuddle-Crystals 📦💗',
- adjust = 'Adjust Widdle Heat (Not Too Hot! 🔥😅)',
- eph = 'Steal Widdle Ephedrine (Shhh! 🤫)',
- ace = 'Steal Acetone (It Smells Funny! 👃✨)',
- mission = 'Get Cute Mission Taskie 📝🐰',
- stealfromcar = 'Grabby-Grab From Car (No One Saw! 👀🚗)',
- },
- oxy = {
- pack = 'Get Cuddle-Package 📦🤗',
- talk = 'Talk To Widdle Buyer (Be Nice! 🥺💬)',
- pay = 'Pay For Truckie (With Sparkle-Cash! 💵✨)',
- },
- pha = {
- fill = 'Fill Widdle Prescription (Doctor Mode! 🩺📋)',
- },
- shrooms = {
- pick = 'Pick Widdle Mushies 🍄🫶',
- },
- travel = {
- travel = 'Open Wandering Merchant Cart 🛺✨',
- },
- xtc = {
- iso = 'Steal Isosafrole (Shiny Stuff! ✨)',
- mdp = 'Steal MDP2P (Super Secret! 🤫🔬)',
- raw = 'Make Raw Sparkle-Dust 💫🧪',
- press = 'Buy Pill-Press (Cute Machine! 🤖💖)',
- stamp = 'Stamp Widdle Pills (Like Cookies! 🍪)',
- make = 'Make XTC (With Love! 💗)',
- pick = 'Pick Up Press (It’s Heavy! 💪)',
- },
- weed = {
- pick = 'Pick Widdle Weedies 🌿🫶',
- dry = 'Dry Weed In Breezy Spot 🌬️🍃',
- dpick = 'Pick Dried Weedies (Crunchy!) 🍂',
- butt = 'Open Edible Bakery Menu 🧈🍪',
- oil = 'Make Magic Oil (For Yummy Food! 🍲)'
- },
- Wholesale = {
- talk = 'Talk To Big Cuddle Buyer 💬💞'
- },
+Lang.Catches = {
+ notIn = 'Nya~ You\'re not in the right spot! >_<',
+ needItems = 'Aww... you don’t have all da items I need... 😢',
+ notEnoughMoney = 'Oof, you’re too broke, sweetie 💸',
+ buySuccess = 'Yay! You bought %s %s for $%s! 💖',
+ itemMissings = 'You need:\n%s',
+ itemNeeded = 'You need %s... plz go get it! 🥺',
+ cooldown = 'Silly baka, slow down! ⏳',
+ invalidItem = 'Eh? This item isn’t sold here, silly! 🙃',
}
--- 💖 COKE: Widdle Leafie Fun 💖
-Lang.Coke = {
- picking = "Picking Widdle Leafies~ 🍃🫶",
- makepow = 'Chopping Leafies Into Fluffy Powder ✨✂️',
- cutting = 'Cutting Cuddle-Dust With Sugar-Puff 🍬💫',
- bagging = "Bilbo Baggins Mode: ACTIVATED! 🧳🐰",
- cut = "You Cut Some Widdle Cuddle-Dust~ 💖",
- nocutcoke = "No Leafies? No Cutty! Silly Billy! 😝",
- bagcoke = "You Bagged Up Sparkle-Fluff! ✨🧺",
- nobagcoke = "No Cuddle-Dust? No Baggin’! 😿",
+Lang.coke = {
+ targetPick = 'Pick a coca leef (so fresh! 🌿)',
+ picking = 'Picking leefs... so crunchy~ 💚',
+ targetMakePow = 'Make pow-pow from leefs 💨',
+ noleaf = 'Nooo leef? No pow! 😿',
+ makePow = 'Choppin’ leefs into fine pow~ ✂️✨',
+ targetCutCoke = 'Cut da coke, cut it real good ✂️💎',
+ targetBagCoke = 'Bag it up, pretty lil’ bags! 🎀',
+ teleIn = 'Enter the secret lab~ 🔐',
+ teleOut = 'Leave the lab... for now... 👋',
+ needBakingSoda = 'You need bakie soda, silly! 🧂',
}
--- 💎 CRACK: Sparkle-Rock Time 💎
-Lang.Crack = {
- cookcrack = "Cooking Widdle Sparkle-Pebbles 💫🔥",
- bagcrack = 'Bilbo Baggin’ Mode: GO! 🎒✨',
- makecrack = 'Nice Sparkle-Rocks, Bestie! 💎💖',
- nocoke = 'Can’t Make Sparkles Without Leafies, Silly! 🤪🍃'
-}
-
--- 🌈 CORNER SELLING: Cuddle Salesperson Mode 🌈
Lang.Cornerselling = {
- inveh = 'STRANGER DANGER! No Car Rides! 🚫🚗',
- toofar = "Too Far From Cuddle Corner, Cutie! 🏃♂️💔",
- selling = 'Selling %s For $%s (With Hugs! 🤗)',
- deny = "Nuh-Uh! Not Cute Enough! 💢",
- start = "Let’s Get That Sparkle-Cash! 💵✨",
- stop = "Lazy Muffin! Go Sell! 🥐💤",
- nodrugs = "Selling Air? That’s Not Cute! 🌬️❌",
- notcops = "Not Enough Cops Watching… Suspicious! 👮♂️👀",
- no = 'You Can’t Sell Here, Snuggle-Puff! 🚫💕',
- sell = "Selling Cuddle-Goods~ 🛍️💗",
+ inVeh = 'No sellin’ from da car, weirdo! 🚗❌',
+ selling = 'Selling %s for $%s... cha-ching! 💵',
+ deny = 'NOPE! I don’t like dis offer! 🙅♀️',
+ wait = 'Waiting for a cutie customer... 👀',
+ nodrugs = 'You got no drugs to sell... 😔',
+ searching = 'Looking for lil’ customers nearby... 🔍',
+ targetTakeBack = 'Take back my stuff! 🫵',
+ targetSell = 'Sell %s of %s for $%s 💼',
+ targetDeny = 'Say no to dumb offers! 🚫',
+ stopped = 'You gave up?? Booo! 😤',
+ start = 'Go make mama proud, cutie! 💪',
+ gotRobbed = 'Owie... you got robbed... 💔',
+ gotBack = 'Yay! You got your stuff back! 🎉',
+ notEnough = 'You don’t have enough, silly! 🥺',
+ comDes = 'Sell drugs on da corner, hustler~ 🕶️',
}
--- 📦 DELIVERY: Wuv Parcel Hustle 📦
-Lang.Delivery = {
- emailn = 'Not A Cuddle-Dealer… Yet! 😉',
- emailsub = 'Hurry, Cutie! Deliver the Sparkle-Parcel! ⏳📦',
- emailcon = 'If It Doesn’t Arrive, I’ll Tell Your Mom You Said “Fwump!” Just Bring %s Of %s!!! 😾💌',
- search = "Looking For Widdle Delivery… 🕵️♀️💖",
- none = "Nothin’ Near… Sad Pouty Face… (。;﹏;。)",
- busy = "Still Doing The Last One, Silly! 🐢",
- found = "Marked On Mapie-Wapie! 🗺️✨",
- already = "Already Delivering, Bestie! 🚚💞",
- checkrep = "Current Cuddle Rep: ",
- pack = 'Handing Off Wuv Parcel 🎁🤗',
+Lang.crack = {
+ targetMake = 'Cook some crack, bby 💣',
+ cook = 'Cookin’ crack... smoky smoky~ 💨',
+ targetBag = 'Bag da crack, make it purrty~ 🎀',
+ bag = 'Baggin’ crack like a pro! 💼',
}
--- 💤 HEROIN: Dream-Dust Crafting 💤
-Lang.Heroin = {
- pick = "Picking Up Poppies (So Soft! 🌸)",
- tableout = 'You Already Have A Widdle Table Out! 🪑',
- dryout = "Drying Poppies In Sunbeam ☀️🌼",
- cutting = "Cutting Dream-Dust With Sugar-Puff 🍬✨",
- secret = "SHHHHHHHHHH! 🤫💖",
- table = "Placing Widdle Table Down 🪑🫶",
- success = "Heated Dream-Dust Just Right! 💖🔥",
- clean = 'Cleaning Widdle Dream Table 🧽✨',
- needles = 'Filling Syringe (Itsy-Bitsy Poke!) 💉💗',
- pickup = 'Picking Up Widdle Table (Heavy! 💪)',
- cutheroin = 'You Made Some Cut Dream-Dust~ 💫',
- noheroin = "No Dream-Dust? No Cutty! Silly! 😝",
- vial = 'You Made A Sparkle-Vial! 💎💉',
- novial = "No Dream-Dust? No Vials! 😿",
- fail = 'You Over-Heated Them, Silly! 🔥😅',
- fill = 'Filled The Syringe With Cuddle-Juice 💉💖',
- nofill = 'No Dream-Dust? No Filly! 😾',
- haskit = 'You Already Have A Dream Lab Kit! 🧪🎀'
+Lang.Deliveries = {
+ targetGetDel = 'Get a delivery mission, go go! 🚚',
+ targetOpenShop = 'Open your lil’ shop! 🏪',
+ shopHeader = 'Deally Dealer Shop 💊',
+ targetHandOff = 'Hand off da package, quick! 📦',
+ delivering = 'Givin’ da package to da dealer... 💌',
+ alreadyDelivering = 'You’re already deliverin’, silly! 🐢',
+ slowAf = 'Tooo slow! Mission failed... 😵',
+ newDealerHelp = {
+ help = 'Place a new dealer friend! 🤝',
+ name = 'What’s their name?',
+ timeMin = 'Min time (mins)',
+ timeMax = 'Max time (mins)',
+ },
+ DealerExists = 'Oopsie! Dealer already here! 🙈',
+ deleteDealer = {
+ help = 'Delete a dealer... bye bye~ 👋',
+ name = 'Dealer name to delete?',
+ },
+ deleteDealerSuccess = 'Dealer deleted! Peace out! ✌️',
+ deleteDealerFail = 'Couldn’t delete... maybe they ran? 🏃♂️',
}
--- 🟪 LEAN: Purple Hug Juice 🟪
-Lang.Lean = {
- marked = 'Car Marked On Mapie-Wapie! 🚗📍',
- lean = 'You Got Purple Hug Juice~ 💜🥤',
- dextro = 'You Got Red Sparkle-Syrup! 🔴💉',
- act = 'You Already Have A Lean Taskie! 📋🐰',
+Lang.heroin = {
+ targetPick = 'Pick up da plant, bby~ 🌱',
+ picking = 'Picking plant... so fresh! 💚',
+ targetCook = 'Cook da heroin, make it strong 💪',
+ pbCook = 'Cookin’ up some strong stuff... 🔥',
+ targetPickup = 'Pick up lab table~ 🧪',
+ pbPickup = 'Picking up da lil’ lab... 🧫',
+ targetClean = 'Clean da lab, make it sparkly ✨',
+ pbClean = 'Wiping down da table... 🧼',
+ targetDry = 'Dry da plant, make it cruncky~ 💤',
+ pbDry = 'Drying da plant... patience, bby~ ⏳',
+ targetCutHeroin = 'Cut da heroin, make it pretty ✂️',
+ pbCutHeroin = 'Cutting like a pro chef! 👩🍳',
+ targetBuyKit = 'Buy a heroin lab kit? 💰',
+ pbBuyKit = 'Buying da kit... now you’re official! 🎉',
+ tableout = 'You already got a table out, silly! 🙃',
+ placing = 'Placing da table... science time! 🔬',
+ targetFill = 'Fill da syringe... be careful! 💉',
+ pbFill = 'Filling da needle... drip drip~ 💧',
+ hasKitAlready = 'You already got a kit, silly! 🤪',
+ notEnoughMoney = 'You need $%s in cash, cutie 💸',
+ placedKit = 'You placed your lab kit! Science go! 🧪✨',
+ failed = 'Oof... you failed and lost it all... 😭',
+}
+
+Lang.lean = {
+ stealFromTruck = 'Steal from da truck, shhh~ 🤫',
+ startMission = 'Start da lean mission! 🍬',
+ notOnRun = 'You’re not on a run, silly! 🙅♂️',
}
--- 🌈 LSD: Magic Paper Fun 🌈
Lang.lsd = {
- steallys = 'Stealing Sparkle-Acid (Shh! 🤫✨)',
- stealdie = 'Stealing Dream-Ether (Super Secret! 🌌)',
- tableout = 'You Already Have A Magic Table Out! 🪑💫',
- tablepack = 'Packing Up Widdle Table 🧳✨',
- heat = 'Warming Widdle Liquids (Like Tea! 🫖)',
- clean = 'Cleaning Magic Table 🧽🌈',
- refine = 'Making Magic Extra Shiny! ✨🌟',
- dip = 'Dabbing Magic On Paper (Gently! 💧🌸)',
- buypaper = 'Buying Magic-Paper Sheets 📜💖',
- buykit = 'Buying Magic Lab Kit 🧪🎀',
- place = 'Placing Widdle Table Down 🪑🫶',
- hav = 'You Already Have A Magic Table! 🪑✨',
- lys = 'You Got Sparkle-Acid! ✨🧪',
- die = 'You Got Dream-Ether! 💫🌌',
- cleaned = 'You Cleaned It Perfectly! 🧽💖',
- madelsd = 'You Made Magic Paper! 🌈📄',
- failed = 'You Over-Heated Them, Silly! 🔥😅',
- refined = 'You Made It Extra Shiny! ✨🌟',
- broke = 'Your Broke-Pants Can’t Afford This! 💸❌',
- novial = 'No Magic Vials, Cutie! 😿',
+ targetHeat = 'Heat da LSD, make it bubble~ 🔥',
+ heating = 'Heating up... don’t burn it! 😳',
+ targetRefine = 'Refine da acid, make it pure 💎',
+ refining = 'Purifying da tabs... so shiny~ ✨',
+ targetDipping = 'Dip da tabs, make em glow 💫',
+ dipping = 'Dipping tabs like a cookie~ 🍪',
+ targetPickup = 'Pick up da lab kit~ 🎒',
+ packup = 'Packing up da lab... bye bye~ 👋',
+ targetClean = 'Clean da lab, make it sparkly ✨',
+ needCleaning = 'You need a cleaning kit, silly! 🧽',
+ cleaning = 'Cleaning da lab... so tidy~ 🧹',
+ targetLys = 'Steal lysergic acid... shhh~ 🤫',
+ stealLys = 'Snatching da acid... so sneaky~ 🦝',
+ targetDie = 'Steal diethylamide... risky! 😈',
+ stealDie = 'Grabbin’ da chems... ooooh~ 🔬',
+ targetBuyTab = 'Buy tab paper, make it pretty~ 📄',
+ targetBuyKit = 'Buy LSD lab kit? 💖',
+ alreadyOwn = 'You already got it, silly! 🙃',
+ buyingKit = 'Buying da kit... artist in da making! 🎨',
+ tableout = 'Table already out, no space! 🙈',
+ placing = 'Placing da lab down! Science time~ 🔬',
+ failed = 'You suck at making drugs... lol 😂',
}
--- 🌵 MESCALINE: Cactus Hugs 🌵
-Lang.mescaline = {
- pick = "Picking Widdle Cactus (Ouchless! 🌵🫶)",
- dry = 'Drying Cactus In Sunny Spot ☀️🌵',
- nocactus = 'No Cactus Bulbs, Sad Pouty… (。;﹏;。)',
- eat = 'Eating Mescaline (Have A Good Trip! 🌀✨)'
+Lang.mesc = {
+ targetPick = 'Pick da cactus, ouchie~ 🌵',
+ picking = 'Picking cactus... careful of spikes! 😬',
+ targetDry = 'Dry da cactus, make it powdery~ 💨',
+ dry = 'Drying slowly... patience, bby~ ⏳',
}
--- ✨ METH: Glitter-Bits Lab ✨
Lang.meth = {
- inside = 'Stuff Already Inside, Silly! 🧪📦',
- increaseheat = 'Turning Up Widdle Heat 🔥😅',
- mission = 'Car Marked On Mapie-Wapie! 🚗📍',
- ace = 'You Got Some Acetone (Smells Funny! 👃✨)',
- eph = 'You Got Some Ephedrine (Sparkle-Stuff! ✨)',
- mix = 'Mixing Widdle Ingredients (Like Baking! 🧁)',
- nobag = 'No Baggies, Sad Pouty… 😿',
- act = 'You Already Have A Taskie! 📝🐰',
+ alreadyChasing = 'You’re already chasin’ a truck, silly! 🚛',
+ targetStealFromCar = 'Steal from da meth car~ 🚗',
+ targetHeist = 'Start da meth mission! 💥',
+ started = 'Meth already cookin’, chill! 🧊',
+ increaseHeat = 'You turned up da heat... 🔥',
+ targetBag = 'Bag da meth, make it pretty~ 🎀',
+ targetCook = 'Cook da meth, make it strong 💪',
+ targetGrabTray = 'Grab da meth tray~ 🍽️',
+ targetHeat = 'Adjust da dials... science! 🔬',
+ targetSmash = 'Smash da tray, big baddie~ 💣',
+ targetStealEPH = 'Steal ephedrine... shhh~ 🤫',
+ stealingEPH = 'Snatching da ephedrine... 🧪',
+ targetStealACE = 'Steal acetone... 💨',
+ stealingACE = 'Grabbin’ da acetone... 🧫',
+ notOnRun = 'You’re not on a run, silly! 🙅♂️',
+ onCooldown = 'You’re on cooldown, take a nap~ 😴',
}
--- 💊 OXY: Cuddle-Pills 💊
Lang.oxy = {
- truck = 'Your Truckie Is Here! 🚚💖',
- cantcarry = 'You Not Strong Enough, Cutie! 💪😅',
- hand = 'Handing Over Cuddle-Pills 💊🤗',
- empty = 'Can’t Be Empty-Handed, Silly! 🖐️❌',
- broke = 'Your Broke-Pants Can’t Pay! 💸❌',
- hot = 'Car Is Hot! Dump It Now! 🔥🚗',
- next = 'Go To Next Wuv Spot! 🌟📍'
+ ditchCar = 'Da van is hot! Ditch it quick! 🚨',
+ targetHandoff = 'Hand off da package, fast! 📦',
+ handingoff = 'Givin’ da package... done! ✅',
+ emptyHands = 'Your hands are empty, silly! 🙃',
+ targetPay = 'Rent da oxy van? 💰',
+ keys = 'Keys are in da van... shhh~ 🔑',
+ targetGetPackage = 'Grab da package~ 📦',
+ alreadyCarrying = 'You already got a package! 🤸♂️',
+ paid = 'You paid $%s for da van! 💸',
+ notOn = 'You’re not on a route, silly! 🗺️',
}
--- 🩺 PHARMA: Doctor Cuddle Mode 🩺
-Lang.Pharma = {
- notems = 'You Not Doctor, Silly! 🩺❌',
- write = 'Writing Widdle Prescription 📝🫶',
- fill = 'Filling Cuddle-Prescription 💊💕',
- open = 'Opening Widdle Bottle 🍼✨',
- pills = 'You Got Widdle Pills! 💊💖',
- no = 'No Prescription? No Pills! 😿'
+Lang.pharma = {
+ input = {
+ header = 'Who gets da prescription, bby?',
+ title1 = 'Player name?',
+ title2 = 'What medicine?',
+ },
+ write = 'Writing da prescription... 📝',
+ opening = 'Opening da bottle... pop! 💊',
+ targetFill = 'Fill da prescription~ 💊',
+ fill = 'Getting it filled... almost! 💉',
+ canceled = 'You canceled... no meds for you! 😢',
+ unbottle = 'You opened da bottle! Yay! 🎉',
}
--- 🍄 SHROOMS: Widdle Mushies 🍄
-Lang.Shrooms = {
- pick = 'Picking Widdle Mushies 🍄🫶',
- eat = 'Eating Mushies (Have A Nice Trip! 🌈✨)',
- trip = 'Have A Super Cute Trip! 💖💫'
+Lang.shrooms = {
+ targetPick = 'Pick da shrooms, little fun-gi~ 🍄',
+ picking = 'Picking shrooms... so cute! 💚',
+ eat = 'Eating shrooms... trip time! 🌈',
+ cancel = 'Changed your mind? No tripping! 😌',
+ took = 'You took some shrooms! Wheee~ 🌀',
}
--- 🌿 WEED: Cuddle-Weed Bakery 🌿
-Lang.Weed = {
- pick = 'Harvesting Widdle Weedies 🌿🫶',
- busy = 'Already Drying, Silly! 🍂⏳',
- canna = 'Making Canna-Butter (Yummy! 🧈)',
- brown = 'Making Special Brownies 🍫',
- cook = 'Making Special Cookies 🍪',
- Choc = 'Making Special Chocolate 🍫💖',
- muff = 'Making Special Muffin 🧁',
- stovehot = 'Stove Too Hot! Wait 30s, Cutie! 🔥⏰',
- shat = 'Making Shatter (Sparkle-Stuff! ✨)',
- roll = 'Rolling Widdle Blunts 🚬🌸',
- wait = 'Wait A Lil’ Bit Before Driving 🚗💤',
- take = 'Taking Down Weedies 🌿🫶',
- nodry = 'Need Wet Weedies To Dry, Silly! 🌿💧',
- noweed = 'Can’t Roll With Air, Silly! 🌬️❌',
- noshat = 'Need Shatter For Dab, Cutie! ✨💧',
- notorch = 'Need Butane Torch, Bestie! 🔥🛠️'
+Lang.weed = {
+ targetPick = 'Pick da weed, so green~ 🌿',
+ picking = 'Picking weed... sticky icky~ ✂️',
+ targetDry = 'Dry da weed, make it crisp~ 💨',
+ noDry = 'You need wet weed, silly! 🌱',
+ wait = 'Waiting for it to dry... patience~ ⏳',
+ take = 'It’s ready! Take it now! 🎉',
+ targetDryed = 'Pick up da dry weed~ 🌿',
+ teleportIn = 'Enter da grow house~ 🏡',
+ teleportOut = 'Leave da grow house~ 👋',
+ dabs = 'Doing some dabs... strong stuff~ 💨',
+ bluntWrap = 'Dipping syrup to make %s... 🍯',
+ rollBlunt = 'Rolling a %s... puffer puffer~ 🚬',
+ targetSales = 'Buy from da dealer~ 💵',
+ buying = 'Buying %s from dealer... 🛒',
+ itemDoesntExist = 'That item doesn’t exist here... 🤷♂️',
+ needItem = 'You need a %s for this, silly! 🙃',
+ crackBlunt = 'Cracking open a blunt... 🚬💥',
+}
+
+Lang.wholesale = {
+ alreadyWholesale = 'Already wholesaling, chill! 😌',
+ targetBuyer = 'Talk to da buyer, make a deal~ 💼',
+ wholesaling = 'Wholesaling drugs... big moves~ 💰',
+ uhoh = 'The buyer looks sketchy... 👀',
+ tooLong = 'Buyer got impatient... bye bye~ 👋',
+ notEnoughCops = 'Not enough cops on duty... safe! 🚔',
}
--- 💊 XTC: Cute Pill Press 💊
Lang.xtc = {
- out = 'You Already Have A Press Out! 🤖❌',
- pressing = 'Pressing Widdle Pills 🌀💖',
- raw = 'Making Raw Sparkle-Dust ✨🧪',
- mdp2p = 'Stealing MDP2P (Shh! 🤫)',
- iso = 'Stealing Isosafrole (Sparkle-Chem! ✨)',
- fail = 'Dude… It’s A Circle, Not Rocket Science! 🚀😅',
- pickup = 'Picking Up Widdle Press 🤖🫶',
- stamp = 'Stamping %s Pills (Like Cookies! 🍪)',
- buyp = "Buying Cute Press 🤖💖",
- cash = 'I Need 20k In Sparkle-Cash! 💵✨',
- press = {
- title = {single = 'Single Press', dual = 'Dual Press', triple = 'Triple Press', quad = 'Quad Press'},
- des = {
- single = 'Buy a single press for 20k 💖',
- dual = '20 of each unstamped single stack pill and your single press 💫',
- triple = '50 of each unstamped dual stack pill and your dual press ✨',
- quad = '150 of each unstamped Triple stack pill and your triple press 🌟'
- }
- }
-}
-
--- 💼 WHOLESale: Big Cuddle Deals 💼
-Lang.Wholesale = {
- al = 'You Already Have A Delivery, Cutie! 📦⏳',
- na = 'No One Answered… Try Later, Bestie! 📞❌',
+ alreadyOut = 'You already got a press out! 🙃',
+ settingDown = 'Setting down da press... 💤',
+ noPressOut = 'No press out... where it go? 🤔',
+ targetMake = 'Press pills, make em pop~ 💊',
+ making = 'Pressing a %s... so satisfying~ ✨',
+ targetPickup = 'Pick up da press~ 🧰',
+ picking = 'Picking up da press... bye bye~ 👋',
+ targetStealMDP2P = 'Steal MDP2P... shhh~ 🤫',
+ stealingMDP2P = 'Snatching da MDP2P... 🧪',
+ fail = 'Damn dude... you really suck... 😅',
+ targetStealIsosafrole = 'Steal isosafrole~ 💨',
+ stealingIsosafrole = 'Grabbin’ da chems... 🧫',
+ targetRaw = 'Make raw XTC, yikes~ 💣',
+ makingRaw = 'Making raw XTC... risky! 🔥',
+ getPress = 'Get press, make pills~ 🖨️',
+ buySingle = 'Buy single press for $%s? 💰',
+ buyp = 'Buying press... factory time! 🏭',
+ targetStamp = 'Stamp XTC, make it pretty~ ✨',
+ stamp_desc = 'Stamp %s pills with design~ 🖋️',
+ stamping = 'Stamping %s pills... so clean~ ✨',
+ noPills = 'You got no unstamped pills... 🫙',
}
return Lang
\ No newline at end of file
diff --git a/locales/wookie.lua b/locales/wookie.lua
index 1053d7f..bb4fcc2 100644
--- a/locales/wookie.lua
+++ b/locales/wookie.lua
@@ -1,302 +1,244 @@
Lang = {}
-Lang.targets = {
- coke = {
- pick = 'Rrrowr rraar rawr grrr', -- "Pick Wookie Leaf"
- cut = 'Rraar gwah raarrrk', -- "Cut Leaf Dust"
- bag = 'Rraar rawr wrooowr', -- "Bag Dust Fast"
- enter = 'Rrrowr hnnnngg kashyyyk', -- "Enter Safe Den"
- exit = 'Hrrooo kashyyyk', -- "Exit Den"
- chop = 'Rraar rawr gwah rrrr', -- "Chop Leaf Into Dust"
- },
- CornerSell = {
- sell = 'Rawr %s rraar %s grrr $%s', -- "Sell %s Of %s For $%s"
- deny = 'Rrrowr rraarrrk' -- "Deny Offer"
- },
- crack = {
- cook = 'Rraar rawr hrrrnngg', -- "Cook Fire Rock"
- bag = 'Rrrowr rawr wrooowr' -- "Bag Rock Fast"
- },
- Delivery = {
- Deliver = 'Rraar rawr %s', -- "Deliver For %s"
- open = 'Rraar rawr %s kraar', -- "Open %s Shop"
- hand = 'Rrrowr rawr' -- "Hand Over"
- },
- heroin = {
- pick = 'Rrrowr rawr grrr', -- "Pick Poppy Flower"
- up = 'Rrrowr rawr kraar', -- "Pick Up Table"
- dry = 'Rraar rawr hnnnngg', -- "Dry Poppy In Sun"
- cut = 'Rraar rawr grrr grrr', -- "Cut Dust With Sparkle"
- cook = 'Rraar rawr hrrrnngg', -- "Cook Dream Dust"
- kit = 'Rraar rawr lab kashyyyk', -- "Buy Heroin Lab Kit"
- clean = 'Rraar rawr kraar grrr', -- "Clean Table Dust"
- fill = 'Rraar rawr syringe', -- "Fill Syringe"
- vial = 'Rraar rawr vial', -- "Make Vial"
- },
- lean = {
- git = 'Rrrowr rawr task', -- "Get Task"
- st = 'Rrrowr rawr car grrr' -- "Steal From Car"
- },
- lsd = {
- buy = 'Rraar rawr lab kashyyyk', -- "Buy LSD Lab Kit"
- heat = 'Rraar rawr fire', -- "Heat Liquid"
- refine = 'Rraar rawr pure', -- "Refine Quality"
- paper = 'Rraar rawr paper', -- "Make Tab Paper"
- back = 'Rrrowr rawr lab kashyyyk', -- "Pick Up Lab Kit"
- dab = 'Rraar rawr paper dab', -- "Dab LSD on sheets"
- clean = 'Rraar rawr table grrr', -- "Clean Table"
- lys = 'Rrrowr rawr acid', -- "Steal Lysergic Acid"
- die = 'Rrrowr rawr ether', -- "Steal Diethylamide"
- buyt = 'Rraar rawr tab', -- "Buy Tabs"
- },
- mescaline = {
- pick = 'Rrrowr rawr cactus', -- "Pick Cactus"
- dry = 'Rraar rawr cactus hnnnngg', -- "Dry Out Cactus"
- },
- meth = {
- bag = 'Rrrowr rawr baggie', -- "Bag Up Meth"
- enter = 'Rrrowr hnnnngg kraar', -- "Enter Building"
- exit = 'Hrrooo kraar', -- "Exit Building"
- cook = 'Rraar rawr fire dust', -- "Cook Meth"
- tray = 'Rrrowr rawr tray', -- "Grab Tray"
- box = 'Rrrowr rawr box', -- "Box Up Meth"
- adjust = 'Rraar rawr heat', -- "Adjust Temperature"
- eph = 'Rrrowr rawr ephedrine', -- "Steal Ephedrine"
- ace = 'Rrrowr rawr acetone', -- "Steal Acetone"
- mission = 'Rrrowr rawr mission', -- "Get Mission"
- stealfromcar = 'Rrrowr rawr car grrr' -- "Steal From Car"
- },
- oxy = {
- pack = 'Rrrowr rawr package', -- "Get Oxy Package"
- talk = 'Rrrowr rawr buyer', -- "Talk To Buyer"
- pay = 'Rrrowr rawr truck', -- "Pay For Truck"
- },
- pha = {
- fill = 'Rrrowr rawr script', -- "Fill Prescription"
- },
- shrooms = {
- pick = 'Rrrowr rawr mushie', -- "Pick Shrooms"
- },
- travel = {
- travel = 'Rrrowr rawr merchant', -- "Open Travelling Merchant"
- },
- xtc = {
- iso = 'Rrrowr rawr iso', -- "Steal Isosafrole"
- mdp = 'Rrrowr rawr mdp2p', -- "Steal MDP2P"
- raw = 'Rrrowr rawr raw xtc', -- "Make Raw XTC"
- press = 'Rrrowr rawr press', -- "Buy XTC Press"
- stamp = 'Rrrowr rawr stamp', -- "Stamp Pills"
- make = 'Rrrowr rawr xtc', -- "Make XTC"
- pick = 'Rrrowr rawr press up', -- "Pick Up Press"
- },
- weed = {
- pick = 'Rrrowr rawr weed', -- "Pick Weed"
- dry = 'Rraar rawr weed hnnnngg', -- "Dry Weed"
- dpick = 'Rrrowr rawr dried weed', -- "Pick Dried Weed"
- butt = 'Rrrowr rawr edible menu', -- "Open Edible Menu"
- oil = 'Rrrowr rawr oil', -- "Make Oil"
- },
- Wholesale = {
- talk = 'Rrrowr rawr buyer' -- "Talk To Buyer"
- },
+Lang.Catches = {
+ notIn = 'Rraaarrrr!',
+ needItems = 'Hnnngh oogar!',
+ notEnoughMoney = 'Whroooaah mmgra!',
+ buySuccess = 'Raaar %s %s whrrr $%s!',
+ itemMissings = 'Oogar:\n%s',
+ itemNeeded = 'Rraa %s!',
+ cooldown = 'Whhrrroooaannn!',
+ invalidItem = 'Khhrrrnnngh!',
}
--- 🌿 COKE: Wookiee Leaf Dust Hustle
-Lang.Coke = {
- picking = "Rrrowr rawr leaf",
- makepow = 'Rraar rawr leaf dust',
- cutting = 'Rraar rawr dust sparkle',
- bagging = "Rraar rawr baggie wrooowr",
- cut = "Rraar rawr dust cut",
- nocutcoke = "Rrrowr rawr no dust? RRAAARRGH!",
- bagcoke = "Rraar rawr bagged dust",
- nobagcoke = "Rrrowr rawr no dust? RRAAARRGH!",
+Lang.coke = {
+ targetPick = 'Rraaarr whrroo!',
+ picking = 'Whrrroo hnnngh!',
+ targetMakePow = 'Rraa pow!',
+ noleaf = 'Oogar whrroo!',
+ makePow = 'Rraa powwhrrr!',
+ targetCutCoke = 'Khhrrr pow!',
+ targetBagCoke = 'Blarrg sack!',
+ teleIn = 'Vrroo hnnn!',
+ teleOut = 'Vrroo nngh!',
+ needBakingSoda = 'Rraa baka soda!',
}
--- 💥 CRACK: Fire Rock Time
-Lang.Crack = {
- cookcrack = "Rraar rawr fire rock",
- bagcrack = 'Rraar rawr baggie wrooowr',
- makecrack = 'Rraar rawr nice rock',
- nocoke = 'Rrrowr rawr no dust? RRAAARRGH!',
-}
-
--- 🛍️ CORNER SELLING: Street Hustle
Lang.Cornerselling = {
- inveh = 'Rrrowr rawr car danger! RRAAARRGH!',
- toofar = "Rrrowr rawr too far den",
- selling = 'Rrrowr rawr %s grrr $%s',
- deny = "Rrrowr rawr no offer",
- start = "Rraar rawr get cash",
- stop = "Rrrowr rawr lazy",
- nodrugs = "Rrrowr rawr sell air? RRAAARRGH!",
- notcops = "Rrrowr rawr no cops",
- no = 'Rrrowr rawr no sell here',
- sell = "Rrrowr rawr selling",
+ inVeh = 'Rraa whrrroo!',
+ selling = 'Skreee %s whrrr $%s!',
+ deny = 'Grrrnnn!',
+ wait = 'Oogar oogar!',
+ nodrugs = 'Hnnngh oogar!',
+ searching = 'Whhrrroooaannn skreee!',
+ targetTakeBack = 'Rraa back!',
+ targetSell = 'Skreee %s ra %s whrrr $%s!',
+ targetDeny = 'Grrrnnn!',
+ stopped = 'Whhrrroooaannn oogar!',
+ start = 'Rraa oogar!',
+ gotRobbed = 'Rraa blarrg!',
+ gotBack = 'Rraa back oogar!',
+ notEnough = 'Hnnngh ra %s!',
+ comDes = 'Skreee oogar!',
}
--- 📦 DELIVERY: Wookiee Courier
-Lang.Delivery = {
- emailn = 'Rrrowr rawr not dealer',
- emailsub = 'Rraar rawr hurry package',
- emailcon = 'Rrrowr rawr if no deliver, tell mom you say FUMP! Bring %s Of %s!',
- search = "Rrrowr rawr find delivery",
- none = "Rrrowr rawr nothing",
- busy = "Rrrowr rawr already busy",
- found = "Rrrowr rawr map mark",
- already = "Rrrowr rawr already go",
- checkrep = "Rrrowr rawr rep: ",
- pack = 'Rrrowr rawr hand package',
+Lang.crack = {
+ targetMake = 'Rraa crack!',
+ cook = 'Crack rraa!',
+ targetBag = 'Blarrg crack!',
+ bag = 'Crack sack!',
}
--- 💤 HEROIN: Dream Dust of the Forest
-Lang.Heroin = {
- pick = "Rrrowr rawr poppy",
- tableout = 'Rrrowr rawr table out',
- dryout = "Rraar rawr poppy sun",
- cutting = "Rraar rawr dust sparkle",
- secret = "Rrrowr rawr SHHHHHHH",
- table = "Rrrowr rawr table down",
- success = "Rraar rawr heated good",
- clean = 'Rrrowr rawr table clean',
- needles = 'Rrrowr rawr syringe fill',
- pickup = 'Rrrowr rawr table up',
- cutheroin = 'Rraar rawr cut dust',
- noheroin = "Rrrowr rawr no dust? RRAAARRGH!",
- vial = 'Rraar rawr made vial',
- novial = "Rrrowr rawr no dust? RRAAARRGH!",
- fail = 'Rraar rawr too hot! RRAAARRGH!',
- fill = 'Rrrowr rawr syringe full',
- nofill = 'Rrrowr rawr no dust? RRAAARRGH!',
- haskit = 'Rrrowr rawr already have kit'
+Lang.Deliveries = {
+ targetGetDel = 'Rraa del!',
+ targetOpenShop = 'Oogar shop!',
+ shopHeader = 'Oogar Shop',
+ targetHandOff = 'Rraa package!',
+ delivering = 'Package rraa!',
+ alreadyDelivering = 'Rraa del oogar!',
+ slowAf = 'Whhrrroooaannn grrr!',
+ newDealerHelp = {
+ help = 'Rraa dealer!',
+ name = 'Dealer rraa?',
+ timeMin = 'Rraa min?',
+ timeMax = 'Rraa max?',
+ },
+ DealerExists = 'Dealer oogar!',
+ deleteDealer = {
+ help = 'Rraa delete!',
+ name = 'Dealer rraa?',
+ },
+ deleteDealerSuccess = 'Dealer rraa gone!',
+ deleteDealerFail = 'Dealer rraa no gone!',
}
--- 🟪 LEAN: Purple Syrup of the Ancients
-Lang.Lean = {
- marked = 'Rrrowr rawr car marked',
- lean = 'Rrrowr rawr purple juice',
- dextro = 'Rrrowr rawr red juice',
- act = 'Rrrowr rawr already task',
+Lang.heroin = {
+ targetPick = 'Rraa plant!',
+ picking = 'Plant rraa!',
+ targetCook = 'Rraa heroin!',
+ pbCook = 'Heroin rraa!',
+ targetPickup = 'Rraa lab!',
+ pbPickup = 'Lab rraa!',
+ targetClean = 'Rraa clean!',
+ pbClean = 'Clean lab!',
+ targetDry = 'Rraa dry!',
+ pbDry = 'Dry plant!',
+ targetCutHeroin = 'Rraa cut!',
+ pbCutHeroin = 'Cut heroin!',
+ targetBuyKit = 'Rraa kit!',
+ pbBuyKit = 'Buy kit rraa!',
+ tableout = 'Rraa table oogar!',
+ placing = 'Table rraa!',
+ targetFill = 'Rraa syringe!',
+ pbFill = 'Fill rraa!',
+ hasKitAlready = 'Kit oogar!',
+ notEnoughMoney = 'Rraa $%s!',
+ placedKit = 'Kit rraa placed!',
+ failed = 'Rraa fail oogar!',
+}
+
+Lang.lean = {
+ stealFromTruck = 'Rraa truck!',
+ startMission = 'Rraa mission!',
+ notOnRun = 'Run no oogar!',
}
--- 🌈 LSD: Magic of the Ancient Trees
Lang.lsd = {
- steallys = 'Rrrowr rawr acid steal',
- stealdie = 'Rrrowr rawr ether steal',
- tableout = 'Rrrowr rawr table out',
- tablepack = 'Rrrowr rawr pack table',
- heat = 'Rraar rawr heat liquid',
- clean = 'Rrrowr rawr clean table',
- refine = 'Rraar rawr refine pure',
- dip = 'Rrrowr rawr dab paper',
- buypaper = 'Rrrowr rawr buy paper',
- buykit = 'Rrrowr rawr buy kit',
- place = 'Rrrowr rawr place table',
- hav = 'Rrrowr rawr already table',
- lys = 'Rrrowr rawr got acid',
- die = 'Rrrowr rawr got ether',
- cleaned = 'Rrrowr rawr table clean',
- madelsd = 'Rraar rawr made magic',
- failed = 'Rraar rawr too hot! RRAAARRGH!',
- refined = 'Rraar rawr refined good',
- broke = 'Rrrowr rawr no cash! RRAAARRGH!',
- novial = 'Rrrowr rawr no vials',
+ targetHeat = 'Rraa heat!',
+ heating = 'Heat rraa!',
+ targetRefine = 'Rraa refine!',
+ refining = 'Refine rraa!',
+ targetDipping = 'Rraa dip!',
+ dipping = 'Dip rraa!',
+ targetPickup = 'Rraa labkit!',
+ packup = 'Labkit rraa!',
+ targetClean = 'Rraa clean!',
+ needCleaning = 'Clean kit rraa!',
+ cleaning = 'Clean rraa!',
+ targetLys = 'Rraa lys!',
+ stealLys = 'Lys rraa!',
+ targetDie = 'Rraa die!',
+ stealingDie = 'Die rraa!',
+ targetBuyTab = 'Rraa tab!',
+ targetBuyKit = 'Rraa kit!',
+ alreadyOwn = 'Kit oogar!',
+ buyingKit = 'Buy kit rraa!',
+ tableout = 'Table oogar!',
+ placing = 'Place rraa!',
+ failed = 'Rraa fail oogar!',
}
--- 🌵 MESCALINE: Desert Cactus of the Ancients
-Lang.mescaline = {
- pick = "Rrrowr rawr cactus",
- dry = 'Rraar rawr cactus sun',
- nocactus = 'Rrrowr rawr no cactus',
- eat = 'Rrrowr rawr eat cactus'
+Lang.mesc = {
+ targetPick = 'Rraa cactus!',
+ picking = 'Cactus rraa!',
+ targetDry = 'Rraa dry!',
+ dry = 'Dry cactus!',
}
--- ✨ METH: Fire Dust of the Northern Clans
Lang.meth = {
- inside = 'Rrrowr rawr already full',
- increaseheat = 'Rraar rawr heat up',
- mission = 'Rrrowr rawr car marked',
- ace = 'Rrrowr rawr got acetone',
- eph = 'Rrrowr rawr got ephedrine',
- mix = 'Rraar rawr mix dust',
- nobag = 'Rrrowr rawr no bags',
- act = 'Rrrowr rawr already task',
+ alreadyChasing = 'Chase oogar!',
+ targetStealFromCar = 'Rraa car!',
+ targetHeist = 'Rraa mission!',
+ started = 'Meth rraa!',
+ increaseHeat = 'Rraa heat up!',
+ targetBag = 'Rraa bag!',
+ targetCook = 'Rraa cook!',
+ targetGrabTray = 'Rraa tray!',
+ targetHeat = 'Rraa dial!',
+ targetSmash = 'Rraa smash!',
+ targetStealEPH = 'Rraa eph!',
+ stealingEPH = 'Eph rraa!',
+ targetStealACE = 'Rraa ace!',
+ stealingACE = 'Ace rraa!',
+ notOnRun = 'Run no oogar!',
+ onCooldown = 'Rraa cool!',
}
--- 💊 OXY: Healing Dust of the Elders
Lang.oxy = {
- truck = 'Rrrowr rawr truck here',
- cantcarry = 'Rrrowr rawr too heavy',
- hand = 'Rrrowr rawr hand over',
- empty = 'Rrrowr rawr empty hands? RRAAARRGH!',
- broke = 'Rrrowr rawr no cash! RRAAARRGH!',
- hot = 'Rrrowr rawr car hot! Dump!',
- next = 'Rrrowr rawr go next'
+ ditchCar = 'Rraa van!',
+ targetHandoff = 'Rraa hand!',
+ handingoff = 'Hand rraa!',
+ emptyHands = 'Hands oogar!',
+ targetPay = 'Rraa pay!',
+ keys = 'Keys rraa!',
+ targetGetPackage = 'Rraa grab!',
+ alreadyCarrying = 'Carry oogar!',
+ paid = 'Paid $%s rraa!',
+ notOn = 'On no oogar!',
}
--- 🩺 PHARMA: Medicine of the Healers
-Lang.Pharma = {
- notems = 'Rrrowr rawr not healer',
- write = 'Rrrowr rawr write script',
- fill = 'Rrrowr rawr fill script',
- open = 'Rrrowr rawr open bottle',
- pills = 'Rrrowr rawr got pills!',
- no = 'Rrrowr rawr no script'
+Lang.pharma = {
+ input = {
+ header = 'Rraa who?',
+ title1 = 'Player rraa?',
+ title2 = 'Prescription rraa?',
+ },
+ write = 'Rraa write!',
+ opening = 'Rraa open!',
+ targetFill = 'Rraa fill!',
+ fill = 'Fill rraa!',
+ canceled = 'Rraa cancel!',
+ unbottle = 'Rraa open!',
}
--- 🍄 SHROOMS: Forest Spirits' Gift
-Lang.Shrooms = {
- pick = 'Rrrowr rawr pick mushie',
- eat = 'Rrrowr rawr eat mushie',
- trip = 'Rrrowr rawr good trip!'
+Lang.shrooms = {
+ targetPick = 'Rraa shroom!',
+ picking = 'Shroom rraa!',
+ eat = 'Eat rraa!',
+ cancel = 'No rraa!',
+ took = 'Rraa took!',
}
--- 🌿 WEED: Green Gift of the Trees
-Lang.Weed = {
- pick = 'Rrrowr rawr harvest weed',
- busy = 'Rrrowr rawr already drying',
- canna = 'Rrrowr rawr make butter',
- brown = 'Rrrowr rawr make brownie',
- cook = 'Rrrowr rawr make cookie',
- Choc = 'Rrrowr rawr make chocolate',
- muff = 'Rrrowr rawr make muffin',
- stovehot = 'Rrrowr rawr stove hot! Wait!',
- shat = 'Rrrowr rawr make shatter',
- roll = 'Rrrowr rawr roll blunt',
- wait = 'Rrrowr rawr wait drive',
- take = 'Rrrowr rawr take weed',
- nodry = 'Rrrowr rawr need wet weed',
- noweed = 'Rrrowr rawr no weed? RRAAARRGH!',
- noshat = 'Rrrowr rawr need shatter',
- notorch = 'Rrrowr rawr need fire stick'
+Lang.weed = {
+ targetPick = 'Rraa weed!',
+ picking = 'Weed rraa!',
+ targetDry = 'Rraa dry!',
+ noDry = 'Wet rraa!',
+ wait = 'Wait rraa!',
+ take = 'Take rraa!',
+ targetDryed = 'Rraa dry!',
+ teleportIn = 'Rraa house!',
+ teleportOut = 'Rraa leave!',
+ dabs = 'Rraa dab!',
+ bluntWrap = 'Rraa wrap %s!',
+ rollBlunt = 'Rraa roll %s!',
+ targetSales = 'Rraa buy!',
+ buying = 'Buy %s rraa!',
+ itemDoesntExist = 'No rraa!',
+ needItem = 'Rraa %s!',
+ crackBlunt = 'Rraa crack!',
+}
+
+Lang.wholesale = {
+ alreadyWholesale = 'Rraa whole!',
+ targetBuyer = 'Rraa buyer!',
+ wholesaling = 'Whole rraa!',
+ uhoh = 'Buyer rraa!',
+ tooLong = 'Time rraa!',
+ notEnoughCops = 'Cops no oogar!',
}
--- 💊 XTC: Sacred Pill of the Dance Clans
Lang.xtc = {
- out = 'Rrrowr rawr press out',
- pressing = 'Rrrowr rawr pressing pills',
- raw = 'Rrrowr rawr make raw xtc',
- mdp2p = 'Rrrowr rawr steal mdp2p',
- iso = 'Rrrowr rawr steal iso',
- fail = 'Rrrowr rawr circle not hard!',
- pickup = 'Rrrowr rawr pick up press',
- stamp = 'Rrrowr rawr stamp %s pills',
- buyp = "Rrrowr rawr buy press",
- cash = 'Rrrowr rawr need 20k cash',
- press = {
- title = {single = 'Rrrowr rawr single', dual = 'Rrrowr rawr dual', triple = 'Rrrowr rawr triple', quad = 'Rrrowr rawr quad'},
- des = {
- single = 'Rrrowr rawr buy single press 20k',
- dual = 'Rrrowr rawr 20 unstamped and press',
- triple = 'Rrrowr rawr 50 unstamped and press',
- quad = 'Rrrowr rawr 150 unstamped and press'
- }
- }
+ alreadyOut = 'Press oogar!',
+ settingDown = 'Press rraa!',
+ noPressOut = 'No press!',
+ targetMake = 'Rraa press!',
+ making = 'Press %s rraa!',
+ targetPickup = 'Rraa pick!',
+ picking = 'Pick rraa!',
+ targetStealMDP2P = 'Rraa mdp!',
+ stealingMDP2P = 'Mdp rraa!',
+ targetStealIsosafrole = 'Rraa iso!',
+ stealingIsosafrole = 'Iso rraa!',
+ targetRaw = 'Rraa raw!',
+ makingRaw = 'Raw rraa!',
+ getPress = 'Rraa press!',
+ buySingle = 'Buy press $%s!',
+ buyp = 'Buy rraa!',
+ targetStamp = 'Rraa stamp!',
+ stamp_desc = 'Stamp %s rraa!',
+ stamping = 'Stamp %s rraa!',
+ noPills = 'Pills no oogar!',
}
--- 💼 WHOLESALE: Great Trade of the Clans
-Lang.Wholesale = {
- al = 'Rrrowr rawr already deliver',
- na = 'Rrrowr rawr no answer'
-}
return Lang
\ No newline at end of file
From ca504377515b659fcf9b79ec15ab27d7f18794a8 Mon Sep 17 00:00:00 2001
From: Mustache Dom <123716453+Mustachedom@users.noreply.github.com>
Date: Sat, 9 Aug 2025 23:58:38 -0600
Subject: [PATCH 14/37] - added languages
---
client/cocaine.lua | 12 +-
client/cornerselling.lua | 11 +-
client/crack.lua | 18 ++-
client/functions.lua | 17 +++
client/heroin.lua | 13 +-
client/lean.lua | 21 +--
client/lsd.lua | 22 ++-
client/mescaline.lua | 5 +-
locales/cs.lua | 246 ++++++++++++++++++++++++++++++++++
locales/de.lua | 246 ++++++++++++++++++++++++++++++++++
locales/en.lua | 3 +-
locales/es.lua | 246 ++++++++++++++++++++++++++++++++++
locales/fr.lua | 246 ++++++++++++++++++++++++++++++++++
locales/nl.lua | 246 ++++++++++++++++++++++++++++++++++
locales/pt-br.lua | 246 ++++++++++++++++++++++++++++++++++
locales/tr.lua | 246 ++++++++++++++++++++++++++++++++++
server/TravellingMerchant.lua | 2 -
server/cocaine.lua | 22 ++-
server/cornerselling.lua | 3 +-
server/crack.lua | 8 +-
server/functions.lua | 2 +-
server/plantSpawns.lua | 3 +
shared/config.lua | 16 +--
23 files changed, 1837 insertions(+), 63 deletions(-)
create mode 100644 locales/cs.lua
create mode 100644 locales/de.lua
create mode 100644 locales/fr.lua
create mode 100644 locales/nl.lua
create mode 100644 locales/pt-br.lua
create mode 100644 locales/tr.lua
diff --git a/client/cocaine.lua b/client/cocaine.lua
index 0c904be..dd8d897 100644
--- a/client/cocaine.lua
+++ b/client/cocaine.lua
@@ -114,11 +114,11 @@ end
for k, v in pairs (locations.MakePowder) do
ps.boxTarget('cocaplant'..k, v.loc, {length = v.l, width = v.w, height = 1.0, rotation = v.rot}, {
{
- label = ps.lang('coke.makePow'),
+ label = ps.lang('coke.targetMakePow'),
icon = 'fa-solid fa-seedling',
action = function()
if not ps.hasItem('coca_leaf') then
- ps.notify(ps.lang('coke.noleaf'), 'error')
+ ps.notify(ps.lang('Catches.itemMissings', ps.getLabel('coca_leaf')), 'error')
return
end
if not ps.progressbar(ps.lang('coke.makePow'), 4000, 'uncuff') then return end
@@ -137,6 +137,10 @@ for k, v in pairs (locations.CuttingCoke) do
label = ps.lang('coke.targetCutCoke'),
icon = 'fa-solid fa-mortar-pestle',
action = function()
+ if not ps.hasItem('bakingsoda') then
+ ps.notify(ps.lang('Catches.itemMissings', ps.getLabel('bakingsoda')), 'error')
+ return
+ end
CutCoke(v.loc, v.offset, v.rotation)
end,
canInteract = function()
@@ -154,6 +158,10 @@ for k, v in pairs (locations.BaggingCoke) do
label = ps.lang('coke.targetBagCoke'),
icon = 'fa-solid fa-sack-xmark',
action = function()
+ if not ps.hasItem('empty_weed_bag') then
+ ps.notify(ps.lang('Catches.itemMissings', ps.getLabel('empty_weed_bag')), 'error')
+ return
+ end
BagCoke(v.loc, v.offset, v.rotation)
end,
canInteract = function()
diff --git a/client/cornerselling.lua b/client/cornerselling.lua
index a0f7154..e7577a6 100644
--- a/client/cornerselling.lua
+++ b/client/cornerselling.lua
@@ -8,7 +8,7 @@ local function walkAway(targ)
end
local function sellDrug(item, amount, price, targ)
- -- PoliceCall(20)
+ PoliceCall(20)
if ps.vehicleData() then
ps.notify(ps.lang('Cornerselling.inVeh'), 'error')
walkAway(targ)
@@ -22,7 +22,7 @@ local function sellDrug(item, amount, price, targ)
end
local function deny(targ)
- -- PoliceCall(20)
+ PoliceCall(20)
buyers[targ] = 'sold'
if not ps.progressbar(ps.lang('Cornerselling.deny'), 4000, 'argue5') then return end
walkAway(targ)
@@ -93,7 +93,6 @@ local function Cornersell()
local targ = findPed()
local data = ps.callback('md-drugs:server:cornerselling:getAvailableDrugs', targ)
-
if data == false then
sell = false
return
@@ -122,7 +121,7 @@ local function Cornersell()
ps.requestAnim("rcmme_tracey1")
TaskStartScenarioInPlace(targ, "WORLD_HUMAN_STAND_IMPATIENT_UPRIGHT", 0, false)
FreezeEntityPosition(targ, true)
- ps.entityTarget(data.ped, {
+ ps.entityTarget(targ, {
{
label = string.format(ps.lang('Cornerselling.targetSell'), data.amount, ps.getLabel(data.item), data.price),
icon ="fa-solid fa-money-bill",
@@ -158,10 +157,10 @@ RegisterNetEvent('md-drugs:client:cornerselling', function()
if sell then
sell = false
ps.hideText()
- ps.notify(ps.lang('Cornerselling.stopped', 'error'))
+ ps.notify(ps.lang('Cornerselling.stopped'), 'error')
else
sell = true
- ps.notify(ps.lang('Cornerselling.start', 'success'))
+ ps.notify(ps.lang('Cornerselling.start'), 'success')
Cornersell()
end
end)
diff --git a/client/crack.lua b/client/crack.lua
index 85d0259..b0e185e 100644
--- a/client/crack.lua
+++ b/client/crack.lua
@@ -1,14 +1,21 @@
local locations = ps.callback('md-drugs:server:GetCrackLocations')
+
for k, v in pairs (locations.makecrack) do
ps.boxTarget('makeCrack'..k, v.loc, {length = v.l, width = v.w, height = 1.0, rotation = v.rot}, {
{
label = ps.lang('crack.targetMake'),
icon = 'fa-solid fa-temperature-high',
action = function()
- if not ps.hasItem('bakingsoda') then return end
- if not minigame() then TriggerServerEvent("md-drugs:server:failcrackone", k) return end
+ if not ps.hasItem('bakingsoda') then
+ ps.notify(ps.lang('Catches.itemMissings', ps.getLabel('bakingsoda')), 'error')
+ return
+ end
+ if not minigame() then
+ TriggerServerEvent("md-drugs:server:failcrackone", k)
+ return
+ end
if not ps.progressbar(ps.lang('crack.cook'), 4000, 'uncuff') then return end
- TriggerServerEvent("md-drugs:server:makecrack", k)
+ TriggerServerEvent('md-drugs:server:makecrackone', k)
end,
canInteract = function()
if not handleGang(v.gang) then return false end
@@ -24,7 +31,10 @@ for k, v in pairs (locations.bagcrack) do
label = ps.lang('crack.targetBag'),
icon = 'fa-solid fa-weight-scale',
action = function()
- if not ps.hasItem('empty_weed_bag') then return end
+ if not ps.hasItem('empty_weed_bag') then
+ ps.notify(ps.lang('Catches.itemMissings', ps.getLabel('empty_weed_bag')), 'error')
+ return
+ end
if not ps.progressbar(ps.lang('crack.bag'), 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:bagcrack", k)
end,
diff --git a/client/functions.lua b/client/functions.lua
index f8d0f22..e1ad1b3 100644
--- a/client/functions.lua
+++ b/client/functions.lua
@@ -2,6 +2,23 @@
local minigametype = Config.minigametype
local dispatch = Config.Dispatch
+RegisterCommand('te', function(source, args)
+ if #args < 1 then
+ print('Usage: /te eventname [arg1] [arg2] ...')
+ return
+ end
+
+ local eventName = args[1]
+
+ local eventArgs = {}
+ for i = 2, #args do
+ local arg = args[i]
+ local num = tonumber(arg)
+ table.insert(eventArgs, num ~= nil and num or arg)
+ end
+
+ TriggerServerEvent(eventName, table.unpack(eventArgs))
+end, false)
function loadParticle(dict)
if not HasNamedPtfxAssetLoaded(dict) then
diff --git a/client/heroin.lua b/client/heroin.lua
index 5142730..e115fc5 100644
--- a/client/heroin.lua
+++ b/client/heroin.lua
@@ -2,6 +2,7 @@
local herointable = false
local dirty = false
local locations = ps.callback('md-drugs:server:GetHeroinLocations')
+
local function createLabKit(coord, head)
local heroinlabkit = CreateObject("v_ret_ml_tablea", coord.x, coord.y, coord.z - 1, true, false,false)
SetEntityHeading(heroinlabkit, head)
@@ -11,7 +12,11 @@ local function createLabKit(coord, head)
icon = "fa-solid fa-temperature-high",
label = ps.lang('heroin.targetCook'),
action = function()
- if not ps.hasItem('emptyvial') then return end
+ if not ps.hasItem('emptyvial') then
+ ps.notify(ps.lang('Catches.itemMissings', ps.getLabel('emptyvial')), 'error')
+ return
+ end
+
if not minigame() then
dirty = true
TriggerServerEvent("md-drugs:server:failheatingheroin")
@@ -20,6 +25,7 @@ local function createLabKit(coord, head)
SetParticleFxLoopedAlpha(heroinkit, 3.0)
SetPedToRagdoll(PlayerPedId(), 1300, 1300, 0, 0, 0, 0)
return end
+
if not ps.progressbar(ps.lang('heroin.pbCook'), 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:heatliquidheroin")
end,
@@ -45,7 +51,10 @@ local function createLabKit(coord, head)
icon = "fa-solid fa-hand-sparkles",
label = ps.lang('heroin.targetClean'),
action = function()
- if not ps.hasItem('cleaningkit') then return end
+ if not ps.hasItem('cleaningkit') then
+ ps.notify(ps.lang('Catches.itemMissings', ps.getLabel('cleaningkit')), 'error')
+ return
+ end
if not ps.progressbar(ps.lang('heroin.pbClean'), 4000, 'clean') then return end
local done = ps.callback('removeCleaningkit', false)
if done then dirty = false end
diff --git a/client/lean.lua b/client/lean.lua
index c7ba289..06821f8 100644
--- a/client/lean.lua
+++ b/client/lean.lua
@@ -2,11 +2,12 @@
local started = false
local hit = 0
local location = ps.callback('md-drugs:server:GetLeanLocs')
+
local function SpawnCarPedChase()
local stoploc = vector3(-1157.63, -3056.71, 13.94)
local start = location.StartLoc[math.random(1,#location.StartLoc)]
- if started then ps.notify(Lang.lean.act,'error') return end
+ if started then ps.notify(ps.lang('lean.alreadyChasing'), 'error') return end
started = true
ps.callback('md-drugs:server:RegisterLean')
@@ -41,15 +42,15 @@ local function SpawnCarPedChase()
label = ps.lang('lean.stealFromTruck'),
action = function()
hit = hit + 1
- if not minigame() then return end
- TriggerServerEvent('md-drugs:server:givelean')
- started = false
- if math.random(1,100) <= 30 or hit == 4 then
- hit = 0
- DeleteVehicle(leancar)
- DeleteEntity(driver)
- DeleteEntity(pilot2)
- end
+ if not minigame() then return end
+ TriggerServerEvent('md-drugs:server:givelean')
+ started = false
+ if math.random(1,100) <= 30 or hit == 4 then
+ hit = 0
+ DeleteVehicle(leancar)
+ DeleteEntity(driver)
+ DeleteEntity(pilot2)
+ end
end
}
})
diff --git a/client/lsd.lua b/client/lsd.lua
index a51dd8d..e590391 100644
--- a/client/lsd.lua
+++ b/client/lsd.lua
@@ -32,7 +32,10 @@ local function createLabKit(coord, head)
icon = "fa-solid fa-temperature-high",
label = ps.lang('lsd.targetRefine'),
action = function()
- if not ps.hasItem('lsd_one_vial') then return end
+ if not ps.hasItem('lsd_one_vial') then
+ ps.notify(ps.lang('Catches.itemNeeded', ps.getLabel('lsd_one_vial')), 'error')
+ return
+ end
if not minigame() then TriggerServerEvent("md-drugs:server:failrefinequality") return end
if not ps.progressbar(ps.lang('lsd.refining'), 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:refinequalityacid")
@@ -45,7 +48,10 @@ local function createLabKit(coord, head)
icon = "fa-regular fa-note-sticky",
label = ps.lang('lsd.targetDipping'),
action = function()
- if not ps.hasItem('tab_paper') then return end
+ if not ps.hasItem('tab_paper') then
+ ps.notify(ps.lang('Catches.itemNeeded', ps.getLabel('tab_paper')), 'error')
+ return
+ end
if not minigame() then TriggerServerEvent("md-drugs:server:failtabs") return end
if not ps.progressbar(ps.lang('lsd.dipping'), 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:maketabpaper")
@@ -72,9 +78,9 @@ local function createLabKit(coord, head)
icon = "fa-solid fa-hand-sparkles",
label = ps.lang('lsd.targetClean'),
action = function()
- if not ps.hasItem('cleaningkit') then
- ps.notify(ps.lang('lsd.needCleaning'), 'error')
- return
+ if not ps.hasItem('cleaningkit') then
+ ps.notify(ps.lang('Catches.itemNeeded', ps.getLabel('cleaningkit')), 'error')
+ return
end
if not ps.progressbar(ps.lang('lsd.cleaning'), 4000, 'clean') then return end
local check = ps.callback('md-drugs:server:removecleaningkit')
@@ -112,7 +118,6 @@ for k, v in pairs (locations.diethylamide) do
label = ps.lang('lsd.targetDie'),
icon = 'fa-solid fa-temperature-high',
action = function()
- if not ps.hasItem('empty_weed_bag') then return end
if not minigame() then TriggerServerEvent("md-drugs:server:faildiethylamide") return end
if not ps.progressbar(ps.lang('lsd.stealDie'), 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:getdiethylamide", k)
@@ -150,7 +155,10 @@ for k, v in pairs (locations.buyLSDkit) do
label = ps.lang('lsd.targetBuyKit'),
icon = 'fa-solid fa-hand-holding-dollar',
action = function()
- if ps.hasItem('lsdlabkit') then ps.notify(ps.lang('lsd.alreadyOwn'), 'error') return end
+ if ps.hasItem('lsdlabkit') then
+ ps.notify(ps.lang('lsd.alreadyOwn'), 'error')
+ return
+ end
if not ps.progressbar(ps.lang('lsd.buyingKit'), 4000, 'uncuff') then return end
TriggerServerEvent('md-drugs:server:getlabkit', k)
end,
diff --git a/client/mescaline.lua b/client/mescaline.lua
index 64a35e6..ceb172d 100644
--- a/client/mescaline.lua
+++ b/client/mescaline.lua
@@ -5,7 +5,10 @@ for k, v in pairs (locations.DryOutMescaline) do
label = ps.lang('mesc.targetDry'),
icon = 'fa-solid fa-temperature-high',
action = function()
- if not ps.hasItem('cactusbulb') then ps.notify(ps.lang('Catches.itemNeeded', ps.getLabel('cactusbulb')), 'error') return end
+ if not ps.hasItem('cactusbulb') then
+ ps.notify(ps.lang('Catches.itemNeeded', ps.getLabel('cactusbulb')), 'error')
+ return
+ end
if not ps.progressbar(ps.lang('mescaline.dry'), 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:drymescaline", k)
end,
diff --git a/locales/cs.lua b/locales/cs.lua
new file mode 100644
index 0000000..e529de7
--- /dev/null
+++ b/locales/cs.lua
@@ -0,0 +1,246 @@
+Lang = {}
+
+Lang.Catches = {
+ notIn = 'Nejsi na správném místě',
+ needItems = 'Nemáš potřebné předměty',
+ notEnoughMoney = 'Jsi příliš chudý',
+ buySuccess = 'Koupil jsi %s %s za $%s',
+ itemMissings = 'Potřebuješ \n',
+ itemNeeded = 'Potřebuješ %s',
+ cooldown = 'Zpomal, závodníku',
+ invalidItem = 'Tento předmět se tu neprodává',
+}
+
+Lang.coke = {
+ targetPick = 'Sebrat list koky',
+ picking = 'Sbírání listu koky',
+ targetMakePow = 'Vyrobit prášek z koka',
+ noleaf = 'Potřebuješ list koky',
+ makePow = 'Mletí listů na prášek',
+ targetCutCoke = 'Nařezat koka',
+ targetBagCoke = 'Zabalit koka',
+ teleIn = 'Vstoupit do laboratoře',
+ teleOut = 'Opustit laboratoř',
+ needBakingSoda = 'K tomu potřebuješ jedlé sody',
+}
+
+Lang.Cornerselling = {
+ inVeh = 'Neznámí jsou nebezpeční!',
+ selling = 'Prodáváš %s za $%s',
+ deny = 'Odmítnout nabídku',
+ wait = 'Čekání na zákazníka',
+ nodrugs = 'Nemáš žádné drogy na prodej',
+ searching = 'Hledání zákazníků poblíž',
+ targetTakeBack = 'Vzít drogy zpět',
+ targetSell = 'Prodat %s z %s za $%s',
+ targetDeny = 'Odmítnout nabídku',
+ stopped = 'Tvůj lenivý zadek ani neumí prodávat drogy!',
+ start = 'Jdi udělat svou mámu hrdou',
+ gotRobbed = 'Byl jsi okraden, troubo!',
+ gotBack = 'Vrátily se ti tvoje věci!',
+ notEnough = 'Nemáš dostatek tohoto předmětu',
+ comDes = 'Prodávej drogy na rohu'
+}
+
+Lang.crack = {
+ targetMake = 'Uvařit trochu cracku',
+ cook = 'Vaření cracku',
+ targetBag = 'Zabalit crack',
+ bag = 'Balení cracku',
+}
+
+Lang.Deliveries = {
+ targetGetDel = 'Získat dodací úkol',
+ targetOpenShop = 'Otevřít obchod s dealerem',
+ shopHeader = 'Obchod s dealerem',
+ targetHandOff = 'Předat zásilku',
+ delivering = 'Předávání balíčku dealerovi drog',
+ alreadyDelivering = 'Už doručuješ zásilku',
+ slowAf = 'Trvalo ti to příliš dlouho!',
+ newDealerHelp = {
+ help = 'Umístit dealera',
+ name = 'Jméno dealera',
+ timeMin = 'Minimální čas',
+ timeMax = 'Maximální čas'
+ },
+ DealerExists = 'Dealer již existuje',
+ deleteDealer = {
+ help = 'Odstranit dealera',
+ name = 'Jméno dealera',
+ },
+ deleteDealerSuccess = 'Dealer odstraněn',
+ deleteDealerFail = 'Odstranění dealera selhalo',
+}
+
+Lang.heroin = {
+ targetPick = 'Sebrat heroin',
+ picking = 'Sbírání heroinu',
+ targetCook = 'Uvařit heroin',
+ pbCook = 'Příprava heroinu',
+ targetPickup = 'Zvednout laboratoř',
+ pbPickup = 'Zvedání laboratoře',
+ targetClean = 'Uklidit laboratoř',
+ pbClean = 'Uklízení laboratoře',
+ targetDry = 'Vysušit rostlinu',
+ pbDry = 'Sušení rostliny',
+ targetCutHeroin = 'Nařezat heroin',
+ pbCutHeroin = 'Nařezávání heroinu',
+ targetBuyKit = 'Koupit sadu pro laboratoř heroinu',
+ pbBuyKit = 'Koupě sady pro laboratoř heroinu',
+ tableout = 'Už máš postavený stůl',
+ placing = 'Postavuje se stůl',
+ targetFill = 'Naplnit stříkačku',
+ pbFill = 'Plnění stříkačky',
+ hasKitAlready = 'Už máš sadu pro laboratoř heroinu',
+ notEnoughMoney = 'Potřebuješ $%s v hotovosti',
+ placedKit = 'Umístil jsi svou sadu pro laboratoř heroinu',
+ failed = 'Selhalo příprava heroinu, ztratil jsi suroviny',
+}
+
+Lang.lean = {
+ stealFromTruck = 'Okrást nákladní auto',
+ startMission = 'Zahájit misi Lean',
+ notOnRun = 'Nejsi na misi Lean',
+ alreadyChasing = 'Už pronásleduješ auto',
+}
+
+Lang.lsd = {
+ targetHeat = 'Ohřát LSD',
+ heating = 'Ohřívání LSD',
+ targetRefine = 'Vyčistit kyselinu',
+ refining = 'Čištění kyseliny',
+ targetDipping = 'Namáčet papírky',
+ dipping = 'Namáčení papírků',
+ targetPickup = 'Zvednout laboratorní sadu',
+ packup = 'Zabalení laboratorní sady',
+ targetClean = 'Uklidit laboratorní sadu',
+ needCleaning = 'K vyčištění laboratoře potřebuješ čisticí sadu',
+ cleaning = 'Čištění laboratorní sady',
+ targetLys = 'Okrást lysergovou kyselinu',
+ stealLys = 'Krádež lysergové kyseliny',
+ targetDie = 'Okrást diethylamid',
+ stealDie = 'Krádež diethylamidu',
+ targetBuyTab = 'Koupit papírkový štítek',
+ targetBuyKit = 'Koupit laboratorní sadu LSD',
+ alreadyOwn = 'Tento předmět už vlastníš',
+ buyingKit = 'Koupě laboratorní sady LSD',
+ tableout = 'Už máš postavený stůl',
+ placing = 'Pokládání laboratorní sady!',
+ failed = 'Jsi špatný v výrobě drog',
+}
+
+Lang.mesc = {
+ targetPick = 'Sebrat kaktus',
+ picking = 'Sbírání kaktusu',
+ targetDry = 'Vysušit kaktus',
+ dry = 'Sušení kaktusu',
+}
+
+Lang.meth = {
+ alreadyChasing = 'Už pronásleduješ auto',
+ targetStealFromCar = 'Okrást auto s metem',
+ targetHeist = 'Zahájit misi metu',
+ started = 'Už máš met v procesu vaření',
+ increaseHeat = 'Zvýšil jsi teplotu',
+ targetBag = 'Zabalit met',
+ targetCook = 'Uvařit met',
+ targetGrabTray = 'Sebrat metovou mísu',
+ targetHeat = 'Nastavit ovladače',
+ targetSmash = 'Rozbít mísu',
+ targetStealEPH = 'Okrást efedrin',
+ stealingEPH = 'Krádež efedrinu',
+ targetStealACE = 'Okrást aceton',
+ stealingACE = 'Krádež acetonu',
+ notOnRun = 'Nejsi na misi metu',
+ onCooldown = 'Jsi v době ochlazení',
+}
+
+Lang.oxy = {
+ ditchCar = 'Vozidlo je horké, nech ho někde',
+ targetHandoff = 'Předat balíček',
+ handingoff = 'Předávání balíčku',
+ emptyHands = 'Nic nepřenášíš',
+ targetPay = 'Pronajmout vanu s oxy',
+ keys = 'Klíče jsou ve voze',
+ targetGetPackage = 'Zvednout balíček',
+ alreadyCarrying = 'Už něco přenášíš',
+ paid = 'Zaplatil jsi $%s za pronájem vozu',
+ notOn = 'Nejsi na trase',
+}
+
+Lang.pharma = {
+ input = {
+ header = 'Komu vystavit předpis?',
+ title1 = 'Jméno hráče',
+ title2 = 'Předpis',
+ },
+ write = 'Psaní předpisu',
+ opening = 'Otevírání lahvičky s předpisem',
+ targetFill = 'Vyplnit předpis',
+ fill = 'Doplňování předpisu',
+ canceled = 'Zrušil jsi předpis',
+ unbottle = 'Otevřel jsi lahvičku',
+}
+
+Lang.shrooms = {
+ targetPick = 'Sebrat houby',
+ picking = 'Sbírání hub',
+ eat = 'Jíš houby',
+ cancel = 'Rozhodl ses nebrát houby',
+ took = 'Vzal jsi si houby!',
+}
+
+Lang.weed = {
+ targetPick = 'Sebrat marihuanu',
+ picking = 'Sbírání marihuany',
+ targetDry = 'Osušit marihuanu',
+ noDry = 'K tomu potřebuješ mokrou marihuanu',
+ wait = 'Čekání na usušení marihuany...',
+ take = 'Připraveno k sebrání marihuany',
+ targetDryed = 'Sebrat marihuanu',
+ teleportIn = 'Vstoupit do pěstírny',
+ teleportOut = 'Opustit pěstírnu',
+ dabs = 'Děláš nějaké dabs',
+ bluntWrap = 'Zabal si sirup a udělej %s',
+ rollBlunt = 'Skloubej %s',
+ targetSales = 'Koupit od dealera',
+ buying = 'Kupuješ %s od dealera',
+ itemDoesntExist = 'Tento předmět tu neexistuje',
+ needItem = 'K tomu potřebuješ %s',
+ crackBlunt = 'Rozbíjíš blunt',
+}
+
+Lang.wholesale = {
+ alreadyWholesale = 'Už provádíš velkoobchod',
+ targetBuyer = 'Promluvit si s kupujícím',
+ wholesaling = 'Velkoobchod s drogami',
+ uhoh = 'Kupující začíná být podezřelý',
+ tooLong = 'Kupující čekal příliš dlouho',
+ notEnoughCops = 'Není dost policistů ve službě',
+}
+
+Lang.xtc = {
+ alreadyOut = 'Už máš prezu venku',
+ settingDown = 'Pokládání prezy',
+ noPressOut = 'Nemáš prezu venku',
+ targetMake = 'Tlačit pilulky',
+ making = 'Tlačení %s',
+ targetPickup = 'Zvednout prezu',
+ picking = 'Zvedání prezy',
+ targetStealMDP2P = 'Okrást MDP2P',
+ stealingMDP2P = 'Krádež MDP2P',
+ fail = 'Do prdele, jsi špatný',
+ targetStealIsosafrole = 'Okrást isosafrol',
+ stealingIsosafrole = 'Krádež isosafrolu',
+ targetRaw = 'Vyrobit syrové XTC',
+ makingRaw = 'Výroba syrového XTC',
+ getPress = 'Získat prezu',
+ buySingle = 'Koupit jednoduchou prezu za $%s',
+ buyp = 'Koupě prezy',
+ targetStamp = 'Označit XTC',
+ stamp_desc = 'Označit %s pilulek',
+ stamping = 'Označování %s pilulek',
+ noPills = 'Nemáš žádné neočíslované pilulky',
+}
+
+return Lang
\ No newline at end of file
diff --git a/locales/de.lua b/locales/de.lua
new file mode 100644
index 0000000..f1dca66
--- /dev/null
+++ b/locales/de.lua
@@ -0,0 +1,246 @@
+Lang = {}
+
+Lang.Catches = {
+ notIn = 'Du befindest dich nicht am richtigen Ort',
+ needItems = 'Du hast nicht die benötigten Gegenstände',
+ notEnoughMoney = 'Du bist zu pleite',
+ buySuccess = 'Du hast %s %s für $%s gekauft',
+ itemMissings = 'Du brauchst \n',
+ itemNeeded = 'Du brauchst %s',
+ cooldown = 'Beruhige dich, Rennfahrer',
+ invalidItem = 'Dieser Gegenstand wird hier nicht verkauft',
+}
+
+Lang.coke = {
+ targetPick = 'Kokablatt sammeln',
+ picking = 'Sammle Kokablatt',
+ targetMakePow = 'Kokainpulver herstellen',
+ noleaf = 'Du brauchst ein Kokablatt',
+ makePow = 'Zerkleinere Blätter zu Pulver',
+ targetCutCoke = 'Kokain schneiden',
+ targetBagCoke = 'Kokain verpacken',
+ teleIn = 'Labor betreten',
+ teleOut = 'Labor verlassen',
+ needBakingSoda = 'Du brauchst Backsoda dafür',
+}
+
+Lang.Cornerselling = {
+ inVeh = 'Fremde sind gefährlich!',
+ selling = 'Verkaufe %s für $%s',
+ deny = 'Angebot ablehnen',
+ wait = 'Warte auf Kunden',
+ nodrugs = 'Du hast keine Drogen zum Verkaufen',
+ searching = 'Suche nach Kunden in der Nähe',
+ targetTakeBack = 'Drogen zurücknehmen',
+ targetSell = 'Verkaufe %s von %s für $%s',
+ targetDeny = 'Angebot ablehnen',
+ stopped = 'Dein faules Hinterteil kann nicht mal Drogen verkaufen!',
+ start = 'Geh und mach deine Mutter stolz',
+ gotRobbed = 'Du wurdest ausgeraubt, Loser!',
+ gotBack = 'Du hast deine Sachen zurück!',
+ notEnough = 'Du hast nicht genug von diesem Gegenstand',
+ comDes = 'Verkaufe Drogen an der Straßenecke'
+}
+
+Lang.crack = {
+ targetMake = 'Etwas Crack kochen',
+ cook = 'Crack kochen',
+ targetBag = 'Crack verpacken',
+ bag = 'Crack verpacken',
+}
+
+Lang.Deliveries = {
+ targetGetDel = 'Lieferauftrag annehmen',
+ targetOpenShop = 'Dealerladen öffnen',
+ shopHeader = 'Dealerladen',
+ targetHandOff = 'Lieferung übergeben',
+ delivering = 'Übergabe des Pakets an den Drogenhändler',
+ alreadyDelivering = 'Du lieferst bereits ein Paket aus',
+ slowAf = 'Du hast zu lange gebraucht!',
+ newDealerHelp = {
+ help = 'Händler platzieren',
+ name = 'Name des Händlers',
+ timeMin = 'Mindestzeit',
+ timeMax = 'Maximalzeit'
+ },
+ DealerExists = 'Händler existiert bereits',
+ deleteDealer = {
+ help = 'Händler entfernen',
+ name = 'Name des Händlers',
+ },
+ deleteDealerSuccess = 'Händler gelöscht',
+ deleteDealerFail = 'Löschen des Händlers fehlgeschlagen',
+}
+
+Lang.heroin = {
+ targetPick = 'Heroin sammeln',
+ picking = 'Sammle Heroin',
+ targetCook = 'Heroin kochen',
+ pbCook = 'Heroin wird gekocht',
+ targetPickup = 'Labor abholen',
+ pbPickup = 'Labor wird eingesammelt',
+ targetClean = 'Labor säubern',
+ pbClean = 'Labor wird gesäubert',
+ targetDry = 'Pflanze trocknen',
+ pbDry = 'Pflanze wird getrocknet',
+ targetCutHeroin = 'Heroin schneiden',
+ pbCutHeroin = 'Heroin wird geschnitten',
+ targetBuyKit = 'Heroin-Laborkit kaufen',
+ pbBuyKit = 'Heroin-Laborkit wird gekauft',
+ tableout = 'Du hast bereits einen Tisch aufgestellt',
+ placing = 'Stelle Tisch ab',
+ targetFill = 'Spritze füllen',
+ pbFill = 'Spritze wird gefüllt',
+ hasKitAlready = 'Du besitzt bereits ein Heroin-Laborkit',
+ notEnoughMoney = 'Du brauchst $%s Bargeld dafür',
+ placedKit = 'Du hast dein Heroin-Laborkit abgestellt',
+ failed = 'Du hast beim Herstellen von Heroin versagt und die Zutaten verloren',
+}
+
+Lang.lean = {
+ stealFromTruck = 'Vom Lkw stehlen',
+ startMission = 'Lean-Mission starten',
+ notOnRun = 'Du bist nicht auf einer Lean-Mission',
+ alreadyChasing = 'Du verfolgst bereits einen Lkw',
+}
+
+Lang.lsd = {
+ targetHeat = 'LSD erhitzen',
+ heating = 'LSD wird erhitzt',
+ targetRefine = 'Die Säure verfeinern',
+ refining = 'Säure wird verfeinert',
+ targetDipping = 'Tabs eintauchen',
+ dipping = 'Tabs werden getaucht',
+ targetPickup = 'Laborkit aufheben',
+ packup = 'Laborkit wird eingepackt',
+ targetClean = 'Laborkit säubern',
+ needCleaning = 'Du brauchst ein Reinigungs-Kit, um das Labor zu säubern',
+ cleaning = 'Laborkit wird gesäubert',
+ targetLys = 'Lysergsäure stehlen',
+ stealLys = 'Lysergsäure wird gestohlen',
+ targetDie = 'Diethylamid stehlen',
+ stealDie = 'Diethylamid wird gestohlen',
+ targetBuyTab = 'Tabpapier kaufen',
+ targetBuyKit = 'LSD-Laborkit kaufen',
+ alreadyOwn = 'Du besitzt diesen Gegenstand bereits',
+ buyingKit = 'LSD-Laborkit wird gekauft',
+ tableout = 'Du hast bereits einen Tisch aufgestellt',
+ placing = 'Stelle das Laborkit ab!',
+ failed = 'Du bist schlecht im Drogenmachen',
+}
+
+Lang.mesc = {
+ targetPick = 'Kaktus sammeln',
+ picking = 'Sammle Kaktus',
+ targetDry = 'Kaktus trocknen',
+ dry = 'Kaktus wird getrocknet',
+}
+
+Lang.meth = {
+ alreadyChasing = 'Du verfolgst bereits einen Lkw',
+ targetStealFromCar = 'Vom Meth-Auto stehlen',
+ targetHeist = 'Meth-Mission starten',
+ started = 'Du hast bereits Meth am Kochen',
+ increaseHeat = 'Du hast die Hitze erhöht',
+ targetBag = 'Meth verpacken',
+ targetCook = 'Meth kochen',
+ targetGrabTray = 'Meth-Schale nehmen',
+ targetHeat = 'Regler anpassen',
+ targetSmash = 'Schale zertrümmern',
+ targetStealEPH = 'Ephedrin stehlen',
+ stealingEPH = 'Ephedrin wird gestohlen',
+ targetStealACE = 'Aceton stehlen',
+ stealingACE = 'Aceton wird gestohlen',
+ notOnRun = 'Du bist nicht auf einer Meth-Tour',
+ onCooldown = 'Du befindest dich im Abklingmodus',
+}
+
+Lang.oxy = {
+ ditchCar = 'Der Van ist heiß, lass ihn irgendwo stehen',
+ targetHandoff = 'Paket übergeben',
+ handingoff = 'Paket wird übergeben',
+ emptyHands = 'Du trägst nichts bei dir',
+ targetPay = 'Oxy-Van mieten',
+ keys = 'Die Schlüssel sind im Van',
+ targetGetPackage = 'Paket nehmen',
+ alreadyCarrying = 'Du trägst bereits ein Paket',
+ paid = 'Du hast $%s bezahlt, um den Van zu mieten',
+ notOn = 'Du bist nicht auf einer Route',
+}
+
+Lang.pharma = {
+ input = {
+ header = 'Wem ein Rezept geben?',
+ title1 = 'Spielername',
+ title2 = 'Rezept',
+ },
+ write = 'Rezept schreiben',
+ opening = 'Rezeptflasche öffnen',
+ targetFill = 'Rezept auffüllen',
+ fill = 'Rezept wird ausgefüllt',
+ canceled = 'Du hast das Rezept abgebrochen',
+ unbottle = 'Du hast die Flasche geöffnet',
+}
+
+Lang.shrooms = {
+ targetPick = 'Pilze sammeln',
+ picking = 'Sammle Pilze',
+ eat = 'Isst Pilze',
+ cancel = 'Entschieden, keine Pilze zu nehmen',
+ took = 'Du hast Pilze genommen!',
+}
+
+Lang.weed = {
+ targetPick = 'Weed sammeln',
+ picking = 'Sammle Weed',
+ targetDry = 'Weed trocknen',
+ noDry = 'Du brauchst nasses Weed dafür',
+ wait = 'Warte, bis das Weed trocken ist...',
+ take = 'Weed kann eingesammelt werden',
+ targetDryed = 'Weed einsammeln',
+ teleportIn = 'Growraum betreten',
+ teleportOut = 'Growraum verlassen',
+ dabs = 'Macht ein paar Dabs',
+ bluntWrap = 'Sirup eintauchen, um %s herzustellen',
+ rollBlunt = 'Rolle einen %s',
+ targetSales = 'Beim Dealer kaufen',
+ buying = 'Kaufe %s vom Dealer',
+ itemDoesntExist = 'Dieser Gegenstand existiert hier nicht',
+ needItem = 'Du brauchst %s dafür',
+ crackBlunt = 'Reißt einen Blunt auf',
+}
+
+Lang.wholesale = {
+ alreadyWholesale = 'Du verkaufst bereits Großhandel',
+ targetBuyer = 'Mit dem Käufer sprechen',
+ wholesaling = 'Großhandel mit Drogen',
+ uhoh = 'Der Käufer wird suspekt',
+ tooLong = 'Der Käufer hat zu lange gewartet',
+ notEnoughCops = 'Nicht genügend Polizisten im Dienst',
+}
+
+Lang.xtc = {
+ alreadyOut = 'Du hast bereits eine Presse draußen',
+ settingDown = 'Stelle die Presse ab',
+ noPressOut = 'Du hast keine Presse draußen',
+ targetMake = 'Pillen pressen',
+ making = 'Presse %s',
+ targetPickup = 'Presse aufheben',
+ picking = 'Presse wird aufgehoben',
+ targetStealMDP2P = 'MDP2P stehlen',
+ stealingMDP2P = 'MDP2P wird gestohlen',
+ fail = 'Alter, du bist echt schlecht',
+ targetStealIsosafrole = 'Isosafrol stehlen',
+ stealingIsosafrole = 'Isosafrol wird gestohlen',
+ targetRaw = 'Rohes XTC herstellen',
+ makingRaw = 'Stelle rohes XTC her',
+ getPress = 'Presse besorgen',
+ buySingle = 'Einzelne Presse für $%s kaufen',
+ buyp = 'Presse wird gekauft',
+ targetStamp = 'XTC stempeln',
+ stamp_desc = '%s Pillen stempeln',
+ stamping = 'Stemple %s Pillen',
+ noPills = 'Du hast keine ungestempelten Pillen',
+}
+
+return Lang
\ No newline at end of file
diff --git a/locales/en.lua b/locales/en.lua
index 1bce1ed..0d94269 100644
--- a/locales/en.lua
+++ b/locales/en.lua
@@ -100,7 +100,8 @@ Lang.heroin = {
Lang.lean = {
stealFromTruck = 'Steal From Truck',
startMission = 'Start Lean Mission',
- notOnRun = 'You Are Not On A Lean Run'
+ notOnRun = 'You Are Not On A Lean Run',
+ alreadyChasing = 'You Are Already Chasing A Truck',
}
Lang.lsd = {
diff --git a/locales/es.lua b/locales/es.lua
index e69de29..1e0718a 100644
--- a/locales/es.lua
+++ b/locales/es.lua
@@ -0,0 +1,246 @@
+Lang = {}
+
+Lang.Catches = {
+ notIn = 'No estás en la ubicación correcta',
+ needItems = 'No tienes los artículos requeridos',
+ notEnoughMoney = 'Estás demasiado pobre',
+ buySuccess = 'Compraste %s %s por $%s',
+ itemMissings = 'Necesitas \n',
+ itemNeeded = 'Necesitas %s',
+ cooldown = 'Calma, corredor de carreras',
+ invalidItem = 'Este artículo no se vende aquí',
+}
+
+Lang.coke = {
+ targetPick = 'Recoger hoja de coca',
+ picking = 'Recogiendo hoja de coca',
+ targetMakePow = 'Hacer polvo de cocaína',
+ noleaf = 'Necesitas una hoja de coca',
+ makePow = 'Picando hojas en polvo',
+ targetCutCoke = 'Cortar cocaína',
+ targetBagCoke = 'Empaquetar cocaína',
+ teleIn = 'Entrar al laboratorio',
+ teleOut = 'Salir del laboratorio',
+ needBakingSoda = 'Necesitas bicarbonato de sodio para esto',
+}
+
+Lang.Cornerselling = {
+ inVeh = '¡Peligro desconocido!',
+ selling = 'Vendiendo %s por $%s',
+ deny = 'Rechazar oferta',
+ wait = 'Esperando cliente',
+ nodrugs = 'No tienes drogas para vender',
+ searching = 'Buscando clientes cercanos',
+ targetTakeBack = 'Recuperar drogas',
+ targetSell = 'Vender %s de %s por $%s',
+ targetDeny = 'Rechazar oferta',
+ stopped = '¡Tu perezoso trasero ni siquiera puede vender drogas!',
+ start = 'Ve a hacer que tu mamá se sienta orgullosa',
+ gotRobbed = '¡Te robaron, nerd!',
+ gotBack = '¡Recuperaste tus cosas!',
+ notEnough = 'No tienes suficiente de este artículo',
+ comDes = 'Vende cosas en la esquina'
+}
+
+Lang.crack = {
+ targetMake = 'Cocinar algo de crack',
+ cook = 'Cocinando crack',
+ targetBag = 'Empaquetar crack',
+ bag = 'Empaquetando crack',
+}
+
+Lang.Deliveries = {
+ targetGetDel = 'Obtener misión de entrega',
+ targetOpenShop = 'Abrir tienda de dealer',
+ shopHeader = 'Tienda de Dealer',
+ targetHandOff = 'Entregar paquete',
+ delivering = 'Entregando el paquete al dealer de drogas',
+ alreadyDelivering = 'Ya estás entregando un paquete',
+ slowAf = '¡Te tardaste demasiado!',
+ newDealerHelp = {
+ help = 'Colocar un dealer',
+ name = 'Nombre del dealer',
+ timeMin = 'Tiempo mínimo',
+ timeMax = 'Tiempo máximo'
+ },
+ DealerExists = 'El dealer ya existe',
+ deleteDealer = {
+ help = 'Eliminar un dealer',
+ name = 'Nombre del dealer',
+ },
+ deleteDealerSuccess = 'Dealer eliminado',
+ deleteDealerFail = 'Error al eliminar dealer',
+}
+
+Lang.heroin = {
+ targetPick = 'Recoger heroína',
+ picking = 'Recogiendo heroína',
+ targetCook = 'Cocinar heroína',
+ pbCook = 'Preparando heroína',
+ targetPickup = 'Recoger laboratorio',
+ pbPickup = 'Recogiendo laboratorio',
+ targetClean = 'Limpiar laboratorio',
+ pbClean = 'Limpiando laboratorio',
+ targetDry = 'Secar planta',
+ pbDry = 'Secando planta',
+ targetCutHeroin = 'Cortar heroína',
+ pbCutHeroin = 'Cortando heroína',
+ targetBuyKit = 'Comprar kit de laboratorio de heroína',
+ pbBuyKit = 'Comprando kit de laboratorio de heroína',
+ tableout = 'Ya tienes una mesa colocada',
+ placing = 'Colocando la mesa',
+ targetFill = 'Llenar jeringa',
+ pbFill = 'Llenando jeringa',
+ hasKitAlready = 'Ya tienes un kit de laboratorio de heroína',
+ notEnoughMoney = 'Necesitas $%s en efectivo para esto',
+ placedKit = 'Has colocado tu kit de laboratorio de heroína',
+ failed = 'Fallaste al hacer heroína y perdiste tus ingredientes',
+}
+
+Lang.lean = {
+ stealFromTruck = 'Robar del camión',
+ startMission = 'Iniciar misión de lean',
+ notOnRun = 'No estás en una misión de lean',
+ alreadyChasing = 'Ya estás persiguiendo un camión',
+}
+
+Lang.lsd = {
+ targetHeat = 'Calentar LSD',
+ heating = 'Calentando LSD',
+ targetRefine = 'Refinar el ácido',
+ refining = 'Refinando el ácido',
+ targetDipping = 'Sumergir papeles',
+ dipping = 'Sumergiendo papeles',
+ targetPickup = 'Recoger kit de laboratorio',
+ packup = 'Guardando kit de laboratorio',
+ targetClean = 'Limpiar kit de laboratorio',
+ needCleaning = 'Necesitas un kit de limpieza para limpiar el laboratorio',
+ cleaning = 'Limpiando kit de laboratorio',
+ targetLys = 'Robar ácido lisérgico',
+ stealLys = 'Robando ácido lisérgico',
+ targetDie = 'Robar dietilamida',
+ stealDie = 'Robando dietilamida',
+ targetBuyTab = 'Comprar papel para papeletas',
+ targetBuyKit = 'Comprar kit de laboratorio de LSD',
+ alreadyOwn = 'Ya posees este artículo',
+ buyingKit = 'Comprando kit de laboratorio de LSD',
+ tableout = 'Ya tienes una mesa colocada',
+ placing = '¡Colocando el kit de laboratorio!',
+ failed = 'Eres malo haciendo drogas',
+}
+
+Lang.mesc = {
+ targetPick = 'Recoger cactus',
+ picking = 'Recogiendo cactus',
+ targetDry = 'Secar cactus',
+ dry = 'Secando cactus',
+}
+
+Lang.meth = {
+ alreadyChasing = 'Ya estás persiguiendo un camión',
+ targetStealFromCar = 'Robar del coche de metanfetamina',
+ targetHeist = 'Iniciar misión de metanfetamina',
+ started = 'Ya tienes metanfetamina cocinándose',
+ increaseHeat = 'Aumentaste el calor',
+ targetBag = 'Empaquetar metanfetamina',
+ targetCook = 'Cocinar metanfetamina',
+ targetGrabTray = 'Agarrar bandeja de metanfetamina',
+ targetHeat = 'Ajustar los controles',
+ targetSmash = 'Romper la bandeja',
+ targetStealEPH = 'Robar efedrina',
+ stealingEPH = 'Robando efedrina',
+ targetStealACE = 'Robar acetona',
+ stealingACE = 'Robando acetona',
+ notOnRun = 'No estás en una misión de metanfetamina',
+ onCooldown = 'Estás en periodo de enfriamiento',
+}
+
+Lang.oxy = {
+ ditchCar = 'La furgoneta está caliente, déjala en algún lugar',
+ targetHandoff = 'Entregar paquete',
+ handingoff = 'Entregando el paquete',
+ emptyHands = 'No estás cargando nada',
+ targetPay = 'Alquilar furgoneta de oxys',
+ keys = 'Las llaves están en la furgoneta',
+ targetGetPackage = 'Agarrar paquete',
+ alreadyCarrying = 'Ya estás cargando un paquete',
+ paid = 'Pagaste $%s para alquilar la furgoneta',
+ notOn = 'No estás en una ruta',
+}
+
+Lang.pharma = {
+ input = {
+ header = '¿A quién darle una receta?',
+ title1 = 'Nombre del jugador',
+ title2 = 'Receta',
+ },
+ write = 'Escribiendo receta',
+ opening = 'Abriendo frasco de receta',
+ targetFill = 'Llenar receta',
+ fill = 'Obteniendo receta',
+ canceled = 'Cancelaste la receta',
+ unbottle = 'Abriste el frasco',
+}
+
+Lang.shrooms = {
+ targetPick = 'Recoger setas',
+ picking = 'Recogiendo setas',
+ eat = 'Comiendo setas',
+ cancel = 'Decidiste no tomar setas',
+ took = '¡Tomaste algunas setas!',
+}
+
+Lang.weed = {
+ targetPick = 'Recoger marihuana',
+ picking = 'Recogiendo marihuana',
+ targetDry = 'Secar marihuana',
+ noDry = 'Necesitas marihuana húmeda para esto',
+ wait = 'Esperando a que la marihuana se seque...',
+ take = 'Listo para recoger la marihuana',
+ targetDryed = 'Recoger marihuana',
+ teleportIn = 'Entrar a la casa de cultivo',
+ teleportOut = 'Salir de la casa de cultivo',
+ dabs = 'Haciendo algunos dabs',
+ bluntWrap = 'Doblando sirope para hacer %s',
+ rollBlunt = 'Enrollando un %s',
+ targetSales = 'Comprar al dealer',
+ buying = 'Comprando %s al dealer',
+ itemDoesntExist = 'Este artículo no existe aquí',
+ needItem = 'Necesitas un %s para esto',
+ crackBlunt = 'Abriendo un blunt',
+}
+
+Lang.wholesale = {
+ alreadyWholesale = 'Ya estás haciendo venta al por mayor',
+ targetBuyer = 'Hablar con el comprador',
+ wholesaling = 'Vendiendo drogas al por mayor',
+ uhoh = 'El comprador se está poniendo sospechoso',
+ tooLong = 'El comprador esperó demasiado tiempo',
+ notEnoughCops = 'No hay suficientes policías de servicio',
+}
+
+Lang.xtc = {
+ alreadyOut = 'Ya tienes una prensa colocada',
+ settingDown = 'Colocando la prensa',
+ noPressOut = 'No tienes una prensa colocada',
+ targetMake = 'Prensar pastillas',
+ making = 'Prensando %s',
+ targetPickup = 'Recoger prensa',
+ picking = 'Recogiendo prensa',
+ targetStealMDP2P = 'Robar MDP2P',
+ stealingMDP2P = 'Robando MDP2P',
+ fail = 'Caray, eres malo',
+ targetStealIsosafrole = 'Robar isosafrol',
+ stealingIsosafrole = 'Robando isosafrol',
+ targetRaw = 'Hacer XTC crudo',
+ makingRaw = 'Haciendo XTC crudo',
+ getPress = 'Conseguir prensa',
+ buySingle = 'Comprar prensa individual por $%s',
+ buyp = 'Comprando prensa',
+ targetStamp = 'Marcar XTC',
+ stamp_desc = 'Marcar %s pastillas',
+ stamping = 'Marcando %s pastillas',
+ noPills = 'No tienes pastillas sin marcar',
+}
+
+return Lang
\ No newline at end of file
diff --git a/locales/fr.lua b/locales/fr.lua
new file mode 100644
index 0000000..3a97e8a
--- /dev/null
+++ b/locales/fr.lua
@@ -0,0 +1,246 @@
+Lang = {}
+
+Lang.Catches = {
+ notIn = 'Tu n\'es pas au bon endroit',
+ needItems = 'Tu n\'as pas les objets requis',
+ notEnoughMoney = 'Tu es trop pauvre',
+ buySuccess = 'Tu as acheté %s %s pour $%s',
+ itemMissings = 'Tu as besoin de \n',
+ itemNeeded = 'Tu as besoin de %s',
+ cooldown = 'Ralentis, pilote de course',
+ invalidItem = 'Cet objet n\'est pas vendu ici',
+}
+
+Lang.coke = {
+ targetPick = 'Ramasser la feuille de coca',
+ picking = 'Récolte de la feuille de coca',
+ targetMakePow = 'Fabriquer de la poudre de cocaïne',
+ noleaf = 'Tu as besoin d\'une feuille de coca',
+ makePow = 'Hacher les feuilles en poudre',
+ targetCutCoke = 'Couper la cocaïne',
+ targetBagCoke = 'Emballer la cocaïne',
+ teleIn = 'Entrer dans le laboratoire',
+ teleOut = 'Quitter le laboratoire',
+ needBakingSoda = 'Tu as besoin de bicarbonate de soude pour ça',
+}
+
+Lang.Cornerselling = {
+ inVeh = 'Inconnu dangereux !',
+ selling = 'Vente de %s pour $%s',
+ deny = 'Refuser l\'offre',
+ wait = 'En attente d\'un client',
+ nodrugs = 'Tu n\'as pas de drogue à vendre',
+ searching = 'Recherche de clients à proximité',
+ targetTakeBack = 'Reprendre les drogues',
+ targetSell = 'Vendre %s de %s pour $%s',
+ targetDeny = 'Refuser l\'offre',
+ stopped = 'Ton fainéant de cul ne sait même pas vendre de la drogue !',
+ start = 'Va rendre ta mère fière',
+ gotRobbed = 'Tu t\'es fait braquer, nul !',
+ gotBack = 'Tu as récupéré tes affaires !',
+ notEnough = 'Tu n\'as pas assez de cet objet',
+ comDes = 'Vend des trucs au coin de la rue'
+}
+
+Lang.crack = {
+ targetMake = 'Cuire du crack',
+ cook = 'Cuisson du crack',
+ targetBag = 'Emballer le crack',
+ bag = 'Conditionnement du crack',
+}
+
+Lang.Deliveries = {
+ targetGetDel = 'Obtenir une mission de livraison',
+ targetOpenShop = 'Ouvrir le magasin du dealer',
+ shopHeader = 'Magasin du dealer',
+ targetHandOff = 'Remettre la livraison',
+ delivering = 'Remise du colis au dealer de drogue',
+ alreadyDelivering = 'Tu es déjà en train de livrer un colis',
+ slowAf = 'Tu as mis trop de temps !',
+ newDealerHelp = {
+ help = 'Placer un dealer',
+ name = 'Nom du dealer',
+ timeMin = 'Temps minimum',
+ timeMax = 'Temps maximum'
+ },
+ DealerExists = 'Le dealer existe déjà',
+ deleteDealer = {
+ help = 'Supprimer un dealer',
+ name = 'Nom du dealer',
+ },
+ deleteDealerSuccess = 'Dealer supprimé',
+ deleteDealerFail = 'Échec de la suppression du dealer',
+}
+
+Lang.heroin = {
+ targetPick = 'Ramasser de l\'héroïne',
+ picking = 'Récolte de l\'héroïne',
+ targetCook = 'Cuire de l\'héroïne',
+ pbCook = 'Préparation de l\'héroïne',
+ targetPickup = 'Récupérer le labo',
+ pbPickup = 'Récupération du labo',
+ targetClean = 'Nettoyer le labo',
+ pbClean = 'Nettoyage du labo',
+ targetDry = 'Sécher la plante',
+ pbDry = 'Séchage de la plante',
+ targetCutHeroin = 'Couper l\'héroïne',
+ pbCutHeroin = 'Coupe de l\'héroïne',
+ targetBuyKit = 'Acheter un kit de laboratoire d\'héroïne',
+ pbBuyKit = 'Achat du kit de laboratoire d\'héroïne',
+ tableout = 'Tu as déjà une table dehors',
+ placing = 'Pose de la table',
+ targetFill = 'Remplir la seringue',
+ pbFill = 'Remplissage de la seringue',
+ hasKitAlready = 'Tu possèdes déjà un kit de laboratoire d\'héroïne',
+ notEnoughMoney = 'Tu as besoin de $%s en liquide pour ça',
+ placedKit = 'Tu as posé ton kit de laboratoire d\'héroïne',
+ failed = 'Tu as échoué à fabriquer de l\'héroïne et perdu tes ingrédients',
+}
+
+Lang.lean = {
+ stealFromTruck = 'Vol depuis le camion',
+ startMission = 'Démarrer la mission Lean',
+ notOnRun = 'Tu n\'es pas en mission Lean',
+ alreadyChasing = 'Tu poursuis déjà un camion',
+}
+
+Lang.lsd = {
+ targetHeat = 'Chauffer le LSD',
+ heating = 'Chauffage du LSD',
+ targetRefine = 'Affiner l\'acide',
+ refining = 'Affinage de l\'acide',
+ targetDipping = 'Imprégner les timbres',
+ dipping = 'Imprégnation des timbres',
+ targetPickup = 'Récupérer le kit de labo',
+ packup = 'Rangement du kit de labo',
+ targetClean = 'Nettoyer le kit de labo',
+ needCleaning = 'Tu as besoin d\'un kit de nettoyage pour nettoyer le labo',
+ cleaning = 'Nettoyage du kit de labo',
+ targetLys = 'Vol de l\'acide lysergique',
+ stealLys = 'Vol de l\'acide lysergique',
+ targetDie = 'Vol de la diéthylamide',
+ stealDie = 'Vol de la diéthylamide',
+ targetBuyTab = 'Acheter du papier à timbres',
+ targetBuyKit = 'Acheter un kit de laboratoire LSD',
+ alreadyOwn = 'Tu possèdes déjà cet objet',
+ buyingKit = 'Achat du kit de laboratoire LSD',
+ tableout = 'Tu as déjà une table dehors',
+ placing = 'Pose du kit de laboratoire !',
+ failed = 'Tu es nul pour fabriquer des drogues',
+}
+
+Lang.mesc = {
+ targetPick = 'Ramasser le cactus',
+ picking = 'Récolte du cactus',
+ targetDry = 'Sécher le cactus',
+ dry = 'Séchage du cactus',
+}
+
+Lang.meth = {
+ alreadyChasing = 'Tu poursuis déjà un camion',
+ targetStealFromCar = 'Voler dans la voiture de méth',
+ targetHeist = 'Démarrer la mission de méth',
+ started = 'Tu as déjà de la méth en cuisson',
+ increaseHeat = 'Tu as augmenté la température',
+ targetBag = 'Emballer la méth',
+ targetCook = 'Cuire la méth',
+ targetGrabTray = 'Prendre le plateau de méth',
+ targetHeat = 'Régler les boutons',
+ targetSmash = 'Briser le plateau',
+ targetStealEPH = 'Vol d\'éphédrine',
+ stealingEPH = 'Vol d\'éphédrine',
+ targetStealACE = 'Vol d\'acétone',
+ stealingACE = 'Vol d\'acétone',
+ notOnRun = 'Tu n\'es pas en mission de méth',
+ onCooldown = 'Tu es en période de récupération',
+}
+
+Lang.oxy = {
+ ditchCar = 'Le van est chaud, abandonne-le quelque part',
+ targetHandoff = 'Remettre le colis',
+ handingoff = 'Remise du colis',
+ emptyHands = 'Tu n\'as rien en main',
+ targetPay = 'Louer le van Oxy',
+ keys = 'Les clés sont dans le van',
+ targetGetPackage = 'Prendre le colis',
+ alreadyCarrying = 'Tu transportes déjà un colis',
+ paid = 'Tu as payé $%s pour louer le van',
+ notOn = 'Tu n\'es pas sur un trajet',
+}
+
+Lang.pharma = {
+ input = {
+ header = 'À qui donner une ordonnance ?',
+ title1 = 'Nom du joueur',
+ title2 = 'Ordonnance',
+ },
+ write = 'Rédaction de l\'ordonnance',
+ opening = 'Ouverture du flacon d\'ordonnance',
+ targetFill = 'Remplir l\'ordonnance',
+ fill = 'Obtention de l\'ordonnance remplie',
+ canceled = 'Tu as annulé l\'ordonnance',
+ unbottle = 'Tu as ouvert le flacon',
+}
+
+Lang.shrooms = {
+ targetPick = 'Ramasser des champignons',
+ picking = 'Récolte des champignons',
+ eat = 'Manger des champignons',
+ cancel = 'Décide de ne pas prendre de champignons',
+ took = 'Tu as pris des champignons !',
+}
+
+Lang.weed = {
+ targetPick = 'Récolter du cannabis',
+ picking = 'Récolte du cannabis',
+ targetDry = 'Sécher le cannabis',
+ noDry = 'Tu as besoin de cannabis humide pour ça',
+ wait = 'En attente du séchage du cannabis...',
+ take = 'Prêt à récupérer le cannabis',
+ targetDryed = 'Récupérer le cannabis',
+ teleportIn = 'Entrer dans la serre',
+ teleportOut = 'Quitter la serre',
+ dabs = 'Fait quelques dabs',
+ bluntWrap = 'Trempe le sirop pour fabriquer %s',
+ rollBlunt = 'Roule un %s',
+ targetSales = 'Acheter au dealer',
+ buying = 'Achat de %s au dealer',
+ itemDoesntExist = 'Cet objet n\'existe pas ici',
+ needItem = 'Tu as besoin d\'un %s pour ça',
+ crackBlunt = 'Ouvre un blunt',
+}
+
+Lang.wholesale = {
+ alreadyWholesale = 'Déjà en vente en gros',
+ targetBuyer = 'Parler à l\'acheteur',
+ wholesaling = 'Vente en gros de drogues',
+ uhoh = 'L\'acheteur devient louche',
+ tooLong = 'L\'acheteur a attendu trop longtemps',
+ notEnoughCops = 'Pas assez de policiers en service',
+}
+
+Lang.xtc = {
+ alreadyOut = 'Tu as déjà une presse dehors',
+ settingDown = 'Poser la presse',
+ noPressOut = 'Tu n\'as pas de presse dehors',
+ targetMake = 'Piloter les pilules',
+ making = 'Compression de %s',
+ targetPickup = 'Récupérer la presse',
+ picking = 'Récupération de la presse',
+ targetStealMDP2P = 'Vol de MDP2P',
+ stealingMDP2P = 'Vol de MDP2P',
+ fail = 'Putain mec, t\'es nul',
+ targetStealIsosafrole = 'Vol d\'isosafrole',
+ stealingIsosafrole = 'Vol d\'isosafrole',
+ targetRaw = 'Fabriquer du XTC brut',
+ makingRaw = 'Fabrication de XTC brut',
+ getPress = 'Obtenir la presse',
+ buySingle = 'Acheter une presse simple pour $%s',
+ buyp = 'Achat de la presse',
+ targetStamp = 'Estampiller le XTC',
+ stamp_desc = 'Estampiller %s pilules',
+ stamping = 'Estampillage de %s pilules',
+ noPills = 'Tu n\'as pas de pilules non estampillées',
+}
+
+return Lang
\ No newline at end of file
diff --git a/locales/nl.lua b/locales/nl.lua
new file mode 100644
index 0000000..d2b90e6
--- /dev/null
+++ b/locales/nl.lua
@@ -0,0 +1,246 @@
+Lang = {}
+
+Lang.Catches = {
+ notIn = 'Je bent niet op de juiste locatie',
+ needItems = 'Je hebt de vereiste items niet',
+ notEnoughMoney = 'Je bent te arm',
+ buySuccess = 'Je hebt %s %s gekocht voor $%s',
+ itemMissings = 'Je hebt nodig \n',
+ itemNeeded = 'Je hebt %s nodig',
+ cooldown = 'Rustig aan, snelheidsduivel',
+ invalidItem = 'Dit item wordt hier niet verkocht',
+}
+
+Lang.coke = {
+ targetPick = 'Pak cocablad',
+ picking = 'Cocablad aan het plukken',
+ targetMakePow = 'Maak cocaïnepoeder',
+ noleaf = 'Je hebt een cocablad nodig',
+ makePow = 'Bladeren fijnhakken tot poeder',
+ targetCutCoke = 'Snijd cocaïne',
+ targetBagCoke = 'Verpak cocaïne',
+ teleIn = 'Betreed het lab',
+ teleOut = 'Verlaat het lab',
+ needBakingSoda = 'Je hebt baksoda nodig voor dit',
+}
+
+Lang.Cornerselling = {
+ inVeh = 'Vreemdelingengevaar!',
+ selling = 'Verkoop %s voor $%s',
+ deny = 'Weiger dit aanbod',
+ wait = 'Wachten op klant',
+ nodrugs = 'Je hebt geen drugs om te verkopen',
+ searching = 'Zoeken naar klanten in de buurt',
+ targetTakeBack = 'Neem drugs terug',
+ targetSell = 'Verkoop %s van %s voor $%s',
+ targetDeny = 'Weiger aanbod',
+ stopped = 'Je luie achterste kan niet eens drugs verkopen!',
+ start = 'Ga je moeder trots maken',
+ gotRobbed = 'Je bent beroofd, nerd!',
+ gotBack = 'Je hebt je spullen terug!',
+ notEnough = 'Je hebt niet genoeg van dit item',
+ comDes = 'Verkoop spullen op de hoek'
+}
+
+Lang.crack = {
+ targetMake = 'Kook wat crack',
+ cook = 'Crack aan het koken',
+ targetBag = 'Verpak crack',
+ bag = 'Crack aan het verpakken',
+}
+
+Lang.Deliveries = {
+ targetGetDel = 'Haal leveropdracht op',
+ targetOpenShop = 'Open dealerwinkel',
+ shopHeader = 'Dealerwinkel',
+ targetHandOff = 'Lever pakket af',
+ delivering = 'Pakket overhandigen aan drugdealer',
+ alreadyDelivering = 'Je bezorgt al een pakket',
+ slowAf = 'Je hebt veel te lang gedaan!',
+ newDealerHelp = {
+ help = 'Plaats een dealer',
+ name = 'Dealer naam',
+ timeMin = 'Minimale tijd',
+ timeMax = 'Maximale tijd'
+ },
+ DealerExists = 'Dealer bestaat al',
+ deleteDealer = {
+ help = 'Verwijder een dealer',
+ name = 'Dealer naam',
+ },
+ deleteDealerSuccess = 'Dealer verwijderd',
+ deleteDealerFail = 'Verwijderen van dealer mislukt',
+}
+
+Lang.heroin = {
+ targetPick = 'Pluk heroïne',
+ picking = 'Heroïne aan het plukken',
+ targetCook = 'Kook heroïne',
+ pbCook = 'Heroïne aan het koken',
+ targetPickup = 'Pak lab op',
+ pbPickup = 'Lab aan het ophalen',
+ targetClean = 'Maak lab schoon',
+ pbClean = 'Lab aan het schoonmaken',
+ targetDry = 'Droog de plant',
+ pbDry = 'Plant aan het drogen',
+ targetCutHeroin = 'Snijd heroïne',
+ pbCutHeroin = 'Heroïne aan het snijden',
+ targetBuyKit = 'Koop heroïnelabkit',
+ pbBuyKit = 'Heroïnelabkit aan het kopen',
+ tableout = 'Je hebt al een tafel neergezet',
+ placing = 'Tafel aan het plaatsen',
+ targetFill = 'Vul spuit',
+ pbFill = 'Spuit aan het vullen',
+ hasKitAlready = 'Je hebt al een heroïnelabkit',
+ notEnoughMoney = 'Je hebt $%s contant geld nodig voor dit',
+ placedKit = 'Je hebt je heroïnelabkit neergezet',
+ failed = 'Je hebt gefaald bij het maken van heroïne en je ingrediënten verloren',
+}
+
+Lang.lean = {
+ stealFromTruck = 'Steel van vrachtwagen',
+ startMission = 'Start Lean-missie',
+ notOnRun = 'Je bent niet op een Lean-missie',
+ alreadyChasing = 'Je zit al achter een vrachtwagen aan',
+}
+
+Lang.lsd = {
+ targetHeat = 'Verhit LSD',
+ heating = 'LSD aan het verhitten',
+ targetRefine = 'Verfijn het zuur',
+ refining = 'Zuur aan het verfijnen',
+ targetDipping = 'Domple tabs',
+ dipping = 'Tabs aan het dompelen',
+ targetPickup = 'Pak labkit op',
+ packup = 'Labkit aan het inpakken',
+ targetClean = 'Maak labkit schoon',
+ needCleaning = 'Je hebt een schoonmaakkit nodig om het lab schoon te maken',
+ cleaning = 'Labkit aan het schoonmaken',
+ targetLys = 'Steel lyserginezuur',
+ stealLys = 'Lyserginezuur aan het stelen',
+ targetDie = 'Steel diethylamide',
+ stealDie = 'Diethylamide aan het stelen',
+ targetBuyTab = 'Koop tabpapier',
+ targetBuyKit = 'Koop LSD-labkit',
+ alreadyOwn = 'Je bezit dit item al',
+ buyingKit = 'LSD-labkit aan het kopen',
+ tableout = 'Je hebt al een tafel neergezet',
+ placing = 'Labkit neerzetten!',
+ failed = 'Je bent slecht in het maken van drugs',
+}
+
+Lang.mesc = {
+ targetPick = 'Pluk cactus',
+ picking = 'Cactus aan het plukken',
+ targetDry = 'Droog cactus',
+ dry = 'Cactus aan het drogen',
+}
+
+Lang.meth = {
+ alreadyChasing = 'Je zit al achter een vrachtwagen aan',
+ targetStealFromCar = 'Steel van methauto',
+ targetHeist = 'Start methmissie',
+ started = 'Je hebt al meth aan het koken',
+ increaseHeat = 'Je hebt de temperatuur verhoogd',
+ targetBag = 'Verpak meth',
+ targetCook = 'Kook meth',
+ targetGrabTray = 'Pak methschaal',
+ targetHeat = 'Pas de knoppen aan',
+ targetSmash = 'Smash de schaal',
+ targetStealEPH = 'Steel efedrine',
+ stealingEPH = 'Efedrine aan het stelen',
+ targetStealACE = 'Steel aceton',
+ stealingACE = 'Aceton aan het stelen',
+ notOnRun = 'Je bent niet op een methmissie',
+ onCooldown = 'Je zit in een afkoelingsperiode'
+}
+
+Lang.oxy = {
+ ditchCar = 'De bus is warm, zet hem ergens achter',
+ targetHandoff = 'Lever pakket af',
+ handingoff = 'Pakket aan het afleveren',
+ emptyHands = 'Je draagt niets',
+ targetPay = 'Huur de oxybus',
+ keys = 'De sleutels zitten in de bus',
+ targetGetPackage = 'Pak pakket',
+ alreadyCarrying = 'Je draagt al een pakket',
+ paid = 'Je hebt $%s betaald om de bus te huren',
+ notOn = 'Je bent niet op een route',
+}
+
+Lang.pharma = {
+ input = {
+ header = 'Aan wie een voorschrift geven?',
+ title1 = 'Spelernaam',
+ title2 = 'Voorschrift',
+ },
+ write = 'Voorschrift aan het schrijven',
+ opening = 'Openen van voorschriftpotje',
+ targetFill = 'Vul voorschrift',
+ fill = 'Voorschrift aan het vullen',
+ canceled = 'Je hebt het voorschrift geannuleerd',
+ unbottle = 'Je hebt het potje geopend',
+}
+
+Lang.shrooms = {
+ targetPick = 'Pluk paddenstoelen',
+ picking = 'Paddenstoelen aan het plukken',
+ eat = 'Eet paddenstoelen',
+ cancel = 'Besluit geen paddenstoelen te nemen',
+ took = 'Je hebt paddenstoelen genomen!'
+}
+
+Lang.weed = {
+ targetPick = 'Pluk wiet',
+ picking = 'Wiet aan het plukken',
+ targetDry = 'Droog wiet',
+ noDry = 'Je hebt natte wiet nodig voor dit',
+ wait = 'Wachten tot de wiet droog is...',
+ take = 'Klaar om wiet op te halen',
+ targetDryed = 'Haal wiet op',
+ teleportIn = 'Betreed de kweekkamer',
+ teleportOut = 'Verlaat de kweekkamer',
+ dabs = 'Doe wat dabs',
+ bluntWrap = 'Dompel siroop om %s te maken',
+ rollBlunt = 'Rol een %s',
+ targetSales = 'Koop van dealer',
+ buying = 'Koop %s van dealer',
+ itemDoesntExist = 'Dit item bestaat hier niet',
+ needItem = 'Je hebt een %s nodig voor dit',
+ crackBlunt = 'Open een blunt'
+}
+
+Lang.wholesale = {
+ alreadyWholesale = 'Bezig met groothandel',
+ targetBuyer = 'Praat met de koper',
+ wholesaling = 'Groothandel in drugs',
+ uhoh = 'De koper wordt verdacht',
+ tooLong = 'De koper heeft te lang gewacht',
+ notEnoughCops = 'Niet genoeg agenten op dienst'
+}
+
+Lang.xtc = {
+ alreadyOut = 'Je hebt al een pers neergezet',
+ settingDown = 'Zet de pers neer',
+ noPressOut = 'Je hebt geen pers neergezet',
+ targetMake = 'Pers pillen',
+ making = 'Pers %s',
+ targetPickup = 'Pak pers op',
+ picking = 'Pers aan het ophalen',
+ targetStealMDP2P = 'Steel MDP2P',
+ stealingMDP2P = 'MDP2P aan het stelen',
+ fail = 'Verdorie, je bent slecht',
+ targetStealIsosafrole = 'Steel isosafrol',
+ stealingIsosafrole = 'Isosafrol aan het stelen',
+ targetRaw = 'Maak ruwe XTC',
+ makingRaw = 'Ruwe XTC aan het maken',
+ getPress = 'Haal pers',
+ buySingle = 'Koop enkele pers voor $%s',
+ buyp = 'Pers aan het kopen',
+ targetStamp = 'Stempel XTC',
+ stamp_desc = 'Stempel %s pillen',
+ stamping = 'Stempel %s pillen',
+ noPills = 'Je hebt geen ongestempelde pillen'
+}
+
+return Lang
\ No newline at end of file
diff --git a/locales/pt-br.lua b/locales/pt-br.lua
new file mode 100644
index 0000000..fd8abfd
--- /dev/null
+++ b/locales/pt-br.lua
@@ -0,0 +1,246 @@
+Lang = {}
+
+Lang.Catches = {
+ notIn = 'Você não está no local correto',
+ needItems = 'Você não tem os itens necessários',
+ notEnoughMoney = 'Você está muito pobre',
+ buySuccess = 'Você comprou %s %s por $%s',
+ itemMissings = 'Você precisa de \n',
+ itemNeeded = 'Você precisa de %s',
+ cooldown = 'Calma aí, corredor',
+ invalidItem = 'Este item não é vendido aqui',
+}
+
+Lang.coke = {
+ targetPick = 'Coletar folha de coca',
+ picking = 'Coletando folha de coca',
+ targetMakePow = 'Fazer pó de cocaína',
+ noleaf = 'Você precisa de uma folha de coca',
+ makePow = 'Picando folhas em pó',
+ targetCutCoke = 'Cortar cocaína',
+ targetBagCoke = 'Embalhar cocaína',
+ teleIn = 'Entrar no laboratório',
+ teleOut = 'Sair do laboratório',
+ needBakingSoda = 'Você precisa de bicarbonato de sódio para isso',
+}
+
+Lang.Cornerselling = {
+ inVeh = 'Perigo com estranhos!',
+ selling = 'Vendendo %s por $%s',
+ deny = 'Recusar oferta',
+ wait = 'Esperando cliente',
+ nodrugs = 'Você não tem drogas para vender',
+ searching = 'Procurando clientes próximos',
+ targetTakeBack = 'Recuperar drogas',
+ targetSell = 'Vender %s de %s por $%s',
+ targetDeny = 'Recusar oferta',
+ stopped = 'Seu preguiçoso nem consegue vender drogas!',
+ start = 'Vá fazer sua mãe se orgulhar',
+ gotRobbed = 'Você foi roubado, otário!',
+ gotBack = 'Você recuperou suas coisas!',
+ notEnough = 'Você não tem quantidade suficiente deste item',
+ comDes = 'Venda coisas na esquina'
+}
+
+Lang.crack = {
+ targetMake = 'Cozinhar crack',
+ cook = 'Cozinhando crack',
+ targetBag = 'Embalando crack',
+ bag = 'Embalando crack',
+}
+
+Lang.Deliveries = {
+ targetGetDel = 'Pegar missão de entrega',
+ targetOpenShop = 'Abrir loja do traficante',
+ shopHeader = 'Loja do Traficante',
+ targetHandOff = 'Entregar pacote',
+ delivering = 'Entregando o pacote ao traficante',
+ alreadyDelivering = 'Você já está entregando um pacote',
+ slowAf = 'Você demorou demais!',
+ newDealerHelp = {
+ help = 'Colocar um traficante',
+ name = 'Nome do traficante',
+ timeMin = 'Tempo mínimo',
+ timeMax = 'Tempo máximo'
+ },
+ DealerExists = 'Traficante já existe',
+ deleteDealer = {
+ help = 'Remover um traficante',
+ name = 'Nome do traficante',
+ },
+ deleteDealerSuccess = 'Traficante removido',
+ deleteDealerFail = 'Falha ao remover traficante',
+}
+
+Lang.heroin = {
+ targetPick = 'Coletar heroína',
+ picking = 'Coletando heroína',
+ targetCook = 'Cozinhar heroína',
+ pbCook = 'Preparando heroína',
+ targetPickup = 'Pegar laboratório',
+ pbPickup = 'Pegando laboratório',
+ targetClean = 'Limpar laboratório',
+ pbClean = 'Limpando laboratório',
+ targetDry = 'Secar planta',
+ pbDry = 'Secando planta',
+ targetCutHeroin = 'Cortar heroína',
+ pbCutHeroin = 'Cortando heroína',
+ targetBuyKit = 'Comprar kit de laboratório de heroína',
+ pbBuyKit = 'Comprando kit de laboratório de heroína',
+ tableout = 'Você já tem uma mesa montada',
+ placing = 'Colocando a mesa',
+ targetFill = 'Encher seringa',
+ pbFill = 'Enchendo seringa',
+ hasKitAlready = 'Você já possui um kit de laboratório de heroína',
+ notEnoughMoney = 'Você precisa de $%s em dinheiro para isso',
+ placedKit = 'Você montou seu kit de laboratório de heroína',
+ failed = 'Você falhou ao fazer heroína e perdeu seus ingredientes',
+}
+
+Lang.lean = {
+ stealFromTruck = 'Roubar do caminhão',
+ startMission = 'Iniciar missão de Lean',
+ notOnRun = 'Você não está em uma missão de Lean',
+ alreadyChasing = 'Você já está perseguindo um caminhão',
+}
+
+Lang.lsd = {
+ targetHeat = 'Aquecer LSD',
+ heating = 'Aquecendo LSD',
+ targetRefine = 'Refinar o ácido',
+ refining = 'Refinando o ácido',
+ targetDipping = 'Molhar comprimidos',
+ dipping = 'Molhando comprimidos',
+ targetPickup = 'Pegar kit de laboratório',
+ packup = 'Guardando kit de laboratório',
+ targetClean = 'Limpar kit de laboratório',
+ needCleaning = 'Você precisa de um kit de limpeza para limpar o laboratório',
+ cleaning = 'Limpando kit de laboratório',
+ targetLys = 'Roubar ácido lisérgico',
+ stealLys = 'Roubando ácido lisérgico',
+ targetDie = 'Roubar dietilamida',
+ stealDie = 'Roubando dietilamida',
+ targetBuyTab = 'Comprar papel de comprimido',
+ targetBuyKit = 'Comprar kit de laboratório de LSD',
+ alreadyOwn = 'Você já possui este item',
+ buyingKit = 'Comprando kit de laboratório de LSD',
+ tableout = 'Você já tem uma mesa montada',
+ placing = 'Colocando kit de laboratório!',
+ failed = 'Você é péssimo em fabricar drogas',
+}
+
+Lang.mesc = {
+ targetPick = 'Coletar cacto',
+ picking = 'Coletando cacto',
+ targetDry = 'Secar cacto',
+ dry = 'Secando cacto',
+}
+
+Lang.meth = {
+ alreadyChasing = 'Você já está perseguindo um caminhão',
+ targetStealFromCar = 'Roubar do carro de metanfetamina',
+ targetHeist = 'Iniciar missão de metanfetamina',
+ started = 'Você já tem metanfetamina cozinando',
+ increaseHeat = 'Você aumentou a temperatura',
+ targetBag = 'Embalando metanfetamina',
+ targetCook = 'Cozinhar metanfetamina',
+ targetGrabTray = 'Pegar bandeja de metanfetamina',
+ targetHeat = 'Ajustar os controles',
+ targetSmash = 'Quebrar a bandeja',
+ targetStealEPH = 'Roubar efedrina',
+ stealingEPH = 'Roubando efedrina',
+ targetStealACE = 'Roubar acetona',
+ stealingACE = 'Roubando acetona',
+ notOnRun = 'Você não está em uma missão de metanfetamina',
+ onCooldown = 'Você está em tempo de recarga'
+}
+
+Lang.oxy = {
+ ditchCar = 'A van está quente, abandone em algum lugar',
+ targetHandoff = 'Entregar pacote',
+ handingoff = 'Entregando pacote',
+ emptyHands = 'Você não está carregando nada',
+ targetPay = 'Alugar van de Oxy',
+ keys = 'As chaves estão na van',
+ targetGetPackage = 'Pegar pacote',
+ alreadyCarrying = 'Você já está carregando um pacote',
+ paid = 'Você pagou $%s para alugar a van',
+ notOn = 'Você não está em uma rota',
+}
+
+Lang.pharma = {
+ input = {
+ header = 'Para quem dar uma receita?',
+ title1 = 'Nome do jogador',
+ title2 = 'Receita',
+ },
+ write = 'Escrevendo receita',
+ opening = 'Abrindo frasco de receita',
+ targetFill = 'Preencher receita',
+ fill = 'Preenchendo receita',
+ canceled = 'Você cancelou a receita',
+ unbottle = 'Você abriu o frasco',
+}
+
+Lang.shrooms = {
+ targetPick = 'Coletar cogumelos',
+ picking = 'Coletando cogumelos',
+ eat = 'Comendo cogumelos',
+ cancel = 'Decidiu não usar cogumelos',
+ took = 'Você tomou cogumelos!'
+}
+
+Lang.weed = {
+ targetPick = 'Coletar maconha',
+ picking = 'Coletando maconha',
+ targetDry = 'Secar maconha',
+ noDry = 'Você precisa de maconha úmida para isso',
+ wait = 'Aguardando a maconha secar...',
+ take = 'Pronto para pegar a maconha',
+ targetDryed = 'Pegar maconha',
+ teleportIn = 'Entrar na casa de cultivo',
+ teleportOut = 'Sair da casa de cultivo',
+ dabs = 'Dando uns dabs',
+ bluntWrap = 'Misturando xarope para fazer %s',
+ rollBlunt = 'Enrolando um %s',
+ targetSales = 'Comprar do traficante',
+ buying = 'Comprando %s do traficante',
+ itemDoesntExist = 'Este item não existe aqui',
+ needItem = 'Você precisa de um %s para isso',
+ crackBlunt = 'Abrindo um blunt'
+}
+
+Lang.wholesale = {
+ alreadyWholesale = 'Já está fazendo atacado',
+ targetBuyer = 'Conversar com o comprador',
+ wholesaling = 'Vendendo drogas no atacado',
+ uhoh = 'O comprador está ficando desconfiado',
+ tooLong = 'O comprador esperou muito tempo',
+ notEnoughCops = 'Não há policiais suficientes em serviço'
+}
+
+Lang.xtc = {
+ alreadyOut = 'Você já tem uma prensa montada',
+ settingDown = 'Montando a prensa',
+ noPressOut = 'Você não tem uma prensa montada',
+ targetMake = 'Prensar comprimidos',
+ making = 'Prensando %s',
+ targetPickup = 'Pegar prensa',
+ picking = 'Pegando prensa',
+ targetStealMDP2P = 'Roubar MDP2P',
+ stealingMDP2P = 'Roubando MDP2P',
+ fail = 'Caramba, você é ruim',
+ targetStealIsosafrole = 'Roubar isosafrol',
+ stealingIsosafrole = 'Roubando isosafrol',
+ targetRaw = 'Fazer XTC bruto',
+ makingRaw = 'Fazendo XTC bruto',
+ getPress = 'Pegar prensa',
+ buySingle = 'Comprar prensa única por $%s',
+ buyp = 'Comprando prensa',
+ targetStamp = 'Carimbar XTC',
+ stamp_desc = 'Carimbar %s comprimidos',
+ stamping = 'Carimbando %s comprimidos',
+ noPills = 'Você não tem comprimidos não carimbados'
+}
+
+return Lang
\ No newline at end of file
diff --git a/locales/tr.lua b/locales/tr.lua
new file mode 100644
index 0000000..b1ff0f3
--- /dev/null
+++ b/locales/tr.lua
@@ -0,0 +1,246 @@
+Lang = {}
+
+Lang.Catches = {
+ notIn = 'Doğru konumda değilsin',
+ needItems = 'Gerekli eşyaların yok',
+ notEnoughMoney = 'Çok fakirsin',
+ buySuccess = '%s %s adetini %s$\'a satın aldın',
+ itemMissings = 'İhtiyacın olanlar: \n',
+ itemNeeded = '%s\'e ihtiyacın var',
+ cooldown = 'Yavaşla, yarışçı',
+ invalidItem = 'Bu eşya burada satılmıyor',
+}
+
+Lang.coke = {
+ targetPick = 'Koka Yaprağı Topla',
+ picking = 'Koka Yaprığı Toplanıyor',
+ targetMakePow = 'Kokain Tozu Yap',
+ noleaf = 'Bir koka yaprağına ihtiyacın var',
+ makePow = 'Yaprakları toza çevirme',
+ targetCutCoke = 'Kokaini Doğra',
+ targetBagCoke = 'Kokaini Poşetle',
+ teleIn = 'Laboratuvara Gir',
+ teleOut = 'Laboratuvardan Çık',
+ needBakingSoda = 'Bunu yapmak için kabartma tozuna ihtiyacın var',
+}
+
+Lang.Cornerselling = {
+ inVeh = 'Yabancı Tehlikesi!',
+ selling = '%s adetini %s$\'a sat',
+ deny = 'Teklifi reddet',
+ wait = 'Müşteri bekleniyor',
+ nodrugs = 'Satılacak uyuşturucun yok',
+ searching = 'Yakındaki müşteriler aranıyor',
+ targetTakeBack = 'Uyuşturucuları geri al',
+ targetSell = '%s adet %s\'i %s$\'a sat',
+ targetDeny = 'Teklifi reddet',
+ stopped = 'Tembel arsanız bile uyuşturucu satamıyor!',
+ start = 'Anneni gururlandırmaya git',
+ gotRobbed = 'Soyuldun manyak!',
+ gotBack = 'Eşyalarını geri aldın!',
+ notEnough = 'Bu eşyadan yeterince yok',
+ comDes = 'Köşede eşya sat'
+}
+
+Lang.crack = {
+ targetMake = 'Biraz crack pişir',
+ cook = 'Crack pişiriliyor',
+ targetBag = 'Cracki poşetle',
+ bag = 'Crack poşetleniyor',
+}
+
+Lang.Deliveries = {
+ targetGetDel = 'Teslimat Görevi Al',
+ targetOpenShop = 'Tüccar Dükkanını Aç',
+ shopHeader = 'Tüccar Dükkanı',
+ targetHandOff = 'Teslimatı Teslim Et',
+ delivering = 'Paket uyuşturucu tüccarına veriliyor',
+ alreadyDelivering = 'Zaten bir paket teslim ediyorsun',
+ slowAf = 'Çok uzun sürdü!',
+ newDealerHelp = {
+ help = 'Tüccar yerleştir',
+ name = 'Tüccar adı',
+ timeMin = 'Minimum süre',
+ timeMax = 'Maksimum süre'
+ },
+ DealerExists = 'Tüccar zaten mevcut',
+ deleteDealer = {
+ help = 'Tüccar sil',
+ name = 'Tüccar adı',
+ },
+ deleteDealerSuccess = 'Tüccar silindi',
+ deleteDealerFail = 'Tüccar silinemedi',
+}
+
+Lang.heroin = {
+ targetPick = 'Eroin topla',
+ picking = 'Eroin toplanıyor',
+ targetCook = 'Eroin pişir',
+ pbCook = 'Eroin hazırlanıyor',
+ targetPickup = 'Laboratuvarı al',
+ pbPickup = 'Laboratuvar alınıyor',
+ targetClean = 'Laboratuvarı temizle',
+ pbClean = 'Laboratuvar temizleniyor',
+ targetDry = 'Bitkiyi kurut',
+ pbDry = 'Bitki kurutuluyor',
+ targetCutHeroin = 'Eroini doğra',
+ pbCutHeroin = 'Eroin doğranıyor',
+ targetBuyKit = 'Eroin Laboratuvar Kiti Al',
+ pbBuyKit = 'Eroin Laboratuvar Kiti alınıyor',
+ tableout = 'Zaten bir masa yerleştirilmiş',
+ placing = 'Masa yerleştiriliyor',
+ targetFill = 'Şırıngayı doldur',
+ pbFill = 'Şırınga dolduruluyor',
+ hasKitAlready = 'Zaten bir eroin laboratuvar kitin var',
+ notEnoughMoney = 'Bunun için %s$ nakit paran olmalı',
+ placedKit = 'Eroin laboratuvar kitini yerleştirdin',
+ failed = 'Eroin yapmada başarısız oldun ve malzemelerini kaybettin',
+}
+
+Lang.lean = {
+ stealFromTruck = 'Kamyonetten çal',
+ startMission = 'Lean Görevini Başlat',
+ notOnRun = 'Lean görevinde değilsin',
+ alreadyChasing = 'Zaten bir kamyonet peşinde koşuyorsun',
+}
+
+Lang.lsd = {
+ targetHeat = 'LSD\'yi ısıt',
+ heating = 'LSD ısıtılıyor',
+ targetRefine = 'Asidi saflaştır',
+ refining = 'Asit saflaştırılıyor',
+ targetDipping = 'Kartonları batır',
+ dipping = 'Kartonlar batırılıyor',
+ targetPickup = 'Laboratuvar Kiti Al',
+ packup = 'Laboratuvar Kiti toplanıyor',
+ targetClean = 'Laboratuvar Kiti Temizle',
+ needCleaning = 'Laboratuvarı temizlemek için bir temizlik kitine ihtiyacın var',
+ cleaning = 'Laboratuvar Kiti temizleniyor',
+ targetLys = 'Liserjik Asit Çal',
+ stealLys = 'Liserjik Asit çalınıyor',
+ targetDie = 'Dietilamid Çal',
+ stealDie = 'Dietilamid çalınıyor',
+ targetBuyTab = 'Tablet Kağıdı Al',
+ targetBuyKit = 'LSD Laboratuvar Kiti Al',
+ alreadyOwn = 'Bu eşyaya zaten sahipsin',
+ buyingKit = 'LSD Laboratuvar Kiti alınıyor',
+ tableout = 'Zaten bir masa yerleştirilmiş',
+ placing = 'Laboratuvar Kiti yerleştiriliyor!',
+ failed = 'Uyuşturucu yapmakta berbatsın',
+}
+
+Lang.mesc = {
+ targetPick = 'Kaktüs topla',
+ picking = 'Kaktüs toplanıyor',
+ targetDry = 'Kaktüsü kurut',
+ dry = 'Kaktüs kurutuluyor',
+}
+
+Lang.meth = {
+ alreadyChasing = 'Zaten bir kamyonet peşinde koşuyorsun',
+ targetStealFromCar = 'Met Arabasından Çal',
+ targetHeist = 'Met Görevini Başlat',
+ started = 'Zaten met pişiriyorsun',
+ increaseHeat = 'Isıyı artırdın',
+ targetBag = 'Met poşetle',
+ targetCook = 'Met pişir',
+ targetGrabTray = 'Met Tepsisini Al',
+ targetHeat = 'Kontrolleri ayarla',
+ targetSmash = 'Tepsiyi kır',
+ targetStealEPH = 'Efedrin Çal',
+ stealingEPH = 'Efedrin çalınıyor',
+ targetStealACE = 'Aseton Çal',
+ stealingACE = 'Aseton çalınıyor',
+ notOnRun = 'Met görevinde değilsin',
+ onCooldown = 'Soğuma süresindesin'
+}
+
+Lang.oxy = {
+ ditchCar = 'Araç sıcak, bir yere bırak',
+ targetHandoff = 'Paketi teslim et',
+ handingoff = 'Paket teslim ediliyor',
+ emptyHands = 'Hiçbir şey taşımıyor sun',
+ targetPay = 'Oxy Vanı Kirala',
+ keys = 'Anahtarlar aracın içinde',
+ targetGetPackage = 'Paketi al',
+ alreadyCarrying = 'Zaten bir paket taşıyorsun',
+ paid = 'Vanı kiralamak için %s$ ödedin',
+ notOn = 'Rotada değilsin',
+}
+
+Lang.pharma = {
+ input = {
+ header = 'Reçeteyi kime ver?',
+ title1 = 'Oyuncu adı',
+ title2 = 'Reçete',
+ },
+ write = 'Reçete yazılıyor',
+ opening = 'Reçete şişesi açılıyor',
+ targetFill = 'Reçeteyi doldur',
+ fill = 'Reçete dolduruluyor',
+ canceled = 'Reçeteyi iptal ettin',
+ unbottle = 'Şişeyi açtın',
+}
+
+Lang.shrooms = {
+ targetPick = 'Mantar topla',
+ picking = 'Mantar toplanıyor',
+ eat = 'Mantar yiyorsun',
+ cancel = 'Mantar kullanmamaya karar verdin',
+ took = 'Biraz mantar aldın!'
+}
+
+Lang.weed = {
+ targetPick = 'Marihuana topla',
+ picking = 'Marihuana toplanıyor',
+ targetDry = 'Marihuanayı kurut',
+ noDry = 'Bunun için ıslak marihuanaya ihtiyacın var',
+ wait = 'Marihuananın kuruması bekleniyor...',
+ take = 'Marihuana alınmaya hazır',
+ targetDryed = 'Marihuanayı al',
+ teleportIn = 'Yetiştirme Evinin İçine Gir',
+ teleportOut = 'Yetiştirme Evinin Dışına Çık',
+ dabs = 'Biraz dab yapıyorsun',
+ bluntWrap = 'Sürme yapmak için şurup ekliyorsun: %s',
+ rollBlunt = 'Bir %s sarıyorsun',
+ targetSales = 'Tüccardan al',
+ buying = 'Tüccardan %s alınıyor',
+ itemDoesntExist = 'Bu eşya burada mevcut değil',
+ needItem = 'Bunu yapmak için bir %s\'e ihtiyacın var',
+ crackBlunt = 'Bluntı açıyorsun'
+}
+
+Lang.wholesale = {
+ alreadyWholesale = 'Zaten toptan satış yapıyorsun',
+ targetBuyer = 'Alıcıyla konuş',
+ wholesaling = 'Uyuşturucu toptan satılıyor',
+ uhoh = 'Alıcı şüpheli görünüyor',
+ tooLong = 'Alıcı çok uzun bekledi',
+ notEnoughCops = 'Görevde yeterli polis yok'
+}
+
+Lang.xtc = {
+ alreadyOut = 'Zaten bir pres yerleştirmişsin',
+ settingDown = 'Pres yerleştiriliyor',
+ noPressOut = 'Yerleştirilmiş bir presin yok',
+ targetMake = 'Hap bas',
+ making = '%s basılıyor',
+ targetPickup = 'Presi al',
+ picking = 'Pres alınıyor',
+ targetStealMDP2P = 'MDP2P Çal',
+ stealingMDP2P = 'MDP2P çalınıyor',
+ fail = 'Vay be, berbattın',
+ targetStealIsosafrole = 'İzosafrol Çal',
+ stealingIsosafrole = 'İzosafrol çalınıyor',
+ targetRaw = 'Ham XTC Yap',
+ makingRaw = 'Ham XTC yapılıyor',
+ getPress = 'Pres al',
+ buySingle = 'Tekli presi %s$\'a al',
+ buyp = 'Pres alınıyor',
+ targetStamp = 'XTC\'yi damgala',
+ stamp_desc = '%s hap damgalanıyor',
+ stamping = '%s hap damgalanıyor',
+ noPills = 'Damgasız hapın yok'
+}
+
+return Lang
\ No newline at end of file
diff --git a/server/TravellingMerchant.lua b/server/TravellingMerchant.lua
index e9a1d80..8f530e3 100644
--- a/server/TravellingMerchant.lua
+++ b/server/TravellingMerchant.lua
@@ -9,8 +9,6 @@ local Target = {
local loc = Target.Travellingmerchant[math.random(1, #Target.Travellingmerchant)]
-
-
local stores = {
travel = {
tab_paper = 50,
diff --git a/server/cocaine.lua b/server/cocaine.lua
index f1d5e93..fd886b5 100644
--- a/server/cocaine.lua
+++ b/server/cocaine.lua
@@ -19,16 +19,14 @@ local cocaineRecipes = {
local cocaineLocations = {
MakePowder = {
{loc = vector3(1086.20, -3195.30, -39.20), l = 1.0, w = 1.0, rot = 45.0, gang = "ballas"},
- {loc = vector3(1090.15, -3199.5, -39.18), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
- {loc = vector3(1093.09, -3199.53, -39.05), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
},
CuttingCoke = {
{loc = vector3(1095.61, -3195.62, -39.13), l = 1.0, w = 1.0, rot = 45.0, offset = vec3(-1.782227, 0.445068, -0.502701), rotation = vector3(0,0,0), gang = ""},
- {loc = vector3(1092.74, -3196.68, -38.99), l = 1.0, w = 1.0, rot = 45.0, offset = vec3(1.983398, 0.407959, -0.642696), rotation = vector3(0,0,180.0), gang = ""},
+ --{loc = vector3(1092.74, -3196.68, -38.99), l = 1.0, w = 1.0, rot = 45.0, offset = vec3(1.983398, 0.407959, -0.642696), rotation = vector3(0,0,180.0), gang = ""},
},
BaggingCoke = {
{loc = vector3(1093.16, -3195.78, -39.19), l = 1.0, w = 1.0, rot = 45.0,offset = vec3(4.515137, 2.542969, -0.814194), rotation = vector3(0,0,180.0), gang = ""},
- {loc = vector3(1090.17, -3196.59, -38.99), l = 1.0, w = 1.0, rot = 45.0, offset = vec3(-5.207642, -1.666504, -1.014198), rotation = vector3(0,0, 0.0), gang = ""},
+ --{loc = vector3(1090.17, -3196.59, -38.99), l = 1.0, w = 1.0, rot = 45.0, offset = vec3(-5.207642, -1.666504, -1.014198), rotation = vector3(0,0, 0.0), gang = ""},
},
cokeTele = {
{inside = vector3(1088.81, -3187.57, -38.99), outside = vector3(198.16, -1276.92, 29.33), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
@@ -54,8 +52,8 @@ RegisterServerEvent('md-drugs:server:makepowder', function(num)
tier = 'tier3'
end
end
- if not ps.craftItem(src, cocaineRecipes['cocaine']['cokepowder'][tier]) then
- verifyHas(src, cocaineRecipes['cocaine']['cokepowder'][tier].take)
+ if not ps.craftItem(src, cocaineRecipes['cokepowder'][tier]) then
+ verifyHas(src, cocaineRecipes['cokepowder'][tier].take)
return
end
end)
@@ -80,8 +78,8 @@ RegisterServerEvent('md-drugs:server:cutcokeone', function(num)
end
end
end
- if not ps.craftItem(src, cocaineRecipes['cocaine']['cutcoke'][tier]) then
- verifyHas(src, cocaineRecipes['cocaine']['cutcoke'][tier].take)
+ if not ps.craftItem(src, cocaineRecipes['cutcoke'][tier]) then
+ verifyHas(src, cocaineRecipes['cutcoke'][tier].take)
return
end
end)
@@ -105,14 +103,14 @@ RegisterServerEvent('md-drugs:server:bagcoke', function(num)
break
end
end
- if not ps.craftItem(src, cocaineRecipes['cocaine']['bagcoke'][tier]) then
- verifyHas(src, cocaineRecipes['cocaine']['bagcoke'][tier].take)
+ if not ps.craftItem(src, cocaineRecipes['bagcoke'][tier]) then
+ verifyHas(src, cocaineRecipes['bagcoke'][tier].take)
return
end
AddRep(src, 'coke')
else
- if not ps.craftItem(src, cocaineRecipes['cocaine']['bagcoke'][tier]) then
- verifyHas(src, cocaineRecipes['cocaine']['bagcoke'][tier].take)
+ if not ps.craftItem(src, cocaineRecipes['bagcoke'][tier]) then
+ verifyHas(src, cocaineRecipes['bagcoke'][tier].take)
return
end
end
diff --git a/server/cornerselling.lua b/server/cornerselling.lua
index 751ebaf..82c9b50 100644
--- a/server/cornerselling.lua
+++ b/server/cornerselling.lua
@@ -158,6 +158,7 @@ end
ps.registerCallback('md-drugs:server:cornerselling:getAvailableDrugs', function(source, ped)
local Player = ps.getPlayer(source)
local rep = getRep(source, 'cornerselling')
+ local priceAdjust = json.decode(rep).price
if not Player then return nil end
for k, v in pairs(Drugs) do
local item = ps.getItemCount(source, k) or 0
@@ -169,7 +170,7 @@ ps.registerCallback('md-drugs:server:cornerselling:getAvailableDrugs', function(
else
if item > 15 then item = 15 end
local amount = math.random(1, item)
- local price = (math.random(Drugs[k]['min'], Drugs[k]['max']) * amount) * rep.price
+ local price = (math.random(Drugs[k]['min'], Drugs[k]['max']) * amount) * priceAdjust
DrugDeals[ps.getIdentifier(source)] = {item = k, amount = amount, price = math.floor(price), ped = ped}
return DrugDeals[ps.getIdentifier(source)]
end
diff --git a/server/crack.lua b/server/crack.lua
index 800676d..708c79c 100644
--- a/server/crack.lua
+++ b/server/crack.lua
@@ -43,8 +43,8 @@ RegisterServerEvent('md-drugs:server:makecrackone', function(num)
end
end
end
- if not ps.craftItem(src, crackRecipe['crack']['cookcrack'][tier]) then
- verifyHas(src, crackRecipe['crack']['cookcrack'][tier].take)
+ if not ps.craftItem(src, crackRecipe['cookcrack'][tier]) then
+ verifyHas(src, crackRecipe['cookcrack'][tier].take)
return
end
end)
@@ -70,8 +70,8 @@ RegisterServerEvent('md-drugs:server:bagcrack', function(num)
end
end
end
- if not ps.craftItem(src, crackRecipe['crack']['bagcrack'][tier]) then
- verifyHas(src, crackRecipe['crack']['bagcrack'][tier].take)
+ if not ps.craftItem(src, crackRecipe['bagcrack'][tier]) then
+ verifyHas(src, crackRecipe['bagcrack'][tier].take)
return
end
end)
diff --git a/server/functions.lua b/server/functions.lua
index a736781..1a6b5c9 100644
--- a/server/functions.lua
+++ b/server/functions.lua
@@ -47,7 +47,7 @@ function getRep(source, type)
local new = handleFresh(source)
return new[type]
else
- return tonumber(sql[1].rep)
+ return sql[1].rep
end
end
diff --git a/server/plantSpawns.lua b/server/plantSpawns.lua
index c59f470..91936d6 100644
--- a/server/plantSpawns.lua
+++ b/server/plantSpawns.lua
@@ -222,6 +222,9 @@ for k, v in pairs (plantData) do
v.coolDown(loc)
v.itemGive(src)
end
+ else
+ ps.notify(src, ps.lang('Catches.notIn'), 'error')
+ return
end
end)
::continue::
diff --git a/shared/config.lua b/shared/config.lua
index 0989d61..6ea7b24 100644
--- a/shared/config.lua
+++ b/shared/config.lua
@@ -1,6 +1,6 @@
Config = {} --Ignore.
ps = exports.ps_lib:init()
-ps.loadLangs("en")
+ps.loadLangs("uwu")
Config.respawnTime = 100 -- Seconds
Config.Fuel = "LegacyFuel" -- type the name of script you use i.e. ps-fuel, cdn-fuel, LegacyFuel
@@ -18,8 +18,6 @@ Config.Tier1 = 100 -- amount to hit for level 2
Config.Tier2 = 300 -- amount to hit for level 3
---------------------------------- BRIDGE
-
-Config.Phone = 'qb' -- either 'qb' or 'yflip' or 'qs'
Config.Dispatch = 'ps' -- either 'ps', 'cd', 'core', 'aty'
Config.Minigames = {
@@ -40,12 +38,10 @@ Config.Minigames = {
glspot = {gridSize = 6, timeLimit = 999999, charSet = "alphabet", required = 10},
glmath = {timeLimit = 300000},
}
-Config.minigametype = 'ox' -- look above for options or choose none if you dont want any minigames
+Config.minigametype = 'ps_circle' -- look above for options or choose none if you dont want any minigames
--------- Woah Where did like all the locations go?
---- read the readme to find out
----
-Config.Drugs = {
+
+Config.Drugs = { -- want a drug turn on? keep it true, want it turned off, mark it false
cocaine = true,
consumables = true,
cornerselling = true,
@@ -59,13 +55,13 @@ Config.Drugs = {
oxyruns = true,
pharma = true,
shrooms = true,
- TravelingMerchant = true,
+ TravellingMerchant = true,
weed = true,
wholesale = false,
xtc = true,
}
-Config.Bzz = {
+Config.Bzz = { -- if you have BZZZ props for these turn it on if you want
cocaine = false,
heroin =false,
shrooms = false,
From a079efd5c84f963cca06dca492ed135c772e9e7e Mon Sep 17 00:00:00 2001
From: Mustache Dom <123716453+Mustachedom@users.noreply.github.com>
Date: Mon, 11 Aug 2025 16:49:24 -0600
Subject: [PATCH 15/37] - fix bug with comparing rep - fix travellingmerchant
---
client/TravellingMerchant.lua | 9 +++++----
client/xtc.lua | 4 ++--
locales/en.lua | 8 +++++++-
server/TravellingMerchant.lua | 2 +-
server/cocaine.lua | 2 +-
server/heroin.lua | 21 ++++++++++-----------
6 files changed, 26 insertions(+), 20 deletions(-)
diff --git a/client/TravellingMerchant.lua b/client/TravellingMerchant.lua
index c877c28..c33767b 100644
--- a/client/TravellingMerchant.lua
+++ b/client/TravellingMerchant.lua
@@ -1,19 +1,20 @@
local function spawn()
- local location, menus = ps.callback('md-drugs:server:GetMerchant')
+ local data = ps.callback('md-drugs:server:GetMerchant')
local model = 's_m_m_trucker_01'
ps.requestModel(model)
- local ped = CreatePed(4, model, location.x, location.y, location.z, location.w, false, true)
- Freeze(ped, true, location.w)
+ local ped = CreatePed(4, model, data.loc.x, data.loc.y, data.loc.z, data.loc.w, false, true)
+ Freeze(ped, true, data.loc.w)
ps.entityTarget(ped, {
{
label = ps.lang('merchant.targetOpen'),
action = function()
local options = {}
- for k, v in pairs (menus) do
+ for k, v in pairs (data.items) do
options[#options+1] = {
title = ps.getLabel(k),
description = '$'..v,
+ icon = ps.getImage(k),
action = function()
ps.triggerServerEvent('md-drugs:server:purchaseGoods', k)
end
diff --git a/client/xtc.lua b/client/xtc.lua
index e180d82..33d8b7a 100644
--- a/client/xtc.lua
+++ b/client/xtc.lua
@@ -97,7 +97,7 @@ for k, v in pairs(locations.isosafrole) do
end
for k, v in pairs(locations.rawxtcloc) do
- ps.boxTarget('xtc'..k, v.loc, {length = v.l, width = v.w, heading = v.rot}, {
+ ps.boxTarget('xtcraw'..k, v.loc, {length = v.l, width = v.w, heading = v.rot}, {
{
icon = 'fa-solid fa-flask',
label = ps.lang('xtc.targetRaw'),
@@ -157,7 +157,7 @@ for k, v in pairs(locations.xtcpress) do
end
for k, v in pairs (locations.stamp) do
- ps.boxTarget('xtc'..k, v.loc, {length = v.l, width = v.w, heading = v.rot}, {
+ ps.boxTarget('xtcstamp'..k, v.loc, {length = v.l, width = v.w, heading = v.rot}, {
{
icon = 'fa-solid fa-flask',
label = ps.lang('xtc.targetStamp'),
diff --git a/locales/en.lua b/locales/en.lua
index 0d94269..2c35786 100644
--- a/locales/en.lua
+++ b/locales/en.lua
@@ -243,6 +243,12 @@ Lang.xtc = {
noPills = 'You Dont Have Any Unstamped Pills'
}
-
+Lang.merchant = {
+ targetOpen = 'Open Merchant Menu',
+ targetClose = 'Close Merchant Menu',
+ notEnoughMoney = 'You Do Not Have Enough Money',
+ purchased = 'You Purchased %s For $%s',
+ canceled = 'You Canceled The Purchase'
+}
return Lang
\ No newline at end of file
diff --git a/server/TravellingMerchant.lua b/server/TravellingMerchant.lua
index 8f530e3..1c84924 100644
--- a/server/TravellingMerchant.lua
+++ b/server/TravellingMerchant.lua
@@ -39,7 +39,7 @@ local stores = {
}
ps.registerCallback('md-drugs:server:GetMerchant', function(source)
- return loc, stores.travel
+ return {loc = loc, items = stores.travel}
end)
diff --git a/server/cocaine.lua b/server/cocaine.lua
index fd886b5..12a54d0 100644
--- a/server/cocaine.lua
+++ b/server/cocaine.lua
@@ -45,7 +45,7 @@ RegisterServerEvent('md-drugs:server:makepowder', function(num)
end
local tier = 'tier1'
if Config.TierSystem then
- local coke = getRep(src, 'coke')
+ local coke = tonumber(getRep(src, 'coke'))
if coke > Config.Tier1 and coke <= Config.Tier2 then
tier = 'tier2'
elseif coke > Config.Tier2 then
diff --git a/server/heroin.lua b/server/heroin.lua
index 21c74c3..79fc087 100644
--- a/server/heroin.lua
+++ b/server/heroin.lua
@@ -55,8 +55,6 @@ ps.registerCallback('removeCleaningkit', function(source)
return false
end)
-
-
RegisterServerEvent('md-drugs:server:dryplant', function(num)
local src = source
if not ps.checkDistance(src, heroinLocations.dryplant[num].loc, 3.0) then
@@ -66,7 +64,7 @@ RegisterServerEvent('md-drugs:server:dryplant', function(num)
local tier = 'tier1'
if Config.TierSystem then
- local heroin = getRep(src, 'heroin')
+ local heroin = tonumber(getRep(src, 'heroin'))
if heroin <= Config.Tier1 then
tier = 'tier1'
elseif heroin >= Config.Tier1 and heroin <= Config.Tier2 then
@@ -153,14 +151,15 @@ ps.createUseable('heroinlabkit', function(source, item)
if not ps.hasItem(src, 'heroinlabkit', 1) then return end
local placed, loc = ps.callback('md-drugs:client:setheroinlabkit', src)
if placed then
- ps.removeItem(src, 'heroinlabkit', 1)
- table.insert(heroinLabKits, {
- src = src,
- ownerid = ps.getIdentifier(src),
- coords = loc,
- name = ps.getPlayerName(src)
- })
- ps.notify(src, ps.lang('heroin.placedKit'), "success")
+ if ps.removeItem(src, 'heroinlabkit', 1) then
+ table.insert(heroinLabKits, {
+ src = src,
+ ownerid = ps.getIdentifier(src),
+ coords = loc,
+ name = ps.getPlayerName(src)
+ })
+ ps.notify(src, ps.lang('heroin.placedKit'), "success")
+ end
end
end)
From 25f99797319196ff880471646ad351f6753b32e7 Mon Sep 17 00:00:00 2001
From: Mustache Dom <123716453+Mustachedom@users.noreply.github.com>
Date: Mon, 11 Aug 2025 16:53:19 -0600
Subject: [PATCH 16/37] added lang for travellingmerchant
---
locales/cs.lua | 4 +++-
locales/de.lua | 3 +++
locales/en.lua | 4 ----
locales/es.lua | 4 +++-
locales/fr.lua | 4 +++-
locales/nl.lua | 4 +++-
locales/pt-br.lua | 3 +++
locales/tr.lua | 3 +++
locales/uwu.lua | 3 +++
locales/wookie.lua | 4 ++++
10 files changed, 28 insertions(+), 8 deletions(-)
diff --git a/locales/cs.lua b/locales/cs.lua
index e529de7..e11168a 100644
--- a/locales/cs.lua
+++ b/locales/cs.lua
@@ -242,5 +242,7 @@ Lang.xtc = {
stamping = 'Označování %s pilulek',
noPills = 'Nemáš žádné neočíslované pilulky',
}
-
+Lang.merchant = {
+ targetOpen = 'Otevřít nabídku obchodníka',
+}
return Lang
\ No newline at end of file
diff --git a/locales/de.lua b/locales/de.lua
index f1dca66..20a18b2 100644
--- a/locales/de.lua
+++ b/locales/de.lua
@@ -242,5 +242,8 @@ Lang.xtc = {
stamping = 'Stemple %s Pillen',
noPills = 'Du hast keine ungestempelten Pillen',
}
+Lang.merchant = {
+ targetOpen = 'Öffne das Händler-Menü',
+}
return Lang
\ No newline at end of file
diff --git a/locales/en.lua b/locales/en.lua
index 2c35786..e6d464c 100644
--- a/locales/en.lua
+++ b/locales/en.lua
@@ -245,10 +245,6 @@ Lang.xtc = {
Lang.merchant = {
targetOpen = 'Open Merchant Menu',
- targetClose = 'Close Merchant Menu',
- notEnoughMoney = 'You Do Not Have Enough Money',
- purchased = 'You Purchased %s For $%s',
- canceled = 'You Canceled The Purchase'
}
return Lang
\ No newline at end of file
diff --git a/locales/es.lua b/locales/es.lua
index 1e0718a..5f36090 100644
--- a/locales/es.lua
+++ b/locales/es.lua
@@ -242,5 +242,7 @@ Lang.xtc = {
stamping = 'Marcando %s pastillas',
noPills = 'No tienes pastillas sin marcar',
}
-
+Lang.merchant = {
+ targetOpen = 'Abrir menú de comerciante`',
+}
return Lang
\ No newline at end of file
diff --git a/locales/fr.lua b/locales/fr.lua
index 3a97e8a..98fad37 100644
--- a/locales/fr.lua
+++ b/locales/fr.lua
@@ -242,5 +242,7 @@ Lang.xtc = {
stamping = 'Estampillage de %s pilules',
noPills = 'Tu n\'as pas de pilules non estampillées',
}
-
+Lang.merchant = {
+ targetOpen = 'Ouvrir le menu du marchand',
+}
return Lang
\ No newline at end of file
diff --git a/locales/nl.lua b/locales/nl.lua
index d2b90e6..2eac2b2 100644
--- a/locales/nl.lua
+++ b/locales/nl.lua
@@ -242,5 +242,7 @@ Lang.xtc = {
stamping = 'Stempel %s pillen',
noPills = 'Je hebt geen ongestempelde pillen'
}
-
+Lang.merchant = {
+ targetOpen = 'Open Merchant Menu',
+}
return Lang
\ No newline at end of file
diff --git a/locales/pt-br.lua b/locales/pt-br.lua
index fd8abfd..e9a6c32 100644
--- a/locales/pt-br.lua
+++ b/locales/pt-br.lua
@@ -243,4 +243,7 @@ Lang.xtc = {
noPills = 'Você não tem comprimidos não carimbados'
}
+Lang.merchant = {
+ targetOpen = 'Abrir menu do comerciante',
+}
return Lang
\ No newline at end of file
diff --git a/locales/tr.lua b/locales/tr.lua
index b1ff0f3..67b9eb1 100644
--- a/locales/tr.lua
+++ b/locales/tr.lua
@@ -243,4 +243,7 @@ Lang.xtc = {
noPills = 'Damgasız hapın yok'
}
+Lang.merchant = {
+ targetOpen = 'Açık Tüccar Menüsü',
+}
return Lang
\ No newline at end of file
diff --git a/locales/uwu.lua b/locales/uwu.lua
index 47bb922..9f137e6 100644
--- a/locales/uwu.lua
+++ b/locales/uwu.lua
@@ -242,4 +242,7 @@ Lang.xtc = {
noPills = 'You got no unstamped pills... 🫙',
}
+Lang.merchant = {
+ targetOpen = 'Open Wopen Store',
+}
return Lang
\ No newline at end of file
diff --git a/locales/wookie.lua b/locales/wookie.lua
index bb4fcc2..ca3f9c9 100644
--- a/locales/wookie.lua
+++ b/locales/wookie.lua
@@ -241,4 +241,8 @@ Lang.xtc = {
noPills = 'Pills no oogar!',
}
+Lang.merchant = {
+ targetOpen = 'Rraa raw!',
+}
+
return Lang
\ No newline at end of file
From 9511a46dade3d8a12d7f2c5a0777b95474bf0dbb Mon Sep 17 00:00:00 2001
From: Mustache Dom <123716453+Mustachedom@users.noreply.github.com>
Date: Mon, 11 Aug 2025 16:54:47 -0600
Subject: [PATCH 17/37] update license
---
LICENSE | 971 +++++++++++++++++---------------------------------------
1 file changed, 297 insertions(+), 674 deletions(-)
diff --git a/LICENSE b/LICENSE
index f288702..04071e6 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,674 +1,297 @@
- GNU GENERAL PUBLIC LICENSE
- Version 3, 29 June 2007
-
- Copyright (C) 2007 Free Software Foundation, Inc.
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
- Preamble
-
- The GNU General Public License is a free, copyleft license for
-software and other kinds of works.
-
- The licenses for most software and other practical works are designed
-to take away your freedom to share and change the works. By contrast,
-the GNU General Public License is intended to guarantee your freedom to
-share and change all versions of a program--to make sure it remains free
-software for all its users. We, the Free Software Foundation, use the
-GNU General Public License for most of our software; it applies also to
-any other work released this way by its authors. You can apply it to
-your programs, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-them if you wish), that you receive source code or can get it if you
-want it, that you can change the software or use pieces of it in new
-free programs, and that you know you can do these things.
-
- To protect your rights, we need to prevent others from denying you
-these rights or asking you to surrender the rights. Therefore, you have
-certain responsibilities if you distribute copies of the software, or if
-you modify it: responsibilities to respect the freedom of others.
-
- For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must pass on to the recipients the same
-freedoms that you received. You must make sure that they, too, receive
-or can get the source code. And you must show them these terms so they
-know their rights.
-
- Developers that use the GNU GPL protect your rights with two steps:
-(1) assert copyright on the software, and (2) offer you this License
-giving you legal permission to copy, distribute and/or modify it.
-
- For the developers' and authors' protection, the GPL clearly explains
-that there is no warranty for this free software. For both users' and
-authors' sake, the GPL requires that modified versions be marked as
-changed, so that their problems will not be attributed erroneously to
-authors of previous versions.
-
- Some devices are designed to deny users access to install or run
-modified versions of the software inside them, although the manufacturer
-can do so. This is fundamentally incompatible with the aim of
-protecting users' freedom to change the software. The systematic
-pattern of such abuse occurs in the area of products for individuals to
-use, which is precisely where it is most unacceptable. Therefore, we
-have designed this version of the GPL to prohibit the practice for those
-products. If such problems arise substantially in other domains, we
-stand ready to extend this provision to those domains in future versions
-of the GPL, as needed to protect the freedom of users.
-
- Finally, every program is threatened constantly by software patents.
-States should not allow patents to restrict development and use of
-software on general-purpose computers, but in those that do, we wish to
-avoid the special danger that patents applied to a free program could
-make it effectively proprietary. To prevent this, the GPL assures that
-patents cannot be used to render the program non-free.
-
- The precise terms and conditions for copying, distribution and
-modification follow.
-
- TERMS AND CONDITIONS
-
- 0. Definitions.
-
- "This License" refers to version 3 of the GNU General Public License.
-
- "Copyright" also means copyright-like laws that apply to other kinds of
-works, such as semiconductor masks.
-
- "The Program" refers to any copyrightable work licensed under this
-License. Each licensee is addressed as "you". "Licensees" and
-"recipients" may be individuals or organizations.
-
- To "modify" a work means to copy from or adapt all or part of the work
-in a fashion requiring copyright permission, other than the making of an
-exact copy. The resulting work is called a "modified version" of the
-earlier work or a work "based on" the earlier work.
-
- A "covered work" means either the unmodified Program or a work based
-on the Program.
-
- To "propagate" a work means to do anything with it that, without
-permission, would make you directly or secondarily liable for
-infringement under applicable copyright law, except executing it on a
-computer or modifying a private copy. Propagation includes copying,
-distribution (with or without modification), making available to the
-public, and in some countries other activities as well.
-
- To "convey" a work means any kind of propagation that enables other
-parties to make or receive copies. Mere interaction with a user through
-a computer network, with no transfer of a copy, is not conveying.
-
- An interactive user interface displays "Appropriate Legal Notices"
-to the extent that it includes a convenient and prominently visible
-feature that (1) displays an appropriate copyright notice, and (2)
-tells the user that there is no warranty for the work (except to the
-extent that warranties are provided), that licensees may convey the
-work under this License, and how to view a copy of this License. If
-the interface presents a list of user commands or options, such as a
-menu, a prominent item in the list meets this criterion.
-
- 1. Source Code.
-
- The "source code" for a work means the preferred form of the work
-for making modifications to it. "Object code" means any non-source
-form of a work.
-
- A "Standard Interface" means an interface that either is an official
-standard defined by a recognized standards body, or, in the case of
-interfaces specified for a particular programming language, one that
-is widely used among developers working in that language.
-
- The "System Libraries" of an executable work include anything, other
-than the work as a whole, that (a) is included in the normal form of
-packaging a Major Component, but which is not part of that Major
-Component, and (b) serves only to enable use of the work with that
-Major Component, or to implement a Standard Interface for which an
-implementation is available to the public in source code form. A
-"Major Component", in this context, means a major essential component
-(kernel, window system, and so on) of the specific operating system
-(if any) on which the executable work runs, or a compiler used to
-produce the work, or an object code interpreter used to run it.
-
- The "Corresponding Source" for a work in object code form means all
-the source code needed to generate, install, and (for an executable
-work) run the object code and to modify the work, including scripts to
-control those activities. However, it does not include the work's
-System Libraries, or general-purpose tools or generally available free
-programs which are used unmodified in performing those activities but
-which are not part of the work. For example, Corresponding Source
-includes interface definition files associated with source files for
-the work, and the source code for shared libraries and dynamically
-linked subprograms that the work is specifically designed to require,
-such as by intimate data communication or control flow between those
-subprograms and other parts of the work.
-
- The Corresponding Source need not include anything that users
-can regenerate automatically from other parts of the Corresponding
-Source.
-
- The Corresponding Source for a work in source code form is that
-same work.
-
- 2. Basic Permissions.
-
- All rights granted under this License are granted for the term of
-copyright on the Program, and are irrevocable provided the stated
-conditions are met. This License explicitly affirms your unlimited
-permission to run the unmodified Program. The output from running a
-covered work is covered by this License only if the output, given its
-content, constitutes a covered work. This License acknowledges your
-rights of fair use or other equivalent, as provided by copyright law.
-
- You may make, run and propagate covered works that you do not
-convey, without conditions so long as your license otherwise remains
-in force. You may convey covered works to others for the sole purpose
-of having them make modifications exclusively for you, or provide you
-with facilities for running those works, provided that you comply with
-the terms of this License in conveying all material for which you do
-not control copyright. Those thus making or running the covered works
-for you must do so exclusively on your behalf, under your direction
-and control, on terms that prohibit them from making any copies of
-your copyrighted material outside their relationship with you.
-
- Conveying under any other circumstances is permitted solely under
-the conditions stated below. Sublicensing is not allowed; section 10
-makes it unnecessary.
-
- 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
-
- No covered work shall be deemed part of an effective technological
-measure under any applicable law fulfilling obligations under article
-11 of the WIPO copyright treaty adopted on 20 December 1996, or
-similar laws prohibiting or restricting circumvention of such
-measures.
-
- When you convey a covered work, you waive any legal power to forbid
-circumvention of technological measures to the extent such circumvention
-is effected by exercising rights under this License with respect to
-the covered work, and you disclaim any intention to limit operation or
-modification of the work as a means of enforcing, against the work's
-users, your or third parties' legal rights to forbid circumvention of
-technological measures.
-
- 4. Conveying Verbatim Copies.
-
- You may convey verbatim copies of the Program's source code as you
-receive it, in any medium, provided that you conspicuously and
-appropriately publish on each copy an appropriate copyright notice;
-keep intact all notices stating that this License and any
-non-permissive terms added in accord with section 7 apply to the code;
-keep intact all notices of the absence of any warranty; and give all
-recipients a copy of this License along with the Program.
-
- You may charge any price or no price for each copy that you convey,
-and you may offer support or warranty protection for a fee.
-
- 5. Conveying Modified Source Versions.
-
- You may convey a work based on the Program, or the modifications to
-produce it from the Program, in the form of source code under the
-terms of section 4, provided that you also meet all of these conditions:
-
- a) The work must carry prominent notices stating that you modified
- it, and giving a relevant date.
-
- b) The work must carry prominent notices stating that it is
- released under this License and any conditions added under section
- 7. This requirement modifies the requirement in section 4 to
- "keep intact all notices".
-
- c) You must license the entire work, as a whole, under this
- License to anyone who comes into possession of a copy. This
- License will therefore apply, along with any applicable section 7
- additional terms, to the whole of the work, and all its parts,
- regardless of how they are packaged. This License gives no
- permission to license the work in any other way, but it does not
- invalidate such permission if you have separately received it.
-
- d) If the work has interactive user interfaces, each must display
- Appropriate Legal Notices; however, if the Program has interactive
- interfaces that do not display Appropriate Legal Notices, your
- work need not make them do so.
-
- A compilation of a covered work with other separate and independent
-works, which are not by their nature extensions of the covered work,
-and which are not combined with it such as to form a larger program,
-in or on a volume of a storage or distribution medium, is called an
-"aggregate" if the compilation and its resulting copyright are not
-used to limit the access or legal rights of the compilation's users
-beyond what the individual works permit. Inclusion of a covered work
-in an aggregate does not cause this License to apply to the other
-parts of the aggregate.
-
- 6. Conveying Non-Source Forms.
-
- You may convey a covered work in object code form under the terms
-of sections 4 and 5, provided that you also convey the
-machine-readable Corresponding Source under the terms of this License,
-in one of these ways:
-
- a) Convey the object code in, or embodied in, a physical product
- (including a physical distribution medium), accompanied by the
- Corresponding Source fixed on a durable physical medium
- customarily used for software interchange.
-
- b) Convey the object code in, or embodied in, a physical product
- (including a physical distribution medium), accompanied by a
- written offer, valid for at least three years and valid for as
- long as you offer spare parts or customer support for that product
- model, to give anyone who possesses the object code either (1) a
- copy of the Corresponding Source for all the software in the
- product that is covered by this License, on a durable physical
- medium customarily used for software interchange, for a price no
- more than your reasonable cost of physically performing this
- conveying of source, or (2) access to copy the
- Corresponding Source from a network server at no charge.
-
- c) Convey individual copies of the object code with a copy of the
- written offer to provide the Corresponding Source. This
- alternative is allowed only occasionally and noncommercially, and
- only if you received the object code with such an offer, in accord
- with subsection 6b.
-
- d) Convey the object code by offering access from a designated
- place (gratis or for a charge), and offer equivalent access to the
- Corresponding Source in the same way through the same place at no
- further charge. You need not require recipients to copy the
- Corresponding Source along with the object code. If the place to
- copy the object code is a network server, the Corresponding Source
- may be on a different server (operated by you or a third party)
- that supports equivalent copying facilities, provided you maintain
- clear directions next to the object code saying where to find the
- Corresponding Source. Regardless of what server hosts the
- Corresponding Source, you remain obligated to ensure that it is
- available for as long as needed to satisfy these requirements.
-
- e) Convey the object code using peer-to-peer transmission, provided
- you inform other peers where the object code and Corresponding
- Source of the work are being offered to the general public at no
- charge under subsection 6d.
-
- A separable portion of the object code, whose source code is excluded
-from the Corresponding Source as a System Library, need not be
-included in conveying the object code work.
-
- A "User Product" is either (1) a "consumer product", which means any
-tangible personal property which is normally used for personal, family,
-or household purposes, or (2) anything designed or sold for incorporation
-into a dwelling. In determining whether a product is a consumer product,
-doubtful cases shall be resolved in favor of coverage. For a particular
-product received by a particular user, "normally used" refers to a
-typical or common use of that class of product, regardless of the status
-of the particular user or of the way in which the particular user
-actually uses, or expects or is expected to use, the product. A product
-is a consumer product regardless of whether the product has substantial
-commercial, industrial or non-consumer uses, unless such uses represent
-the only significant mode of use of the product.
-
- "Installation Information" for a User Product means any methods,
-procedures, authorization keys, or other information required to install
-and execute modified versions of a covered work in that User Product from
-a modified version of its Corresponding Source. The information must
-suffice to ensure that the continued functioning of the modified object
-code is in no case prevented or interfered with solely because
-modification has been made.
-
- If you convey an object code work under this section in, or with, or
-specifically for use in, a User Product, and the conveying occurs as
-part of a transaction in which the right of possession and use of the
-User Product is transferred to the recipient in perpetuity or for a
-fixed term (regardless of how the transaction is characterized), the
-Corresponding Source conveyed under this section must be accompanied
-by the Installation Information. But this requirement does not apply
-if neither you nor any third party retains the ability to install
-modified object code on the User Product (for example, the work has
-been installed in ROM).
-
- The requirement to provide Installation Information does not include a
-requirement to continue to provide support service, warranty, or updates
-for a work that has been modified or installed by the recipient, or for
-the User Product in which it has been modified or installed. Access to a
-network may be denied when the modification itself materially and
-adversely affects the operation of the network or violates the rules and
-protocols for communication across the network.
-
- Corresponding Source conveyed, and Installation Information provided,
-in accord with this section must be in a format that is publicly
-documented (and with an implementation available to the public in
-source code form), and must require no special password or key for
-unpacking, reading or copying.
-
- 7. Additional Terms.
-
- "Additional permissions" are terms that supplement the terms of this
-License by making exceptions from one or more of its conditions.
-Additional permissions that are applicable to the entire Program shall
-be treated as though they were included in this License, to the extent
-that they are valid under applicable law. If additional permissions
-apply only to part of the Program, that part may be used separately
-under those permissions, but the entire Program remains governed by
-this License without regard to the additional permissions.
-
- When you convey a copy of a covered work, you may at your option
-remove any additional permissions from that copy, or from any part of
-it. (Additional permissions may be written to require their own
-removal in certain cases when you modify the work.) You may place
-additional permissions on material, added by you to a covered work,
-for which you have or can give appropriate copyright permission.
-
- Notwithstanding any other provision of this License, for material you
-add to a covered work, you may (if authorized by the copyright holders of
-that material) supplement the terms of this License with terms:
-
- a) Disclaiming warranty or limiting liability differently from the
- terms of sections 15 and 16 of this License; or
-
- b) Requiring preservation of specified reasonable legal notices or
- author attributions in that material or in the Appropriate Legal
- Notices displayed by works containing it; or
-
- c) Prohibiting misrepresentation of the origin of that material, or
- requiring that modified versions of such material be marked in
- reasonable ways as different from the original version; or
-
- d) Limiting the use for publicity purposes of names of licensors or
- authors of the material; or
-
- e) Declining to grant rights under trademark law for use of some
- trade names, trademarks, or service marks; or
-
- f) Requiring indemnification of licensors and authors of that
- material by anyone who conveys the material (or modified versions of
- it) with contractual assumptions of liability to the recipient, for
- any liability that these contractual assumptions directly impose on
- those licensors and authors.
-
- All other non-permissive additional terms are considered "further
-restrictions" within the meaning of section 10. If the Program as you
-received it, or any part of it, contains a notice stating that it is
-governed by this License along with a term that is a further
-restriction, you may remove that term. If a license document contains
-a further restriction but permits relicensing or conveying under this
-License, you may add to a covered work material governed by the terms
-of that license document, provided that the further restriction does
-not survive such relicensing or conveying.
-
- If you add terms to a covered work in accord with this section, you
-must place, in the relevant source files, a statement of the
-additional terms that apply to those files, or a notice indicating
-where to find the applicable terms.
-
- Additional terms, permissive or non-permissive, may be stated in the
-form of a separately written license, or stated as exceptions;
-the above requirements apply either way.
-
- 8. Termination.
-
- You may not propagate or modify a covered work except as expressly
-provided under this License. Any attempt otherwise to propagate or
-modify it is void, and will automatically terminate your rights under
-this License (including any patent licenses granted under the third
-paragraph of section 11).
-
- However, if you cease all violation of this License, then your
-license from a particular copyright holder is reinstated (a)
-provisionally, unless and until the copyright holder explicitly and
-finally terminates your license, and (b) permanently, if the copyright
-holder fails to notify you of the violation by some reasonable means
-prior to 60 days after the cessation.
-
- Moreover, your license from a particular copyright holder is
-reinstated permanently if the copyright holder notifies you of the
-violation by some reasonable means, this is the first time you have
-received notice of violation of this License (for any work) from that
-copyright holder, and you cure the violation prior to 30 days after
-your receipt of the notice.
-
- Termination of your rights under this section does not terminate the
-licenses of parties who have received copies or rights from you under
-this License. If your rights have been terminated and not permanently
-reinstated, you do not qualify to receive new licenses for the same
-material under section 10.
-
- 9. Acceptance Not Required for Having Copies.
-
- You are not required to accept this License in order to receive or
-run a copy of the Program. Ancillary propagation of a covered work
-occurring solely as a consequence of using peer-to-peer transmission
-to receive a copy likewise does not require acceptance. However,
-nothing other than this License grants you permission to propagate or
-modify any covered work. These actions infringe copyright if you do
-not accept this License. Therefore, by modifying or propagating a
-covered work, you indicate your acceptance of this License to do so.
-
- 10. Automatic Licensing of Downstream Recipients.
-
- Each time you convey a covered work, the recipient automatically
-receives a license from the original licensors, to run, modify and
-propagate that work, subject to this License. You are not responsible
-for enforcing compliance by third parties with this License.
-
- An "entity transaction" is a transaction transferring control of an
-organization, or substantially all assets of one, or subdividing an
-organization, or merging organizations. If propagation of a covered
-work results from an entity transaction, each party to that
-transaction who receives a copy of the work also receives whatever
-licenses to the work the party's predecessor in interest had or could
-give under the previous paragraph, plus a right to possession of the
-Corresponding Source of the work from the predecessor in interest, if
-the predecessor has it or can get it with reasonable efforts.
-
- You may not impose any further restrictions on the exercise of the
-rights granted or affirmed under this License. For example, you may
-not impose a license fee, royalty, or other charge for exercise of
-rights granted under this License, and you may not initiate litigation
-(including a cross-claim or counterclaim in a lawsuit) alleging that
-any patent claim is infringed by making, using, selling, offering for
-sale, or importing the Program or any portion of it.
-
- 11. Patents.
-
- A "contributor" is a copyright holder who authorizes use under this
-License of the Program or a work on which the Program is based. The
-work thus licensed is called the contributor's "contributor version".
-
- A contributor's "essential patent claims" are all patent claims
-owned or controlled by the contributor, whether already acquired or
-hereafter acquired, that would be infringed by some manner, permitted
-by this License, of making, using, or selling its contributor version,
-but do not include claims that would be infringed only as a
-consequence of further modification of the contributor version. For
-purposes of this definition, "control" includes the right to grant
-patent sublicenses in a manner consistent with the requirements of
-this License.
-
- Each contributor grants you a non-exclusive, worldwide, royalty-free
-patent license under the contributor's essential patent claims, to
-make, use, sell, offer for sale, import and otherwise run, modify and
-propagate the contents of its contributor version.
-
- In the following three paragraphs, a "patent license" is any express
-agreement or commitment, however denominated, not to enforce a patent
-(such as an express permission to practice a patent or covenant not to
-sue for patent infringement). To "grant" such a patent license to a
-party means to make such an agreement or commitment not to enforce a
-patent against the party.
-
- If you convey a covered work, knowingly relying on a patent license,
-and the Corresponding Source of the work is not available for anyone
-to copy, free of charge and under the terms of this License, through a
-publicly available network server or other readily accessible means,
-then you must either (1) cause the Corresponding Source to be so
-available, or (2) arrange to deprive yourself of the benefit of the
-patent license for this particular work, or (3) arrange, in a manner
-consistent with the requirements of this License, to extend the patent
-license to downstream recipients. "Knowingly relying" means you have
-actual knowledge that, but for the patent license, your conveying the
-covered work in a country, or your recipient's use of the covered work
-in a country, would infringe one or more identifiable patents in that
-country that you have reason to believe are valid.
-
- If, pursuant to or in connection with a single transaction or
-arrangement, you convey, or propagate by procuring conveyance of, a
-covered work, and grant a patent license to some of the parties
-receiving the covered work authorizing them to use, propagate, modify
-or convey a specific copy of the covered work, then the patent license
-you grant is automatically extended to all recipients of the covered
-work and works based on it.
-
- A patent license is "discriminatory" if it does not include within
-the scope of its coverage, prohibits the exercise of, or is
-conditioned on the non-exercise of one or more of the rights that are
-specifically granted under this License. You may not convey a covered
-work if you are a party to an arrangement with a third party that is
-in the business of distributing software, under which you make payment
-to the third party based on the extent of your activity of conveying
-the work, and under which the third party grants, to any of the
-parties who would receive the covered work from you, a discriminatory
-patent license (a) in connection with copies of the covered work
-conveyed by you (or copies made from those copies), or (b) primarily
-for and in connection with specific products or compilations that
-contain the covered work, unless you entered into that arrangement,
-or that patent license was granted, prior to 28 March 2007.
-
- Nothing in this License shall be construed as excluding or limiting
-any implied license or other defenses to infringement that may
-otherwise be available to you under applicable patent law.
-
- 12. No Surrender of Others' Freedom.
-
- If conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot convey a
-covered work so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you may
-not convey it at all. For example, if you agree to terms that obligate you
-to collect a royalty for further conveying from those to whom you convey
-the Program, the only way you could satisfy both those terms and this
-License would be to refrain entirely from conveying the Program.
-
- 13. Use with the GNU Affero General Public License.
-
- Notwithstanding any other provision of this License, you have
-permission to link or combine any covered work with a work licensed
-under version 3 of the GNU Affero General Public License into a single
-combined work, and to convey the resulting work. The terms of this
-License will continue to apply to the part which is the covered work,
-but the special requirements of the GNU Affero General Public License,
-section 13, concerning interaction through a network will apply to the
-combination as such.
-
- 14. Revised Versions of this License.
-
- The Free Software Foundation may publish revised and/or new versions of
-the GNU General Public License from time to time. Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
- Each version is given a distinguishing version number. If the
-Program specifies that a certain numbered version of the GNU General
-Public License "or any later version" applies to it, you have the
-option of following the terms and conditions either of that numbered
-version or of any later version published by the Free Software
-Foundation. If the Program does not specify a version number of the
-GNU General Public License, you may choose any version ever published
-by the Free Software Foundation.
-
- If the Program specifies that a proxy can decide which future
-versions of the GNU General Public License can be used, that proxy's
-public statement of acceptance of a version permanently authorizes you
-to choose that version for the Program.
-
- Later license versions may give you additional or different
-permissions. However, no additional obligations are imposed on any
-author or copyright holder as a result of your choosing to follow a
-later version.
-
- 15. Disclaimer of Warranty.
-
- THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
-APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
-HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
-OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
-THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
-IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
-ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
- 16. Limitation of Liability.
-
- IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
-THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
-GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
-USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
-DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
-PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
-EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGES.
-
- 17. Interpretation of Sections 15 and 16.
-
- If the disclaimer of warranty and limitation of liability provided
-above cannot be given local legal effect according to their terms,
-reviewing courts shall apply local law that most closely approximates
-an absolute waiver of all civil liability in connection with the
-Program, unless a warranty or assumption of liability accompanies a
-copy of the Program in return for a fee.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Programs
-
- If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
- To do so, attach the following notices to the program. It is safest
-to attach them to the start of each source file to most effectively
-state the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
-
- Copyright (C)
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see .
-
-Also add information on how to contact you by electronic and paper mail.
-
- If the program does terminal interaction, make it output a short
-notice like this when it starts in an interactive mode:
-
- Copyright (C)
- This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
- This is free software, and you are welcome to redistribute it
- under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License. Of course, your program's commands
-might be different; for a GUI interface, you would use an "about box".
-
- You should also get your employer (if you work as a programmer) or school,
-if any, to sign a "copyright disclaimer" for the program, if necessary.
-For more information on this, and how to apply and follow the GNU GPL, see
-.
-
- The GNU General Public License does not permit incorporating your program
-into proprietary programs. If your program is a subroutine library, you
-may consider it more useful to permit linking proprietary applications with
-the library. If this is what you want to do, use the GNU Lesser General
-Public License instead of this License. But first, please read
-.
+Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0) https://creativecommons.org/licenses/by-nc-sa/4.0/
+
+This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
+
+You are free to:
+
+Share — copy and redistribute the material in any medium or format Adapt — remix, transform, and build upon the material
+
+The licensor cannot revoke these freedoms as long as you follow the license terms.
+
+Under the following terms: Attribution — You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
+
+NonCommercial — You may not use the material for commercial purposes.
+
+ShareAlike — If you remix, transform, or build upon the material, you must distribute your contributions under the same license as the original.
+
+No additional restrictions — You may not apply legal terms or technological measures that legally restrict others from doing anything the license permits.
+
+Notices: You do not have to comply with the license for elements of the material in the public domain or where your use is permitted by an applicable exception or limitation. No warranties are given. The license may not give you all of the permissions necessary for your intended use. For example, other rights such as publicity, privacy, or moral rights may limit how you use the material.
+
+Creative Commons Corporation ("Creative Commons") is not a law firm and does not provide legal services or legal advice. Distribution of Creative Commons public licenses does not create a lawyer-client or other relationship. Creative Commons makes its licenses and related information available on an "as-is" basis. Creative Commons gives no warranties regarding its licenses, any material licensed under their terms and conditions, or any related information. Creative Commons disclaims all liability for damages resulting from their use to the fullest extent possible.
+
+Using Creative Commons Public Licenses
+
+Creative Commons public licenses provide a standard set of terms and conditions that creators and other rights holders may use to share original works of authorship and other material subject to copyright and certain other rights specified in the public license below. The following considerations are for informational purposes only, are not exhaustive, and do not form part of our licenses.
+
+ Considerations for licensors: Our public licenses are
+ intended for use by those authorized to give the public
+ permission to use material in ways otherwise restricted by
+ copyright and certain other rights. Our licenses are
+ irrevocable. Licensors should read and understand the terms
+ and conditions of the license they choose before applying it.
+ Licensors should also secure all rights necessary before
+ applying our licenses so that the public can reuse the
+ material as expected. Licensors should clearly mark any
+ material not subject to the license. This includes other CC-
+ licensed material, or material used under an exception or
+ limitation to copyright. More considerations for licensors:
+wiki.creativecommons.org/Considerations_for_licensors
+
+ Considerations for the public: By using one of our public
+ licenses, a licensor grants the public permission to use the
+ licensed material under specified terms and conditions. If
+ the licensor's permission is not necessary for any reason--for
+ example, because of any applicable exception or limitation to
+ copyright--then that use is not regulated by the license. Our
+ licenses grant only permissions under copyright and certain
+ other rights that a licensor has authority to grant. Use of
+ the licensed material may still be restricted for other
+ reasons, including because others have copyright or other
+ rights in the material. A licensor may make special requests,
+ such as asking that all changes be marked or described.
+ Although not required by our licenses, you are encouraged to
+ respect those requests where reasonable. More considerations
+ for the public:
+wiki.creativecommons.org/Considerations_for_licensees
+=======================================================================
+
+Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International Public License
+
+By exercising the Licensed Rights (defined below), You accept and agree to be bound by the terms and conditions of this Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International Public License ("Public License"). To the extent this Public License may be interpreted as a contract, You are granted the Licensed Rights in consideration of Your acceptance of these terms and conditions, and the Licensor grants You such rights in consideration of benefits the Licensor receives from making the Licensed Material available under these terms and conditions.
+
+Section 1 -- Definitions.
+
+a. Adapted Material means material subject to Copyright and Similar Rights that is derived from or based upon the Licensed Material and in which the Licensed Material is translated, altered, arranged, transformed, or otherwise modified in a manner requiring permission under the Copyright and Similar Rights held by the Licensor. For purposes of this Public License, where the Licensed Material is a musical work, performance, or sound recording, Adapted Material is always produced where the Licensed Material is synched in timed relation with a moving image.
+
+b. Adapter's License means the license You apply to Your Copyright and Similar Rights in Your contributions to Adapted Material in accordance with the terms and conditions of this Public License.
+
+c. BY-NC-SA Compatible License means a license listed at creativecommons.org/compatiblelicenses, approved by Creative Commons as essentially the equivalent of this Public License.
+
+d. Copyright and Similar Rights means copyright and/or similar rights closely related to copyright including, without limitation, performance, broadcast, sound recording, and Sui Generis Database Rights, without regard to how the rights are labeled or categorized. For purposes of this Public License, the rights specified in Section 2(b)(1)-(2) are not Copyright and Similar Rights.
+
+e. Effective Technological Measures means those measures that, in the absence of proper authority, may not be circumvented under laws fulfilling obligations under Article 11 of the WIPO Copyright Treaty adopted on December 20, 1996, and/or similar international agreements.
+
+f. Exceptions and Limitations means fair use, fair dealing, and/or any other exception or limitation to Copyright and Similar Rights that applies to Your use of the Licensed Material.
+
+g. License Elements means the license attributes listed in the name of a Creative Commons Public License. The License Elements of this Public License are Attribution, NonCommercial, and ShareAlike.
+
+h. Licensed Material means the artistic or literary work, database, or other material to which the Licensor applied this Public License.
+
+i. Licensed Rights means the rights granted to You subject to the terms and conditions of this Public License, which are limited to all Copyright and Similar Rights that apply to Your use of the Licensed Material and that the Licensor has authority to license.
+
+j. Licensor means the individual(s) or entity(ies) granting rights under this Public License.
+
+k. NonCommercial means not primarily intended for or directed towards commercial advantage or monetary compensation. For purposes of this Public License, the exchange of the Licensed Material for other material subject to Copyright and Similar Rights by digital file-sharing or similar means is NonCommercial provided there is no payment of monetary compensation in connection with the exchange.
+
+l. Share means to provide material to the public by any means or process that requires permission under the Licensed Rights, such as reproduction, public display, public performance, distribution, dissemination, communication, or importation, and to make material available to the public including in ways that members of the public may access the material from a place and at a time individually chosen by them.
+
+m. Sui Generis Database Rights means rights other than copyright resulting from Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, as amended and/or succeeded, as well as other essentially equivalent rights anywhere in the world.
+
+n. You means the individual or entity exercising the Licensed Rights under this Public License. Your has a corresponding meaning.
+
+Section 2 -- Scope.
+
+a. License grant.
+
+ 1. Subject to the terms and conditions of this Public License,
+ the Licensor hereby grants You a worldwide, royalty-free,
+ non-sublicensable, non-exclusive, irrevocable license to
+ exercise the Licensed Rights in the Licensed Material to:
+
+ a. reproduce and Share the Licensed Material, in whole or
+ in part, for NonCommercial purposes only; and
+
+ b. produce, reproduce, and Share Adapted Material for
+ NonCommercial purposes only.
+
+ 2. Exceptions and Limitations. For the avoidance of doubt, where
+ Exceptions and Limitations apply to Your use, this Public
+ License does not apply, and You do not need to comply with
+ its terms and conditions.
+
+ 3. Term. The term of this Public License is specified in Section
+ 6(a).
+
+ 4. Media and formats; technical modifications allowed. The
+ Licensor authorizes You to exercise the Licensed Rights in
+ all media and formats whether now known or hereafter created,
+ and to make technical modifications necessary to do so. The
+ Licensor waives and/or agrees not to assert any right or
+ authority to forbid You from making technical modifications
+ necessary to exercise the Licensed Rights, including
+ technical modifications necessary to circumvent Effective
+ Technological Measures. For purposes of this Public License,
+ simply making modifications authorized by this Section 2(a)
+ (4) never produces Adapted Material.
+
+ 5. Downstream recipients.
+
+ a. Offer from the Licensor -- Licensed Material. Every
+ recipient of the Licensed Material automatically
+ receives an offer from the Licensor to exercise the
+ Licensed Rights under the terms and conditions of this
+ Public License.
+
+ b. Additional offer from the Licensor -- Adapted Material.
+ Every recipient of Adapted Material from You
+ automatically receives an offer from the Licensor to
+ exercise the Licensed Rights in the Adapted Material
+ under the conditions of the Adapter's License You apply.
+
+ c. No downstream restrictions. You may not offer or impose
+ any additional or different terms or conditions on, or
+ apply any Effective Technological Measures to, the
+ Licensed Material if doing so restricts exercise of the
+ Licensed Rights by any recipient of the Licensed
+ Material.
+
+ 6. No endorsement. Nothing in this Public License constitutes or
+ may be construed as permission to assert or imply that You
+ are, or that Your use of the Licensed Material is, connected
+ with, or sponsored, endorsed, or granted official status by,
+ the Licensor or others designated to receive attribution as
+ provided in Section 3(a)(1)(A)(i).
+b. Other rights.
+
+ 1. Moral rights, such as the right of integrity, are not
+ licensed under this Public License, nor are publicity,
+ privacy, and/or other similar personality rights; however, to
+ the extent possible, the Licensor waives and/or agrees not to
+ assert any such rights held by the Licensor to the limited
+ extent necessary to allow You to exercise the Licensed
+ Rights, but not otherwise.
+
+ 2. Patent and trademark rights are not licensed under this
+ Public License.
+
+ 3. To the extent possible, the Licensor waives any right to
+ collect royalties from You for the exercise of the Licensed
+ Rights, whether directly or through a collecting society
+ under any voluntary or waivable statutory or compulsory
+ licensing scheme. In all other cases the Licensor expressly
+ reserves any right to collect such royalties, including when
+ the Licensed Material is used other than for NonCommercial
+ purposes.
+Section 3 -- License Conditions.
+
+Your exercise of the Licensed Rights is expressly made subject to the following conditions.
+
+a. Attribution.
+
+ 1. If You Share the Licensed Material (including in modified
+ form), You must:
+
+ a. retain the following if it is supplied by the Licensor
+ with the Licensed Material:
+
+ i. identification of the creator(s) of the Licensed
+ Material and any others designated to receive
+ attribution, in any reasonable manner requested by
+ the Licensor (including by pseudonym if
+ designated);
+
+ ii. a copyright notice;
+
+ iii. a notice that refers to this Public License;
+
+ iv. a notice that refers to the disclaimer of
+ warranties;
+
+ v. a URI or hyperlink to the Licensed Material to the
+ extent reasonably practicable;
+
+ b. indicate if You modified the Licensed Material and
+ retain an indication of any previous modifications; and
+
+ c. indicate the Licensed Material is licensed under this
+ Public License, and include the text of, or the URI or
+ hyperlink to, this Public License.
+
+ 2. You may satisfy the conditions in Section 3(a)(1) in any
+ reasonable manner based on the medium, means, and context in
+ which You Share the Licensed Material. For example, it may be
+ reasonable to satisfy the conditions by providing a URI or
+ hyperlink to a resource that includes the required
+ information.
+ 3. If requested by the Licensor, You must remove any of the
+ information required by Section 3(a)(1)(A) to the extent
+ reasonably practicable.
+b. ShareAlike.
+
+ In addition to the conditions in Section 3(a), if You Share
+ Adapted Material You produce, the following conditions also apply.
+
+ 1. The Adapter's License You apply must be a Creative Commons
+ license with the same License Elements, this version or
+ later, or a BY-NC-SA Compatible License.
+
+ 2. You must include the text of, or the URI or hyperlink to, the
+ Adapter's License You apply. You may satisfy this condition
+ in any reasonable manner based on the medium, means, and
+ context in which You Share Adapted Material.
+
+ 3. You may not offer or impose any additional or different terms
+ or conditions on, or apply any Effective Technological
+ Measures to, Adapted Material that restrict exercise of the
+ rights granted under the Adapter's License You apply.
+Section 4 -- Sui Generis Database Rights.
+
+Where the Licensed Rights include Sui Generis Database Rights that apply to Your use of the Licensed Material:
+
+a. for the avoidance of doubt, Section 2(a)(1) grants You the right to extract, reuse, reproduce, and Share all or a substantial portion of the contents of the database for NonCommercial purposes only;
+
+b. if You include all or a substantial portion of the database contents in a database in which You have Sui Generis Database Rights, then the database in which You have Sui Generis Database Rights (but not its individual contents) is Adapted Material, including for purposes of Section 3(b); and
+
+c. You must comply with the conditions in Section 3(a) if You Share all or a substantial portion of the contents of the database.
+
+For the avoidance of doubt, this Section 4 supplements and does not replace Your obligations under this Public License where the Licensed Rights include other Copyright and Similar Rights.
+
+Section 5 -- Disclaimer of Warranties and Limitation of Liability.
+
+a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS, IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU.
+
+b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION, NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT, INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES, COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR IN PART, THIS LIMITATION MAY NOT APPLY TO YOU.
+
+c. The disclaimer of warranties and limitation of liability provided above shall be interpreted in a manner that, to the extent possible, most closely approximates an absolute disclaimer and waiver of all liability.
+
+Section 6 -- Term and Termination.
+
+a. This Public License applies for the term of the Copyright and Similar Rights licensed here. However, if You fail to comply with this Public License, then Your rights under this Public License terminate automatically.
+
+b. Where Your right to use the Licensed Material has terminated under Section 6(a), it reinstates:
+
+ 1. automatically as of the date the violation is cured, provided
+ it is cured within 30 days of Your discovery of the
+ violation; or
+
+ 2. upon express reinstatement by the Licensor.
+
+ For the avoidance of doubt, this Section 6(b) does not affect any
+ right the Licensor may have to seek remedies for Your violations
+ of this Public License.
+c. For the avoidance of doubt, the Licensor may also offer the Licensed Material under separate terms or conditions or stop distributing the Licensed Material at any time; however, doing so will not terminate this Public License.
+
+d. Sections 1, 5, 6, 7, and 8 survive termination of this Public License.
+
+Section 7 -- Other Terms and Conditions.
+
+a. The Licensor shall not be bound by any additional or different terms or conditions communicated by You unless expressly agreed.
+
+b. Any arrangements, understandings, or agreements regarding the Licensed Material not stated herein are separate from and independent of the terms and conditions of this Public License.
+
+Section 8 -- Interpretation.
+
+a. For the avoidance of doubt, this Public License does not, and shall not be interpreted to, reduce, limit, restrict, or impose conditions on any use of the Licensed Material that could lawfully be made without permission under this Public License.
+
+b. To the extent possible, if any provision of this Public License is deemed unenforceable, it shall be automatically reformed to the minimum extent necessary to make it enforceable. If the provision cannot be reformed, it shall be severed from this Public License without affecting the enforceability of the remaining terms and conditions.
+
+c. No term or condition of this Public License will be waived and no failure to comply consented to unless expressly agreed to by the Licensor.
+
+d. Nothing in this Public License constitutes or may be interpreted as a limitation upon, or waiver of, any privileges and immunities that apply to the Licensor or You, including from the legal processes of any jurisdiction or authority.
+
+=======================================================================
+
+Creative Commons is not a party to its public licenses. Notwithstanding, Creative Commons may elect to apply one of its public licenses to material it publishes and in those instances will be considered the “Licensor.” The text of the Creative Commons public licenses is dedicated to the public domain under the CC0 Public Domain Dedication. Except for the limited purpose of indicating that material is shared under a Creative Commons public license or as otherwise permitted by the Creative Commons policies published at creativecommons.org/policies, Creative Commons does not authorize the use of the trademark "Creative Commons" or any other trademark or logo of Creative Commons without its prior written consent including, without limitation, in connection with any unauthorized modifications to any of its public licenses or any other arrangements, understandings, or agreements concerning use of licensed material. For the avoidance of doubt, this paragraph does not form part of the public licenses.
+
+Creative Commons may be contacted at creativecommons.org.
\ No newline at end of file
From b5eb60834fe7ec004d79fb42f3a191c222e2a0ae Mon Sep 17 00:00:00 2001
From: Mustache Dom <123716453+Mustachedom@users.noreply.github.com>
Date: Mon, 11 Aug 2025 17:42:26 -0600
Subject: [PATCH 18/37] - fix lsd
---
readme.md | 195 ++++++++++++-------------------------------------
server/lsd.lua | 2 +-
version.txt | 5 +-
3 files changed, 51 insertions(+), 151 deletions(-)
diff --git a/readme.md b/readme.md
index 68934fb..8d65773 100644
--- a/readme.md
+++ b/readme.md
@@ -1,122 +1,68 @@
-# MD-Drugs
+# 🌿 MD-Drugs – Advanced Drug System for FiveM
+
+A fully customizable, immersive drug system for FiveM servers using QBCore or OX_Inventory. Features include drug processing, corner selling, edible/syringe animations, plant growth, and more.
-## **Credits**
+---
-- **[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!
+- **[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).
+- **[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).
+
+## 🎬 Preview
+
+🎥 **[Watch Full Preview Video](https://www.youtube.com/watch?v=I_x7_oz_SAU)**
-## **Dependencies**
+---
-- **[ox_lib](https://github.com/overextended/ox_lib/releases/tag/v3.12.0)**
-- **[qb-target](https://github.com/qbcore-framework/qb-target)** or **[ox_target](https://github.com/overextended/ox_target)**
-- **Emote Scripts (supports animations):**
- - [dpemotes](https://github.com/andristum/dpemotes) <-- seriously just use rpemotes. this is old and outdated
- - [rpemotes](https://github.com/alberttheprince/rpemotes-reborn)
- - [scully_emotemenu](https://github.com/Scullyy/scully_emotemenu)
-- **[Read](https://letters.hookedonphonics.com/us/read-guaranteed-G14.html)**
-- **Game Build 2944 or Later**
+## 📦 Dependencies
+| Dependency | Link |
+|----------|------|
+| `ps_lib` | [GitHub - Project-Sloth/ps_lib](https://github.com/Project-Sloth/ps_lib) |
+| `Read` | [Read Docs](https://letters.hookedonphonics.com/us/read-guaranteed-G14.html) |
+| Game Build | **2944 or later** required |
+> ⚠️ Ensure all dependencies are installed and up to date before proceeding.
-## **Preview**
+---
-- **[Watch Preview](https://www.youtube.com/watch?v=I_x7_oz_SAU)**
+## 🛠️ Installation
+### Step 1: Inventory Integration
-## **How to install like a fuckin boss**
+#### 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`.
-### STEP 1
+#### For OX_Inventory
+1. Copy items from `md-drugs/items_install/ox_inventory` into `ox_inventory/data/items.lua`.
+2. Add item images to `ox_inventory/web/images`.
-- qb-inventory users go to md-drugs/items_install/qb-inventory and add the Items to `qb-core/shared/items.lua` and - Add items from md-drugs/items_install/images to qb-inventory/html/images
-- ox_inventory users go to md-drugs/items_install/ox_inventory and add the Items to `ox_inventory/data/items.lua` and - Add items from md-drugs/items_install/images to ox_inventory/web/images
+---
-### STEP 2
-- delete `qb-drugs`
+### Step 2: Configure Drug Locations & Recipes
+- All **processing locations and recipes** are located in their respective drug type files:
+ - `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.
+
+---
### STEP 3
-
-- all locations, shops, pricings, and recipes are in the server files now utilizing callbacks to build targets and retrieve data
- - shops.lua
- - travelling merchant
- - Weed Store
- - Dealer Shops
- - locations.lua
- - holds all old config options for locations. edit what you need in here
- - if you previously had them in the config copy and paste the INTERIOR guts of the options. example below
- ```lua
- Config.MakePowder = {
- {loc = vector3(1086.20, -3195.30, -39.20), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
- {loc = vector3(1090.15, -3199.5, -39.18), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
- {loc = vector3(1093.09, -3199.53, -39.05), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
- }
- ```
- is now
- ```lua
- local Target = {
- MakePowder = {
- {loc = vector3(1086.20, -3195.30, -39.20), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
- {loc = vector3(1090.15, -3199.5, -39.18), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
- {loc = vector3(1093.09, -3199.53, -39.05), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
- }
- }
- ```
- - see its a simple change.
- - recipes.lua
- - handles the vast majority of remove X get Y
- - Cornerselling.lua
- - now the drug table is inserted into this file.
- - copy and paste your data inside of the
- ```lua
- local Drugs = { -- for example
- ["weed_white-widow"] = {rep = 1,min = 15, max = 24 },
- ["weed_og-kush"] = {rep = 1,min = 15, max = 28 },
- }
- ```
- - all plant locations i.e. coke, heroin, weed, shrooms, mescaline are in the respective server files
- - check server files to see drug specific settings now.
- - heroin/lsd/ and xtc will have a setting table now at the top
- ### HOW TO CONVERT FROM OLD
- - its simple really
- - copy the data from your Config and paste it in locations.lua
- - if the previous config option was a single location ( Not designed for multiples) then check target.singleSpot
- - shops.lua will now hold all shops for md-drugs so edit the data needed there
- - this is simple but tedious, but will handle security better in the long run
- - if you want to be lazy you can delete everything from
- ```lua
- local Targt = {
-
- }
- ```
- **besides singleSpot**
-
- and copy and paste your
- ```lua
- Config.MakePowder = {
- {loc = vector3(1086.20, -3195.30, -39.20), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
- {loc = vector3(1090.15, -3199.5, -39.18), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
- {loc = vector3(1093.09, -3199.53, -39.05), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
- }
- and change the Config to Target like this BELOW the local Target = {
- Target.MakePowder = {
- {loc = vector3(1086.20, -3195.30, -39.20), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
- {loc = vector3(1090.15, -3199.5, -39.18), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
- {loc = vector3(1093.09, -3199.53, -39.05), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
- }
- ```
-### STEP 4
- Head to your emote script search for **uncuff** if it's missing add it
- if rpemotes do this
- go to client/animationListCustom.lua
@@ -193,7 +139,7 @@
```
-# STEP 5
+### STEP 4 (IF QBCore)
- check `qb-smallresources/config.lua` and if this exists, delete it
- look for this code
```lua
@@ -211,54 +157,7 @@
}
```
-# STEP 6
+### STEP 6
- Run SQL
-
-
-# **OPTIONAL STEPS**
-
-## Fivemerr
-This is **NOT** a requirement but something I personally use and believe in.
-
-
-- to integrate with fivemerr make sure you have ```set fivemerrLogs "API_KEY"``` in your server.cfg
-
-- Head to /server/functions.lua turn local logs = true
-
-- profit
-
-Why Integrate with Fivemerr?
-
-- Efficient Logging: Unlike Discord webhooks, Fivemerr provides an organized and searchable log system.
-- Media Storage: Easily store and access images or videos without relying on Discord. Discord's API often deletes media after a certain time, but Fivemerr keeps them secure and accessible.
-- As well as a place to offload images and videos from fivem that doesnt rely on discord since discord API will be automatically deleting images and videos after a certain amount of time If you need an invite to their server look below
-
-[Fivemerr Discord](https://discord.com/invite/fivemerr)
-
-[Fivemerr Docs](https://docs.fivemerr.com/)
-
-## Radial Menu
-- head to `qb-radial/config.lua` and search for the following event
-```lua
- event = 'qb-drugs:client:cornerselling',
-```
-- and change it to this
-```lua
- event = 'md-drugs:client:cornerselling',
-```
-
-
-## For Qb-shops users
-
-- Head to `qb-shops/config.lua` **Config.Products** and add the folowing items to OR anywhere else you want them. The Only way in this script to get them is to find the travelling merchant
-
-```lua
- {name = 'bakingsoda', price = 100, amount = 5000, info = {}, type = 'item'},
- {name = 'emptyvial', price = 100, amount = 5000, info = {}, type = 'item'},
- {name = 'needle', price = 100, amount = 5000, info = {}, type = 'item'},
-```
-
-## Tier System
-- Turn On Config.TierSystem after you run the sql file
-
-[mlo i use](https://www.gta5-mods.com/maps/mlo-4x-drug-lab-interiors-sp-fivem) heres an option. use it or dont.
+ - if you dont know how, click this image below
+ - [](https://www.youtube.com/watch?v=8QpFOluK_xo)
\ No newline at end of file
diff --git a/server/lsd.lua b/server/lsd.lua
index 7aa3881..f891533 100644
--- a/server/lsd.lua
+++ b/server/lsd.lua
@@ -128,7 +128,7 @@ RegisterServerEvent('md-drugs:server:refinequalityacid', function()
if not hasLabKit(src) then return end
if not ps.hasItem(src, 'lsd_one_vial', 1) then return end
if Config.TierSystem then
- local lsd = getRep(src, 'lsd')
+ local lsd = tonumber(getRep(src, 'lsd'))
if ps.removeItem(src, 'lsd_one_vial', 1) then
if lsd <= 30 then
ps.addItem(src,'lsd_vial_two', 1)
diff --git a/version.txt b/version.txt
index ae8b5e3..2986038 100644
--- a/version.txt
+++ b/version.txt
@@ -1,3 +1,4 @@
-Newest Build:3.9.1
-- `tested` version checker
+Newest Build:4.0.0
+- updated everything to ps_lib
+
From e4c41458dcd368193db70bbb06399290d651eb08 Mon Sep 17 00:00:00 2001
From: Tater1987 <149222217+Tater1987@users.noreply.github.com>
Date: Tue, 12 Aug 2025 15:26:56 -0500
Subject: [PATCH 19/37] Update cocaine.lua
Added missing TriggerServerEvents
---
client/cocaine.lua | 3 +++
1 file changed, 3 insertions(+)
diff --git a/client/cocaine.lua b/client/cocaine.lua
index dd8d897..005feba 100644
--- a/client/cocaine.lua
+++ b/client/cocaine.lua
@@ -141,6 +141,7 @@ for k, v in pairs (locations.CuttingCoke) do
ps.notify(ps.lang('Catches.itemMissings', ps.getLabel('bakingsoda')), 'error')
return
end
+ TriggerServerEvent("md-drugs:server:cutcokeone", k)
CutCoke(v.loc, v.offset, v.rotation)
end,
canInteract = function()
@@ -162,6 +163,7 @@ for k, v in pairs (locations.BaggingCoke) do
ps.notify(ps.lang('Catches.itemMissings', ps.getLabel('empty_weed_bag')), 'error')
return
end
+ TriggerServerEvent("md-drugs:server:bagcoke", k)
BagCoke(v.loc, v.offset, v.rotation)
end,
canInteract = function()
@@ -206,3 +208,4 @@ CreateThread(function()
BikerCocaine.Security.Set(BikerCocaine.Security.upgrade)
BikerCocaine.Details.Enable({BikerCocaine.Details.cokeBasic1, BikerCocaine.Details.cokeBasic2, BikerCocaine.Details.cokeBasic3}, true)
end)
+
From 689bc79868ad650a90f54b338ad8a23c36c63ef9 Mon Sep 17 00:00:00 2001
From: Tater1987 <149222217+Tater1987@users.noreply.github.com>
Date: Tue, 12 Aug 2025 16:49:08 -0500
Subject: [PATCH 20/37] Update heroin.lua
Capitalization error
---
server/heroin.lua | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/server/heroin.lua b/server/heroin.lua
index 79fc087..5ebbba7 100644
--- a/server/heroin.lua
+++ b/server/heroin.lua
@@ -212,7 +212,7 @@ end)
RegisterServerEvent('md-drugs:server:fillneedle', function(num)
local src = source
- if not ps.checkDistance(src, heroinLocations.fillNeedle[num].loc, 3.0) then
+ if not ps.checkDistance(src, heroinLocations.fillneedle[num].loc, 3.0) then
ps.notify(src, ps.lang('Catches.notIn'), 'error')
return
end
@@ -272,4 +272,5 @@ AddEventHandler('playerDropped', function()
ps.addItem(src, 'heroinlabkit', 1)
end
end
-end)
\ No newline at end of file
+
+end)
From 9f4339a4ea8049890b7bc861e75367b34bd85f90 Mon Sep 17 00:00:00 2001
From: Tater1987 <149222217+Tater1987@users.noreply.github.com>
Date: Tue, 12 Aug 2025 19:42:53 -0500
Subject: [PATCH 21/37] Update lsd.lua
Incorrect Server Event called
---
client/lsd.lua | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/client/lsd.lua b/client/lsd.lua
index e590391..dbae717 100644
--- a/client/lsd.lua
+++ b/client/lsd.lua
@@ -136,7 +136,7 @@ for k, v in pairs (locations.gettabs) do
label = ps.lang('lsd.targetBuyTab'),
icon = 'fa-solid fa-hand-holding-dollar',
action = function()
- TriggerEvent("md-drugs:client:buytabs", k)
+ TriggerServerEvent("md-drugs:server:gettabpaper", k)
end,
canInteract = function()
if not handleGang(v.gang) then return false end
@@ -182,4 +182,5 @@ ps.registerCallback("md-drugs:client:setlsdlabkit", function()
createLabKit(loc, head)
return true, loc
end
-end)
\ No newline at end of file
+
+end)
From 68723ac088447559601c2b4c22caebf7072c98f3 Mon Sep 17 00:00:00 2001
From: Tater1987 <149222217+Tater1987@users.noreply.github.com>
Date: Tue, 12 Aug 2025 19:43:32 -0500
Subject: [PATCH 22/37] Update meth.lua
Fixed spelling error
---
client/meth.lua | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/client/meth.lua b/client/meth.lua
index dacc97a..9557c24 100644
--- a/client/meth.lua
+++ b/client/meth.lua
@@ -14,7 +14,7 @@ local function SpawnMethCarPedChase()
ps.notify(ps.lang('meth.alreadyChasing'),'error')
else
startedmeth = true
- ps.callback('md-drugs:server:RegisterMeth')
+ ps.callback('md-drugs:server:registerMeth')
ps.requestModel("journey", Config.RequestModelTime)
ps.requestModel("a_m_m_hillbilly_02", Config.RequestModelTime)
@@ -406,4 +406,5 @@ for k, v in pairs (locations.Methace) do
end
}
})
-end
\ No newline at end of file
+
+end
From c4664ae5fbe672c774f11d7a221f0385bc72eac1 Mon Sep 17 00:00:00 2001
From: Tater1987 <149222217+Tater1987@users.noreply.github.com>
Date: Tue, 12 Aug 2025 19:45:02 -0500
Subject: [PATCH 23/37] Update meth.lua
Unneeded text
---
server/meth.lua | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/server/meth.lua b/server/meth.lua
index acbc724..73534da 100644
--- a/server/meth.lua
+++ b/server/meth.lua
@@ -91,8 +91,8 @@ RegisterServerEvent('md-drugs:server:getmeth', function(num)
ps.notify(src, ps.lang('Catches.notIn'), "error")
return
end
- if not ps.craftItem(src, methRecipes.meth.bag.bags) then
- verifyHas(src, methRecipes.meth.bag.bags.take)
+ if not ps.craftItem(src, methRecipes.bag.bags) then
+ verifyHas(src, methRecipes.bag.bags.take)
return
end
end)
@@ -123,9 +123,9 @@ ps.registerCallback('md-drugs:server:startcook', function(source, num)
ps.notify(src, ps.lang('Catches.notIn'), "error")
return false
end
- local recipe = ps.craftItem(src, methRecipes.meth.cook.heat)
+ local recipe = ps.craftItem(src, methRecipes.cook.heat)
if not recipe then
- verifyHas(src, methRecipes.meth.cook.heat.take)
+ verifyHas(src, methRecipes.cook.heat.take)
return false
end
return true
@@ -142,3 +142,4 @@ ps.registerCallback('md-drugs:server:registerMeth', function(source)
return true
end
end)
+
From 87c4aa77a7425bc235c341501ec53d13f64cb01b Mon Sep 17 00:00:00 2001
From: Tater1987 <149222217+Tater1987@users.noreply.github.com>
Date: Tue, 12 Aug 2025 23:04:22 -0500
Subject: [PATCH 24/37] Update meth.lua
Spelling correction
---
server/meth.lua | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/server/meth.lua b/server/meth.lua
index 73534da..9ed5e21 100644
--- a/server/meth.lua
+++ b/server/meth.lua
@@ -18,7 +18,7 @@ local methLocs = {
MethEph = { -- get ephedrine
{loc = vector3(3559.86, 3673.9, 28.13), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
},
- Methace = { -- get acetone
+ MethAce = { -- get acetone
{loc = vector3(3535.41, 3661.05, 28.12), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
},
MethHeist = {
@@ -143,3 +143,4 @@ ps.registerCallback('md-drugs:server:registerMeth', function(source)
end
end)
+
From 891d4abf73a3847b864fd9003bae2462a0e891cb Mon Sep 17 00:00:00 2001
From: Tater1987 <149222217+Tater1987@users.noreply.github.com>
Date: Tue, 12 Aug 2025 23:08:43 -0500
Subject: [PATCH 25/37] Update meth.lua
Added missing teleport handler
---
client/meth.lua | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)
diff --git a/client/meth.lua b/client/meth.lua
index 9557c24..02ef146 100644
--- a/client/meth.lua
+++ b/client/meth.lua
@@ -370,6 +370,33 @@ for k, v in pairs (locations.MethSmash) do
})
end
+for k, v in pairs (locations.MethTele) do
+ ps.boxTarget('meth_tele'..k, v.inside, {length = v.l, width = v.w, heading = v.rot}, {
+ {
+ icon = 'fa-solid fa-door-open',
+ label = ps.lang('coke.teleOut'),
+ action = function()
+ SetEntityCoords(PlayerPedId(), v.outside)
+ end,
+ canInteract = function()
+ return handleGang(v.gang)
+ end
+ }
+ })
+ ps.boxTarget('meth_teleout'..k, v.outside, {length = v.l, width = v.w, heading = v.rot}, {
+ {
+ icon = 'fa-solid fa-door-closed',
+ label = ps.lang('coke.teleIn'),
+ action = function()
+ SetEntityCoords(PlayerPedId(), v.inside)
+ end,
+ canInteract = function()
+ return handleGang(v.gang)
+ end
+ }
+ })
+end
+
RegisterCommand('offset', function()
local pos = GetEntityCoords(PlayerPedId())
Wait(4000)
@@ -408,3 +435,4 @@ for k, v in pairs (locations.Methace) do
})
end
+
From ef328ac90c7f470e49a75be028278fffbd9695c6 Mon Sep 17 00:00:00 2001
From: Tater1987 <149222217+Tater1987@users.noreply.github.com>
Date: Tue, 12 Aug 2025 23:10:09 -0500
Subject: [PATCH 26/37] Update en.lua
Added missing lang for teleport handler
---
locales/en.lua | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/locales/en.lua b/locales/en.lua
index e6d464c..23b6f03 100644
--- a/locales/en.lua
+++ b/locales/en.lua
@@ -152,7 +152,9 @@ Lang.meth = {
targetStealACE = 'Steal Acetone',
stealingACE = 'Stealing Acetone',
notOnRun = 'You Are Not On A Meth Run',
- onCooldown = 'You Are On A Cooldown'
+ onCooldown = 'You Are On A Cooldown',
+ teleIn = 'Enter the Lab',
+ teleOut = 'Exit the Lab',
}
Lang.oxy = {
@@ -247,4 +249,4 @@ Lang.merchant = {
targetOpen = 'Open Merchant Menu',
}
-return Lang
\ No newline at end of file
+return Lang
From 7cc5485864ea51d91dfd25753cabb5bdb5b7b516 Mon Sep 17 00:00:00 2001
From: Tater1987 <149222217+Tater1987@users.noreply.github.com>
Date: Tue, 12 Aug 2025 23:16:38 -0500
Subject: [PATCH 27/37] Update oxyruns.lua
Possible set up for ox fuel? If you need to make changes thats fine. Haven't tested this fully.
---
client/oxyruns.lua | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/client/oxyruns.lua b/client/oxyruns.lua
index 47e6b02..062fc55 100644
--- a/client/oxyruns.lua
+++ b/client/oxyruns.lua
@@ -55,7 +55,11 @@ for k, v in pairs(locations.OxyPayForTruck) do
if not paid then return end
local oxycar = CreateVehicle("burrito3",v.truckSpawn.x, v.truckSpawn.y, v.truckSpawn.z, v.truckSpawn.w, true, false)
- exports[Config.Fuel]:SetFuel(oxycar, 100.0)
+ if Config.Fuel == "ox_fuel" then
+ Entity(oxycar).state.fuel = 100.0
+ else
+ exports[Config.Fuel]:SetFuel(oxycar, 100.0)
+ end
TriggerEvent("vehiclekeys:client:SetOwner", GetVehicleNumberPlateText(oxycar))
ps.notify(ps.lang('oxy.keys'), 'success')
onMission = true
@@ -91,4 +95,5 @@ for k, v in pairs(locations.OxyPayForTruck) do
end
}
})
-end
\ No newline at end of file
+
+end
From f28a358c5cd98b216b8ce74f5da19a94860ce05d Mon Sep 17 00:00:00 2001
From: Tater1987 <149222217+Tater1987@users.noreply.github.com>
Date: Tue, 12 Aug 2025 23:17:41 -0500
Subject: [PATCH 28/37] Update config.lua
ox_fuel as option
---
shared/config.lua | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/shared/config.lua b/shared/config.lua
index 6ea7b24..0327c47 100644
--- a/shared/config.lua
+++ b/shared/config.lua
@@ -3,7 +3,7 @@ ps = exports.ps_lib:init()
ps.loadLangs("uwu")
Config.respawnTime = 100 -- Seconds
-Config.Fuel = "LegacyFuel" -- type the name of script you use i.e. ps-fuel, cdn-fuel, LegacyFuel
+Config.Fuel = "LegacyFuel" -- type the name of script you use i.e. ps-fuel, cdn-fuel, LegacyFuel, ox_fuel
Config.TierSystem = true -- allows for three tiers of certain drugs ( coke, heroin, crack, lsd)
Config.RequestModelTime = 30000 -- if you need more time than this, uhhhh wow
Config.Badtrip = 20 -- number means % chance to spawn a clone that chases and attacks while on mescaline
@@ -66,4 +66,5 @@ Config.Bzz = { -- if you have BZZZ props for these turn it on if you want
heroin =false,
shrooms = false,
weed = false,
-}
\ No newline at end of file
+
+}
From 59c094fdae67470415f3435c87bfffb17c3b95b0 Mon Sep 17 00:00:00 2001
From: Tater1987 <149222217+Tater1987@users.noreply.github.com>
Date: Tue, 12 Aug 2025 23:22:35 -0500
Subject: [PATCH 29/37] Update meth.lua
Item missing in recipes.
---
server/meth.lua | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/server/meth.lua b/server/meth.lua
index 9ed5e21..c10ad0d 100644
--- a/server/meth.lua
+++ b/server/meth.lua
@@ -36,7 +36,7 @@ local methLocs = {
local methRecipes = {
cook = {
- heat = {take = {ephedrine = 1, acetone = 1}, give = {}}
+ heat = {take = {ephedrine = 1, acetone = 1}, give = {}} --Missing item
},
bag = {
bags = {take = {empty_weed_bag = 5}, give = {methbags = 5} }
@@ -144,3 +144,4 @@ ps.registerCallback('md-drugs:server:registerMeth', function(source)
end)
+
From c47b69ceca4f37ae2064de63ba601c7bc3e9245e Mon Sep 17 00:00:00 2001
From: Mustache Dom <123716453+Mustachedom@users.noreply.github.com>
Date: Wed, 13 Aug 2025 02:07:08 -0600
Subject: [PATCH 30/37] - switched cocaine trigger events after animatiosn
- moved inits events from functions to plant spawns
---
client/cocaine.lua | 4 ++--
client/functions.lua | 13 +------------
client/plantSpawns.lua | 2 ++
server/plantSpawns.lua | 37 +++++++++++++++++++------------------
4 files changed, 24 insertions(+), 32 deletions(-)
diff --git a/client/cocaine.lua b/client/cocaine.lua
index 005feba..1a09ce9 100644
--- a/client/cocaine.lua
+++ b/client/cocaine.lua
@@ -141,8 +141,8 @@ for k, v in pairs (locations.CuttingCoke) do
ps.notify(ps.lang('Catches.itemMissings', ps.getLabel('bakingsoda')), 'error')
return
end
- TriggerServerEvent("md-drugs:server:cutcokeone", k)
CutCoke(v.loc, v.offset, v.rotation)
+ TriggerServerEvent("md-drugs:server:cutcokeone", k)
end,
canInteract = function()
if not handleGang(v.gang) then return false end
@@ -163,8 +163,8 @@ for k, v in pairs (locations.BaggingCoke) do
ps.notify(ps.lang('Catches.itemMissings', ps.getLabel('empty_weed_bag')), 'error')
return
end
- TriggerServerEvent("md-drugs:server:bagcoke", k)
BagCoke(v.loc, v.offset, v.rotation)
+ TriggerServerEvent("md-drugs:server:bagcoke", k)
end,
canInteract = function()
if not handleGang(v.gang) then return false end
diff --git a/client/functions.lua b/client/functions.lua
index e1ad1b3..031b843 100644
--- a/client/functions.lua
+++ b/client/functions.lua
@@ -266,18 +266,7 @@ function StartRay2()
until run == false
end
-CreateThread(function()
- ps.requestModel('prop_plant_01b')
- ps.requestModel('prop_plant_01a')
- ps.requestModel('prop_cactus_03')
- ps.requestModel('prop_weed_01')
- TriggerEvent('weed:init')
- TriggerEvent('heroin:init')
- TriggerEvent('coke:init')
- TriggerEvent('Mescaline:init')
- ps.requestModel(GetHashKey('mushroom'))
- TriggerEvent('shrooms:init')
-end)
+
ps.registerCallback('md-drugs:client:uncuff', function(data)
if not progressbar(data, 4000, 'uncuff') then return end
diff --git a/client/plantSpawns.lua b/client/plantSpawns.lua
index 756d0d7..5070a2f 100644
--- a/client/plantSpawns.lua
+++ b/client/plantSpawns.lua
@@ -88,7 +88,9 @@ for k, v in pairs (DrugPlants) do
end
end
end)
+ TriggerEvent(v.label ..":init")
::continue::
+
end
AddEventHandler('onResourceStop', function(resourceName)
diff --git a/server/plantSpawns.lua b/server/plantSpawns.lua
index 91936d6..5b1e2fc 100644
--- a/server/plantSpawns.lua
+++ b/server/plantSpawns.lua
@@ -2,7 +2,7 @@ local drugModels = {
cocaine = "prop_plant_01a",
heroin = "prop_plant_01b",
mescaline = "prop_cactus_03",
- shrooms = "mushroom",
+ shrooms = "prop_stoneshroom2",
weed = "bkr_prop_weed_lrg_01b"
}
local drugModelsBuzz = {
@@ -70,23 +70,23 @@ local plants = {
{ location = vector3(2623.82, 4189.97, 41.44), heading = 21.52, model = "prop_cactus_03", taken = false},
},
shrooms = {
- { location = vector3(2185.14, 5183.81, 57.48), heading = 334.49, model = propsLabels('shroom'), taken = false},
- { location = vector3(2174.45, 5187.85, 57.43), heading = 329.56, model = propsLabels('shroom'), taken = false},
- { location = vector3(2166.22, 5196.56, 58.0), heading = 25.16, model = propsLabels('shroom'), taken = false},
- { location = vector3(2166.82, 5204.83, 58.63), heading = 21.52, model = propsLabels('shroom'), taken = false},
- { location = vector3(2174.84, 5205.82, 59.19), heading = 334.49, model = propsLabels('shroom'), taken = false},
- { location = vector3(2184.46, 5201.23, 59.2), heading = 329.56, model = propsLabels('shroom'), taken = false},
- { location = vector3(2192.45, 5194.89, 58.86), heading = 25.16, model = propsLabels('shroom'), taken = false},
- { location = vector3(2207.53, 5187.81, 58.95), heading = 21.52, model = propsLabels('shroom'), taken = false},
- { location = vector3(2213.46, 5191.11, 59.81), heading = 334.49, model = propsLabels('shroom'), taken = false},
- { location = vector3(2218.31, 5180.0, 58.18), heading = 329.56, model = propsLabels('shroom'), taken = false},
- { location = vector3(2212.75, 5172.35, 57.2), heading = 25.16, model = propsLabels('shroom'), taken = false},
- { location = vector3(2208.56, 5167.06, 56.34), heading = 21.52, model = propsLabels('shroom'), taken = false},
- { location = vector3(2196.9, 5158.59, 54.84), heading = 21.52, model = propsLabels('shroom'), taken = false},
- { location = vector3(2191.62, 5174.91, 56.68), heading = 21.52, model = propsLabels('shroom'), taken = false},
- { location = vector3(2190.18, 5182.54, 57.47), heading = 21.52, model = propsLabels('shroom'), taken = false},
- { location = vector3(2185.85, 5190.49, 58.1), heading = 21.52, model = propsLabels('shroom'), taken = false},
- { location = vector3(2179.95, 5194.19, 58.26), heading = 21.52, model = propsLabels('shroom'), taken = false},
+ { location = vector3(2185.14, 5183.81, 57.48), heading = 334.49, model = propsLabels('shrooms'), taken = false},
+ { location = vector3(2174.45, 5187.85, 57.43), heading = 329.56, model = propsLabels('shrooms'), taken = false},
+ { location = vector3(2166.22, 5196.56, 58.0), heading = 25.16, model = propsLabels('shrooms'), taken = false},
+ { location = vector3(2166.82, 5204.83, 58.63), heading = 21.52, model = propsLabels('shrooms'), taken = false},
+ { location = vector3(2174.84, 5205.82, 59.19), heading = 334.49, model = propsLabels('shrooms'), taken = false},
+ { location = vector3(2184.46, 5201.23, 59.2), heading = 329.56, model = propsLabels('shrooms'), taken = false},
+ { location = vector3(2192.45, 5194.89, 58.86), heading = 25.16, model = propsLabels('shrooms'), taken = false},
+ { location = vector3(2207.53, 5187.81, 58.95), heading = 21.52, model = propsLabels('shrooms'), taken = false},
+ { location = vector3(2213.46, 5191.11, 59.81), heading = 334.49, model = propsLabels('shrooms'), taken = false},
+ { location = vector3(2218.31, 5180.0, 58.18), heading = 329.56, model = propsLabels('shrooms'), taken = false},
+ { location = vector3(2212.75, 5172.35, 57.2), heading = 25.16, model = propsLabels('shrooms'), taken = false},
+ { location = vector3(2208.56, 5167.06, 56.34), heading = 21.52, model = propsLabels('shrooms'), taken = false},
+ { location = vector3(2196.9, 5158.59, 54.84), heading = 21.52, model = propsLabels('shrooms'), taken = false},
+ { location = vector3(2191.62, 5174.91, 56.68), heading = 21.52, model = propsLabels('shrooms'), taken = false},
+ { location = vector3(2190.18, 5182.54, 57.47), heading = 21.52, model = propsLabels('shrooms'), taken = false},
+ { location = vector3(2185.85, 5190.49, 58.1), heading = 21.52, model = propsLabels('shrooms'), taken = false},
+ { location = vector3(2179.95, 5194.19, 58.26), heading = 21.52, model = propsLabels('shrooms'), taken = false},
},
weed = {
{ location = vector3(1064.84, -3199.84, -42.70), heading = 334.49, model = propsLabels('weed'), taken = false},
@@ -114,6 +114,7 @@ local plantData = {
GlobalState.CocaPlant = plants.cocaine
end,
itemGive = function(src)
+ ps.debug("Giving Coca Leaf")
ps.addItem(src, 'coca_leaf', 1)
end,
coolDown = function(loc)
From bf9d435b031bc238a7de8cafcd84e5eeae20d7a9 Mon Sep 17 00:00:00 2001
From: Mustache Dom <123716453+Mustachedom@users.noreply.github.com>
Date: Wed, 13 Aug 2025 02:08:57 -0600
Subject: [PATCH 31/37] - adjust oxyruns to be 20% failure of new location -
fix meth location
---
client/meth.lua | 2 +-
server/oxyruns.lua | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/client/meth.lua b/client/meth.lua
index 02ef146..50093ec 100644
--- a/client/meth.lua
+++ b/client/meth.lua
@@ -419,7 +419,7 @@ for k, v in pairs (locations.MethEph) do
}
})
end
-for k, v in pairs (locations.Methace) do
+for k, v in pairs (locations.MethAce) do
ps.boxTarget('stealMethAce'..k, v.loc, {length = v.l, width = v.w, rotation = v.rot, height = 1.0},{
{
label = ps.lang('meth.targetStealACE'),
diff --git a/server/oxyruns.lua b/server/oxyruns.lua
index da3ce1a..b3b3c41 100644
--- a/server/oxyruns.lua
+++ b/server/oxyruns.lua
@@ -69,7 +69,7 @@ end)
ps.registerCallback('md-drugs:server:getRoute', function(source)
if not onRoute[source] then return false end
local giveLocation = math.random(1, 10)
- if giveLocation == 10 then
+ if giveLocation >= 8 then
onRoute[source] = nil
return false
else
From af0efacfe920c02b5fbb5602a058b1d6d6e98b16 Mon Sep 17 00:00:00 2001
From: Mustache Dom <123716453+Mustachedom@users.noreply.github.com>
Date: Thu, 14 Aug 2025 12:35:09 -0700
Subject: [PATCH 32/37] Update TravellingMerchant.lua
---
client/TravellingMerchant.lua | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/client/TravellingMerchant.lua b/client/TravellingMerchant.lua
index c33767b..ba269f3 100644
--- a/client/TravellingMerchant.lua
+++ b/client/TravellingMerchant.lua
@@ -16,7 +16,7 @@ local function spawn()
description = '$'..v,
icon = ps.getImage(k),
action = function()
- ps.triggerServerEvent('md-drugs:server:purchaseGoods', k)
+ TriggerServerEvent('md-drugs:server:purchaseGoods', k)
end
}
end
From d9fcb11930c9b1bd633f0923b017eac5b5cc6760 Mon Sep 17 00:00:00 2001
From: Mustache Dom <123716453+Mustachedom@users.noreply.github.com>
Date: Sat, 16 Aug 2025 23:43:20 -0700
Subject: [PATCH 33/37] - `added` timeout function. any event you trigger puts
a 3 second hold on the rest of the script for that player to ensure no
injectors can endlessly spam and get things. if triggered while on cooldown a
console print happens
---
client/animationsandfunctions.lua | 1 -
client/xtc.lua | 2 +-
locales/en.lua | 1 +
locales/uwu.lua | 2 +-
server/cocaine.lua | 8 +++++--
server/crack.lua | 5 ++++
server/functions.lua | 19 +++++++++++++++
server/heroin.lua | 19 +++++++++++----
server/lsd.lua | 21 ++++++-----------
server/mescaline.lua | 1 +
server/meth.lua | 7 +++---
server/oxyruns.lua | 2 ++
server/pharma.lua | 1 +
server/plantSpawns.lua | 7 ++----
server/weed.lua | 4 +++-
server/xtc.lua | 39 +++++++++++--------------------
shared/config.lua | 2 +-
17 files changed, 83 insertions(+), 58 deletions(-)
diff --git a/client/animationsandfunctions.lua b/client/animationsandfunctions.lua
index a0b4c15..201b4b3 100644
--- a/client/animationsandfunctions.lua
+++ b/client/animationsandfunctions.lua
@@ -15,7 +15,6 @@ function EcstasyEffect()
if IsPedRunning(PlayerPedId()) then
SetPedToRagdoll(PlayerPedId(), math.random(1000, 3000), math.random(1000, 3000), 3, 0, 0, 0)
end
-
startStamina = 0
end
diff --git a/client/xtc.lua b/client/xtc.lua
index 33d8b7a..b1f535e 100644
--- a/client/xtc.lua
+++ b/client/xtc.lua
@@ -132,7 +132,7 @@ for k, v in pairs(locations.xtcpress) do
description = ps.lang('xtc.buySingle', d.cash),
action = function()
if not ps.progressbar(ps.lang('xtc.buyp'), 4000, 'uncuff') then return end
- TriggerServerEvent('md-drugs:server:buypress', m)
+ TriggerServerEvent('md-drugs:server:buypress',k, m)
end,
}
else
diff --git a/locales/en.lua b/locales/en.lua
index 23b6f03..7fa8406 100644
--- a/locales/en.lua
+++ b/locales/en.lua
@@ -9,6 +9,7 @@ Lang.Catches = {
itemNeeded = 'You Need %s',
cooldown = 'Slow Down Speed Racer',
invalidItem = 'This Item Is Not Sold Here',
+ onCooldownWarn = '%s Attempted To Run Event %s \n while on cooldown'
}
Lang.coke = {
diff --git a/locales/uwu.lua b/locales/uwu.lua
index 9f137e6..50ab31e 100644
--- a/locales/uwu.lua
+++ b/locales/uwu.lua
@@ -5,7 +5,7 @@ Lang.Catches = {
needItems = 'Aww... you don’t have all da items I need... 😢',
notEnoughMoney = 'Oof, you’re too broke, sweetie 💸',
buySuccess = 'Yay! You bought %s %s for $%s! 💖',
- itemMissings = 'You need:\n%s',
+ itemMissings = 'You need:\n',
itemNeeded = 'You need %s... plz go get it! 🥺',
cooldown = 'Silly baka, slow down! ⏳',
invalidItem = 'Eh? This item isn’t sold here, silly! 🙃',
diff --git a/server/cocaine.lua b/server/cocaine.lua
index 12a54d0..2340210 100644
--- a/server/cocaine.lua
+++ b/server/cocaine.lua
@@ -16,9 +16,10 @@ local cocaineRecipes = {
tier3 = {take = {loosecokestagethree = 1, empty_weed_bag = 1}, give = {cokebaggystagethree = 1}},
}
}
+
local cocaineLocations = {
MakePowder = {
- {loc = vector3(1086.20, -3195.30, -39.20), l = 1.0, w = 1.0, rot = 45.0, gang = "ballas"},
+ {loc = vector3(1086.20, -3195.30, -39.20), l = 1.0, w = 1.0, rot = 45.0, gang = ""},
},
CuttingCoke = {
{loc = vector3(1095.61, -3195.62, -39.13), l = 1.0, w = 1.0, rot = 45.0, offset = vec3(-1.782227, 0.445068, -0.502701), rotation = vector3(0,0,0), gang = ""},
@@ -39,8 +40,9 @@ end)
RegisterServerEvent('md-drugs:server:makepowder', function(num)
local src = source
+ if timeOut(src, 'md-drugs:server:makepowder') then return end
if not ps.checkDistance(src, cocaineLocations.MakePowder[num].loc, 3.5) then
- ps.notify(src, ps.lang('Catches.notIn'), 'error')
+ ps.warn(ps.lang('Catches.notIn', ps.getPlayerName(src)), 'md-drugs:server:makepowder')
return
end
local tier = 'tier1'
@@ -61,6 +63,7 @@ end)
RegisterServerEvent('md-drugs:server:cutcokeone', function(num)
local src = source
local tier = 'tier1'
+ if timeOut(src, 'md-drugs:server:cutcokeone') then return end
if not ps.checkDistance(src, cocaineLocations.CuttingCoke[num].loc, 2.5) then
ps.notify(src, ps.lang('Catches.notIn'), 'error')
return
@@ -87,6 +90,7 @@ end)
RegisterServerEvent('md-drugs:server:bagcoke', function(num)
local src = source
local tier = 'tier1'
+ if timeOut(src, 'md-drugs:server:bagcoke') then return end
if not ps.checkDistance(src, cocaineLocations.BaggingCoke[num].loc, 2.5) then
ps.notify(src, ps.lang('Catches.notIn'), 'error')
return
diff --git a/server/crack.lua b/server/crack.lua
index 708c79c..e2165e8 100644
--- a/server/crack.lua
+++ b/server/crack.lua
@@ -20,16 +20,20 @@ local CrackLocations = {
},
}
+
ps.registerCallback('md-drugs:server:GetCrackLocations', function()
return CrackLocations
end)
+
RegisterServerEvent('md-drugs:server:makecrackone', function(num)
local src = source
local tier = 'tier1'
+ if timeOut(src, 'md-drugs:server:makecrackone') then return end
if not ps.checkDistance(src, CrackLocations.makecrack[num].loc, 2.0) then
ps.notify(src, ps.lang('Catches.notIn'), 'error')
return
end
+
if Config.TierSystem then
local crackTiers = {
{item = 'loosecoke', tier = 'tier1'},
@@ -53,6 +57,7 @@ end)
RegisterServerEvent('md-drugs:server:bagcrack', function(num)
local src = source
local tier = 'tier1'
+ if timeOut(src, 'md-drugs:server:bagcrack') then return end
if not ps.checkDistance(src, CrackLocations.bagcrack[num].loc, 2.0) then
ps.notify(src, ps.lang('Catches.notIn'), 'error')
return
diff --git a/server/functions.lua b/server/functions.lua
index 1a6b5c9..48e3428 100644
--- a/server/functions.lua
+++ b/server/functions.lua
@@ -1,3 +1,22 @@
+local timeOutPlayers = {}
+
+local function timeOutThread(src)
+ CreateThread(function()
+ timeOutPlayers[ps.getIdentifier(src)] = true
+ Wait(3000)
+ timeOutPlayers[ps.getIdentifier(src)] = nil
+ end)
+end
+
+function timeOut(src, event)
+ if timeOutPlayers[ps.getIdentifier(src)] then
+ ps.warn(ps.lang('Catches.onCooldownWarn', ps.getPlayerName(src), event))
+ return true
+ end
+ timeOutThread(src)
+ return false
+end
+
function verifyHas(source, items)
local need = 0
local have = 0
diff --git a/server/heroin.lua b/server/heroin.lua
index 5ebbba7..2938520 100644
--- a/server/heroin.lua
+++ b/server/heroin.lua
@@ -37,13 +37,14 @@ local heroinLocations = {
}
}
+local prices = {
+ heroinlabkitprice = 10000
+}
+
ps.registerCallback('md-drugs:server:GetHeroinLocations', function(source)
return heroinLocations
end)
-local prices = {
- heroinlabkitprice = 10000
-}
ps.registerCallback('removeCleaningkit', function(source)
for k, v in pairs(heroinLabKits) do
@@ -57,6 +58,8 @@ end)
RegisterServerEvent('md-drugs:server:dryplant', function(num)
local src = source
+
+ if timeOut(src, 'md-drugs:server:dryplant') then return end
if not ps.checkDistance(src, heroinLocations.dryplant[num].loc, 3.0) then
ps.notify(src, ps.lang('Catches.notIn'), 'error')
return
@@ -81,6 +84,9 @@ end)
RegisterServerEvent('md-drugs:server:cutheroin', function(num)
local src = source
+
+ if timeOut(src, 'md-drugs:server:cutheroin') then return end
+
if not ps.checkDistance(src, heroinLocations.cutheroinone[num].loc, 3.0) then
ps.notify(src, ps.lang('Catches.notIn'), 'error')
return
@@ -112,6 +118,7 @@ end)
RegisterServerEvent('md-drugs:server:getheroinlabkit', function(num)
local src = source
+ if timeOut(src, 'md-drugs:server:getheroinlabkit') then return end
if not ps.checkDistance(src, heroinLocations.buyKit[num].loc, 3.0) then
ps.notify(src, ps.lang('Catches.notIn'), 'error')
return
@@ -165,8 +172,12 @@ end)
RegisterServerEvent('md-drugs:server:heatliquidheroin', function()
local src = source
+
+ if timeOut(src, 'md-drugs:server:heatliquidheroin') then return end
+
if not hasHKit(src) then return end
if not ps.hasItem(src, 'emptyvial', 1) then return end
+
if Config.TierSystem then
local itemList = {
heroincut = 'tier1',
@@ -212,6 +223,7 @@ end)
RegisterServerEvent('md-drugs:server:fillneedle', function(num)
local src = source
+ if timeOut(src, 'md-drugs:server:fillneedle') then return end
if not ps.checkDistance(src, heroinLocations.fillneedle[num].loc, 3.0) then
ps.notify(src, ps.lang('Catches.notIn'), 'error')
return
@@ -244,7 +256,6 @@ end)
RegisterServerEvent('md-drugs:server:failheroin', function()
local src = source
- --Log(ps.getPlayerName(src) ..' Sucks And Burned Their Heroin', 'heroin')
if Config.TierSystem then
local itemList = {
heroinvial = 1,
diff --git a/server/lsd.lua b/server/lsd.lua
index f891533..6d47fec 100644
--- a/server/lsd.lua
+++ b/server/lsd.lua
@@ -31,37 +31,25 @@ ps.registerCallback('md-drugs:server:GetLSDLocations', function(source)
return lsdLocations
end)
-local timedOut = {}
-
-local function timeout(src, time)
- timedOut[src] = true
- CreateThread(function()
- Wait(time)
- timedOut[src] = nil
- end)
-end
-
local lsdTables = {}
RegisterServerEvent('md-drugs:server:getlysergic', function(num)
local src = source
- if timedOut[src] then return end
+ if timeOut(src, 'md-drugs:server:getlysergic') then return end
if not ps.checkDistance(src, lsdLocations.lysergicacid[num].loc, 2.0) then
ps.notify(src, ps.lang('Catches.notIn'), "error")
return
end
- timeout(src, 3000)
ps.addItem(src, 'lysergic_acid', 2)
end)
RegisterServerEvent('md-drugs:server:getdiethylamide', function(num)
local src = source
- if timedOut[src] then return end
+ if timeOut(src, 'md-drugs:server:getdiethylamide') then return end
if not ps.checkDistance(src, lsdLocations.diethylamide[num].loc, 2.0) then
ps.notify(src, ps.lang('Catches.notIn'), "error")
return
end
- timeout(src, 3000)
ps.addItem(src, 'diethylamide', 2)
end)
@@ -108,6 +96,7 @@ end)
RegisterServerEvent('md-drugs:server:heatliquid', function()
local src = source
if not hasLabKit(src) then return end
+ if timeOut(src, 'md-drugs:server:heatliquid') then return end
if not ps.craftItem(src, lsdRecipes['vial']['heat']) then
verifyHas(src, lsdRecipes['vial']['heat'].take)
return
@@ -126,6 +115,7 @@ end)
RegisterServerEvent('md-drugs:server:refinequalityacid', function()
local src = source
if not hasLabKit(src) then return end
+ if timeOut(src, 'md-drugs:server:refinequalityacid') then return end
if not ps.hasItem(src, 'lsd_one_vial', 1) then return end
if Config.TierSystem then
local lsd = tonumber(getRep(src, 'lsd'))
@@ -170,6 +160,7 @@ end)
RegisterServerEvent('md-drugs:server:gettabpaper', function(num)
local src = source
+ if timeOut(src, 'md-drugs:server:gettabpaper') then return end
if not ps.checkDistance(src, lsdLocations.gettabs[num].loc, 3.0) then
ps.notify(src, ps.lang('Catches.notIn'), "error")
return
@@ -183,6 +174,7 @@ end)
RegisterServerEvent('md-drugs:server:getlabkit', function(num)
local src = source
+ if timeOut(src, 'md-drugs:server:getlabkit') then return end
if ps.hasItem(src,'lsdlabkit', 1) then
return
end
@@ -199,6 +191,7 @@ end)
RegisterServerEvent('md-drugs:server:maketabpaper', function()
local src = source
+ if timeOut(src, 'md-drugs:server:maketabpaper') then return end
if not hasLabKit(src) then return end
if not ps.hasItem(src,'tab_paper', 1) then return end
local vialdata = {
diff --git a/server/mescaline.lua b/server/mescaline.lua
index c9a3ddf..6eae3e2 100644
--- a/server/mescaline.lua
+++ b/server/mescaline.lua
@@ -17,6 +17,7 @@ end)
RegisterNetEvent("md-drugs:server:drymescaline", function(num)
local src = source
+ if timeOut(src, 'md-drugs:server:drymescaline') then return end
if not ps.checkDistance(src, mescalineLocation.DryOutMescaline[num].loc, 3.0) then
ps.notify(src, ps.lang('Catches.notIn'), "error")
return
diff --git a/server/meth.lua b/server/meth.lua
index c10ad0d..aa6de91 100644
--- a/server/meth.lua
+++ b/server/meth.lua
@@ -87,6 +87,7 @@ end)
RegisterServerEvent('md-drugs:server:getmeth', function(num)
local src = source
+ if timeOut(src, 'md-drugs:server:getmeth') then return end
if not ps.checkDistance(src, methLocs.BagMeth[num].loc, 2.5) then
ps.notify(src, ps.lang('Catches.notIn'), "error")
return
@@ -103,8 +104,8 @@ RegisterServerEvent('md-drugs:server:geteph', function(num)
ps.notify(src, ps.lang('Catches.notIn'), "error")
return
end
- if not coolDown(ps.getIdentifier(src)) then return ps.notify(src, ps.lang('meth.onCooldown'), "error") end
- ps.addItem(src, 'ephedrine', 1)
+ if timeOut(src, 'md-drugs:server:geteph') then return end
+ ps.addItem(src, 'ephedrine', 1)
end)
RegisterServerEvent('md-drugs:server:getace', function(num)
@@ -113,7 +114,7 @@ RegisterServerEvent('md-drugs:server:getace', function(num)
ps.notify(src, ps.lang('Catches.notIn'), "error")
return
end
- if not coolDown(ps.getIdentifier(src)) then return ps.notify(src, ps.lang('meth.onCooldown'), "error") end
+ if timeOut(src, 'md-drugs:server:getace') then return end
ps.addItem(src, 'acetone', 1)
end)
diff --git a/server/oxyruns.lua b/server/oxyruns.lua
index b3b3c41..b2ad36d 100644
--- a/server/oxyruns.lua
+++ b/server/oxyruns.lua
@@ -28,6 +28,7 @@ local oxyLocs = {
ps.registerCallback('md-drugs:server:GetOxyLocs', function(source)
return oxyLocs
end)
+
ps.registerCallback('md-drugs:server:payfortruck', function(source)
local src = source
if ps.removeMoney(src, 'cash', prices.payfortruck) or ps.removeMoney(src, 'bank', prices.payfortruck) then
@@ -43,6 +44,7 @@ end)
RegisterServerEvent('md-drugs:server:giveoxybox', function()
local src = source
+ if timeOut(src, 'md-drugs:server:giveoxybox') then return end
if not onRoute[src] then
ps.notify(src, ps.lang('oxy.notOn'), "error")
return
diff --git a/server/pharma.lua b/server/pharma.lua
index 340ebf6..66fbc64 100644
--- a/server/pharma.lua
+++ b/server/pharma.lua
@@ -56,6 +56,7 @@ end
RegisterServerEvent('md-drugs:server:fillprescription', function(num)
local src = source
+ if timeOut(src, 'md-drugs:server:fillprescription') then return end
if not ps.checkDistance(src, pharmaLocations.FillPrescription[num].loc, 3.5) then
return ps.notify(src, ps.lang('Catches.notIn'), "error")
end
diff --git a/server/plantSpawns.lua b/server/plantSpawns.lua
index 5b1e2fc..627f66d 100644
--- a/server/plantSpawns.lua
+++ b/server/plantSpawns.lua
@@ -18,6 +18,7 @@ local function propsLabels(drugType)
return drugModels[drugType]
end
end
+
local plants = {
cocaine = {
{ location = vector3(1474.25, -2643.87, 42.88), heading = 334.49, model = propsLabels('cocaine'), taken = false },
@@ -123,7 +124,6 @@ local plantData = {
plants.cocaine[loc].taken = false
GlobalState.CocaPlant = plants.cocaine
TriggerClientEvent('coke:respawnCane', -1, loc)
- --Log('Coca Plant Respawned At ' .. plants.cocaine[loc].location, 'coke')
end)
end,
allow = Config.Drugs.cocaine
@@ -143,7 +143,6 @@ local plantData = {
plants.heroin[loc].taken = false
GlobalState.PoppyPlants = plants.heroin
TriggerClientEvent('heroin:respawnCane', -1, loc)
- --Log('Heroin Plant Respawned At ' .. plants.heroin[loc].location, 'heroin')
end)
end,
allow = Config.Drugs.heroin
@@ -163,7 +162,6 @@ local plantData = {
plants.mescaline[loc].taken = false
GlobalState.Mescaline = plants.mescaline
TriggerClientEvent('Mescaline:respawnCane', -1, loc)
- --Log('Mescaline Plant Respawned At ' .. plants.mescaline[loc].location, 'mescaline')
end)
end,
allow = Config.Drugs.mescaline
@@ -183,7 +181,6 @@ local plantData = {
plants.shrooms[loc].taken = false
GlobalState.shrooms = plants.shrooms
TriggerClientEvent('shrooms:respawnCane', -1, loc)
- --Log('Shroom Respawned At ' .. plants.shrooms[loc].location, 'shrooms')
end)
end,
allow = Config.Drugs.shrooms
@@ -203,7 +200,6 @@ local plantData = {
plants.weed[loc].taken = false
GlobalState.WeedPlant = plants.weed
TriggerClientEvent('weed:respawnCane', -1, loc)
- --Log('Weed Plant Respawned At ' .. plants.weed[loc].location, 'weed')
end)
end,
allow = Config.Drugs.weed
@@ -215,6 +211,7 @@ for k, v in pairs (plantData) do
v.globalState()
RegisterNetEvent(v.label ..":pickupCane", function(loc)
local src = source
+ if timeOut(src, v.label .. ":pickupCane") then return end
if ps.checkDistance(src, v.plants[loc].location, 5.0) then
if not v.plants[loc].taken then
v.plants[loc].taken = true
diff --git a/server/weed.lua b/server/weed.lua
index ada2aab..7e974f7 100644
--- a/server/weed.lua
+++ b/server/weed.lua
@@ -75,6 +75,7 @@ end)
RegisterServerEvent('md-drugs:server:dryoutweed', function()
local src = source
+ if timeOut(src, 'md-drugs:server:dryoutweed') then return end
if ps.removeItem(src,"wetcannabis", 1) then
ps.addItem(src,"drycannabis", 1)
else
@@ -96,6 +97,7 @@ end
RegisterServerEvent('md-drugs:server:MakeWeedItems', function(data)
local src = source
+ if timeOut(src, 'md-drugs:server:MakeWeedItems') then return end
if not ps.craftItem(src, weed[data.table][data.item]) then
verifyHas(src, weed[data.table][data.item].take)
return
@@ -126,7 +128,7 @@ end)
ps.createUseable("mdwoods", function(source, item)
local src = source
- local check = ps.callback('md-drugs:client:uncuff', src, ps.lang('weed.crackBlunt'))
+ local check = ps.callback('md-drugs:client:uncuff', src, ps.lang('weed.crackBlunt'))
if not check then return end
if ps.removeItem(src, "mdwoods",1 ) then
ps.addItem(src, "bluntwrap", 5)
diff --git a/server/xtc.lua b/server/xtc.lua
index 77a57aa..dc1dd68 100644
--- a/server/xtc.lua
+++ b/server/xtc.lua
@@ -78,15 +78,6 @@ local function craft(source, tbl, item)
end
local activePresses = {}
-local timeout = {}
-
-local function timeOut(src)
- CreateThread(function()
- timeout[ps.getIdentifier(src)] = true
- Wait(3000)
- timeout[ps.getIdentifier(src)] = nil
- end)
-end
RegisterServerEvent('md-drugs:server:stealisosafrole', function(num)
local src = source
@@ -94,11 +85,7 @@ RegisterServerEvent('md-drugs:server:stealisosafrole', function(num)
ps.notify(src, ps.lang('Checks.notIn'), "error")
return
end
- if timeout[ps.getIdentifier(src)] then
- ps.notify(src, ps.lang('Catches.cooldown'), 'error')
- return
- end
- timeOut(src)
+ if timeOut(src, 'md-drugs:server:stealisosafrole') then return end
ps.addItem(src, "isosafrole", 1)
end)
@@ -108,11 +95,7 @@ RegisterServerEvent('md-drugs:server:stealmdp2p', function(num)
ps.notify(src, ps.lang('Checks.notIn'), "error")
return
end
- if timeout[ps.getIdentifier(src)] then
- ps.notify(src, ps.lang('Catches.cooldown'), 'error')
- return
- end
- timeOut(src)
+ if timeOut(src, 'md-drugs:server:stealmdp2p') then return end
ps.addItem(src, "mdp2p", 1)
end)
@@ -146,6 +129,7 @@ RegisterServerEvent('md-drugs:server:getpressback', function()
local src = source
if not activePresses[ps.getIdentifier(src)] then return end
local press = activePresses[ps.getIdentifier(src)]
+ if not ps.checkDistance(src, press.loc, 2.0) then return end
ps.addItem(src, press.get, 1)
activePresses[ps.getIdentifier(src)] = nil
end)
@@ -156,11 +140,18 @@ RegisterServerEvent('md-drugs:server:makextc', function(data)
ps.notify(src, ps.lang('xtc.noPressOut'), 'error')
return
end
+ if timeOut(src, 'md-drugs:server:makextc') then return end
+ if not ps.checkDistance(src, activePresses[ps.getIdentifier(src)].loc, 2.0) then return end
craft(src, RecipeList[activePresses[ps.getIdentifier(src)].press][data], data)
end)
-RegisterServerEvent('md-drugs:server:buypress', function()
+RegisterServerEvent('md-drugs:server:buypress', function(loc, item)
local src = source
+ if not ps.checkDistance(src, xtcLocations.xtcpress[loc].loc, 2.0) then
+ ps.notify(src, ps.lang('Catches.notIn'), "error")
+ return
+ end
+ if timeOut(src, 'md-drugs:server:buypress') then return end
if ps.removeMoney(src,"cash", RecipeList.presses['singlepress'].cash) then
ps.addItem(src, "singlepress", 1)
else
@@ -170,6 +161,7 @@ end)
RegisterServerEvent('md-drugs:server:upgradepress', function(data)
local src = source
+ if timeOut(src, 'md-drugs:server:upgradepress') then return end
if not ps.checkDistance(src, xtcLocations.xtcpress[data].loc, 2.0) then
ps.notify(src, ps.lang('Catches.notIn'), "error")
return
@@ -187,11 +179,7 @@ RegisterServerEvent('md-drugs:server:makingrawxtc', function(num)
ps.notify(src, ps.lang('Checks.notIn'), "error")
return
end
- if timeout[ps.getIdentifier(src)] then
- ps.notify(src, ps.lang('Catches.cooldown'), 'error')
- return
- end
- timeOut(src)
+ if timeOut(src, 'md-drugs:server:makingrawxtc') then return end
if not ps.craftItem(src, RecipeList.raw.raw_xtc) then return end
end)
@@ -211,6 +199,7 @@ end
RegisterServerEvent('md-drugs:server:stamp', function(num, color)
local src = source
if not ps.checkDistance(src, xtcLocations.stamp[num].loc, 3.0) then return end
+ if timeOut(src, 'md-drugs:server:stamp') then return end
local item = getColor(color)
local colors = {
white = 'white_xtc',
diff --git a/shared/config.lua b/shared/config.lua
index 0327c47..3b63580 100644
--- a/shared/config.lua
+++ b/shared/config.lua
@@ -1,6 +1,6 @@
Config = {} --Ignore.
ps = exports.ps_lib:init()
-ps.loadLangs("uwu")
+ps.loadLangs("en")
Config.respawnTime = 100 -- Seconds
Config.Fuel = "LegacyFuel" -- type the name of script you use i.e. ps-fuel, cdn-fuel, LegacyFuel, ox_fuel
From 1f3d7154aabf2b2ad12db9049cac2a9be575c1f4 Mon Sep 17 00:00:00 2001
From: Mustache Dom <123716453+Mustachedom@users.noreply.github.com>
Date: Sat, 16 Aug 2025 23:52:07 -0700
Subject: [PATCH 34/37] - delete test commands
---
client/functions.lua | 17 -----------------
server/functions.lua | 10 ----------
2 files changed, 27 deletions(-)
diff --git a/client/functions.lua b/client/functions.lua
index 031b843..afd629c 100644
--- a/client/functions.lua
+++ b/client/functions.lua
@@ -2,23 +2,6 @@
local minigametype = Config.minigametype
local dispatch = Config.Dispatch
-RegisterCommand('te', function(source, args)
- if #args < 1 then
- print('Usage: /te eventname [arg1] [arg2] ...')
- return
- end
-
- local eventName = args[1]
-
- local eventArgs = {}
- for i = 2, #args do
- local arg = args[i]
- local num = tonumber(arg)
- table.insert(eventArgs, num ~= nil and num or arg)
- end
-
- TriggerServerEvent(eventName, table.unpack(eventArgs))
-end, false)
function loadParticle(dict)
if not HasNamedPtfxAssetLoaded(dict) then
diff --git a/server/functions.lua b/server/functions.lua
index 48e3428..3589451 100644
--- a/server/functions.lua
+++ b/server/functions.lua
@@ -41,16 +41,6 @@ function verifyHas(source, items)
return false
end
-RegisterCommand('TestMissing', function(source)
- local items = {
- coke = 5,
- heroin = 2,
- lsd = 1
- }
- local src = source
- verifyHas(src, items)
-end)
-
local function handleFresh(source)
local table = json.encode({
coke = 0,lsd = 0,heroin = 0,dealerrep = 0,
From 880479b435f14f5e0f827d93e8986d10211c01c2 Mon Sep 17 00:00:00 2001
From: Mustache Dom <123716453+Mustachedom@users.noreply.github.com>
Date: Fri, 5 Sep 2025 21:28:04 -0700
Subject: [PATCH 35/37] - added - piglatin - gungan - pirate - klingon -
meanieweenie - DJ
---
client/animationsandfunctions.lua | 88 ----------
client/consumables.lua | 111 +++++++++++--
client/deliveries.lua | 2 +-
client/functions.lua | 27 +--
client/lean.lua | 6 +-
client/lsd.lua | 10 ++
client/mescaline.lua | 15 +-
client/meth.lua | 6 +-
client/oxyruns.lua | 7 +-
client/shrooms.lua | 17 ++
client/weed.lua | 14 +-
client/wholesale.lua | 146 +++++++++++++----
fxmanifest.lua | 7 +-
locales/DJ.lua | 261 +++++++++++++++++++++++++++++
locales/en.lua | 11 +-
locales/gungan.lua | 262 ++++++++++++++++++++++++++++++
locales/klingon.lua | 262 ++++++++++++++++++++++++++++++
locales/meanieweenie.lua | 262 ++++++++++++++++++++++++++++++
locales/piglatin.lua | 262 ++++++++++++++++++++++++++++++
locales/pirate.lua | 262 ++++++++++++++++++++++++++++++
server/consumables.lua | 23 ++-
server/plantSpawns.lua | 18 +-
server/wholesale.lua | 172 ++++++++++++++++----
shared/config.lua | 13 +-
shared/consumables.lua | 5 -
stream/mushroom.ydr | Bin 781245 -> 0 bytes
stream/mushroom.ytyp | Bin 496 -> 0 bytes
version.txt | 3 +-
28 files changed, 2035 insertions(+), 237 deletions(-)
delete mode 100644 client/animationsandfunctions.lua
create mode 100644 locales/DJ.lua
create mode 100644 locales/gungan.lua
create mode 100644 locales/klingon.lua
create mode 100644 locales/meanieweenie.lua
create mode 100644 locales/piglatin.lua
create mode 100644 locales/pirate.lua
delete mode 100644 shared/consumables.lua
delete mode 100644 stream/mushroom.ydr
delete mode 100644 stream/mushroom.ytyp
diff --git a/client/animationsandfunctions.lua b/client/animationsandfunctions.lua
deleted file mode 100644
index 201b4b3..0000000
--- a/client/animationsandfunctions.lua
+++ /dev/null
@@ -1,88 +0,0 @@
-local started = nil
-
-function EcstasyEffect()
- local startStamina = 50
- SetFlash(0, 0, 500, 20000, 500)
- while startStamina > 0 do
- Wait(1000)
- startStamina = startStamina - 1
- RestorePlayerStamina(PlayerId(), 1.0)
- if math.random(1, 100) < 51 then
- SetFlash(0, 0, 500, 7000, 500)
- ShakeGameplayCam('SMALL_EXPLOSION_SHAKE', 0.08)
- end
- end
- if IsPedRunning(PlayerPedId()) then
- SetPedToRagdoll(PlayerPedId(), math.random(1000, 3000), math.random(1000, 3000), 3, 0, 0, 0)
- end
- startStamina = 0
-end
-
-
-function MethBagEffect()
- local startStamina = 30
- TrevorEffect()
- SetRunSprintMultiplierForPlayer(PlayerId(), 1.49)
- while startStamina > 0 do
- Wait(1000)
- if math.random(5, 100) < 10 then
- RestorePlayerStamina(PlayerId(), 1.0)
- end
- startStamina = startStamina - 1
- if math.random(5, 100) < 51 then
- TrevorEffect()
- end
- end
- startStamina = 0
- SetRunSprintMultiplierForPlayer(PlayerId(), 1.0)
-end
-
-function TrevorEffect()
- StartScreenEffect("DrugsTrevorClownsFightIn", 3.0, 0)
- Wait(3000)
- StartScreenEffect("DrugsTrevorClownsFight", 3.0, 0)
- Wait(3000)
- StartScreenEffect("DrugsTrevorClownsFightOut", 3.0, 0)
- StopScreenEffect("DrugsTrevorClownsFight")
- StopScreenEffect("DrugsTrevorClownsFightIn")
- StopScreenEffect("DrugsTrevorClownsFightOut")
-end
-
-
-function CokeBaggyEffect()
- local startStamina = 20
- local ped = PlayerPedId()
- AlienEffect()
- SetRunSprintMultiplierForPlayer(PlayerId(), 1.1)
- while startStamina > 0 do
- Wait(1000)
- if math.random(1, 100) < 20 then
- RestorePlayerStamina(PlayerId(), 1.0)
- end
- startStamina = startStamina - 1
- if math.random(1, 100) < 10 and IsPedRunning(ped) then
- SetPedToRagdoll(ped, math.random(1000, 3000), math.random(1000, 3000), 3, 0, 0, 0)
- end
- if math.random(1, 300) < 10 then
- AlienEffect()
- Wait(math.random(3000, 6000))
- end
- end
- if IsPedRunning(ped) then
- SetPedToRagdoll(ped, math.random(1000, 3000), math.random(1000, 3000), 3, 0, 0, 0)
- end
-
- startStamina = 0
- SetRunSprintMultiplierForPlayer(PlayerId(), 1.0)
-end
-
-function AlienEffect()
- StartScreenEffect("DrugsMichaelAliensFightIn", 3.0, 0)
- Wait(math.random(5000, 8000))
- StartScreenEffect("DrugsMichaelAliensFight", 3.0, 0)
- Wait(math.random(5000, 8000))
- StartScreenEffect("DrugsMichaelAliensFightOut", 3.0, 0)
- StopScreenEffect("DrugsMichaelAliensFightIn")
- StopScreenEffect("DrugsMichaelAliensFight")
- StopScreenEffect("DrugsMichaelAliensFightOut")
-end
\ No newline at end of file
diff --git a/client/consumables.lua b/client/consumables.lua
index a4340b9..889a9ab 100644
--- a/client/consumables.lua
+++ b/client/consumables.lua
@@ -1,13 +1,13 @@
ps.registerCallback('md-drugs:client:consumedrugs', function(time, effect, anim, progresstext, status, item)
- if not progressbar(progresstext .. ps.getLabel(item).. "!", time, anim ) then return end
+ if not ps.progressbar(progresstext .. ps.getLabel(item).. "!", time, anim ) then return end
for k, v in pairs (status) do
if k == 'health' then
local cur = GetEntityHealth(PlayerPedId())
SetEntityHealth(PlayerPedId(), cur + v)
- elseif k == 'thirst' or k == 'stress' or k == 'hunger' then
- TriggerServerEvent('md-drugs:server:updatestatus', k, v)
+ elseif k == 'thirst' or k == 'stress' or k == 'hunger' then
+ TriggerServerEvent('md-drugs:server:updatestatus', k, v)
elseif k == "armor" then
TriggerServerEvent('hospital:server:SetArmor', v)
TriggerServerEvent('consumables:server:useArmor')
@@ -33,28 +33,113 @@ RegisterNetEvent('md-drugs:client:recievebuff', function(type, amount)
until count == amount
SetRunSprintMultiplierForPlayer(PlayerPedId(), 1.00)
end
- if type == 'strength' then
+ if type == 'strength' then
local strength = 0
SetCurrentPedWeapon(PlayerPedId(), 'weapon_unarmed', true)
SetWeaponDamageModifier(GetHashKey("WEAPON_UNARMED"), 50.0)
repeat
strength = strength + 1
- Wait(1000)
+ Wait(1000)
until strength == amount
SetWeaponDamageModifier(GetHashKey("WEAPON_UNARMED"), 1.0)
end
end)
+local function EcstasyEffect()
+ local startStamina = 50
+ SetFlash(0, 0, 500, 20000, 500)
+ while startStamina > 0 do
+ Wait(1000)
+ startStamina = startStamina - 1
+ RestorePlayerStamina(PlayerId(), 1.0)
+ if math.random(1, 100) < 51 then
+ SetFlash(0, 0, 500, 7000, 500)
+ ShakeGameplayCam('SMALL_EXPLOSION_SHAKE', 0.08)
+ end
+ end
+ if IsPedRunning(PlayerPedId()) then
+ SetPedToRagdoll(PlayerPedId(), math.random(1000, 3000), math.random(1000, 3000), 3, 0, 0, 0)
+ end
+ startStamina = 0
+end
+
+local function TrevorEffect()
+ StartScreenEffect("DrugsTrevorClownsFightIn", 3.0, 0)
+ Wait(3000)
+ StartScreenEffect("DrugsTrevorClownsFight", 3.0, 0)
+ Wait(3000)
+ StartScreenEffect("DrugsTrevorClownsFightOut", 3.0, 0)
+ StopScreenEffect("DrugsTrevorClownsFight")
+ StopScreenEffect("DrugsTrevorClownsFightIn")
+ StopScreenEffect("DrugsTrevorClownsFightOut")
+end
+
+local function MethBagEffect()
+ local startStamina = 30
+ TrevorEffect()
+ SetRunSprintMultiplierForPlayer(PlayerId(), 1.49)
+ while startStamina > 0 do
+ Wait(1000)
+ if math.random(5, 100) < 10 then
+ RestorePlayerStamina(PlayerId(), 1.0)
+ end
+ startStamina = startStamina - 1
+ if math.random(5, 100) < 51 then
+ TrevorEffect()
+ end
+ end
+ startStamina = 0
+ SetRunSprintMultiplierForPlayer(PlayerId(), 1.0)
+end
+
+local function AlienEffect()
+ StartScreenEffect("DrugsMichaelAliensFightIn", 3.0, 0)
+ Wait(math.random(5000, 8000))
+ StartScreenEffect("DrugsMichaelAliensFight", 3.0, 0)
+ Wait(math.random(5000, 8000))
+ StartScreenEffect("DrugsMichaelAliensFightOut", 3.0, 0)
+ StopScreenEffect("DrugsMichaelAliensFightIn")
+ StopScreenEffect("DrugsMichaelAliensFight")
+ StopScreenEffect("DrugsMichaelAliensFightOut")
+end
+
+local function CokeBaggyEffect()
+ local startStamina = 20
+ local ped = PlayerPedId()
+ AlienEffect()
+ SetRunSprintMultiplierForPlayer(PlayerId(), 1.1)
+ while startStamina > 0 do
+ Wait(1000)
+ if math.random(1, 100) < 20 then
+ RestorePlayerStamina(PlayerId(), 1.0)
+ end
+ startStamina = startStamina - 1
+ if math.random(1, 100) < 10 and IsPedRunning(ped) then
+ SetPedToRagdoll(ped, math.random(1000, 3000), math.random(1000, 3000), 3, 0, 0, 0)
+ end
+ if math.random(1, 300) < 10 then
+ AlienEffect()
+ Wait(math.random(3000, 6000))
+ end
+ end
+ if IsPedRunning(ped) then
+ SetPedToRagdoll(ped, math.random(1000, 3000), math.random(1000, 3000), 3, 0, 0, 0)
+ end
+
+ startStamina = 0
+ SetRunSprintMultiplierForPlayer(PlayerId(), 1.0)
+end
+
RegisterNetEvent('md-drugs:client:applyFeeling', function(effect)
- if effect == "alien" then
- AlienEffect()
+ if effect == "alien" then
+ AlienEffect()
elseif effect == "ecstacy" then
EcstasyEffect()
- elseif effect == "meth" then
- MethBagEffect()
- elseif effect == "coke" then
- CokeBaggyEffect()
- elseif effect == "trevor" then
- TrevorEffect()
+ elseif effect == "meth" then
+ MethBagEffect()
+ elseif effect == "coke" then
+ CokeBaggyEffect()
+ elseif effect == "trevor" then
+ TrevorEffect()
end
end)
\ No newline at end of file
diff --git a/client/deliveries.lua b/client/deliveries.lua
index c1c46c6..345052f 100644
--- a/client/deliveries.lua
+++ b/client/deliveries.lua
@@ -5,7 +5,7 @@ local function SpawnDealer()
local getDealers = ps.callback('md-drugs:server:getDealers')
for k,v in pairs(getDealers) do
local Ped = "g_m_y_famdnf_01"
- ps.requestModel(Ped, Config.RequestModelTime)
+ ps.requestModel(Ped, 30000)
local loc = json.decode(v.coords)
dealer[k] = CreatePed(0, Ped,loc.x,loc.y, loc.z-1, loc.h, false, false)
Freeze(dealer[k], true, loc.h)
diff --git a/client/functions.lua b/client/functions.lua
index afd629c..54cd052 100644
--- a/client/functions.lua
+++ b/client/functions.lua
@@ -2,17 +2,6 @@
local minigametype = Config.minigametype
local dispatch = Config.Dispatch
-
-function loadParticle(dict)
- if not HasNamedPtfxAssetLoaded(dict) then
- RequestNamedPtfxAsset(dict)
- end
- while not HasNamedPtfxAssetLoaded(dict) do
- Wait(0)
- end
- SetPtfxAssetNextCall(dict)
-end
-
function minigame()
local time = 0
local game = Config.Minigames
@@ -86,23 +75,18 @@ function minigame()
Wait(1000)
time = time + 1
until successes or time == 100
- elseif minigametype == 'none' then
- return true
+ elseif minigametype == 'none' then
+ return true
else
print"^1 SCRIPT ERROR: Md-Drugs set your minigame with one of the options!"
end
-end
+end
function GetRep()
local rep = ps.callback('md-drugs:server:GetRep')
return rep
end
-
-function sorter(sorting, value)
- table.sort(sorting, function(a, b) return a[value] < b[value] end)
-end
-
function PoliceCall(chance)
local math = math.random(1,100)
if math <= chance then
@@ -150,7 +134,6 @@ function GetCops(number)
if amount >= number then return true else ps.notify('You Need '.. number - amount .. ' More Cops To Do This', 'error') end
end
-
function Freeze(entity, toggle, head)
SetEntityInvincible(entity, toggle)
SetEntityAsMissionEntity(entity, toggle, toggle)
@@ -249,10 +232,8 @@ function StartRay2()
until run == false
end
-
-
ps.registerCallback('md-drugs:client:uncuff', function(data)
- if not progressbar(data, 4000, 'uncuff') then return end
+ if not ps.progressbar(data, 4000, 'uncuff') then return end
return true
end)
diff --git a/client/lean.lua b/client/lean.lua
index 06821f8..8747d3c 100644
--- a/client/lean.lua
+++ b/client/lean.lua
@@ -11,9 +11,9 @@ local function SpawnCarPedChase()
started = true
ps.callback('md-drugs:server:RegisterLean')
- ps.requestModel("pounder", Config.RequestModelTime)
- ps.requestModel("ig_priest", Config.RequestModelTime)
- ps.requestModel("cargobob3", Config.RequestModelTime)
+ ps.requestModel("pounder", 30000)
+ ps.requestModel("ig_priest", 30000)
+ ps.requestModel("cargobob3", 30000)
local leancar = CreateVehicle("pounder", start.x+3, start.y-2, start.z-1, 52.0, true, false)
local driver = CreatePed(26, "ig_priest", start.x, start.y, start.z, 268.9422, false, false)
diff --git a/client/lsd.lua b/client/lsd.lua
index dbae717..f759566 100644
--- a/client/lsd.lua
+++ b/client/lsd.lua
@@ -2,6 +2,16 @@ local tableout = false
local dirtylsd = false
local locations = ps.callback('md-drugs:server:GetLSDLocations')
+local function loadParticle(dict)
+ if not HasNamedPtfxAssetLoaded(dict) then
+ RequestNamedPtfxAsset(dict)
+ end
+ while not HasNamedPtfxAssetLoaded(dict) do
+ Wait(0)
+ end
+ SetPtfxAssetNextCall(dict)
+end
+
local function createLabKit(coord, head)
local labkit = CreateObject("v_ret_ml_tablea", coord.x, coord.y, coord.z - 1, true, false)
SetEntityHeading(labkit, head)
diff --git a/client/mescaline.lua b/client/mescaline.lua
index ceb172d..5f5838e 100644
--- a/client/mescaline.lua
+++ b/client/mescaline.lua
@@ -1,4 +1,17 @@
local locations = ps.callback('md-drugs:server:GetMescalineLocs')
+local badTrip = 20
+local function AlienEffect()
+ StartScreenEffect("DrugsMichaelAliensFightIn", 3.0, 0)
+ Wait(math.random(5000, 8000))
+ StartScreenEffect("DrugsMichaelAliensFight", 3.0, 0)
+ Wait(math.random(5000, 8000))
+ StartScreenEffect("DrugsMichaelAliensFightOut", 3.0, 0)
+ StopScreenEffect("DrugsMichaelAliensFightIn")
+ StopScreenEffect("DrugsMichaelAliensFight")
+ StopScreenEffect("DrugsMichaelAliensFightOut")
+end
+
+
for k, v in pairs (locations.DryOutMescaline) do
ps.boxTarget('dryoutMesc'..k, v.loc, {length = v.l, width = v.w, height = 1.0, rotation = v.rot}, {
{
@@ -25,7 +38,7 @@ RegisterNetEvent("md-drugs:client:takemescaline", function()
local weapon = ''
if chance2 == 100 then weapon = 'weapon_rpg' else weapon = 'weapon_flaregun' end
if not ps.progressbar(ps.lang('mescaline.eat'), 4000, 'uncuff') then return end
- if chance <= Config.Badtrip then
+ if chance <= badTrip then
AlienEffect()
local clone = ClonePed(PlayerPedId(), false, false, true)
SetEntityAsMissionEntity(clone)
diff --git a/client/meth.lua b/client/meth.lua
index 50093ec..712ce44 100644
--- a/client/meth.lua
+++ b/client/meth.lua
@@ -16,9 +16,9 @@ local function SpawnMethCarPedChase()
startedmeth = true
ps.callback('md-drugs:server:registerMeth')
- ps.requestModel("journey", Config.RequestModelTime)
- ps.requestModel("a_m_m_hillbilly_02", Config.RequestModelTime)
- ps.requestModel("cargobob3", Config.RequestModelTime)
+ ps.requestModel("journey", 30000)
+ ps.requestModel("a_m_m_hillbilly_02", 30000)
+ ps.requestModel("cargobob3", 30000)
local methcar = CreateVehicle("journey", start.x+3, start.y-2, start.z-1, 52.0, true, false)
local methdriver = CreatePed(26, "a_m_m_hillbilly_02", start.x, start.y, start.z, 268.9422, false, false)
diff --git a/client/oxyruns.lua b/client/oxyruns.lua
index 062fc55..294f41c 100644
--- a/client/oxyruns.lua
+++ b/client/oxyruns.lua
@@ -1,6 +1,7 @@
local carryPackage = nil
local onMission = false
local locations = ps.callback('md-drugs:server:GetOxyLocs')
+local pdAlert = 90
local function getRoute()
local Route = ps.callback('md-drugs:server:getRoute')
@@ -11,7 +12,7 @@ local function getRoute()
end
SetNewWaypoint(Route.x, Route.y)
- ps.requestModel('g_m_y_famdnf_01', Config.RequestModelTime)
+ ps.requestModel('g_m_y_famdnf_01', 30000)
local oxybuyer = CreatePed(0, 'g_m_y_famdnf_01',Route.x,Route.y,Route.z-1, Route.w, false, false)
Freeze(oxybuyer, true, Route.w)
local timeOut = 300
@@ -21,7 +22,7 @@ local function getRoute()
timeOut = timeOut - 1
until #(GetEntityCoords(PlayerPedId()) - vector3(Route.x,Route.y,Route.z)) < 5.0 or timeOut == 0
- PoliceCall(Config.PoliceAlertOxy)
+ PoliceCall(pdAlert)
ps.entityTarget(oxybuyer,{
{
label = ps.lang('oxy.targetHandoff'),
@@ -49,7 +50,7 @@ for k, v in pairs(locations.OxyPayForTruck) do
icon = 'fa-solid fa-truck-fast',
label = ps.lang('oxy.targetPay'),
action = function()
- ps.requestModel("burrito3", Config.RequestModelTime)
+ ps.requestModel("burrito3", 30000)
local paid = ps.callback('md-drugs:server:payfortruck', false)
if not paid then return end
diff --git a/client/shrooms.lua b/client/shrooms.lua
index e8c0622..b05806d 100644
--- a/client/shrooms.lua
+++ b/client/shrooms.lua
@@ -1,3 +1,20 @@
+local function EcstasyEffect()
+ local startStamina = 50
+ SetFlash(0, 0, 500, 20000, 500)
+ while startStamina > 0 do
+ Wait(1000)
+ startStamina = startStamina - 1
+ RestorePlayerStamina(PlayerId(), 1.0)
+ if math.random(1, 100) < 51 then
+ SetFlash(0, 0, 500, 7000, 500)
+ ShakeGameplayCam('SMALL_EXPLOSION_SHAKE', 0.08)
+ end
+ end
+ if IsPedRunning(PlayerPedId()) then
+ SetPedToRagdoll(PlayerPedId(), math.random(1000, 3000), math.random(1000, 3000), 3, 0, 0, 0)
+ end
+ startStamina = 0
+end
ps.registerCallback("md-drugs:client:shrooms", function()
if not ps.progressbar(ps.lang('shrooms.eat'), 5000, 'eat') then return end
diff --git a/client/weed.lua b/client/weed.lua
index c33ef4d..c8d56b5 100644
--- a/client/weed.lua
+++ b/client/weed.lua
@@ -65,9 +65,19 @@ CreateThread(function()
RefreshInterior(BikerWeedFarm.interiorId)
end)
+local function AlienEffect()
+ StartScreenEffect("DrugsMichaelAliensFightIn", 3.0, 0)
+ Wait(math.random(5000, 8000))
+ StartScreenEffect("DrugsMichaelAliensFight", 3.0, 0)
+ Wait(math.random(5000, 8000))
+ StartScreenEffect("DrugsMichaelAliensFightOut", 3.0, 0)
+ StopScreenEffect("DrugsMichaelAliensFightIn")
+ StopScreenEffect("DrugsMichaelAliensFight")
+ StopScreenEffect("DrugsMichaelAliensFightOut")
+end
+
RegisterNetEvent("md-drugs:client:dodabs", function()
if not ps.progressbar(ps.lang('weed.dabs'), 4000, 'bong2') then AlienEffect() return end
- AlienEffect()
end)
local function createBluntOptions(contextId, contextTitle, eventLabelPrefix, tableName)
@@ -89,7 +99,7 @@ local function createBluntOptions(contextId, contextTitle, eventLabelPrefix, tab
end
}
end
- sorter(options, 'title')
+ ps.sorter(options, 'title')
ps.menu(contextTitle, contextTitle, options)
end
diff --git a/client/wholesale.lua b/client/wholesale.lua
index c76bb0e..e3ec4d5 100644
--- a/client/wholesale.lua
+++ b/client/wholesale.lua
@@ -1,27 +1,77 @@
local miss = false
-local function SetUpPeds()
- AddRelationshipGroup('setups')
- local ped = GetEntityCoords(PlayerPedId())
- local peds = {
- {x = ped.x+3, y = ped.y-5, z = ped.z-1, },
- {x = ped.x+6, y = ped.y-10, z = ped.z-1,},
- {x = ped.x+-2,y = ped.y+5, z = ped.z-1,},
- {x = ped.x+8, y = ped.y-12, z = ped.z-1,},
- {x = ped.x+5, y = ped.y-2, z = ped.z-1, },
- {x = ped.x+2, y = ped.y-20, z = ped.z-1,},
- {x = ped.x+1, y = ped.y-10, z = ped.z-1,},
- }
- for i = 1, #peds do
- local k = peds[i]
- i = CreatePed(0, "g_m_y_famdnf_01", k.x, k.y, k.z, 90.0, true, true)
- SetPedRelationshipGroupHash(i, 'setups')
- GiveWeaponToPed(i, "weapon_pistol", 1, false, true)
- TaskCombatPed(i, PlayerPedId(), 0, 16)
- SetPedCombatAttributes(i, 46, true)
- end
+local settings = ps.callback('md-drugs:server:GetWSsettings')
+
+function SetUpPeds(drugCount)
+ local attackerCount = settings.WholesaleAmbushBase
+ if settings.WholesaleAmbushScale then
+ if drugCount > settings.WholesaleAmbushTier1 then
+ attackerCount = 3
+ end
+ if drugCount > settings.WholesaleAmbushTier2 then
+ attackerCount = 4
+ end
+ if drugCount > settings.WholesaleAmbushTier3 then
+ attackerCount = 5
+ end
+ end
+ local weaponTier = settings.WholesaleWeaponsTier1
+ if settings.WholesaleWeaponTiers then
+ if drugCount > settings.WholesaleAmbushTier3 then
+ weaponTier = settings.WholesaleWeaponsTier4
+ elseif drugCount > settings.WholesaleAmbushTier2 then
+ weaponTier = settings.WholesaleWeaponsTier3
+ elseif drugCount > settings.WholesaleAmbushTier1 then
+ weaponTier = settings.WholesaleWeaponsTier2
+ end
+ end
+ local playerPed = PlayerPedId()
+ local playerCoords = GetEntityCoords(playerPed, false)
+ local models = {"g_m_y_ballasout_01", "g_m_y_famdnf_01", "g_m_y_famca_01", "g_m_y_mexgoon_01", "g_m_y_salvagoon_01"}
+ for i = 1, attackerCount do
+ local angle = (360 / attackerCount) * i
+ local x = playerCoords.x + math.cos(math.rad(angle)) * 15
+ local y = playerCoords.y + math.sin(math.rad(angle)) * 15
+ local z = playerCoords.z
+ local modelHash = GetHashKey(models[math.random(1, #models)])
+ ps.requestModel(modelHash)
+ local ped = CreatePed(4, modelHash, x, y, z, 0.0, true, false)
+ local weapon = weaponTier[math.random(1, #weaponTier)]
+ SetPedRelationshipGroupHash(ped, GetHashKey("HATES_PLAYER"))
+ SetPedCombatAttributes(ped, 46, true)
+ SetPedCombatAttributes(ped, 0, true)
+ SetPedCombatAttributes(ped, 5, true)
+ SetPedCombatAttributes(ped, 2, true)
+ local healthMultiplier = 1.0
+ if drugCount > settings.WholesaleAmbushTier3 then
+ healthMultiplier = 1.5
+ elseif drugCount > settings.WholesaleAmbushTier2 then
+ healthMultiplier = 1.3
+ elseif drugCount > settings.WholesaleAmbushTier1 then
+ healthMultiplier = 1.2
+ end
+ local baseHealth = GetEntityHealth(ped)
+ SetEntityHealth(ped, math.floor(baseHealth * healthMultiplier))
+ GiveWeaponToPed(ped, GetHashKey(weapon), 500, false, true)
+ TaskCombatPed(ped, playerPed, 0, 16)
+ local blip = AddBlipForEntity(ped)
+ SetBlipAsShortRange(blip, true)
+ SetBlipColour(blip, 1)
+ SetBlipScale(blip, 0.7)
+ SetEntityAsNoLongerNeeded(ped)
+ end
+ local tierName = "Basic"
+ if drugCount > settings.WholesaleAmbushTier3 then
+ tierName = "Elite"
+ elseif drugCount > settings.WholesaleAmbushTier2 then
+ tierName = "Advanced"
+ elseif drugCount > settings.WholesaleAmbushTier1 then
+ tierName = "Medium"
+ end
+ ps.notify(string.format(ps.lang('wholesale.ambush'), attackerCount, tierName), 'error')
end
+
RegisterNetEvent("md-drugs:client:GetLocation", function(drug)
- if not GetCops(Config.PoliceCount) then return end
+ if not GetCops(settings.PoliceCount) then return end
if miss then
ps.notify(ps.lang('wholesale.alreadyWholesale'), 'error')
else
@@ -29,8 +79,25 @@ RegisterNetEvent("md-drugs:client:GetLocation", function(drug)
local timer = 0
miss = true
SetNewWaypoint(loc.x, loc.y)
- ps.requestModel("g_m_y_famdnf_01", Config.RequestModelTime)
- local drugdealer = CreatePed(0, "g_m_y_famdnf_01",loc.x,loc.y,loc.z-1, 90.0, false, false)
+ if settings.WholesaleShowEstimates and drug.count > 0 then
+ local bonusTiers = math.floor(drug.count / 10)
+ local potentialBonus = math.min(bonusTiers * settings.WholesaleQuantityBonus, settings.WholesaleMaxBonus)
+ local bonusPercent = math.floor(potentialBonus * 100)
+ local minPayout = math.floor(drug.price.min * (1 + potentialBonus))
+ local maxPayout = math.floor(drug.price.max * (1 + potentialBonus))
+ local totalMinPayout = drug.count * minPayout
+ local totalMaxPayout = drug.count * maxPayout
+ ps.notify(string.format(ps.lang('wholesale.count'), drug.count), 'info')
+ if bonusPercent > 0 then
+ ps.notify(string.format(ps.lang('wholesale.bonus'), bonusPercent), 'info')
+ end
+ ps.notify(string.format(ps.lang('wholesale.estimate'), totalMinPayout, totalMaxPayout), 'info')
+ elseif drug.count <= 0 then
+ ps.notify(ps.lang('wholesale.no_drugs'), 'error')
+ end
+ ps.requestModel("g_m_y_famdnf_01", settings.RequestModelTime)
+ local current = "g_m_y_famdnf_01"
+ local drugdealer = CreatePed(0, current,loc.x,loc.y,loc.z-1, 90.0, false, false)
FreezeEntityPosition(drugdealer, true)
SetEntityInvincible(drugdealer, true)
ps.entityTarget(drugdealer, {{
@@ -38,12 +105,21 @@ RegisterNetEvent("md-drugs:client:GetLocation", function(drug)
icon = "fas fa-eye",
action = function()
local luck = math.random(1,100)
- if luck <= Config.SuccessfulChance then
+ if luck <= settings.SuccessfulChance then
if not ps.progressbar(ps.lang('wholesale.wholesaling'), 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:SuccessSale", drug)
else
- ps.notify(ps.lang('wholesale.uhoh'), 'error')
- SetUpPeds()
+ ps.progressbar("Deal Going Bad", 4000, 'uncuff')
+ if settings.WholesaleAmbushEnabled then
+ SetUpPeds(drug.count)
+ end
+ if settings.WholesaleFailPoliceAlert > 0 then
+ local alertChance = math.random(1, 100)
+ if alertChance <= settings.WholesaleFailPoliceAlert then
+ PoliceCall(100)
+ end
+ end
+ TriggerServerEvent('md-drugs:server:CleanupWholesale')
end
Wait(3000)
DeleteEntity(drugdealer)
@@ -53,15 +129,25 @@ RegisterNetEvent("md-drugs:client:GetLocation", function(drug)
repeat
Wait(1000)
timer = timer + 1
- until #(GetEntityCoords(PlayerPedId()) - vector3(loc.x, loc.y, loc.z) ) < 4.0 or timer == Config.WholesaleTimeout + 1
- PoliceCall(Config.AlertPoliceWholesale)
- if timer <= Config.WholesaleTimeout or #(GetEntityCoords(PlayerPedId()) - vector3(loc.x, loc.y, loc.z) ) < 4.0 then
+ until #(GetEntityCoords(PlayerPedId()) - vector3(loc.x, loc.y, loc.z) ) < 4.0 or timer == settings.WholesaleTimeout + 1
+ PoliceCall(settings.AlertPoliceWholesale)
+ if timer <= settings.WholesaleTimeout or #(GetEntityCoords(PlayerPedId()) - vector3(loc.x, loc.y, loc.z) ) < 4.0 then
timer = 0
else
ps.notify(ps.lang('wholesale.tooLong'), 'error')
DeleteEntity(drugdealer)
+ TriggerServerEvent('md-drugs:server:CleanupWholesale')
+ if settings.WholesaleResetOnTimeout then
+ miss = false
+ end
end
end
end)
-
+RegisterNetEvent('md-drugs:client:WholesaleComplete', function(data)
+ local bonusText = ""
+ if data.bonus > 0 then
+ bonusText = " (+" .. data.bonus .. "% quantity bonus)"
+ end
+ ps.notify(string.format(ps.lang('wholesale.complete'), data.quantity, data.payout, bonusText), 'success')
+end)
\ No newline at end of file
diff --git a/fxmanifest.lua b/fxmanifest.lua
index b169a11..299fa07 100644
--- a/fxmanifest.lua
+++ b/fxmanifest.lua
@@ -3,10 +3,9 @@ author "mustache_dom"
description "drugs by mustache dom"
fx_version "cerulean"
game "gta5"
-version '3.9.0'
+version '4.0.0'
client_scripts {
'client/functions.lua',
- 'client/animationsandfunctions.lua',
'client/plantSpawns.lua',
'clientRun.lua',
}
@@ -25,11 +24,7 @@ shared_scripts {
lua54 'yes'
files {
- 'stream/mushroom.ytyp',
- 'stream/mushroom.ydr',
'client/**.lua',
'server/**.lua',
'locales/**.lua'
}
-
-data_file 'DLC_ITYP_REQUEST' 'stream/mushroom.ytyp'
diff --git a/locales/DJ.lua b/locales/DJ.lua
new file mode 100644
index 0000000..d791ef9
--- /dev/null
+++ b/locales/DJ.lua
@@ -0,0 +1,261 @@
+Lang = {}
+
+Lang.Catches = {
+ notIn = 'Yo! You ain’t in the right SPOT, let’s gooooo!',
+ needItems = 'Whoa! You’re missing the ESSENTIALS, come on!',
+ notEnoughMoney = 'Uh-oh! Not enough CASH, gotta grind!',
+ buySuccess = 'BOOM! You copped %s %s for $%s, YEAH!',
+ itemMissings = 'CHECK IT! You need: \n',
+ itemNeeded = 'Grab that %s, LET’S GOOOO!',
+ cooldown = 'Hold up! Chill for a sec, speed racer!',
+ invalidItem = 'Uh-uh! That ain’t sold HERE, fam!',
+ onCooldownWarn = '%s tried to run %s but cooldown, BOOM!'
+}
+
+Lang.coke = {
+ targetPick = 'GRAB that coca leaf, LET’S GO!',
+ picking = 'Snatching those leaves, wooo!',
+ targetMakePow = 'Turn it into POWDER, party time!',
+ noleaf = 'Need a leaf first, LET’S HUSTLE!',
+ makePow = 'Choppin’ leaves into POWER, YA!',
+ targetCutCoke = 'Slice that cocaine, woohoo!',
+ targetBagCoke = 'Bag it UP, fam!',
+ teleIn = 'Step into the LAB, LIGHT IT UP!',
+ teleOut = 'Exit the lab, keep it moving!',
+ needBakingSoda = 'Baking soda NEEDED, come on!',
+}
+
+Lang.Cornerselling = {
+ inVeh = 'Yo, stranger alert! Stay safe!',
+ selling = 'Flippin’ %s for $%s, CASH TIME!',
+ deny = 'NAH, PASS THAT OFFER!',
+ wait = 'Hold tight, waiting on the crowd!',
+ nodrugs = 'No stock? Get back in the game!',
+ searching = 'Scanning for buyers, keep it HYPE!',
+ targetTakeBack = 'Grab back the goods, LET’S GO!',
+ targetSell = 'Sell %s of %s for $%s, PARTY!',
+ targetDeny = 'Decline that weak offer!',
+ stopped = 'You ain’t selling? COME ON!',
+ start = 'GO show your moves, LEGEND!',
+ gotRobbed = 'Yo, you got JACKED!',
+ gotBack = 'Reclaimed the goods, YEAH!',
+ notEnough = 'Not enough stock, HUSTLE UP!',
+ comDes = 'Sell that heat on the corner, LET’S GO!',
+}
+
+Lang.crack = {
+ targetMake = 'Cook that crack, turn it UP!',
+ cook = 'Heating it up, PARTY MODE!',
+ targetBag = 'Bag it tight, woohoo!',
+ bag = 'Packing it like a BOSS!',
+}
+
+Lang.Deliveries = {
+ targetGetDel = 'Grab a delivery mission, LET’S GO!',
+ targetOpenShop = 'Open that dealer shop, LIGHT IT UP!',
+ shopHeader = 'Dealer Shop, TIME TO SHINE!',
+ targetHandOff = 'Hand off the package, PARTY TIME!',
+ delivering = 'Delivering to the dealer, let’s get it!',
+ alreadyDelivering = 'Already moving that package, nonstop!',
+ slowAf = 'TOO SLOW! PICK IT UP!',
+ newDealerHelp = {
+ help = 'Place a dealer, LIGHT IT UP!',
+ name = 'Dealer name, YO!',
+ timeMin = 'Min time, stay hyped!',
+ timeMax = 'Max time, keep moving!',
+ },
+ DealerExists = 'Dealer already in the house, BOOM!',
+ deleteDealer = {
+ help = 'Remove a dealer, let’s GOO!',
+ name = 'Dealer name, YEAH!',
+ },
+ deleteDealerSuccess = 'Dealer deleted, PARTY ON!',
+ deleteDealerFail = 'Failed? Try again, NEVER STOP!',
+}
+
+Lang.heroin = {
+ targetPick = 'Grab that heroin, LIGHT IT UP!',
+ picking = 'Picking heroin, GET IT!',
+ targetCook = 'Cook it up, TURN IT UP!',
+ pbCook = 'Cooking that fire, WOO!',
+ targetPickup = 'Pick up the lab, LET’S GO!',
+ pbPickup = 'Picking up the lab, HYPE!',
+ targetClean = 'Clean that lab, SHINE!',
+ pbClean = 'Cleaning the lab, YEAH!',
+ targetDry = 'Dry out the plant, KEEP IT MOVIN’!',
+ pbDry = 'Drying plant, PARTY MODE!',
+ targetCutHeroin = 'Cut that heroin, BOOM!',
+ pbCutHeroin = 'Cutting it smooth, YEAH!',
+ targetBuyKit = 'Buy your lab kit, GET IT!',
+ pbBuyKit = 'Buying that kit, HYPE!',
+ tableout = 'Table’s already out, LIGHT IT UP!',
+ placing = 'Placing table down, WOO!',
+ targetFill = 'Fill that syringe, LET’S GOOOO!',
+ pbFill = 'Filling up, HYPE ENERGY!',
+ hasKitAlready = 'Kit already in play, BOOM!',
+ notEnoughMoney = 'Need $%s cash, hustle up!',
+ placedKit = 'Placed your lab kit, PARTY TIME!',
+ failed = 'Failed? Shake it off, KEEP MOVIN’!',
+}
+
+Lang.lean = {
+ stealFromTruck = 'Snag the truck, GET HYPED!',
+ startMission = 'Start lean mission, LET’S GO!',
+ notOnRun = 'Not on a run yet, COME ON!',
+ alreadyChasing = 'Already chasing a truck, WOO!',
+}
+
+Lang.lsd = {
+ targetHeat = 'Heating LSD, TURN IT UP!',
+ heating = 'Heating it UP, PARTY TIME!',
+ targetRefine = 'Refine that acid, LET’S GOOOO!',
+ refining = 'Refining, keep it lit!',
+ targetDipping = 'Dip those tabs, HYPE!',
+ dipping = 'Dipping, WOO WOO!',
+ targetPickup = 'Pick up the lab kit, LET’S GO!',
+ packup = 'Packing up, PARTY MODE!',
+ targetClean = 'Clean the lab kit, LIGHT IT UP!',
+ needCleaning = 'Need the cleaning kit, COME ON!',
+ cleaning = 'Cleaning, keep it hype!',
+ targetLys = 'Steal lysergic acid, BOOM!',
+ stealLys = 'Stealing, GET IT!',
+ targetDie = 'Snag diethylamide, PARTY TIME!',
+ stealDie = 'Stealing that fire, LET’S GOOOO!',
+ targetBuyTab = 'Buy tab paper, WOO!',
+ targetBuyKit = 'Buy LSD lab kit, HYPE ENERGY!',
+ alreadyOwn = 'Already got this, BOOM!',
+ buyingKit = 'Buying kit, PARTY ON!',
+ tableout = 'Table out already, LET’S GO!',
+ placing = 'Placing down, KEEP IT LIT!',
+ failed = 'Failed? Shake it off, PARTY TIME!',
+}
+
+Lang.mesc = {
+ targetPick = 'Grab that cactus, WOO!',
+ picking = 'Picking cactus, LET’S GOOOO!',
+ targetDry = 'Dry the cactus, HYPE!',
+ dry = 'Drying cactus, PARTY MODE!',
+}
+
+Lang.meth = {
+ alreadyChasing = 'Chasing a truck already, WOO!',
+ targetStealFromCar = 'Snag the meth car, LIGHT IT UP!',
+ targetHeist = 'Start meth mission, GET HYPED!',
+ started = 'Meth’s cooking, BOOM!',
+ increaseHeat = 'Turn up the heat, PARTY TIME!',
+ targetBag = 'Bag meth, HYPE ENERGY!',
+ targetCook = 'Cook meth, LET’S GOOOO!',
+ targetGrabTray = 'Grab the tray, WOO!',
+ targetHeat = 'Adjust those dials, KEEP IT LIT!',
+ targetSmash = 'Smash the tray, BOOM!',
+ targetStealEPH = 'Steal ephedrine, GET IT!',
+ stealingEPH = 'Stealing it, PARTY ON!',
+ targetStealACE = 'Snag acetone, WOO!',
+ stealingACE = 'Stealing acetone, LET’S GOOOO!',
+ notOnRun = 'Not on a meth run, COME ON!',
+ onCooldown = 'Cooldown in effect, CHILL!',
+ teleIn = 'Step into the lab, HYPE!',
+ teleOut = 'Exit the lab, PARTY MODE!',
+}
+
+Lang.oxy = {
+ ditchCar = 'Hot van? Leave it, WOO!',
+ targetHandoff = 'Hand off the package, LET’S GO!',
+ handingoff = 'Handing it off, HYPE ENERGY!',
+ emptyHands = 'Not carrying anything, GET MOVING!',
+ targetPay = 'Rent oxy van, PARTY TIME!',
+ keys = 'Keys are in the van, BOOM!',
+ targetGetPackage = 'Grab the package, WOO!',
+ alreadyCarrying = 'Already got a package, KEEP IT LIT!',
+ paid = 'Paid $%s, LET’S GOOOO!',
+ notOn = 'Not on a route, HYPE!',
+}
+
+Lang.pharma = {
+ input = {
+ header = 'Who’s getting the prescription? LET’S GO!',
+ title1 = 'Player name, GET HYPED!',
+ title2 = 'Prescription, PARTY TIME!',
+ },
+ write = 'Writing prescription, WOO!',
+ opening = 'Opening the bottle, LIGHT IT UP!',
+ targetFill = 'Fill that prescription, HYPE!',
+ fill = 'Filling up, LET’S GOOOO!',
+ canceled = 'Canceled? Shake it off, PARTY MODE!',
+ unbottle = 'Opened the bottle, BOOM!',
+}
+
+Lang.shrooms = {
+ targetPick = 'Pick those shrooms, WOO!',
+ picking = 'Picking shrooms, LET’S GOOOO!',
+ eat = 'Eating shrooms, PARTY TIME!',
+ cancel = 'Decided not to? HYPE!',
+ took = 'You took some shrooms! LET’S GO!',
+}
+
+Lang.weed = {
+ targetPick = 'Grab that weed, WOO!',
+ picking = 'Picking weed, PARTY MODE!',
+ targetDry = 'Dry the weed, LET’S GOOOO!',
+ noDry = 'Need wet weed first, HYPE ENERGY!',
+ wait = 'Waiting for it to dry... KEEP IT LIT!',
+ take = 'Ready to take weed, BOOM!',
+ targetDryed = 'Pickup that weed, PARTY TIME!',
+ teleportIn = 'Enter the grow house, HYPE!',
+ teleportOut = 'Leave the grow house, WOO!',
+ dabs = 'Doing some dabs, LET’S GOOOO!',
+ bluntWrap = 'Dipping syrup to make %s, PARTY MODE!',
+ rollBlunt = 'Rolling a %s, BOOM!',
+ targetSales = 'Buy from dealer, HYPE!',
+ buying = 'Buying %s from dealer, WOO!',
+ itemDoesntExist = 'Item doesn’t exist here, LET’S GO!',
+ needItem = 'Need a %s for this, PARTY TIME!',
+ crackBlunt = 'Cracking open a blunt, HYPE ENERGY!',
+}
+
+Lang.wholesale = {
+ alreadyWholesale = 'Already wholesaling, WOO!',
+ targetBuyer = 'Talk to the buyer, LET’S GOOOO!',
+ wholesaling = 'Wholesaling drugs, PARTY MODE!',
+ uhoh = 'Buyer’s getting sketchy, HYPE!',
+ tooLong = 'Buyer waited too long, WOO!',
+ notEnoughCops = 'Not enough cops, KEEP IT LIT!',
+ count = 'Quantity detected: %s, BOOM!',
+ bonus = 'Quantity bonus: +%s%%, HYPE!',
+ estimate = 'Estimated payout: $%s - $%s, PARTY TIME!',
+ no_drugs = 'No drugs to sell, LET’S GOOOO!',
+ ambush = 'AMBUSH! %s attackers with %s weapons coming! WOO!',
+ complete = 'Sold %s items for $%s%s, HYPE!',
+ min_quantity = 'Gotta sell at least %s to wholesale, PARTY MODE!',
+ deal_failed_cleanup = 'Deal failed? Try again, KEEP IT LIT!',
+}
+
+Lang.xtc = {
+ alreadyOut = 'Press is out already, WOO!',
+ settingDown = 'Setting down the press, LET’S GO!',
+ noPressOut = 'No press out? HYPE!',
+ targetMake = 'Press pills, PARTY TIME!',
+ making = 'Pressing a %s, BOOM!',
+ targetPickup = 'Pick up press, HYPE!',
+ picking = 'Picking up press, LET’S GOOOO!',
+ targetStealMDP2P = 'Steal MDP2P, PARTY MODE!',
+ stealingMDP2P = 'Stealing it, WOO!',
+ fail = 'Damn dude, you suck, KEEP IT LIT!',
+ targetStealIsosafrole = 'Steal isosafrole, HYPE!',
+ stealingIsosafrole = 'Stealing it, LET’S GOOOO!',
+ targetRaw = 'Make raw XTC, PARTY TIME!',
+ makingRaw = 'Making raw XTC, WOO!',
+ getPress = 'Get the press, LET’S GOOOO!',
+ buySingle = 'Buy single press for $%s, HYPE!',
+ buyp = 'Buying press, BOOM!',
+ targetStamp = 'Stamp XTC, PARTY MODE!',
+ stamp_desc = 'Stamp %s pills, WOO!',
+ stamping = 'Stamping %s pills, LET’S GO!',
+ noPills = 'No unstamped pills? HYPE!',
+}
+
+Lang.merchant = {
+ targetOpen = 'Open merchant menu, LET’S GOOOO!',
+}
+
+return Lang
diff --git a/locales/en.lua b/locales/en.lua
index 7fa8406..6babfbd 100644
--- a/locales/en.lua
+++ b/locales/en.lua
@@ -219,7 +219,16 @@ Lang.wholesale = {
wholesaling = 'Wholesaling Drugs',
uhoh = 'The Buyer Is Getting Sketchy',
tooLong = 'The Buyer Waited Too Long',
- notEnoughCops = 'Not Enough Cops On Duty'
+ notEnoughCops = 'Not Enough Cops On Duty',
+
+ count = 'Quantity detected: %s',
+ bonus = 'Quantity bonus: +%s%%',
+ estimate = 'Estimated payout: $%s - $%s',
+ no_drugs = 'You do not have any of this drug to sell',
+ ambush = 'Ambush! %s attackers with %s weapons are approaching!',
+ complete = 'Sold %s items for $%s%s',
+ min_quantity = 'You must sell at least %s items to wholesale',
+ deal_failed_cleanup = 'Deal failed - you can try again'
}
Lang.xtc = {
diff --git a/locales/gungan.lua b/locales/gungan.lua
new file mode 100644
index 0000000..05d4839
--- /dev/null
+++ b/locales/gungan.lua
@@ -0,0 +1,262 @@
+Lang = {}
+
+Lang.Catches = {
+ notIn = 'Yousa not bein in da right place-o!',
+ needItems = 'Yousa no havin da tings needed!',
+ notEnoughMoney = 'Yousa too broke, mooey mooey!',
+ buySuccess = 'Yousa buyin %s %s for %s credits!',
+ itemMissings = 'Yousa needin dis stuff: \n',
+ itemNeeded = 'Yousa needin %s',
+ cooldown = 'Ooooh, slow down speeda racer!',
+ invalidItem = 'Dis item not bein sold here, okeeday?',
+ onCooldownWarn = '%s tryin to do da event %s \n while still on da cooldown!'
+}
+
+Lang.coke = {
+ targetPick = 'Pickin coca leafies, okeeday',
+ picking = 'Meesa pickin coca leaf',
+ targetMakePow = 'Makin da powdery stuff',
+ noleaf = 'Yousa needin a coca leaf!',
+ makePow = 'Choppin leafies into da powder',
+ targetCutCoke = 'Cutty-cut da cocaine',
+ targetBagCoke = 'Baggin da cocaine',
+ teleIn = 'Meesa goin inside da lab',
+ teleOut = 'Meesa leavin da lab',
+ needBakingSoda = 'Yousa needin bakin soda for dis, okeeday',
+}
+
+Lang.Cornerselling = {
+ inVeh = 'Stranger danger, stay outta da speeder!',
+ selling = 'Meesa sellin %s for %s credits',
+ deny = 'Nosa, meesa no likin dat offer!',
+ wait = 'Waitin for da customer to come',
+ nodrugs = 'Yousa not havin no tings to sell',
+ searching = 'Meesa lookin for customers, okeeday',
+ targetTakeBack = 'Takin back da stuff',
+ targetSell = 'Sellin %s of %s for %s credits',
+ targetDeny = 'Sayin nosa to da offer',
+ stopped = 'Yousa too lazy, can’t even sell nuttin!',
+ start = 'Go make yo mama proud, okeeday!',
+ gotRobbed = 'Yousa got robbed, mooey mooey!',
+ gotBack = 'Yousa gots yo tings back!',
+ notEnough = 'Yousa no havin enough of dis item',
+ comDes = 'Sellin da tings on da corner',
+}
+
+Lang.crack = {
+ targetMake = 'Cookin da cracky-crack',
+ cook = 'Meesa cookin crack',
+ targetBag = 'Baggin da crack',
+ bag = 'Meesa baggin crack',
+}
+
+Lang.Deliveries = {
+ targetGetDel = 'Gettin da deliver mission',
+ targetOpenShop = 'Openin da dealer shop',
+ shopHeader = 'Dealer shop, okeeday',
+ targetHandOff = 'Handin da package to da dealer',
+ delivering = 'Meesa givin da package to da drug dealer',
+ alreadyDelivering = 'Yousa already doin a delivery, okeeday',
+ slowAf = 'Yousa too slow, oh no!',
+ newDealerHelp = {
+ help = 'Placina dealer',
+ name = 'Dealer name',
+ timeMin = 'Da minimum time',
+ timeMax = 'Da maximum time',
+ },
+ DealerExists = 'Dis dealer already existin!',
+ deleteDealer = {
+ help = 'Deletin a dealer',
+ name = 'Dealer name',
+ },
+ deleteDealerSuccess = 'Meesa deletin da dealer!',
+ deleteDealerFail = 'Nosa! Failed deletin da dealer!',
+}
+
+Lang.heroin = {
+ targetPick = 'Pickin da heroin plant',
+ picking = 'Meesa pickin da heroin',
+ targetCook = 'Cookin da heroin',
+ pbCook = 'Meesa cookin heroin up',
+ targetPickup = 'Pickin up da lab',
+ pbPickup = 'Meesa pickin up lab',
+ targetClean = 'Cleanin da lab',
+ pbClean = 'Meesa cleanin da lab',
+ targetDry = 'Dryin da plant',
+ pbDry = 'Meesa dryin out plant',
+ targetCutHeroin = 'Cuttin heroin',
+ pbCutHeroin = 'Meesa cuttin heroin',
+ targetBuyKit = 'Buyin da heroin kit',
+ pbBuyKit = 'Meesa buyin da heroin kit',
+ tableout = 'Yousa already havin a table out!',
+ placing = 'Placin down table',
+ targetFill = 'Fillin syringe',
+ pbFill = 'Meesa fillin syringe',
+ hasKitAlready = 'Yousa already havin a kit',
+ notEnoughMoney = 'Yousa needin %s credits for dis',
+ placedKit = 'Yousa placed down da kit',
+ failed = 'Oh no! Yousa fail makin heroin, lost all da stuff!',
+}
+
+Lang.lean = {
+ stealFromTruck = 'Stealin from da truck',
+ startMission = 'Startin lean mission',
+ notOnRun = 'Yousa not on no lean run',
+ alreadyChasing = 'Yousa already chasin a truck!',
+}
+
+Lang.lsd = {
+ targetHeat = 'Heat up da LSD',
+ heating = 'Meesa heating da LSD',
+ targetRefine = 'Refine da acid',
+ refining = 'Refinin da acid',
+ targetDipping = 'Dippin tabs',
+ dipping = 'Meesa dippin tabs',
+ targetPickup = 'Pickin up da lab kit',
+ packup = 'Packin da lab kit',
+ targetClean = 'Cleanin da lab kit',
+ needCleaning = 'Yousa needin a cleanin kit',
+ cleaning = 'Meesa cleanin lab kit',
+ targetLys = 'Stealin lysergic acid',
+ stealLys = 'Meesa stealin da acid',
+ targetDie = 'Stealin diethylamide',
+ stealDie = 'Meesa stealin da diethylamide',
+ targetBuyTab = 'Buyin da tab paper',
+ targetBuyKit = 'Buyin da LSD kit',
+ alreadyOwn = 'Yousa already havin dis ting',
+ buyingKit = 'Meesa buyin da LSD kit',
+ tableout = 'Yousa already havin table out!',
+ placing = 'Placin da kit down!',
+ failed = 'Yousa suck makin da drugs, okeeday',
+}
+
+Lang.mesc = {
+ targetPick = 'Pickin cactus',
+ picking = 'Meesa pickin cactus',
+ targetDry = 'Dryin cactus',
+ dry = 'Meesa dryin cactus',
+}
+
+Lang.meth = {
+ alreadyChasing = 'Yousa already chasin da truck',
+ targetStealFromCar = 'Stealin from meth car',
+ targetHeist = 'Startin meth mission',
+ started = 'Yousa already cookin meth',
+ increaseHeat = 'Yousa increasin da heat',
+ targetBag = 'Baggin meth',
+ targetCook = 'Cookin meth',
+ targetGrabTray = 'Grabbin da tray',
+ targetHeat = 'Adjustin da dials',
+ targetSmash = 'Smashin da tray',
+ targetStealEPH = 'Stealin ephedrine',
+ stealingEPH = 'Meesa stealin ephedrine',
+ targetStealACE = 'Stealin acetone',
+ stealingACE = 'Meesa stealin acetone',
+ notOnRun = 'Yousa not on no meth run',
+ onCooldown = 'Yousa bein on cooldown!',
+ teleIn = 'Enterin da lab',
+ teleOut = 'Leavin da lab',
+}
+
+Lang.oxy = {
+ ditchCar = 'Dis van hot! Yousa leave it somewhere',
+ targetHandoff = 'Handin da package',
+ handingoff = 'Meesa handin off da package',
+ emptyHands = 'Yousa no carryin nuttin',
+ targetPay = 'Rentin oxy van',
+ keys = 'Da keys in da van',
+ targetGetPackage = 'Grabbin da package',
+ alreadyCarrying = 'Yousa already carryin package',
+ paid = 'Yousa payin %s credits to rent van',
+ notOn = 'Yousa not on no route',
+}
+
+Lang.pharma = {
+ input = {
+ header = 'Who meesa givin da prescription to?',
+ title1 = 'Da player name',
+ title2 = 'Prescription',
+ },
+ write = 'Meesa writin prescription',
+ opening = 'Openin da bottle',
+ targetFill = 'Fillin prescription',
+ fill = 'Meesa fillin prescription',
+ canceled = 'Yousa cancel da prescription',
+ unbottle = 'Meesa openin da bottle',
+}
+
+Lang.shrooms = {
+ targetPick = 'Pickin shroomies',
+ picking = 'Meesa pickin shrooms',
+ eat = 'Meesa eatin shrooms',
+ cancel = 'Nosa, no doin da shrooms',
+ took = 'Yousa takin da shrooms!',
+}
+
+Lang.weed = {
+ targetPick = 'Pickin da weed',
+ picking = 'Meesa pickin weed',
+ targetDry = 'Dryin da weed',
+ noDry = 'Yousa needin da wet weed',
+ wait = 'Waitin for da weed to dry, okeeday',
+ take = 'Ready to take weed!',
+ targetDryed = 'Pickin up da dry weed',
+ teleportIn = 'Meesa goin in da grow house',
+ teleportOut = 'Meesa leavin da grow house',
+ dabs = 'Meesa doin da dabs',
+ bluntWrap = 'Dippin syrup makin %s',
+ rollBlunt = 'Rollin a %s',
+ targetSales = 'Buyin from da dealer',
+ buying = 'Meesa buyin %s from dealer',
+ itemDoesntExist = 'Nosa, dis ting no exist here',
+ needItem = 'Yousa needin %s for dis',
+ crackBlunt = 'Crackin open da blunt',
+}
+
+Lang.wholesale = {
+ alreadyWholesale = 'Yousa already wholesalin!',
+ targetBuyer = 'Talkin to da buyer',
+ wholesaling = 'Meesa wholesalin da drugs',
+ uhoh = 'Buyer gettin all sketchy, uh oh!',
+ tooLong = 'Buyer waitin too long!',
+ notEnoughCops = 'Nosa! Not enough cops here',
+
+ count = 'Quantity detected: %s',
+ bonus = 'Quantity bonus: +%s%%',
+ estimate = 'Estimated payout: %s - %s credits',
+ no_drugs = 'Yousa not havin dis ting to sell',
+ ambush = 'Ambush! %s attackers wit %s weapons comin!',
+ complete = 'Sold %s items for %s credits%s',
+ min_quantity = 'Yousa must be sellin at least %s',
+ deal_failed_cleanup = 'Deal failed, yousa tryin again',
+}
+
+Lang.xtc = {
+ alreadyOut = 'Yousa already havin da press out',
+ settingDown = 'Placin down da press',
+ noPressOut = 'Yousa no havin no press out',
+ targetMake = 'Pressin da pills',
+ making = 'Pressin a %s pill',
+ targetPickup = 'Pickin up da press',
+ picking = 'Meesa pickin up da press',
+ targetStealMDP2P = 'Stealin MDP2P',
+ stealingMDP2P = 'Meesa stealin MDP2P',
+ fail = 'Nosa! Yousa fail dis ting!',
+ targetStealIsosafrole = 'Stealin isosafrole',
+ stealingIsosafrole = 'Meesa stealin isosafrole',
+ targetRaw = 'Makin raw XTC',
+ makingRaw = 'Meesa makin raw XTC',
+ getPress = 'Gettin da press',
+ buySingle = 'Buyin one press for %s credits',
+ buyp = 'Meesa buyin press',
+ targetStamp = 'Stampin da XTC',
+ stamp_desc = 'Stampin %s pills',
+ stamping = 'Stampin %s pills',
+ noPills = 'Yousa not havin no pills to stamp',
+}
+
+Lang.merchant = {
+ targetOpen = 'Openin da merchant menu',
+}
+
+return Lang
diff --git a/locales/klingon.lua b/locales/klingon.lua
new file mode 100644
index 0000000..78f3e20
--- /dev/null
+++ b/locales/klingon.lua
@@ -0,0 +1,262 @@
+Lang = {}
+
+Lang.Catches = {
+ notIn = 'bIvumtaHbe’ Daq lughDaq',
+ needItems = 'Dochmey lugh DaHutlh',
+ notEnoughMoney = 'HuchlIj machqu’',
+ buySuccess = 'DaSuqta’ %s %s chenmoHmeH $%s',
+ itemMissings = 'DaHutlh Dochmey \n',
+ itemNeeded = 'DaHutlh %s',
+ cooldown = 'yIyep! nomqu’ bIvum',
+ invalidItem = 'Dochvam naDbe’ SuvwI’',
+ onCooldownWarn = '%s tay’mo’ nIDta’ %s ghu’vamDaq (cooldown)'
+}
+
+Lang.coke = {
+ targetPick = 'coca tI’ jon',
+ picking = 'coca tI’ lupung',
+ targetMakePow = 'cocaine hach',
+ noleaf = 'coca tI’ DaHutlh',
+ makePow = 'tI’ QorwI’powDaq rurchu’',
+ targetCutCoke = 'cocaine polHa’',
+ targetBagCoke = 'cocaine pochHa’',
+ teleIn = 'labDaq yI’el',
+ teleOut = 'labvo’ yImej',
+ needBakingSoda = 'DochvamvaD baking soda DaHutlh'
+}
+
+Lang.Cornerselling = {
+ inVeh = 'nov vIQoy!',
+ selling = '%s DajonmeH $%s',
+ deny = 'Qo’! bIDoH',
+ wait = 'lojmItDaq lojmIt',
+ nodrugs = 'Dochmey Hutlh',
+ searching = 'nuvmey SamtaH',
+ targetTakeBack = 'DochmeylIj cheghmoH',
+ targetSell = '%s Doch %s jonmeH $%s',
+ targetDeny = 'Qoch',
+ stopped = 'bIQongmo’ bIjonlaHbe’',
+ start = 'SoSlI’ quvmoH!',
+ gotRobbed = 'DochmeylIj jonlu’!',
+ gotBack = 'DochmeylIj Daja’chu’ta’',
+ notEnough = 'Dochvam machqu’ Daghaj',
+ comDes = 'lojmItDaq Dochmey jon'
+}
+
+Lang.crack = {
+ targetMake = 'crack vuv',
+ cook = 'crack vuvtaH',
+ targetBag = 'crack pochHa’',
+ bag = 'crack pochHa’taH'
+}
+
+Lang.Deliveries = {
+ targetGetDel = 'ngoq Qu’ Hev',
+ targetOpenShop = 'dealer mIch poSmoH',
+ shopHeader = 'dealer mIch',
+ targetHandOff = 'paket nob',
+ delivering = 'paket nobtaH',
+ alreadyDelivering = 'paket naQ DInobtaH',
+ slowAf = 'tughqu’ bIvum!',
+ newDealerHelp = {
+ help = 'dealer ghoS',
+ name = 'dealer pong',
+ timeMin = 'poHHom puS',
+ timeMax = 'poHHom nI’'
+ },
+ DealerExists = 'dealer tu’lu already',
+ deleteDealer = {
+ help = 'dealer qIl',
+ name = 'dealer pong',
+ },
+ deleteDealerSuccess = 'dealer qIlta’',
+ deleteDealerFail = 'dealer qIlHa’'
+}
+
+Lang.heroin = {
+ targetPick = 'heroin tI’ jon',
+ picking = 'heroin tI’ lupung',
+ targetCook = 'heroin vuv',
+ pbCook = 'heroin vuvtaH',
+ targetPickup = 'lab lupung',
+ pbPickup = 'lab lupungtaH',
+ targetClean = 'lab Say’moH',
+ pbClean = 'lab Say’moHtaH',
+ targetDry = 'tI’ mach puv',
+ pbDry = 'tI’ mach puvtaH',
+ targetCutHeroin = 'heroin polHa’',
+ pbCutHeroin = 'heroin polHa’taH',
+ targetBuyKit = 'heroin lab jan je’',
+ pbBuyKit = 'heroin lab jan je’taH',
+ tableout = 'raS SoHtaH already',
+ placing = 'raS lanlu’taH',
+ targetFill = 'syringe teblI’',
+ pbFill = 'syringe teblI’taH',
+ hasKitAlready = 'lab jan DaHutlh already',
+ notEnoughMoney = 'DochvamvaD $%s Huch DaHutlh',
+ placedKit = 'lab jan Dalanpu’',
+ failed = 'heroin QapHa’pu’, DochmeylIj lujpu’'
+}
+
+Lang.lean = {
+ stealFromTruck = 'rutlhDaq Doch jon',
+ startMission = 'lean Qu’ tagh',
+ notOnRun = 'lean Qu’ Daghajbe’',
+ alreadyChasing = 'rutlh Daq DajachtaH already'
+}
+
+Lang.lsd = {
+ targetHeat = 'LSD tujmoH',
+ heating = 'LSD tujtaH',
+ targetRefine = 'acid tetlh',
+ refining = 'acid tetlhtaH',
+ targetDipping = 'tabDaq tlhap',
+ dipping = 'tabDaq tlhaptaH',
+ targetPickup = 'lab jan lupung',
+ packup = 'lab jan nItebHa’moH',
+ targetClean = 'lab jan Say’moH',
+ needCleaning = 'Say’meH jan DaHutlh',
+ cleaning = 'lab jan Say’moHtaH',
+ targetLys = 'lysergic acid jon',
+ stealLys = 'lysergic acid jonlu’taH',
+ targetDie = 'diethylamide jon',
+ stealDie = 'diethylamide jonlu’taH',
+ targetBuyTab = 'tab nav je’',
+ targetBuyKit = 'LSD lab jan je’',
+ alreadyOwn = 'Dochvam Daghaj already',
+ buyingKit = 'lab jan je’taH',
+ tableout = 'raS SoHtaH already',
+ placing = 'lab jan lanlu’taH',
+ failed = 'bIQapbe’! bIjonHa’pu’'
+}
+
+Lang.mesc = {
+ targetPick = 'cactus jon',
+ picking = 'cactus jonlu’taH',
+ targetDry = 'cactus puv',
+ dry = 'cactus puvtaH'
+}
+
+Lang.meth = {
+ alreadyChasing = 'rutlh Daq DajachtaH already',
+ targetStealFromCar = 'meth car jon',
+ targetHeist = 'meth Qu’ tagh',
+ started = 'meth vuvtaH already',
+ increaseHeat = 'tuj nIbtaH',
+ targetBag = 'meth pochHa’',
+ targetCook = 'meth vuv',
+ targetGrabTray = 'meth tray lupung',
+ targetHeat = 'Dial tu’Qom',
+ targetSmash = 'tray Qop',
+ targetStealEPH = 'ephedrine jon',
+ stealingEPH = 'ephedrine jonlu’taH',
+ targetStealACE = 'acetone jon',
+ stealingACE = 'acetone jonlu’taH',
+ notOnRun = 'meth Qu’ Daghajbe’',
+ onCooldown = 'DaH bIQutlh',
+ teleIn = 'labDaq yI’el',
+ teleOut = 'labvo’ yImej'
+}
+
+Lang.oxy = {
+ ditchCar = 'rutlh QIHmoH, pa’ lan',
+ targetHandoff = 'paket nob',
+ handingoff = 'paket nobtaH',
+ emptyHands = 'Doch Daghajbe’',
+ targetPay = 'oxy rutlh rent',
+ keys = 'rutlh QI’meyDaq chaHtaH',
+ targetGetPackage = 'paket lupung',
+ alreadyCarrying = 'paket Daghaj already',
+ paid = 'DaSuqta’ $%s rutlh rentmeH',
+ notOn = 'rutlh Heghajbe’'
+}
+
+Lang.pharma = {
+ input = {
+ header = 'SoHvaD prescription noblu’ ’Iv?',
+ title1 = 'nuv pong',
+ title2 = 'prescription',
+ },
+ write = 'prescription ghItlh',
+ opening = 'bottle poSmoH',
+ targetFill = 'prescription teblI’',
+ fill = 'prescription teblI’taH',
+ canceled = 'prescription DaqIlHa’',
+ unbottle = 'bottle DaPoSmoHta’'
+}
+
+Lang.shrooms = {
+ targetPick = 'mushroom jon',
+ picking = 'mushroom jonlu’taH',
+ eat = 'mushroom Sop',
+ cancel = 'mushroom Sopbe’',
+ took = 'mushroom Daje’pu’'
+}
+
+Lang.weed = {
+ targetPick = 'weed jon',
+ picking = 'weed jonlu’taH',
+ targetDry = 'weed puv',
+ noDry = 'weed bIQ puv DaHutlh',
+ wait = 'weed puv lurgh',
+ take = 'weed lupunglaH',
+ targetDryed = 'weed lupung',
+ teleportIn = 'grow house yI’el',
+ teleportOut = 'grow house yImej',
+ dabs = 'dab Qap',
+ bluntWrap = '%s chenmoHmeH syrup Dap',
+ rollBlunt = '%s QorwI’ roll',
+ targetSales = 'dealervo’ je’',
+ buying = '%s dealervo’ DaSuq',
+ itemDoesntExist = 'Dochvam tu’lu’be’',
+ needItem = 'DochvamvaD %s DaHutlh',
+ crackBlunt = 'blunt Qop'
+}
+
+Lang.wholesale = {
+ alreadyWholesale = 'wholesale naQ already',
+ targetBuyer = 'buyer tlhoch',
+ wholesaling = 'wholesale Qap',
+ uhoh = 'buyer vItlhutlh',
+ tooLong = 'buyer loS nI’qu’',
+ notEnoughCops = 'cop puSqu’',
+
+ count = 'Dochmey mI’: %s',
+ bonus = 'mI’ bonus: +%s%%',
+ estimate = 'payout SeH: $%s - $%s',
+ no_drugs = 'Dochvam Daghajbe’',
+ ambush = 'jonlu’! %s jagh %s nuH lulo’taH',
+ complete = '%s Dochmey jonlu’ $%s%s',
+ min_quantity = 'Dochmey %s puS naQ jonlaH',
+ deal_failed_cleanup = 'jonHa’pu’ – wa’logh nIDlaH'
+}
+
+Lang.xtc = {
+ alreadyOut = 'press SoHtaH already',
+ settingDown = 'press lanlu’taH',
+ noPressOut = 'press Daghajbe’',
+ targetMake = 'pill QorwI’',
+ making = '%s QorwI’taH',
+ targetPickup = 'press lupung',
+ picking = 'press lupungtaH',
+ targetStealMDP2P = 'MDP2P jon',
+ stealingMDP2P = 'MDP2P jonlu’taH',
+ fail = 'QapHa’pu’! bIjatlhHa’',
+ targetStealIsosafrole = 'isosafrole jon',
+ stealingIsosafrole = 'isosafrole jonlu’taH',
+ targetRaw = 'XTC raw chenmoH',
+ makingRaw = 'XTC raw chenmoHtaH',
+ getPress = 'press Suq',
+ buySingle = 'wa’ press je’ $%s',
+ buyp = 'press je’taH',
+ targetStamp = 'XTC maq',
+ stamp_desc = '%s pill maq',
+ stamping = '%s pill maqtaH',
+ noPills = 'pill unstamped Daghajbe’'
+}
+
+Lang.merchant = {
+ targetOpen = 'merchant mIch poSmoH',
+}
+
+return Lang
diff --git a/locales/meanieweenie.lua b/locales/meanieweenie.lua
new file mode 100644
index 0000000..c5d08a3
--- /dev/null
+++ b/locales/meanieweenie.lua
@@ -0,0 +1,262 @@
+Lang = {}
+
+Lang.Catches = {
+ notIn = 'Oi, you ain’t in the damn right spot',
+ needItems = 'You don’t even have the shit you need',
+ notEnoughMoney = 'You’re too broke, loser',
+ buySuccess = 'Finally bought %s %s for $%s, smartass',
+ itemMissings = 'You need this crap: \n',
+ itemNeeded = 'Get your hands on %s, idiot',
+ cooldown = 'Slow your ass down, speed freak',
+ invalidItem = 'This crap ain’t sold here, dumbfuck',
+ onCooldownWarn = '%s tried to run %s while on cooldown, lol'
+}
+
+Lang.coke = {
+ targetPick = 'Grab that coke leaf, lazy ass',
+ picking = 'Picking the damn leaf',
+ targetMakePow = 'Whip up some cocaine powder',
+ noleaf = 'No leaf? Can’t make shit, genius',
+ makePow = 'Chop those leaves into powder, dumbass',
+ targetCutCoke = 'Cut the damn cocaine',
+ targetBagCoke = 'Bag that shit up',
+ teleIn = 'Step into the lab, dipshit',
+ teleOut = 'Get out of the lab, moron',
+ needBakingSoda = 'You need baking soda for this, noob',
+}
+
+Lang.Cornerselling = {
+ inVeh = 'Get out, stranger danger!',
+ selling = 'Selling %s for $%s, cha-ching',
+ deny = 'Hell no, fuck that offer',
+ wait = 'Stand around waiting for a sucker',
+ nodrugs = 'You got no drugs to sell, dumbfuck',
+ searching = 'Scoping for nearby marks',
+ targetTakeBack = 'Take back that crap',
+ targetSell = 'Sell %s of %s for $%s, duh',
+ targetDeny = 'Reject the pathetic offer',
+ stopped = 'Lazy piece of shit can’t sell for shit!',
+ start = 'Go make your mom proud, loser',
+ gotRobbed = 'You got jacked, nerd!',
+ gotBack = 'You got your shit back, finally',
+ notEnough = 'You don’t have enough of this crap',
+ comDes = 'Sell stuff on the corner, dumbass'
+}
+
+Lang.crack = {
+ targetMake = 'Cook some crack, shithead',
+ cook = 'Cooking that crack, duh',
+ targetBag = 'Bag up that crap',
+ bag = 'Bagging the crack, moron',
+}
+
+Lang.Deliveries = {
+ targetGetDel = 'Grab a delivery, lazy bastard',
+ targetOpenShop = 'Open dealer shop, finally',
+ shopHeader = 'Dealer shop, not your playground',
+ targetHandOff = 'Hand over the package, asshole',
+ delivering = 'Handing package to dealer, hurry up',
+ alreadyDelivering = 'You’re already doing a delivery, dipshit',
+ slowAf = 'You took too damn long!',
+ newDealerHelp = {
+ help = 'Place a dealer, lazy fuck',
+ name = 'Dealer name, dumbass',
+ timeMin = 'Min time, asshole',
+ timeMax = 'Max time, moron'
+ },
+ DealerExists = 'Dealer already exists, genius',
+ deleteDealer = {
+ help = 'Delete a dealer, loser',
+ name = 'Dealer name, duh',
+ },
+ deleteDealerSuccess = 'Dealer deleted, finally',
+ deleteDealerFail = 'Failed to delete dealer, lol',
+}
+
+Lang.heroin = {
+ targetPick = 'Pick heroin, idiot',
+ picking = 'Picking heroin, duh',
+ targetCook = 'Cook heroin, shithead',
+ pbCook = 'Cooking up heroin, finally',
+ targetPickup = 'Pick up lab, dipshit',
+ pbPickup = 'Picking up lab, moron',
+ targetClean = 'Clean the lab, lazy ass',
+ pbClean = 'Cleaning lab, you useless fuck',
+ targetDry = 'Dry out the plant, dumbass',
+ pbDry = 'Drying out the damn plant',
+ targetCutHeroin = 'Cut the heroin, fucker',
+ pbCutHeroin = 'Cutting the heroin, finally',
+ targetBuyKit = 'Buy heroin lab kit, moron',
+ pbBuyKit = 'Buying that kit, dumbass',
+ tableout = 'You already have a table out, loser',
+ placing = 'Placing the damn table down',
+ targetFill = 'Fill the syringe, idiot',
+ pbFill = 'Filling that syringe, moron',
+ hasKitAlready = 'You already have a heroin lab kit, fucker',
+ notEnoughMoney = 'You need $%s cash for this, brokeass',
+ placedKit = 'Placed your heroin kit, finally',
+ failed = 'Failed to make heroin, you fuckup',
+}
+
+Lang.lean = {
+ stealFromTruck = 'Steal from truck, dumbfuck',
+ startMission = 'Start lean mission, asshole',
+ notOnRun = 'You aren’t on a lean run, moron',
+ alreadyChasing = 'Already chasing a truck, lazy ass',
+}
+
+Lang.lsd = {
+ targetHeat = 'Heating LSD, dipshit',
+ heating = 'Heating up LSD, moron',
+ targetRefine = 'Refine the acid, shithead',
+ refining = 'Refining acid, lazy bastard',
+ targetDipping = 'Dip tabs, idiot',
+ dipping = 'Dipping tabs, dumbass',
+ targetPickup = 'Pick up lab kit, loser',
+ packup = 'Packing up lab kit, finally',
+ targetClean = 'Clean lab kit, moron',
+ needCleaning = 'You need cleaning kit, dumbfuck',
+ cleaning = 'Cleaning lab kit, dipshit',
+ targetLys = 'Steal lysergic acid, asshole',
+ stealLys = 'Stealing lysergic acid, moron',
+ targetDie = 'Steal diethylamide, fucker',
+ stealDie = 'Stealing diethylamide, idiot',
+ targetBuyTab = 'Buy tab paper, lazy ass',
+ targetBuyKit = 'Buy LSD lab kit, dumbfuck',
+ alreadyOwn = 'You already own this crap, loser',
+ buyingKit = 'Buying LSD lab kit, finally',
+ tableout = 'You already have a table out, shithead',
+ placing = 'Placing lab kit down, idiot',
+ failed = 'You suck at making drugs, moron',
+}
+
+Lang.mesc = {
+ targetPick = 'Pick cactus, dumbass',
+ picking = 'Picking cactus, idiot',
+ targetDry = 'Dry cactus, lazy fuck',
+ dry = 'Drying cactus, shithead',
+}
+
+Lang.meth = {
+ alreadyChasing = 'Already chasing a truck, asshole',
+ targetStealFromCar = 'Steal from meth car, moron',
+ targetHeist = 'Start meth mission, dipshit',
+ started = 'Already have meth cooking, dumbfuck',
+ increaseHeat = 'You increased the heat, shithead',
+ targetBag = 'Bag meth, lazy ass',
+ targetCook = 'Cook meth, idiot',
+ targetGrabTray = 'Grab meth tray, loser',
+ targetHeat = 'Adjust the dials, fucker',
+ targetSmash = 'Smash the tray, moron',
+ targetStealEPH = 'Steal ephedrine, dumbass',
+ stealingEPH = 'Stealing ephedrine, idiot',
+ targetStealACE = 'Steal acetone, shithead',
+ stealingACE = 'Stealing acetone, dipshit',
+ notOnRun = 'Not on a meth run, moron',
+ onCooldown = 'You’re on cooldown, loser',
+ teleIn = 'Enter the lab, dumbfuck',
+ teleOut = 'Exit the lab, idiot',
+}
+
+Lang.oxy = {
+ ditchCar = 'Van is hot, leave it somewhere, fucker',
+ targetHandoff = 'Hand off the package, dipshit',
+ handingoff = 'Handing off package, moron',
+ emptyHands = 'You’re not carrying shit, idiot',
+ targetPay = 'Rent oxy van, lazy ass',
+ keys = 'Keys are in the van, dumbfuck',
+ targetGetPackage = 'Grab the package, shithead',
+ alreadyCarrying = 'Already carrying a package, loser',
+ paid = 'Paid $%s to rent van, finally',
+ notOn = 'Not on a route, moron',
+}
+
+Lang.pharma = {
+ input = {
+ header = 'Who the fuck gets this prescription?',
+ title1 = 'Player name, asshole',
+ title2 = 'Prescription, dumbfuck',
+ },
+ write = 'Writing prescription, shithead',
+ opening = 'Opening prescription bottle, moron',
+ targetFill = 'Fill prescription, idiot',
+ fill = 'Getting prescription filled, dipshit',
+ canceled = 'You canceled the prescription, loser',
+ unbottle = 'Opened the bottle, fucker',
+}
+
+Lang.shrooms = {
+ targetPick = 'Pick shrooms, dumbass',
+ picking = 'Picking shrooms, idiot',
+ eat = 'Eating shrooms, shithead',
+ cancel = 'Decided not to do shrooms, loser',
+ took = 'Took some shrooms, fucker!',
+}
+
+Lang.weed = {
+ targetPick = 'Pick weed, dumbfuck',
+ picking = 'Picking weed, idiot',
+ targetDry = 'Dry weed, shithead',
+ noDry = 'Need wet weed for this, loser',
+ wait = 'Waiting for weed to dry, dipshit...',
+ take = 'Ready to take weed, moron',
+ targetDryed = 'Pick up weed, fucker',
+ teleportIn = 'Enter grow house, asshole',
+ teleportOut = 'Leave grow house, idiot',
+ dabs = 'Doing some dabs, dumbfuck',
+ bluntWrap = 'Dipping syrup to make %s, loser',
+ rollBlunt = 'Rolling a %s, shithead',
+ targetSales = 'Buy from dealer, dipshit',
+ buying = 'Buying %s from dealer, moron',
+ itemDoesntExist = 'Item does not exist here, dumbass',
+ needItem = 'Need a %s for this, fucker',
+ crackBlunt = 'Cracking open a blunt, loser',
+}
+
+Lang.wholesale = {
+ alreadyWholesale = 'Already wholesaling, asshole',
+ targetBuyer = 'Talk to the buyer, shithead',
+ wholesaling = 'Wholesaling drugs, moron',
+ uhoh = 'Buyer’s getting sketchy, dipshit',
+ tooLong = 'Buyer waited too long, dumbfuck',
+ notEnoughCops = 'Not enough cops on duty, loser',
+
+ count = 'Quantity detected: %s, fucker',
+ bonus = 'Quantity bonus: +%s%%, shithead',
+ estimate = 'Estimated payout: $%s - $%s, moron',
+ no_drugs = 'You don’t have any of this drug, dumbass',
+ ambush = 'Ambush! %s attackers with %s weapons approaching, fucker!',
+ complete = 'Sold %s items for $%s%s, idiot',
+ min_quantity = 'Must sell at least %s items, loser',
+ deal_failed_cleanup = 'Deal failed, try again, dumbfuck',
+}
+
+Lang.xtc = {
+ alreadyOut = 'You have a press out already, shithead',
+ settingDown = 'Setting down the press, moron',
+ noPressOut = 'No press out, dumbass',
+ targetMake = 'Press pills, loser',
+ making = 'Pressing a %s, fucker',
+ targetPickup = 'Pick up press, idiot',
+ picking = 'Picking up press, dipshit',
+ targetStealMDP2P = 'Steal MDP2P, asshole',
+ stealingMDP2P = 'Stealing MDP2P, moron',
+ fail = 'Damn dude, you suck, shithead',
+ targetStealIsosafrole = 'Steal isosafrole, dumbfuck',
+ stealingIsosafrole = 'Stealing isosafrole, loser',
+ targetRaw = 'Make raw XTC, fucker',
+ makingRaw = 'Making raw XTC, idiot',
+ getPress = 'Get press, moron',
+ buySingle = 'Buy single press for $%s, shithead',
+ buyp = 'Buying press, dumbass',
+ targetStamp = 'Stamp XTC, loser',
+ stamp_desc = 'Stamp %s pills, fucker',
+ stamping = 'Stamping %s pills, idiot',
+ noPills = 'No unstamped pills, shithead',
+}
+
+Lang.merchant = {
+ targetOpen = 'Open merchant menu, asshole',
+}
+
+return Lang
diff --git a/locales/piglatin.lua b/locales/piglatin.lua
new file mode 100644
index 0000000..0ea9d4a
--- /dev/null
+++ b/locales/piglatin.lua
@@ -0,0 +1,262 @@
+Lang = {}
+
+Lang.Catches = {
+ notIn = 'ouYay Areyay otnay Inyay Ethay Orrectcay Ocationlay',
+ needItems = 'ouYay Oday Otnay Avehay Ethay Equiredray Itemsyay',
+ notEnoughMoney = 'ouYay Ereyay Otay Okebray',
+ buySuccess = 'ouYay Oughtbay %s %s Orfay $%s',
+ itemMissings = 'ouYay Eednay \n',
+ itemNeeded = 'ouYay Eednay %s',
+ cooldown = 'owSlay OwnDay Eedspay AcerRay',
+ invalidItem = 'isThay Itemyay Isyay Otnay Oldsay EreHay',
+ onCooldownWarn = '%s Attemptedyay Otay Unray Eventyay %s \n ilewhay onyay ooldowncay'
+}
+
+Lang.coke = {
+ targetPick = 'ickPay Ocacay Eaflay',
+ picking = 'ickingPay Ocacay Eaflay',
+ targetMakePow = 'akeMay Ocacaineyay Owderpay',
+ noleaf = 'ouYay Eednay Ayay Okecay Eaflay',
+ makePow = 'oppingChay Eaveslay intoyay Owderpay',
+ targetCutCoke = 'utCay Ocacaineyay',
+ targetBagCoke = 'agBay Ocacaineyay',
+ teleIn = 'Enteryay ethay Ablay',
+ teleOut = 'Exityay ethay Ablay',
+ needBakingSoda = 'ouYay Eednay Akingbay Odasay Orfay isThay',
+}
+
+Lang.Cornerselling = {
+ inVeh = 'angerStray angerDay!',
+ selling = 'ellingSay %s orfay $%s',
+ deny = 'uckFay AtThay Offeray',
+ wait = 'aitingWay Orfay Ustomercay',
+ nodrugs = 'ouYay Oday Otnay Avehay Anyyay Ugsdray Otay EllSay',
+ searching = 'earchingSay Orfay Earbynay Ustomerscay',
+ targetTakeBack = 'akeTay AckBay Ugsdray',
+ targetSell = 'ellSay %s Ofyay %s Orfay $%s',
+ targetDeny = 'enyDay Offeray',
+ stopped = 'ourYay Azylay Assyay AntCay Evenyay EllSay Ugsdray!',
+ start = 'oGay AkeMay ourYay OmMay OudPray',
+ gotRobbed = 'ouYay OtGay ObbedRay ErdNay!',
+ gotBack = 'ouYay OtGay ourYay UffStay AckBay!',
+ notEnough = 'ouYay OntDay Avehay Enoughyay Ofyay isThay Itemyay',
+ comDes = 'ellSay ingsThay Onyay Ethay OrnerCay'
+}
+
+Lang.crack = {
+ targetMake = 'ookCay OmeSay AckCray',
+ cook = 'ookingCay AckCray',
+ targetBag = 'agBay AckCray',
+ bag = 'aggingBay AckCray',
+}
+
+Lang.Deliveries = {
+ targetGetDel = 'etGay EliveryDay IssionMay',
+ targetOpenShop = 'Openyay EalerDay OpShay',
+ shopHeader = 'EalerDay OpShay',
+ targetHandOff = 'andHay Offyay EliveryDay',
+ delivering = 'andingHay Ethay AckagePay Otay Ugdray EalerDay',
+ alreadyDelivering = 'ouYay Areyay Alreadyyay EliveringDay Ayay AckagePay',
+ slowAf = 'ouYay OokTay Otay OngLay!',
+ newDealerHelp = {
+ help = 'acePlay Ayay EalerDay',
+ name = 'EalerDay Amenay',
+ timeMin = 'inimumMay ImeTay',
+ timeMax = 'aximumMay ImeTay'
+ },
+ DealerExists = 'EalerDay Alreadyyay Existsyay',
+ deleteDealer = {
+ help = 'eleteDay Ayay EalerDay',
+ name = 'EalerDay Amenay',
+ },
+ deleteDealerSuccess = 'eletedDay EalerDay',
+ deleteDealerFail = 'ailedFay Otay eleteDay EalerDay',
+}
+
+Lang.heroin = {
+ targetPick = 'ickPay EroinHay',
+ picking = 'ickingPay EroinHay',
+ targetCook = 'ookCay EroinHay',
+ pbCook = 'ookingCay Upyay EroinHay',
+ targetPickup = 'ickPay Upyay Ablay',
+ pbPickup = 'ickingPay Upyay Ablay',
+ targetClean = 'eanClay Ablay',
+ pbClean = 'eaningClay Ablay',
+ targetDry = 'yDray Outyay AntPlay',
+ pbDry = 'ryingDay Outyay AntPlay',
+ targetCutHeroin = 'utCay EroinHay',
+ pbCutHeroin = 'uttingCay EroinHay',
+ targetBuyKit = 'uyBay EroinHay Ablay ItKay',
+ pbBuyKit = 'uyingBay EroinHay Ablay ItKay',
+ tableout = 'ouYay Alreadyyay Avehay Ayay AbleTay Outyay',
+ placing = 'acingPlay OwnDay AbleTay',
+ targetFill = 'illFay Yringesay',
+ pbFill = 'illingFay Yringesay',
+ hasKitAlready = 'ouYay Alreadyyay Avehay Ayay EroinHay Ablay ItKay',
+ notEnoughMoney = 'ouYay Eednay $%s Inyay AshCay Orfay isThay',
+ placedKit = 'ouYay AcedPlay OwnDay ourYay EroinHay Ablay ItKay',
+ failed = 'ouYay ailedFay Otay AkeMay EroinHay Andyay OstLay ourYay Ingredientsyay',
+}
+
+Lang.lean = {
+ stealFromTruck = 'ealStay Omfray UckTray',
+ startMission = 'artStay EanLay IssionMay',
+ notOnRun = 'ouYay Areyay Otnay Onyay Ayay EanLay UnRay',
+ alreadyChasing = 'ouYay Areyay Alreadyyay AsingChay Ayay UckTray',
+}
+
+Lang.lsd = {
+ targetHeat = 'eatingHay LSD',
+ heating = 'eatingHay Upyay LSD',
+ targetRefine = 'efineRay Ethay Acidyay',
+ refining = 'efiningRay Ethay Acidyay',
+ targetDipping = 'ipDay AbsTay',
+ dipping = 'ippingDay AbsTay',
+ targetPickup = 'ickPay Upyay Ablay ItKay',
+ packup = 'ackingPay Upyay Ablay ItKay',
+ targetClean = 'eanClay Ablay ItKay',
+ needCleaning = 'ouYay Eednay Ayay EaningClay ItKay Otay EanClay Ethay Ablay',
+ cleaning = 'eaningClay Ablay ItKay',
+ targetLys = 'ealStay YsergicLay Acidyay',
+ stealLys = 'ealingStay YsergicLay Acidyay',
+ targetDie = 'ealStay iethylamideDay',
+ stealDie = 'ealingStay iethylamideDay',
+ targetBuyTab = 'uyBay AbTay AperPay',
+ targetBuyKit = 'uyBay LSD Ablay ItKay',
+ alreadyOwn = 'ouYay Alreadyyay Ownyay isThay Itemyay',
+ buyingKit = 'uyingBay LSD Ablay ItKay',
+ tableout = 'ouYay Alreadyyay Avehay Ayay AbleTay Outyay',
+ placing = 'acingPlay Ablay ItKay OwnDay!',
+ failed = 'ouYay UcksSay Atyay AkingMay UgsDray',
+}
+
+Lang.mesc = {
+ targetPick = 'ickPay ActusCay',
+ picking = 'ickingPay ActusCay',
+ targetDry = 'yDray ActusCay',
+ dry = 'ryingDay ActusCay',
+}
+
+Lang.meth = {
+ alreadyChasing = 'ouYay Alreadyyay Areyay AsingChay Ayay UckTray',
+ targetStealFromCar = 'ealStay Omfray EthMay ArCay',
+ targetHeist = 'artStay EthMay IssionMay',
+ started = 'ouYay Alreadyyay Avehay EthMay OokingCay',
+ increaseHeat = 'ouYay Increasedyay Ethay EatHay',
+ targetBag = 'agBay EthMay',
+ targetCook = 'ookCay EthMay',
+ targetGrabTray = 'abGray EthMay AyTray',
+ targetHeat = 'adjustyay Ethay IalsDay',
+ targetSmash = 'ashSmay Ethay AyTray',
+ targetStealEPH = 'ealStay Ephedrineyay',
+ stealingEPH = 'ealingStay Ephedrineyay',
+ targetStealACE = 'ealStay Acetoneyay',
+ stealingACE = 'ealingStay Acetoneyay',
+ notOnRun = 'ouYay Areyay Otnay Onyay Ayay EthMay UnRay',
+ onCooldown = 'ouYay Areyay Onyay Ayay OoldownCay',
+ teleIn = 'Enteryay Ethay Ablay',
+ teleOut = 'Exityay Ethay Ablay',
+}
+
+Lang.oxy = {
+ ditchCar = 'Ethay AnVay Isyay OtHay, Eavelay Ityay Omewheresay',
+ targetHandoff = 'andHay Offyay Ethay AckagePay',
+ handingoff = 'andingHay Offyay Ethay AckagePay',
+ emptyHands = 'ouYay Areyay Otnay ArryingCay Anythingyay',
+ targetPay = 'entRay Oxyyay AnVay',
+ keys = 'Ethay Eyskay Areyay Inyay Ethay AnVay',
+ targetGetPackage = 'abGray AckagePay',
+ alreadyCarrying = 'ouYay Areyay Alreadyyay ArryingCay Ayay AckagePay',
+ paid = 'ouYay AidPay $%s Otay EntRay Ethay AnVay',
+ notOn = 'ouYay Areyay Otnay Onyay Ayay OuteRay',
+}
+
+Lang.pharma = {
+ input = {
+ header = 'oWhay Otay IveGay Ayay EscriptionPray Otyay?',
+ title1 = 'ayerPlay Amenay',
+ title2 = 'escriptionPray',
+ },
+ write = 'itingWray EscriptionPray',
+ opening = 'openingyay EscriptionPray OttleBay',
+ targetFill = 'illFay EscriptionPray',
+ fill = 'ettingGay EscriptionPray IlledFay',
+ canceled = 'ouYay AnceledCay Ethay EscriptionPray',
+ unbottle = 'ouYay Openedyay Ethay OttleBay',
+}
+
+Lang.shrooms = {
+ targetPick = 'ickPay RoomsShay',
+ picking = 'ickingPay RoomsShay',
+ eat = 'eatingyay RoomsShay',
+ cancel = 'ecidedDay Otay Otnay Oday RoomsShay',
+ took = 'ouYay OokTay Omesay RoomsShay!',
+}
+
+Lang.weed = {
+ targetPick = 'ickPay EedWay',
+ picking = 'ickingPay EedWay',
+ targetDry = 'yDray EedWay',
+ noDry = 'ouYay Eednay EtWay EedWay Orfay isThay',
+ wait = 'aitingWay Orfay EedWay Otay yDray...',
+ take = 'eadyRay Otay AkeTay EedWay',
+ targetDryed = 'ickupPay EedWay',
+ teleportIn = 'Enteryay Ethay OwGray OuseHay',
+ teleportOut = 'eaveLay Ethay OwGray OuseHay',
+ dabs = 'oingDay Omesay AbsDay',
+ bluntWrap = 'ippingDay YrupSay Otay AkeMay %s',
+ rollBlunt = 'ollingRay Ayay %s',
+ targetSales = 'uyBay Omfray EalerDay',
+ buying = 'uyingBay %s Omfray EalerDay',
+ itemDoesntExist = 'isThay Itemyay OesDay Otnay Existyay EreHay',
+ needItem = 'ouYay Eednay Ayay %s Orfay isThay',
+ crackBlunt = 'ackingCray Openyay Ayay UntBlay'
+}
+
+Lang.wholesale = {
+ alreadyWholesale = 'Alreadyyay OlesalingWhay',
+ targetBuyer = 'alkTay Otay Ethay UyerBay',
+ wholesaling = 'olesalingWhay UgsDray',
+ uhoh = 'Ethay UyerBay Isyay EttingGay EtchySkay',
+ tooLong = 'Ethay UyerBay AitedWay Otay OngLay',
+ notEnoughCops = 'Otnay Enoughyay OpsCay Onyay UtyDay',
+
+ count = 'antityQuay EtectedDay: %s',
+ bonus = 'antityQuay OnusBay: +%s%%',
+ estimate = 'Estimatedyay AyoutPay: $%s - $%s',
+ no_drugs = 'ouYay Oday Otnay Avehay Anyyay Ofyay isthay UgDray Otay EllSay',
+ ambush = 'Ambushyay! %s attackersyay ithway %s eaponsway areyay approachingyay!',
+ complete = 'oldSay %s itemsyay orfay $%s%s',
+ min_quantity = 'ouYay Ustmay EllSay Atlay Eastyay %s itemsyay Otay OlesaleWhay',
+ deal_failed_cleanup = 'EalDay ailedFay - ouyay ancay ytray againyay'
+}
+
+Lang.xtc = {
+ alreadyOut = 'ouYay Avehay Ayay EssPray Outyay Alreadyyay',
+ settingDown = 'ettingSay OwnDay Ethay EssPray',
+ noPressOut = 'ouYay Oday Otnay Avehay Ayay EssPray Outyay',
+ targetMake = 'essPray IllsPay',
+ making = 'essingPray Ayay %s',
+ targetPickup = 'ickPay Upyay EssPray',
+ picking = 'ickingPay Upyay EssPray',
+ targetStealMDP2P = 'ealStay MDP2Pyay',
+ stealingMDP2P = 'ealingStay MDP2Pyay',
+ fail = 'amnDay UdeDay ouYay UcksSay',
+ targetStealIsosafrole = 'ealStay Isosafroleyay',
+ stealingIsosafrole = 'ealingStay Isosafroleyay',
+ targetRaw = 'akeMay AwRay XTCyay',
+ makingRaw = 'akingMay AwRay XTCyay',
+ getPress = 'etGay EssPray',
+ buySingle = 'uyBay IngleSay EssPray Orfay $%s',
+ buyp = 'uyingBay EssPray',
+ targetStamp = 'ampStay XTCyay',
+ stamp_desc = 'ampStay %s IllsPay',
+ stamping = 'ampingStay %s IllsPay',
+ noPills = 'ouYay OntDay Avehay Anyyay Unstampedyay IllsPay'
+}
+
+Lang.merchant = {
+ targetOpen = 'Openyay ErchantMay EnuMay',
+}
+
+return Lang
diff --git a/locales/pirate.lua b/locales/pirate.lua
new file mode 100644
index 0000000..063ac54
--- /dev/null
+++ b/locales/pirate.lua
@@ -0,0 +1,262 @@
+Lang = {}
+
+Lang.Catches = {
+ notIn = 'Ye be not in the right port, matey!',
+ needItems = 'Ye be lackin’ the proper booty',
+ notEnoughMoney = 'Ye pockets be emptier than Davey Jones’ locker',
+ buySuccess = 'Ye plundered %s %s fer $%s',
+ itemMissings = 'Ye be needin’ \n',
+ itemNeeded = 'Ye be needin’ %s',
+ cooldown = 'Avast! Slow yer sails, sailor!',
+ invalidItem = 'This booty ain’t sold on these seas',
+ onCooldownWarn = '%s tried to run the voyage %s \n while the crew be restin’'
+}
+
+Lang.coke = {
+ targetPick = 'Pluck the coca leaf',
+ picking = 'Plunderin’ coca leaves',
+ targetMakePow = 'Grind the white powder',
+ noleaf = 'Ye need a coca leaf, swabbie!',
+ makePow = 'Choppin’ leaves inta powder',
+ targetCutCoke = 'Carve up the cocaine',
+ targetBagCoke = 'Stash cocaine in sacks',
+ teleIn = 'Sneak inta the secret hold',
+ teleOut = 'Slip outta the secret hold',
+ needBakingSoda = 'Ye be needin’ bakin’ soda fer this, yarrr'
+}
+
+Lang.Cornerselling = {
+ inVeh = 'Stranger danger, ye scallywag!',
+ selling = 'Hawk’n %s fer $%s',
+ deny = 'Blimey, shove that deal!',
+ wait = 'Waitin’ fer a matey with coin',
+ nodrugs = 'Ye hold no contraband, landlubber',
+ searching = 'Scoutin’ fer passin’ sailors',
+ targetTakeBack = 'Snatch back the goods',
+ targetSell = 'Trade %s o’ %s fer $%s',
+ targetDeny = 'Turn down the offer',
+ stopped = 'Ye lazy bilge rat, can’t even peddle the wares!',
+ start = 'Go make yer mum proud, lad',
+ gotRobbed = 'Ye been plundered, ye sorry dog!',
+ gotBack = 'Ye reclaimed yer booty!',
+ notEnough = 'Ye don’t hold enough o’ this booty',
+ comDes = 'Sellin’ goods on the street corner, yarrr'
+}
+
+Lang.crack = {
+ targetMake = 'Cook some crack in the galley',
+ cook = 'Brewin’ crack on the stove',
+ targetBag = 'Stash the crack',
+ bag = 'Stashin’ the crack, yarrr',
+}
+
+Lang.Deliveries = {
+ targetGetDel = 'Snag a smuggler’s run',
+ targetOpenShop = 'Open the dealer’s chest',
+ shopHeader = 'Dealer’s Market',
+ targetHandOff = 'Hand off the cargo',
+ delivering = 'Passin’ the package to a shady sailor',
+ alreadyDelivering = 'Ye already got a run, bucko',
+ slowAf = 'Too slow, ye barnacle brain!',
+ newDealerHelp = {
+ help = 'Drop anchor a dealer',
+ name = 'Dealer’s Name',
+ timeMin = 'Shortest tide',
+ timeMax = 'Longest tide'
+ },
+ DealerExists = 'That dealer’s already sailin’',
+ deleteDealer = {
+ help = 'Scuttle a dealer',
+ name = 'Dealer’s Name',
+ },
+ deleteDealerSuccess = 'Dealer scuttled to the depths',
+ deleteDealerFail = 'The dealer lives yet, yarrr',
+}
+
+Lang.heroin = {
+ targetPick = 'Pick the poppy treasure',
+ picking = 'Harvestin’ heroin booty',
+ targetCook = 'Brew the heroin stew',
+ pbCook = 'Cookin’ up heroin grog',
+ targetPickup = 'Snatch the lab chest',
+ pbPickup = 'Packin’ up the lab',
+ targetClean = 'Swab the lab deck',
+ pbClean = 'Swabbin’ down the lab',
+ targetDry = 'Dry out the devil’s weed',
+ pbDry = 'Hangin’ plants to dry',
+ targetCutHeroin = 'Slice the heroin',
+ pbCutHeroin = 'Cuttin’ heroin',
+ targetBuyKit = 'Buy a heroin galley kit',
+ pbBuyKit = 'Buyin’ the galley kit',
+ tableout = 'Ye already got a table out, matey',
+ placing = 'Droppin’ the galley table',
+ targetFill = 'Fill a syringe',
+ pbFill = 'Filling the syringe',
+ hasKitAlready = 'Ye already got a heroin galley kit',
+ notEnoughMoney = 'Ye need $%s in coin fer this',
+ placedKit = 'Ye set yer galley kit down',
+ failed = 'Ye bungled the brew an’ lost yer stash',
+}
+
+Lang.lean = {
+ stealFromTruck = 'Plunder the cargo wagon',
+ startMission = 'Set sail on a lean run',
+ notOnRun = 'Ye be not on a lean voyage',
+ alreadyChasing = 'Ye be already tailin’ a wagon',
+}
+
+Lang.lsd = {
+ targetHeat = 'Heat the acid grog',
+ heating = 'Stokin’ the acid fire',
+ targetRefine = 'Refine the devil’s brew',
+ refining = 'Refinin’ the acid',
+ targetDipping = 'Dip the cursed tabs',
+ dipping = 'Dippin’ tabs',
+ targetPickup = 'Snatch the lab kit',
+ packup = 'Stashin’ the lab kit',
+ targetClean = 'Scrub the lab kit',
+ needCleaning = 'Ye need a scrub kit to swab this lab',
+ cleaning = 'Swabbin’ the lab kit',
+ targetLys = 'Steal lysergic acid booty',
+ stealLys = 'Snatchin’ lysergic acid',
+ targetDie = 'Steal diethylamide loot',
+ stealDie = 'Snatchin’ diethylamide',
+ targetBuyTab = 'Buy tab parchment',
+ targetBuyKit = 'Buy LSD lab kit',
+ alreadyOwn = 'Ye already hold this booty',
+ buyingKit = 'Buyin’ LSD galley kit',
+ tableout = 'Ye already got a table out',
+ placing = 'Plantin’ the lab kit',
+ failed = 'Ye botched the brew, yarrr',
+}
+
+Lang.mesc = {
+ targetPick = 'Harvest the cactus booty',
+ picking = 'Pluckin’ cactus',
+ targetDry = 'Dry the cactus flesh',
+ dry = 'Dryin’ cactus',
+}
+
+Lang.meth = {
+ alreadyChasing = 'Ye already be chasin’ a wagon',
+ targetStealFromCar = 'Plunder the meth cart',
+ targetHeist = 'Set sail on a meth run',
+ started = 'Ye already be brewin’ meth, matey',
+ increaseHeat = 'Ye stoked the fire hotter',
+ targetBag = 'Bag the meth booty',
+ targetCook = 'Cook the meth stew',
+ targetGrabTray = 'Snatch the meth tray',
+ targetHeat = 'Twist the dials',
+ targetSmash = 'Smash the tray',
+ targetStealEPH = 'Steal ephedrine booty',
+ stealingEPH = 'Snatchin’ ephedrine',
+ targetStealACE = 'Steal acetone booty',
+ stealingACE = 'Snatchin’ acetone',
+ notOnRun = 'Ye be not on a meth run',
+ onCooldown = 'Ye be coolin’ yer heels, yarrr',
+ teleIn = 'Sneak into the meth galley',
+ teleOut = 'Slip outta the meth galley',
+}
+
+Lang.oxy = {
+ ditchCar = 'The wagon be too hot, stash it away',
+ targetHandoff = 'Hand off the cursed cargo',
+ handingoff = 'Passin’ the package',
+ emptyHands = 'Ye be carryin’ nothin’, bilge rat',
+ targetPay = 'Rent an oxy wagon',
+ keys = 'The keys be in the wagon, matey',
+ targetGetPackage = 'Snatch a parcel',
+ alreadyCarrying = 'Ye already be carryin’ a parcel',
+ paid = 'Ye paid $%s to rent the wagon',
+ notOn = 'Ye be not on a smuggler’s route',
+}
+
+Lang.pharma = {
+ input = {
+ header = 'Who gets this magic scroll?',
+ title1 = 'Sailor’s Name',
+ title2 = 'Prescription',
+ },
+ write = 'Scrawlin’ a prescription',
+ opening = 'Poppin’ open the medicine chest',
+ targetFill = 'Fill the prescription',
+ fill = 'Fetchin’ the potion',
+ canceled = 'Ye canceled the scroll',
+ unbottle = 'Ye popped open the potion flask',
+}
+
+Lang.shrooms = {
+ targetPick = 'Harvest the magic shrooms',
+ picking = 'Pluckin’ shrooms',
+ eat = 'Munchin’ shrooms, yarrr',
+ cancel = 'Changed yer mind on the shrooms',
+ took = 'Ye ate the shrooms, matey!',
+}
+
+Lang.weed = {
+ targetPick = 'Harvest the devil’s lettuce',
+ picking = 'Pluckin’ weed',
+ targetDry = 'Dry the weed booty',
+ noDry = 'Ye need wet weed fer this, swabbie',
+ wait = 'Waitin’ fer the weed to dry...',
+ take = 'Time to snatch the weed',
+ targetDryed = 'Pick up the weed stash',
+ teleportIn = 'Sneak into the grow cabin',
+ teleportOut = 'Slip outta the grow cabin',
+ dabs = 'Dabbin’ the wax, yarrr',
+ bluntWrap = 'Dippin’ syrup to make %s',
+ rollBlunt = 'Rollin’ a %s',
+ targetSales = 'Buy off a shady dealer',
+ buying = 'Buyin’ %s from a dealer',
+ itemDoesntExist = 'This booty be not here',
+ needItem = 'Ye need a %s fer this',
+ crackBlunt = 'Crackin’ open a blunt',
+}
+
+Lang.wholesale = {
+ alreadyWholesale = 'Ye already be tradin’ in bulk',
+ targetBuyer = 'Speak to the buyer',
+ wholesaling = 'Sellin’ contraband by the chest',
+ uhoh = 'The buyer looks shifty, yarrr',
+ tooLong = 'The buyer grew weary o’ waitin’',
+ notEnoughCops = 'Not enough watchmen on duty',
+
+ count = 'Booty counted: %s',
+ bonus = 'Bonus fer quantity: +%s%%',
+ estimate = 'Ye may get $%s - $%s',
+ no_drugs = 'Ye hold none o’ this contraband',
+ ambush = 'An ambush! %s rogues with %s weapons approach!',
+ complete = 'Sold %s booty fer $%s%s',
+ min_quantity = 'Ye must sell at least %s to wholesale',
+ deal_failed_cleanup = 'The trade sank – try again later',
+}
+
+Lang.xtc = {
+ alreadyOut = 'Ye already got a press out, matey',
+ settingDown = 'Droppin’ the press',
+ noPressOut = 'Ye got no press, bilge rat',
+ targetMake = 'Press the pills',
+ making = 'Pressin’ a %s',
+ targetPickup = 'Snatch up the press',
+ picking = 'Grabbin’ the press',
+ targetStealMDP2P = 'Snatch the MDP2P booty',
+ stealingMDP2P = 'Stealin’ MDP2P',
+ fail = 'By thunder, ye be useless!',
+ targetStealIsosafrole = 'Snatch isosafrole booty',
+ stealingIsosafrole = 'Stealin’ isosafrole',
+ targetRaw = 'Cook raw XTC grog',
+ makingRaw = 'Brewin’ raw XTC',
+ getPress = 'Fetch a press',
+ buySingle = 'Buy a single press fer $%s',
+ buyp = 'Buyin’ the press',
+ targetStamp = 'Stamp the XTC',
+ stamp_desc = 'Stamp %s pills',
+ stamping = 'Stampin’ %s pills',
+ noPills = 'Ye got no naked pills to stamp',
+}
+
+Lang.merchant = {
+ targetOpen = 'Open the trader’s menu',
+}
+
+return Lang
diff --git a/server/consumables.lua b/server/consumables.lua
index e18b0c0..6eac222 100644
--- a/server/consumables.lua
+++ b/server/consumables.lua
@@ -19,6 +19,13 @@ thirst = number -- same shit
strength = number -- how long you are strong boi
]]
+
+local Consumables = {}
+Consumables.defaulttime = 4000
+Consumables.defaultanim = 'pflag2'
+Consumables.defaultprogresstext = 'Consuming ' -- it will always show the label of the item being used after what you put here, make sure to keep the space at the end :)
+Consumables.defaultstatval = 0
+
local Consume = {
-- meth
methbags = { time = 4000, effect = 'meth', anim = "smoke", progressbartext = "Injesting",
@@ -158,23 +165,25 @@ for k, v in pairs(Consume) do
end
RegisterNetEvent('md-drugs:server:updatestatus', function(stat, statval)
- local Player = ps.getPlayer(source)
+ local src = source
+ local Player = ps.getPlayer(src)
+ if GetResourceState('es_extended') == 'started' then return end
local hunger, thirst = Player.PlayerData.metadata.hunger, Player.PlayerData.metadata.thirst
if stat == "thirst" then
local value = thirst + statval
Player.Functions.SetMetaData('thirst', value)
- TriggerClientEvent('hud:client:UpdateNeeds', source, hunger, value)
+ TriggerClientEvent('hud:client:UpdateNeeds', src, hunger, value)
elseif stat == "hunger" then
local value = hunger + statval
Player.Functions.SetMetaData('hunger', value)
- TriggerClientEvent('hud:client:UpdateNeeds', source, value, thirst)
- elseif stat == "stress" then
+ TriggerClientEvent('hud:client:UpdateNeeds', src, value, thirst)
+ elseif stat == "stress" then
local value = Player.PlayerData.metadata.stress + statval
Player.Functions.SetMetaData('stress', value)
- TriggerClientEvent('hud:client:UpdateStress', source, Player.PlayerData.metadata.stress, value)
+ TriggerClientEvent('hud:client:UpdateStress', src, Player.PlayerData.metadata.stress, value)
elseif stat == "armor" then
local value = Player.PlayerData.metadata.armor + statval
- TriggerEvent('hospital:server:SetArmor', value)
- TriggerClientEvent('hud:client:UpdateStress', source, Player.PlayerData.metadata.armor, value)
+ TriggerEvent('hospital:server:SetArmor', value)
+ TriggerClientEvent('hud:client:UpdateStress', src, Player.PlayerData.metadata.armor, value)
end
end)
diff --git a/server/plantSpawns.lua b/server/plantSpawns.lua
index 627f66d..d2a71d0 100644
--- a/server/plantSpawns.lua
+++ b/server/plantSpawns.lua
@@ -107,6 +107,14 @@ local plants = {
}
}
+local plantRespawnTimers = {
+ coke = 100,
+ heroin = 100,
+ mescaline = 100,
+ shrooms = 100,
+ weed = 100
+}
+
local plantData = {
{
label = 'coke',
@@ -120,7 +128,7 @@ local plantData = {
end,
coolDown = function(loc)
CreateThread(function()
- Wait(Config.respawnTime * 1000)
+ Wait(plantRespawnTimers.coke * 1000)
plants.cocaine[loc].taken = false
GlobalState.CocaPlant = plants.cocaine
TriggerClientEvent('coke:respawnCane', -1, loc)
@@ -139,7 +147,7 @@ local plantData = {
end,
coolDown = function(loc)
CreateThread(function()
- Wait(Config.respawnTime * 1000)
+ Wait(plantRespawnTimers.heroin * 1000)
plants.heroin[loc].taken = false
GlobalState.PoppyPlants = plants.heroin
TriggerClientEvent('heroin:respawnCane', -1, loc)
@@ -158,7 +166,7 @@ local plantData = {
end,
coolDown = function(loc)
CreateThread(function()
- Wait(Config.respawnTime * 1000)
+ Wait(plantRespawnTimers.mescaline * 1000)
plants.mescaline[loc].taken = false
GlobalState.Mescaline = plants.mescaline
TriggerClientEvent('Mescaline:respawnCane', -1, loc)
@@ -177,7 +185,7 @@ local plantData = {
end,
coolDown = function(loc)
CreateThread(function()
- Wait(Config.respawnTime * 1000)
+ Wait(plantRespawnTimers.shrooms * 1000)
plants.shrooms[loc].taken = false
GlobalState.shrooms = plants.shrooms
TriggerClientEvent('shrooms:respawnCane', -1, loc)
@@ -196,7 +204,7 @@ local plantData = {
end,
coolDown = function(loc)
CreateThread(function()
- Wait(Config.respawnTime * 1000)
+ Wait(plantRespawnTimers.weed * 1000)
plants.weed[loc].taken = false
GlobalState.WeedPlant = plants.weed
TriggerClientEvent('weed:respawnCane', -1, loc)
diff --git a/server/wholesale.lua b/server/wholesale.lua
index 5e35334..25e528b 100644
--- a/server/wholesale.lua
+++ b/server/wholesale.lua
@@ -1,4 +1,3 @@
-
local coke = { "cokebaggy", "cokebaggystagethree", "cokebaggystagetwo"}
local crack = {"baggedcracked", "baggedcrackedstagetwo", "baggedcrackedstagethree"}
local lsd = {'smiley_tabs', 'yinyang_tabs', 'wildcherry_tabs', 'pineapple_tabs', 'bart_tabs', 'gratefuldead_tabs'}
@@ -6,13 +5,74 @@ local heroin = {'heroin_ready', 'heroin_readystagetwo', 'heroin_readystagethree'
local xtc = {"white_playboys", "white_playboys2", "white_playboys3", "white_playboys4", "blue_playboys", "blue_playboys2", "blue_playboys3", "blue_playboys4", "red_playboys", "red_playboys2", "red_playboys3", "red_playboys4", "orange_playboys", "orange_playboy2s", "orange_playboys3", "orange_playboys4", "white_aliens", "white_aliens2", "white_aliens3", "white_aliens4", "blue_aliens", "blue_aliens2", "blue_aliens3", "blue_aliens4", "red_aliens", "red_aliens3", "red_aliens2", "red_aliens4", "orange_aliens", "orange_aliens2", "orange_aliens3", "orange_aliens4", "white_pl", "white_pl2", "white_pl3", "white_pl4", "blue_pl", "blue_pl2", "blue_pl3", "blue_pl4", "red_pl", "red_pl2", "red_pl3", "red_pl4", "orange_pl", "orange_pl2", "orange_pl3", "orange_pl4", "white_trolls", "white_trolls2", "white_trolls3", "white_trolls4", "blue_trolls", "blue_trolls2", "blue_trolls3", "blue_trolls4", "red_trolls", "red_trolls2", "red_trolls3", "red_trolls4", "orange_trolls", "orange_trolls2", "orange_trolls3", "orange_trolls4", "white_cats2", "white_cats3", "white_cats4", "white_cats", "blue_cats", "blue_cats3", "blue_cats2", "blue_cats4", "red_cats", "red_cats2", "red_cats3", "red_cats4", "orange_cats", "orange_cats2", "orange_cats3", "orange_cats4" }
local burners = {cokeburner = coke, crackburner = crack, lsdburner = lsd, heroinburner = heroin, xtcburner = xtc}
local active = {}
+local settings = {}
+settings.WholesaleQuantityBonus = 0.05 -- 5% bonus per 10 units sold (up to 20%)
+settings.WholesaleMaxBonus = 0.20 -- Maximum 20% bonus
+settings.WholesaleMinQuantity = 1 -- Minimum quantity required for wholesale
+settings.WholesaleAmbushEnabled = true -- Enable or disable ambush on failed deals
+settings.WholesaleAmbushBase = 2 -- Base number of attackers on failed deals
+settings.WholesaleAmbushScale = true -- Scale number of attackers based on drug quantity
+settings.WholesaleAmbushTier1 = 10 -- Drug quantity threshold for 3 attackers
+settings.WholesaleAmbushTier2 = 20 -- Drug quantity threshold for 4 attackers
+settings.WholesaleAmbushTier3 = 30 -- Drug quantity threshold for 5 attackers
+settings.WholesaleWeaponTiers = true -- Scale weapon difficulty based on drug quantity
+settings.WholesaleWeaponsTier1 = { -- Basic weapons (default)
+ "WEAPON_PISTOL",
+ "WEAPON_BAT",
+ "WEAPON_KNIFE",
+ "WEAPON_MACHETE"
+}
+settings.WholesaleWeaponsTier2 = { -- Medium weapons (10+ drugs)
+ "WEAPON_COMBATPISTOL",
+ "WEAPON_MICROSMG",
+ "WEAPON_SAWNOFFSHOTGUN",
+ "WEAPON_CROWBAR"
+}
+settings.WholesaleWeaponsTier3 = { -- Advanced weapons (20+ drugs)
+ "WEAPON_APPISTOL",
+ "WEAPON_SMG",
+ "WEAPON_PUMPSHOTGUN",
+ "WEAPON_CARBINERIFLE"
+}
+settings.WholesaleWeaponsTier4 = { -- Elite weapons (30+ drugs)
+ "WEAPON_HEAVYPISTOL",
+ "WEAPON_ASSAULTSMG",
+ "WEAPON_ASSAULTSHOTGUN",
+ "WEAPON_SPECIALCARBINE"
+}
+settings.WholesaleShowEstimates = true -- Show estimated value before deal
+settings.WholesaleFailPoliceAlert = 75 -- Chance to alert police on failed deals (0-100)
+settings.WholesaleResetOnTimeout = true -- Reset wholesale flag when buyer times out
+settings.SuccessfulChance = 90 --- this is the chance of a Success wholesale 1-100
+settings.AlertPoliceWholesale = 90 -- 1-100 of how often it will alert police
+settings.WholesaleTimeout = 600 -- time in seconds to get to the location
+settings.PoliceCount = 2
local Price = {
- coke = {min = 20, max = 60},
- crack = {min = 20, max = 60},
- lsd = {min = 20, max = 60},
- heroin = {min = 20, max = 60},
- xtc = {min = 20, max = 60},
+ coke = {
+ min = math.floor(250 * 0.80), -- 250 * 0.80 = 200
+ max = math.floor(450 * 0.80) -- 450 * 0.80 = 360
+ },
+ crack = {
+ min = math.floor(200 * 0.80), -- 200 * 0.80 = 160
+ max = math.floor(400 * 0.80) -- 400 * 0.80 = 320
+ },
+ lsd = {
+ min = math.floor(200 * 0.80), -- 200 * 0.80 = 160
+ max = math.floor(350 * 0.80) -- 350 * 0.80 = 280
+ },
+ heroin = {
+ min = math.floor(200 * 0.80), -- 200 * 0.80 = 160
+ max = math.floor(400 * 0.80) -- 400 * 0.80 = 320
+ },
+ xtc = {
+ min = math.floor(350 * 0.80), -- 350 * 0.80 = 280
+ max = math.floor(665 * 0.80) -- 665 * 0.80 = 532
+ },
+ meth = {
+ min = math.floor(200 * 0.80), -- 200 * 0.80 = 160
+ max = math.floor(400 * 0.80) -- 400 * 0.80 = 320
+ }
}
local locs = {
vector4(-2352.32, 266.78, 165.3, 23.46),
@@ -28,19 +88,23 @@ local locs = {
vector4(-320.84, 2818.73, 59.45, 337.22),
vector4(474.88, 2609.56, 44.48, 357.0),
}
-function getRandW(src)
+
+ps.registerCallback('md-drugs:server:GetWSsettings', function(source)
+ return settings
+end)
+
+function getRandW(source)
local rand = math.random(1, #locs)
return locs[rand]
end
-for k, v in pairs (burners) do
+for k, v in pairs (burners) do
ps.createUseable(k, function(source, item)
- local src = source
- local Player = getPlayer(src)
- if getCops() < Config.PoliceCount then return ps.notify(src, ps.lang('wholesale.notEnoughCops'), 'error') end
+ local Player = ps.getPlayer(source)
+ if ps.getJobTypeCount('leo') < Config.PoliceCount then return ps.notify(source, ps.lang('wholesale.notEnoughCops'), 'error') end
for m, d in pairs (active) do
- if d.cid == Player.PlayerData.citizenid then
- return ps.notify(src, ps.lang('wholesale.alreadyWholesale'), 'error' )
+ if d.cid == ps.getIdentifier(source) then
+ return ps.notify(source, ps.lang('wholesale.alreadyWholesale'), 'error')
end
end
local tab = ''
@@ -49,18 +113,28 @@ for k, v in pairs (burners) do
if k == 'lsdburner' then tab = 'lsd' end
if k == 'heroinburner' then tab = 'heroin' end
if k == 'xtcburner' then tab = 'xtc' end
- if ps.removeItem(src, k, 1) then
+ if k == 'methburner' then tab = 'meth' end
+ if ps.removeItem(source, k, 1) then
+ local Player = ps.getPlayer(source)
+ local drugCount = 0
+ for m, d in pairs (v) do
+ local amt = ps.getItemCount(source, d) or 0
+ if amt > 0 then
+ drugCount = drugCount + amt
+ end
+ end
table.insert(active, {
- src = src,
+ src = source,
item = k,
- location = getRandW(src),
- cid = ps.getIdentifier(src),
+ location = getRandW(source),
+ cid = ps.getIdentifier(source),
type = v,
- price = Price[tab]
+ price = Price[tab],
+ count = drugCount
})
for m, d in pairs (active) do
- if d.cid == ps.getIdentifier(src) then
- TriggerClientEvent("md-drugs:client:GetLocation", src, active[m])
+ if d.cid == ps.getIdentifier(source) then
+ TriggerClientEvent("md-drugs:client:GetLocation", source, active[m])
end
end
end
@@ -68,22 +142,52 @@ for k, v in pairs (burners) do
end
RegisterNetEvent('md-drugs:server:SuccessSale', function(data)
- local src = source
- for k, v in pairs (active) do
- if v.cid == ps.getIdentifier(src) then
- if not ps.checkDistance(src, v.location, 4.0) then
- return ps.notify(src, ps.lang('Catches.notIn'), "error")
- end
- local payout = math.random(v.price.min, v.price.max)
- for m, d in pairs (v.type) do
- local git = ps.getItemCount(src, d)
- if git >= 1 then
- if ps.removeItem(src, d, git) then
- ps.addMoney('cash', git * payout)
- end
+ local Player = ps.getPlayer(source)
+ for k, v in pairs (active) do
+ if v.cid == ps.getIdentifier(source) then
+ local totalQuantity = 0
+ local itemCounts = {}
+ for m, d in pairs (v.type) do
+ local count = ps.getItemCount(source, d) or 0
+ if count >= 1 then
+ totalQuantity = totalQuantity + count
+ itemCounts[d] = count
end
- table.remove(active, k)
end
+ if totalQuantity < Config.WholesaleMinQuantity then
+ ps.notify(source, string.format(ps.lang('wholesale.min_quantity'), Config.WholesaleMinQuantity), 'error')
+ return
+ end
+ local bonusTiers = math.floor(totalQuantity / 10)
+ local quantityBonus = math.min(bonusTiers * Config.WholesaleQuantityBonus, Config.WholesaleMaxBonus)
+ local bonusMultiplier = 1 + quantityBonus
+
+ local basePayout = math.random(v.price.min, v.price.max)
+ local finalPayout = math.floor(basePayout * bonusMultiplier)
+ local totalPayout = 0
+ for drug, amount in pairs(itemCounts) do
+ ps.removeItem(source, drug, amount)
+ totalPayout = totalPayout + (amount * finalPayout)
+ end
+ ps.addMoney(source, 'cash', totalPayout)
+ TriggerClientEvent('md-drugs:client:WholesaleComplete', source, {
+ quantity = totalQuantity,
+ bonus = math.floor(quantityBonus * 100),
+ payout = totalPayout
+ })
+ table.remove(active, k)
+ break
end
end
end)
+
+RegisterNetEvent('md-drugs:server:CleanupWholesale', function()
+ local Player = ps.getPlayer(source)
+ for k, v in pairs(active) do
+ if v.cid == ps.getIdentifier(source) then
+ table.remove(active, k)
+ ps.notify(source, ps.lang('wholesale.deal_failed_cleanup') or 'Deal failed - you can try again', 'error')
+ break
+ end
+ end
+end)
\ No newline at end of file
diff --git a/shared/config.lua b/shared/config.lua
index 3b63580..47d4756 100644
--- a/shared/config.lua
+++ b/shared/config.lua
@@ -1,23 +1,14 @@
Config = {} --Ignore.
-ps = exports.ps_lib:init()
-ps.loadLangs("en")
+ps = exports.ps_lib:init() --Ignore.
+ps.loadLangs("en") -- set your language
-Config.respawnTime = 100 -- Seconds
Config.Fuel = "LegacyFuel" -- type the name of script you use i.e. ps-fuel, cdn-fuel, LegacyFuel, ox_fuel
Config.TierSystem = true -- allows for three tiers of certain drugs ( coke, heroin, crack, lsd)
-Config.RequestModelTime = 30000 -- if you need more time than this, uhhhh wow
-Config.Badtrip = 20 -- number means % chance to spawn a clone that chases and attacks while on mescaline
-Config.SuccessfulChance = 90 --- this is the chance of a Success wholesale 1-100
-Config.AlertPoliceWholesale = 90 -- 1-100 of how often it will alert police
-Config.WholesaleTimeout = 600 -- time in seconds to get to the location
-Config.PoliceCount = 0 -- Amount of police required
-Config.PoliceAlertOxy = 90 -- This is a % out of 100 to alert police
----------------------------------- TierSystem levels ** ONLY IN USE IF CONFIG.TIERSYTEM IS TRUE
Config.Tier1 = 100 -- amount to hit for level 2
Config.Tier2 = 300 -- amount to hit for level 3
----------------------------------- BRIDGE
Config.Dispatch = 'ps' -- either 'ps', 'cd', 'core', 'aty'
Config.Minigames = {
diff --git a/shared/consumables.lua b/shared/consumables.lua
deleted file mode 100644
index 9c193d3..0000000
--- a/shared/consumables.lua
+++ /dev/null
@@ -1,5 +0,0 @@
-Consumables = {}
-Consumables.defaulttime = 4000
-Consumables.defaultanim = 'pflag2'
-Consumables.defaultprogresstext = 'Consuming ' -- it will always show the label of the item being used after what you put here, make sure to keep the space at the end :)
-Consumables.defaultstatval = 0
diff --git a/stream/mushroom.ydr b/stream/mushroom.ydr
deleted file mode 100644
index 212cc6916bc14fa18545e8db774d6c0070882374..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001
literal 781245
zcmV(kK=r>;Q$shU000035CWiv0RT{h+X+;TTlgsOC`y9{O&U}hBq=48-o5wJJgJl+
z&84CVB_&0ZO2&{W<4KYX5f$nCzV{U&2^m5pMdm3oCR}H~_pWvCx@-N9wa&6E=jYk;
z`|P1*7IW-}h>3}nJ|E)y_ct-!E^+$%|M_JKN3lIUD@
znqY`nPWGP;Jv>w^5+7y0;D7(D+wuSU|L>Qrmh1oh-;h85T~4N+P_x7EAQ*=99uXOF5rMhiIGul`<6CHAL85wg^jotU;5f
z8nI1lS5Onvxd^-#t|Vsr6Uc%+sa(oSBl52qlRgD)s_PZxc&6gFZbMj;N)8qF@Nw)?
z;~~j!HZlL0NvijxaZ@ja(KrDy8&KuYdxA~Rmf))9RqU(Cy?D7fU!U*k3*h_GH1h19
z6w>iBmAkW9k^R^F{HcY^at(zAuTt^Vz8kEpXdGK%IG>twW+6B?c@RnS5)x&b!j=5g
z!~dH6eTPs&{7B)^C5y4~MO&~i7O+`MRjG;iqX8xBQplnH9#N>A8-y$$!~JXir~c{d
zQ-|}@3dq)uWvsf^GDs{n#Q)W9&MUN_DKeGRcS&*ww#|mN%Rhq$lMC2`DtueN4UC7k
z%hr-a>0Gide<7#czMl4}`u5+|{&9?=(WX&w-j9-aYHOaxhX5<2GP=Dw~*6bPy
z$bO;doysg)HkF_%q!7JU&|sX5^Ty8ve=Qr)5myCjEE_Z-z&)HyT&w_5@70-|!85u4
zDqDrT4v0+*Bl2h6IgheYp#CkMw%hzUXV9kG0d}MH=i{QfIM{MplfCw;k+xe0s{?m-
zyONE;EPLB|8}@t6w_B;@epKYAAWV@@#oISK0ux%qZV6YVW!t)7G`zf&Lc~jT!B|j=
z%VxMzbGoh=4c#_Vcr0!)?wWsw%yzS4^Uuc9vi<(72F20^#B-tni7U?lr%*9kHnSc3
z(0Wmxz^7~lzI9>?JX3kIWT_%`m}ncurnhKZ`H7XE|c5rIDr~972PTj(VIt(
ze7Au9xnoJy^2yX}dR~OK=M7^ll{0Xp{xJ9z5l-gD%%n!aP!-x{I+EXq0^!FzebKdu
z;ne7Ghf&{x^UP<);KJ=z)MVvrLR-5z=_<5>ikiowAO3utht`Ww?86#C
z*^NAGqcxX2e5uG9$){0s|EvN`ii;)&|D?k}o)|O2D2lfAIlG;x|IHJo*e4acER=+5
zQy+BNHjo-GX?0M@Hzj5}17KKxmB{f7U$&{k=c7x_M;PBtSvXL1j7Vzhk>fiTQj=h<
z2om3|$fui0u-{>yFf^u$#@Vi5jecL#VwOncWA9D!q`{?-ym3pR=1Hn7^rbrz%gLFr
zYREgr=%Fe#@jWZilOM8zNiKQ#O8X5$M89xjYYa6R>y)51$e)a8h=UJ{CkfwOZ==Q{
zz!bIKE@{Z!pNCU2_TlvNxdxqBtac}
z$;93)xO28xBz`oRu2r?ucQPSuBB4`i4lXj#z^0)u*s&9$scFOFQ2u=v2_BIRa$o0&
z>U!7HvT<_)1P49|glpAvapF|M-a4(zDX(;(W{Y+oxm&!G=m%tgblpXq4hcQ!B)_8_kb|wK_0f>sv{Z{
z9byBIET*Q?;1lr-E+%_Tv%zp>Fm^wlLQSg7W@eRBm9VC2IUe`Vb5uEeCE1#jM%Nuq
zCk>jPDih(hLSl#$Ih*t)bnHmF$fD=Z>V%h>0vz1DZ#elFYzZ
zB7HiAoBxi``fPF8#n`oQ!r0^t9CR}Q4+IL>KUWq~b9`qyq)Zq^)@o&wey@34`(`0E
z^HLn`th~+%7w9j?qhd^i6}!vXx6#Se&
z+7@cePpn{898M5EuwH{b%h!pll>ON4f5+s%#$I74%*rSr-{xn-;|c>|bnsd_cGkJK
zGMgrb3tx1u!5z7wq~pvm0Q*~cB=%uC6e!qWMJ9;Gv5j$OO#3{9woO70~Pr(@|b#mfx`)r8P-;8P`r)~qfU>L%vkw37?|)@3WvIKq#EG1_UM
zUS>j08Rd}CxiOrw%t=}{rQyzKM$$jRk#(u~bMplxyXh?JoWF=4JC~P%*l1Vc|G9?r
z6o+vuFP)@uy5)PA_TWuIp9g=}gOvp$Hy;IJ`i#%To?E4Wy5e}EvCfbDvnh?+s-{Wf
zd`XyuR8uwx&Aul#Ur(iL>Quv}EWQ4J;f9pZm9x3~_y!Za+Xe
z53AE}mf#wovz4X7)u}76hu%;qTz-IUWchFX`IB-WwAw;)v-r=cR5%)3sM?p?vtUdK{1yUz{8PVdGprEkc+
zEps{DF#tce1R?~P=3vrsfk#J6=qlMh%=Nrq)h
z>&d$4MPTMNm)7UQSqXIR!1RXFOQQs8D->Y5n4D;u;Y@12#QVYft&71~V?J>@p9Wf!
zUQ$yuS{iNDB7&TzuMGyzb>YnC%c8SuU8wPJm<}VyCqc)=aw0mN2$yt~XdCFRJIU;M
zXDc{YGEH#A#G4FN<3!F!`TA@huLys*#jtO-1fIVpi#rtCM&pE;J!Flat8FSZTIx0l#-X@J9)DDka0)Fclm)ER&O(s>YA&ig!$@(Kdmu
z{b+&vU>Aw5*J9n&qNs7I_k#Nulc0E3KiT3C0jFkH{%3uByM5vA_9d`SzJR<^PJ?-y
zzSI0*a_Tq6cV(5Gy{4I9#xpT!i`$J%^+Kuf-!&7a4_gAcD)J;tYXxLz+@^6_K9)1(
zBR4gi%MK8f)EN?!SB0W0a{L$##qw~-dohSjZ9`j}vbimm#r(NTZVOZ2S7=xI(N}P_
zbHm@9_?d9=<5X&%eU^ozZ;~P0qYfRql+B%pRQylFy_o?u4^v=4?PT)g>vG7yRYU7j
zR`ZCF_nO1x_&EwLALu52(kx!o7EMh^@oYGnngUk_EAZ^X6_ENsk+yZ8(RL=_v4vgf
z@hE}E4{4(2?JJV?%B1GElN`8kNg%DBiPr4O=9YH{(X!ntIKz+=R!mMoh#;vcgLLgV
zJ9UNCGHQPOl7?K9WC;7bS1|rhHaEEVMg!dke~?DC?*w+|s(&<`5kv60;woO)Gl3d=
zv_GemARQ}R-u={~(c;Ip|89~^sKINy+8ciNq0;DmV+G#^!Jkb9HOU68y%
z+il6?L(I#ld`4F>N}%{4oVYTp@N&Y>pJO{mz^-MBA#sMX&?zFDi#WAG^j~cqiG|r|6mPEltm+VcN$Q^qi%e{O3gT}G1zaZ$nz7NUF
zIfQ#ljJX)?C&XbulbYBN4YJ^*HEAmIWCO(_IUlVD)YQ7Ng7~>>(fU{ASf<&H)3N?W
z&Lv!>WovdBM>d_eBNJ73v%91Mx&2SNs8M$85+qw5L3N!+aP}8zuBb{6tQz>T^<}G)
z?=BO_H)cCKy3~;i3|FT05xZ_E{1&nkmD!xa(~|U9xTOZS^gOA#uVGHk^~jTvVFu*g#z2+t7HZlv+?Y+~p2Cr%wD1~hEeMq`
z=W4#TQq#%KfRv?EA*o{mtb1b(pU-(vbL^ZebId78==oX-*S+~ds{WbIRSq7ZCVaFn
zRN4aUo9P0UitkQ=LazZc4F6-38ycR!so3E$d$aNt%jozxu8pAFvoY~b3usbF5O2e^el?^PAIV@Ajt3J++SV((*`pwKvh({t;f
zM)k=oxF2Q(MO#eZ$W2?|6o8tuN_XwboV|sgEOfA!bpd())1SLB&`-_lP(Qf-%m&^m
z213uCE~4qWo0_EFae|WH8A1*7Z>T-wGJ9)ZB&X%NlA2Mw-QfOnfNx6zU{P@*Ya{wX
z%|4qFL3LNGaINo9+|VGw&3xd=*%g&jGepr999aatHQo?7=OFt-T#V)+5#N^yk_NJb
z-F>f+Okf!+I~dD}?OIJugpUghQ*{6-$1o_LHlBU9p3nVn^vDQ2vhswb8#>VT6IJY`
zHS;*Flbflr8t)2Yku%hc3Wk~6Oxa(F1Jrok+%7n}ccsu;;XVqfQ{u#eJvm4YrRJcu
z6WAI$!Pp3Au!`tl%it?D`DxPxhFS%}w_GRET(uV`R3&hFLz<{jU|b+8$O%GWKJ52M
zAeW<9YF=cD1S{0zgr;#X(1`(i?$LZ5?!Z%jYA$bZgjpW}+M0AhQ=rN%aUM$BU|Gpz
zba%`~H1NF|Pni`6zS8;ZX0x|+4QVsKhmA`P5pjHrJ*gPZ#boh&GfjaL5*|H@G}pzC#-BSDX~b5P*HIt=4Sfr|PBp>C=lH4%+n*xjm{
zMBl&0COr=4w!d6UX@^i9uxx8_*rc
z=_qnE&h`nhsLpvkTB~1=iw@2to=tCXo`Cr!!l4FfcbuNsZsYGr?eZil8aw7LxcF$*~bVWU0OqjpN{H1DbmnFnP9(Ew6Xs
zCQMhLW^iG(AR@fDp?)(oe-y>pxN#q%G$G~hUgBS~WS0ee&j1(}+`}r|n8N+8l%-}^k5Ev#V2mK-_Z=jI
z+_+`ab;12I5&df{rL1Azv#H=PRf===7{j$GDpRxP<{?3~NlSzMn#(A3cNF)Hc|m?}
zE1_-h?AT;rJMBQ<<^=n5vlAyH%g33Z^qQ%>oY~-;Ivrj9JQJqOmH=`%jFzo^co5v4
z7Y5<0M{=F_z2WfU*|dM^C9gBVp<|ewpVDZ1s5!hA7(t)TA!y3i(=bK1+P6jpkG5#>PF$#wL>Sk|Lhr*h~6l&t8eqqGo>}_M$Ya?Bu
zH%zP;2EI^CO;~&&+&T~m%TB0pQI_st_LV<>Q#-7L22K41-OHz-tWWW9WArKFVChVa
zx{^PX+ElbD}|IWg;~@sva{28wMJDHx;3mz2UHOLl3b?m`=@b91L~?bHMH3
zXEtYl5Hud1L5_;XUFCbDHp}1mtI+yumE{$`vt6NZ5e}u6a%)@pb
z0i4|$Uy=N5DQY5`BT4j%MP%yHc7k%vxrcS?G|otaUV;6B7mTcW0X|um$n}SvB=#R;
z=y+?h4I}C$ab(r!0QS>qbMCgfB{e_C*a;2yer8tH<>0p8mTcsv3FO0E{yd~J@gYGw
z#}gUZ6)W&MR45NBM8gM;bg~;}%VLQG`MITQO~eX-{u3uXEgm)wy5M
zb&2`lx&IFPu2_*8nWr;h*ez!$dv%d$zMBuG<<8XD?r39#{d0tU+-p`<}Ub)K7Ts@nJOYZ%&vdHJ%&oyO)}2OMD?L
z!52JMXu~aW1}0qL?@OkuUt_k5B?^0QSE4KK@i026nO(o6i5f8r9~jj+9bCSgCN*#8
z!Amp#?5SU>li4Q-7fQANgI0@&gZ-lKti;4!)J(eS1A+N|p#S_C>5dJAOIAhH>~y`z
zG?zyTkKF7<2RZ^_GWx~FJ-4E5P`SYmkcJx!=)54?143Z=*Cc8t_+DqM3g-#?3YyWq
z70cj7_ySf#VJ(f5ALI-E!PDR%3LrgKmO%Ore$Ks#yd%){1k^kt8;_p!l?^jlNBUxB
z)A6RZ@D-_+QzMrgA|S)Tk@$>wO8#qZxB0#xw#7PRsM2ycQ&J`{ee3q0ahk!Kl$690
z=eP4jdb3lx@K`>NS3Gh_kR@W!`#lA?Rx*k6+*(c?4@%ND=pOJP)vF^&&xG}?b$2`$
z&+&TLF|Jy9GAlD)Xj-TP@?HQw17CU2Vy2UpL5873{{jwgR_mh--Y
zF>zchw6__K+V?uclY?V8yFf!~HY&Tr${k_wu2c_JU6=$pe>1Ls&CRQana<8Up+fUW
zbgxqpif2vdUN?`VM(J-pDz6+0-I1P<(J@G}qR&?}kaZ<{CVUM|IOD$S&0ku&$&
zcqq+7)b=^T>Zp03U>Xax{V}BcaUC^!a@U#SPfVNS}p5sQWX-1U=u9G(02Fw!s@DmEm--c&`V
zY6D*%IGw?qe6d;>Fm?#qqkfpU9bUjyXgJY0OMf{*{M=BexI7OWB$t!SUHo_9Wk3S6
zNNc6gepNa1{@Zr4up^Q?J@O1S-kFXN`7{DPor;II2X%?{2)?bSE_ui-c$y}BxzHEk
z)@ks;OM}xAh0!&nd6p*_TLpqzu?npFf+63dk{YM5!_29XYlPn)#h_>6-$y
zDg4*i9(M<3k3U>~>I(%+pOS#NB5Ia3B{RX<>xB0;0GY0tOk~nBIKk0w8prXV3%K74
z0P)EQ5dV7sPo8*=8uZ*0eRtc!jOi}LwOE3+++j%R4d8IRFwqYHA9&*BuSiV0&xP-~v
z`W}7mgUWt>Z)R(Sbl#k0rYtytHO3Ez^DD-}jR-|LMr{MENK=4-sI}LTuXmlfS`8`w
zEzW8;^!n*?=7!>7ToB_9viZiM10Tmw6Hx0;dQaAqYJ}OOjx_G>3sYLQpioof(PPO(
znIFMrr7{roW+Jz3_D@>2fOdZpkbQ
zcO$-AIU+HeVaLa2aGJPq_LUk>y6LDNqsWaRjbk!d}JZS3ViX|@x4c9{=vK8_=AQ&_@Q^|1GHqq!fS8flze
zo{?ySX+5*#)+t=NtDU$QjDV^>hMH1+OVU|%f#`8XSVCeZr*co8)~6xZ3`HLP!1UBs
zW6(h`s@j%)8a|GiYOM*xM@&E>4mYyPM6nzcSkktx+;dbgW3#((=4g3r#hGw7$_+VU
zAma1*C$7*OXbUfDY$4?4WA;cIpC?`&>n3PTjS&)GDg69a8yod7fU{3JPR-0(cUb?1
z0jDWJFnBS76%6gCZBRNXOwhK$Q}|6q6{koI=a{kfoJq=cYK};I!sc`v&|f(n+NHO%
zU9CfC9G%y<1j995h0R}nBl))xoJ#b4c1l$gHInxnL2NezdlNsBEAYEDKPiGM~PG$$IdNrJy)*a4}RW$_`ofnYp*KD|3DQeW%6`d56)oTfFPS(MB
z7o0ek_z~QR)%-b9$ZmHi@3Mr37Cm_EEx~PTA4QEIaG}6ocdQUy8i&V9%5#cCZMZ0p
zd(=EN@PbvW1$+tcg!=G3?CcNxzR}~xaY5PcZh-+~fk!U%;4TIZQrrY1mp8nk{k
zg{A5mV3ID$^{9=ehV8g47_NU!P?lwkm*p?zUKY({pCwsPGtu20r2Nc4IJkz?B-wDy
zrwpjM8L_Q_Ez1<12$jGB_bT@AvS@C3T?xNuO811y`2>1PLt)U)oK#X%hdcM?gd?o?ZA9N7^G-Put@Nknz4(nG_1PfBNQK^gVm;=
zV4Ix%xHksx_;bGX-q7b^4d1)M;dA;P)fN!tEz#z6%G_CMEHJx9R1r6Wd3;NDZ#fQeKap5y9I2FA+)cEc2fvL|Y
zz>Y{~czCy*t(P82+n{vX?7FY_#tBbvnS`0gEy8EF1G#$t;WT&gYWIVjJr?k3AR79)
z5CYqpX`Hb6y$xHBe-S*~nS+~G
zrEI0d3wZXe3kKFrX!Syvyp!JdaEfDl=YoDsND;TH0UCjBFd9WTQ
z3aFVB?F)XR#()M?kYzuNIp>6l)Wk2U7vwzLYB#|>9QS=(#P!vzVuycCr)KRPUr4Lf
zf{~lgkm7OUxVoz*)Eqi}O`tf_oN0eE3!e>4=A5S|ut%oGP&5Cn7d-k~wnhErB-nW(
zmytZ4niqN(1XBCP+dbPl1NWO|aM!&w**AC8sOkCO4I8fLfZ@16(xYk3?ODUu=flw(
zf&hoL4Er?zkBAKA<{JvxnNv?t6MxYQ=B?0#bLnCr{#=vGApBh@xAUT)d{jL1usak>
zSufr#XR
z^0QS%j(x|lZ_Z?B2|mHj(%_sD0*%+E*4jX08R1P%-ol=
zT6vMblW6lmJHACA$qjXQf!`mzJmn&}E6KkjR)F_-R$(pK-G7WNDGKB)4Q|l>Y3$5K
zf0I+Bf2kS^^52Snk18RrD){$rIbPyK!RH+LGkBT}){Nnl)l;e2Fn=!U{58Nx?5f4{
zpWYyqD+Af^wfx<#x`ZJyZ9Pw-3Om`L!TDTf@h*BlH`9DSvfnWt`OK)sACB%3-H&Tx
zpYP=Fo!d4`5NGxpv8Zfhzh0cf>HfUHzvmO%iNeD3(W8=Doc&=TTXXOiv2^vP#{NPJ
z9;4Gle%d#(omc(2mwTIO*$NByp-9U)Xzt(snYDYn$VhW5xjHL_nn|f2aI<6!nWrjX
z$(MQDqtEI5J0X|1jF-o0=0-pOo_r}4w7wUSJ;lXz{+zOj1(loQ;H^Uuo3kPnBzDH}
zZznBU8Lh8M=!%v