jesussssss
This commit is contained in:
1 parent
daa1a4f8a3
commit
3574ecef5b
32 files changed
+1639
-914
No files matched your search
+25
-4
@@ -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)
|
||||
|
||||
+3
-3
@@ -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'),
|
||||
|
||||
+25
-8
@@ -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'),
|
||||
|
||||
+3
-3
@@ -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)
|
||||
|
||||
+6
-4
@@ -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)
|
||||
|
||||
@@ -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'),
|
||||
|
||||
+10
-10
@@ -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',
|
||||
|
||||
+2
-2
@@ -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',
|
||||
|
||||
@@ -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)
|
||||
+3
-8
@@ -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',
|
||||
|
||||
@@ -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
|
||||
|
||||
+7
-5
@@ -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)
|
||||
+86
-97
@@ -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)
|
||||
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
|
||||
|
||||
+168
-145
@@ -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
|
||||
Reference in new issue
Block a user