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
|
||||
+303
@@ -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
|
||||
@@ -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
|
||||
+59
-7
@@ -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)
|
||||
|
||||
|
||||
+34
-4
@@ -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}
|
||||
|
||||
+70
-17
@@ -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)
|
||||
|
||||
|
||||
+26
-1
@@ -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,
|
||||
|
||||
@@ -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
|
||||
+41
-14
@@ -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
|
||||
|
||||
+10
-3
@@ -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)
|
||||
+41
-4
@@ -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)
|
||||
|
||||
+27
-3
@@ -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)
|
||||
|
||||
+14
-8
@@ -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)
|
||||
+23
-103
@@ -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)
|
||||
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
|
||||
+20
-11
@@ -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},
|
||||
|
||||
+7
-6
@@ -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)
|
||||
|
||||
+141
-34
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
+172
-211
@@ -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)
|
||||
+2
-2
@@ -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,
|
||||
}
|
||||
Reference in new issue
Block a user