lots of shit
This commit is contained in:
1 parent
9e84111da3
commit
1b29aaa3b0
37 files changed
+699
-664
No files matched your search
@@ -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
|
||||
|
||||
|
||||
+7
-8
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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')
|
||||
|
||||
+36
-11
@@ -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)
|
||||
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
|
||||
@@ -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})
|
||||
|
||||
+5
-159
@@ -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',
|
||||
|
||||
+2
-2
@@ -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)
|
||||
|
||||
|
||||
+1
-1
@@ -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 = ''
|
||||
|
||||
+150
-72
@@ -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)
|
||||
+1
-1
@@ -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 = {
|
||||
|
||||
+3
-3
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
+2
-2
@@ -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)
|
||||
@@ -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)
|
||||
+2
-2
@@ -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 = ''
|
||||
|
||||
+1
-1
@@ -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
|
||||
|
||||
Reference in new issue
Block a user