added lang and sorts

This commit is contained in:
Mustache Dom committed 2024-10-23 17:44:46 -07:00
1 parent fefd53857e
commit d3e99d6440
16 files changed
+260 -172

No files matched your search

+13 -7
View File
@@ -84,16 +84,22 @@ CreateThread(function()
AddMultiModel(dealer[k], options) AddMultiModel(dealer[k], options)
end end
end) end)
-- TODO add a blip for the delivery location
RegisterNetEvent('md-drugs:client:setLocation', function(data) RegisterNetEvent('md-drugs:client:setLocation', function(data)
local coord = json.decode(data.coords) local coord = json.decode(data.coords)
if isActive then local deliveryBlip = AddBlipForCoord(coord.x, coord.y, coord.z)
Blip(vector3(coord.x, coord.y, coord.z), 'Drop Off') SetBlipSprite(deliveryBlip, 1)
return SetBlipDisplay(deliveryBlip, 2)
end SetBlipScale(deliveryBlip, 1.0)
SetBlipAsShortRange(deliveryBlip, false)
SetBlipColour(deliveryBlip, 27)
BeginTextCommandSetBlipName("STRING")
AddTextComponentSubstringPlayerName('Drug Delivery')
EndTextCommandSetBlipName(deliveryBlip)
SetBlipRoute(deliveryBlip, true)
if isActive then return end
isActive = true isActive = true
Blip(vector3(coord.x, coord.y, coord.z), 'Drop Off') local Buyer = CreatePed(0, "g_m_y_famdnf_01",coord.x, coord.y, coord.z-1, 180.0, false, false)
Buyer = CreatePed(0, "g_m_y_famdnf_01",coord.x, coord.y, coord.z-1, 180.0, false, false)
Freeze(Buyer, true, 180) Freeze(Buyer, true, 180)
AddSingleModel(Buyer, { AddSingleModel(Buyer, {
icon = 'fas fa-user-secret', icon = 'fas fa-user-secret',
+11 -1
View File
@@ -53,7 +53,17 @@ function progressbar(text, time, anim)
end end
end end
function minigame(tier) function loadParticle(dict)
if not HasNamedPtfxAssetLoaded(dict) then
RequestNamedPtfxAsset(dict)
end
while not HasNamedPtfxAssetLoaded(dict) do
Wait(0)
end
SetPtfxAssetNextCall(dict)
end
function minigame()
local time = 0 local time = 0
local game = Config.Minigames local game = Config.Minigames
if minigametype == 'ps_circle' then if minigametype == 'ps_circle' then
+10 -13
View File
@@ -13,7 +13,7 @@ local Ped = "g_m_y_famdnf_01"
local labkitlocation = Config.buyheroinlabkit local labkitlocation = Config.buyheroinlabkit
local heroinkitdealer = CreatePed(0, Ped, labkitlocation.x, labkitlocation.y, labkitlocation.z-1, labkitlocation.w, false, false) local heroinkitdealer = CreatePed(0, Ped, labkitlocation.x, labkitlocation.y, labkitlocation.z-1, labkitlocation.w, false, false)
Freeze(heroinkitdealer, true, labkitlocation.w) Freeze(heroinkitdealer, true, labkitlocation.w)
AddSingleModel(heroinkitdealer, { label = "Buy Heroin Lab Kit", icon = "fas fa-eye", event = "md-drugs:client:buyheroinlabkit", distance = 2.0}, nil ) AddSingleModel(heroinkitdealer, { label = lang.targets.heroin.kit, icon = "fas fa-eye", event = "md-drugs:client:buyheroinlabkit", distance = 2.0}, nil )
end) end)
---- plant spawns dont edit ---- plant spawns dont edit
@@ -23,7 +23,7 @@ RegisterNetEvent('heroin:respawnCane', function(loc)
if not PoppyPlants[loc] then if not PoppyPlants[loc] then
PoppyPlants[loc] = CreateObject(hash, v.location, false, true, true) PoppyPlants[loc] = CreateObject(hash, v.location, false, true, true)
Freeze(PoppyPlants[loc], true, v.heading) Freeze(PoppyPlants[loc], true, v.heading)
AddSingleModel(PoppyPlants[loc], {icon = "fas fa-hand", label = "pick Poppies", action = function() pickher(loc) end}, loc ) AddSingleModel(PoppyPlants[loc], {icon = "fas fa-hand", label = Lang.targets.heroin.pick, action = function() pickher(loc) end}, loc )
end end
end) end)
@@ -43,7 +43,7 @@ RegisterNetEvent("heroin:init", function()
if not v.taken then if not v.taken then
PoppyPlants[k] = CreateObject(hash, v.location.x, v.location.y, v.location.z, false, true, true) PoppyPlants[k] = CreateObject(hash, v.location.x, v.location.y, v.location.z, false, true, true)
Freeze(PoppyPlants[k], true, v.heading) Freeze(PoppyPlants[k], true, v.heading)
AddSingleModel(PoppyPlants[k], {icon = "fas fa-hand", label = "pick Poppies", action = function() pickher(k) end}, k ) AddSingleModel(PoppyPlants[k], {icon = "fas fa-hand", label = Lang.targets.heroin.pick, action = function() pickher(k) end}, k )
end end
end end
end) end)
@@ -105,8 +105,8 @@ else
SetEntityHeading(heroinlabkit, head) SetEntityHeading(heroinlabkit, head)
PlaceObjectOnGroundProperly(heroinlabkit) PlaceObjectOnGroundProperly(heroinlabkit)
local options = { local options = {
{ event = "md-drugs:client:heatliquidheroin", icon = "fas fa-box-circle-check", label = "Cook Heroin", data = heroinlabkit}, { event = "md-drugs:client:heatliquidheroin", icon = "fas fa-box-circle-check", label = Lang.targets.heroin.cook, data = heroinlabkit},
{ event = "md-drugs:client:getheroinkitback", icon = "fas fa-box-circle-check", label = "Pick Up", data = heroinlabkit, canInteract = function() if herointable then return true end end}, { event = "md-drugs:client:getheroinkitback", icon = "fas fa-box-circle-check", label = Lang.targets.heroin.up, data = heroinlabkit, canInteract = function() if herointable then return true end end},
} }
AddMultiModel(heroinlabkit, options, heroinlabkit) AddMultiModel(heroinlabkit, options, heroinlabkit)
end end
@@ -117,7 +117,7 @@ RegisterNetEvent("md-drugs:client:heatliquidheroin", function(data)
local loc = GetEntityCoords(data.data) local loc = GetEntityCoords(data.data)
local head = GetEntityHeading(data.data) local head = GetEntityHeading(data.data)
if not ItemCheck('emptyvial') then return end if not ItemCheck('emptyvial') then return end
if not minigame(2, 8) then if not minigame() then
TriggerServerEvent("md-drugs:server:failheatingheroin") TriggerServerEvent("md-drugs:server:failheatingheroin")
DeleteObject(data.data) DeleteObject(data.data)
local dirtylabkitheroin = CreateObject("v_ret_ml_tablea", loc.x, loc.y, loc.z-1, true, false) local dirtylabkitheroin = CreateObject("v_ret_ml_tablea", loc.x, loc.y, loc.z-1, true, false)
@@ -127,10 +127,7 @@ RegisterNetEvent("md-drugs:client:heatliquidheroin", function(data)
heroinkit = StartParticleFxLoopedOnEntity("exp_air_molotov", dirtylabkitheroin, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.5, false, false, false) heroinkit = StartParticleFxLoopedOnEntity("exp_air_molotov", dirtylabkitheroin, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.5, false, false, false)
SetParticleFxLoopedAlpha(heroinkit, 3.0) SetParticleFxLoopedAlpha(heroinkit, 3.0)
SetPedToRagdoll(PlayerPedId(), 1300, 1300, 0, 0, 0, 0) SetPedToRagdoll(PlayerPedId(), 1300, 1300, 0, 0, 0, 0)
local options = { AddMultiModel(dirtylabkitheroin, {event = "md-drugs:client:cleanheroinlabkit",icon = "fas fa-box-circle-check",label = Lang.target.heroin.clean, data = dirtylabkitheroin}, nil )
{ event = "md-drugs:client:cleanheroinlabkit", icon = "fas fa-box-circle-check", label = "Clean It", data = dirtylabkitheroin}
}
AddMultiModel(dirtylabkitheroin, options, nil )
return end return end
if not progressbar(Lang.Heroin.success, 4000, 'uncuff') then return end if not progressbar(Lang.Heroin.success, 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:heatliquidheroin") TriggerServerEvent("md-drugs:server:heatliquidheroin")
@@ -151,8 +148,8 @@ local head = GetEntityHeading(data)
SetEntityHeading(heroinlabkit, head) SetEntityHeading(heroinlabkit, head)
PlaceObjectOnGroundProperly(heroinlabkit) PlaceObjectOnGroundProperly(heroinlabkit)
local options = { local options = {
{ event = "md-drugs:client:heatliquidheroin", icon = "fas fa-box-circle-check", label = "Cook Heroin", data = heroinlabkit}, { event = "md-drugs:client:heatliquidheroin", icon = "fas fa-box-circle-check", label = Lang.targets.heroin.cook, data = heroinlabkit},
{ event = "md-drugs:client:getheroinkitback", icon = "fas fa-box-circle-check", label = "Pick Up", data = heroinlabkit, canInteract = function() if herointable then return true end end}, { event = "md-drugs:client:getheroinkitback", icon = "fas fa-box-circle-check", label = Lang.targets.heroin.up, data = heroinlabkit, canInteract = function() if herointable then return true end end},
} }
AddMultiModel(heroinlabkit, options, heroinlabkit) AddMultiModel(heroinlabkit, options, heroinlabkit)
end) end)
@@ -168,7 +165,7 @@ end)
RegisterNetEvent("md-drugs:client:fillneedle", function(data) RegisterNetEvent("md-drugs:client:fillneedle", function(data)
if not minigame(2, 8) then TriggerServerEvent("md-drugs:server:failheroin", data.data) return end if not minigame() then TriggerServerEvent("md-drugs:server:failheroin", data.data) return end
if not progressbar(Lang.Heroin.needles, 4000, 'uncuff') then return end if not progressbar(Lang.Heroin.needles, 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:fillneedle", data.data) TriggerServerEvent("md-drugs:server:fillneedle", data.data)
end) end)
+7 -10
View File
@@ -5,7 +5,7 @@ CreateThread(function()
lib.requestModel(current, Config.RequestModelTime) lib.requestModel(current, Config.RequestModelTime)
local SyrupLocation = CreatePed(0, current,Config.SyrupVendor.x,Config.SyrupVendor.y,Config.SyrupVendor.z-1, Config.SyrupVendor.w, false, false) local SyrupLocation = CreatePed(0, current,Config.SyrupVendor.x,Config.SyrupVendor.y,Config.SyrupVendor.z-1, Config.SyrupVendor.w, false, false)
Freeze(SyrupLocation, true, Config.SyrupVendor.w) Freeze(SyrupLocation, true, Config.SyrupVendor.w)
AddSingleModel(SyrupLocation, { type = "client", label = "Get Task", icon = "fas fa-eye", event = "md-drugs:client:getsyruplocationtobuy", distance = 2.0}, nil ) AddSingleModel(SyrupLocation, { type = "client", label = Lang.targets.lean.git, icon = "fas fa-eye", event = "md-drugs:client:getsyruplocationtobuy", distance = 2.0}, nil )
end) end)
@@ -21,12 +21,8 @@ local items = lib.callback.await('md-drugs:server:GetRecipe', false,'lean', 'cup
for k, v in pairs (items) do for k, v in pairs (items) do
label = {} label = {}
local item = '' local item = ''
for m, d in pairs (items[k].take) do for m, d in pairs (items[k].take) do table.insert(label, GetLabel(m) .. ' X ' .. d) end
table.insert(label, GetLabel(m) .. ' X ' .. d) for m,d in pairs (items[k].give) do item = m end
end
for m,d in pairs (items[k].give) do
item = m
end
store[#store + 1] = { store[#store + 1] = {
icon = GetImage(item), icon = GetImage(item),
description = table.concat(label, ", "), description = table.concat(label, ", "),
@@ -34,17 +30,18 @@ for k, v in pairs (items) do
event = 'md-drugs:client:stirlean', event = 'md-drugs:client:stirlean',
args = { args = {
item = item, item = item,
recipe = 'weed', recipe = 'lean',
num = k, num = k,
label = 'Cooking Up ' .. GetLabel(item), label = 'Cooking Up ' .. GetLabel(item),
table = 'edibles' table = 'cups'
} }
} }
lib.registerContext({id = 'leanCraft',title = "Make Lean", options = store}) lib.registerContext({id = 'leanCraft',title = "Make Lean", options = store})
end end
sorter(store, 'title')
lib.showContext('leanCraft') lib.showContext('leanCraft')
end) end)
local busy = false local busy = false
RegisterNetEvent('md-drugs:client:stirlean', function(data) RegisterNetEvent('md-drugs:client:stirlean', function(data)
if busy then return end if busy then return end
+18 -29
View File
@@ -2,34 +2,26 @@ local QBCore = exports['qb-core']:GetCoreObject()
local tableout = false local tableout = false
local function loadParticle(dict)
if not HasNamedPtfxAssetLoaded(dict) then
RequestNamedPtfxAsset(dict)
end
while not HasNamedPtfxAssetLoaded(dict) do
Wait(0)
end
SetPtfxAssetNextCall(dict)
end
CreateThread(function() CreateThread(function()
local Ped = "g_m_y_famdnf_01" local Ped = "g_m_y_famdnf_01"
lib.requestModel(Ped, Config.RequestModelTime) lib.requestModel(Ped, Config.RequestModelTime)
local tabdealer = CreatePed(0, Ped,Config.buylsdlabkit.x,Config.buylsdlabkit.y,Config.buylsdlabkit.z-1, Config.buylsdlabkit.w, false, false) local tabdealer = CreatePed(0, Ped,Config.buylsdlabkit.x,Config.buylsdlabkit.y,Config.buylsdlabkit.z-1, Config.buylsdlabkit.w, false, false)
Freeze(tabdealer, true, Config.buylsdlabkit.w) Freeze(tabdealer, true, Config.buylsdlabkit.w)
AddSingleModel(tabdealer,{ type = "client", label = "Buy LSD Lab Kit", icon = "fas fa-eye", event = "md-drugs:client:buylabkit", distance = 2.0}, tabdealer ) AddSingleModel(tabdealer,{ type = "client", label = lang.targets.lsd.buy, icon = "fas fa-eye", event = "md-drugs:client:buylabkit", distance = 2.0}, tabdealer )
end) end)
RegisterNetEvent("md-drugs:client:getlysergic", function(data) RegisterNetEvent("md-drugs:client:getlysergic", function(data)
if not minigame(2, 8) then return end if not minigame() then return end
if not progressbar(Lang.lsd.steallys, 4000, 'uncuff') then return end if not progressbar(Lang.lsd.steallys, 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:getlysergic",data.data) TriggerServerEvent("md-drugs:server:getlysergic",data.data)
end) end)
RegisterNetEvent("md-drugs:client:getdiethylamide", function(data) RegisterNetEvent("md-drugs:client:getdiethylamide", function(data)
if not minigame(2, 8) then return end if not minigame() then return end
if not progressbar(Lang.lsd.stealdie, 4000, 'uncuff') then return end if not progressbar(Lang.lsd.stealdie, 4000, 'uncuff') then return end
TriggerServerEvent('md-drugs:server:getdiethylamide', data.data) TriggerServerEvent('md-drugs:server:getdiethylamide', data.data)
end) end)
@@ -47,10 +39,10 @@ else
SetEntityHeading(labkit, head) SetEntityHeading(labkit, head)
PlaceObjectOnGroundProperly(labkit) PlaceObjectOnGroundProperly(labkit)
local options = { local options = {
{ event = "md-drugs:client:heatliquid", icon = "fas fa-box-circle-check", label = "Heat Liquid" , data = labkit, }, { event = "md-drugs:client:heatliquid", icon = "fas fa-box-circle-check", label = Lang.targets.lsd.heat, data = labkit, },
{ event = "md-drugs:client:refinequalityacid", icon = "fas fa-box-circle-check", label = "Refine", data = labkit, }, { event = "md-drugs:client:refinequalityacid", icon = "fas fa-box-circle-check", label = Lang.targets.lsd.refine, data = labkit, },
{ event = "md-drugs:client:maketabpaper", icon = "fas fa-box-circle-check", label = "Dab Sheets", data = labkit, }, { event = "md-drugs:client:maketabpaper", icon = "fas fa-box-circle-check", label = Lang.targets.lsd.dab, data = labkit, },
{ event = "md-drugs:client:getlabkitback", icon = "fas fa-box-circle-check", label = "Pick Up", data = labkit, canInteract = function() if tableout then return true end end}, { event = "md-drugs:client:getlabkitback", icon = "fas fa-box-circle-check", label = Lang.targets.lsd.back, data = labkit, canInteract = function() if tableout then return true end end},
} }
AddMultiModel(labkit, options, labkit) AddMultiModel(labkit, options, labkit)
end end
@@ -65,10 +57,10 @@ end)
RegisterNetEvent("md-drugs:client:heatliquid", function(data) RegisterNetEvent("md-drugs:client:heatliquid", function(data)
local PedCoords = GetEntityCoords(data.data) local PedCoords = GetEntityCoords(data.data)
dict = "scr_ie_svm_technical2" local dict = "scr_ie_svm_technical2"
if not ItemCheck('lysergic_acid') then return end if not ItemCheck('lysergic_acid') then return end
if not ItemCheck('diethylamide') then return end if not ItemCheck('diethylamide') then return end
if not minigame(2, 8) then if not minigame() then
TriggerServerEvent("md-drugs:server:failheating") TriggerServerEvent("md-drugs:server:failheating")
DeleteObject(data.data) DeleteObject(data.data)
local dirtylabkit = CreateObject("v_ret_ml_tablea", PedCoords.x, PedCoords.y, PedCoords.z-1, true, false) local dirtylabkit = CreateObject("v_ret_ml_tablea", PedCoords.x, PedCoords.y, PedCoords.z-1, true, false)
@@ -77,10 +69,7 @@ RegisterNetEvent("md-drugs:client:heatliquid", function(data)
PlaceObjectOnGroundProperly(dirtylabkit) PlaceObjectOnGroundProperly(dirtylabkit)
SetParticleFxLoopedAlpha(exitPtfx, 3.0) SetParticleFxLoopedAlpha(exitPtfx, 3.0)
Wait(100) Wait(100)
local options = { AddMultiModel(dirtylabkit, { event = "md-drugs:client:cleanlabkit", icon = "fas fa-box-circle-check", label = Lang.targets.lsd.clean, data = dirtylabkit}, nil )
{ event = "md-drugs:client:cleanlabkit", icon = "fas fa-box-circle-check", label = "Clean It", data = dirtylabkit}
}
AddMultiModel(dirtylabkit, options, nil )
return end return end
if not progressbar(Lang.lsd.heat, 7000, 'uncuff') then return end if not progressbar(Lang.lsd.heat, 7000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:heatliquid") TriggerServerEvent("md-drugs:server:heatliquid")
@@ -96,10 +85,10 @@ RegisterNetEvent("md-drugs:client:cleanlabkit", function(data)
local labkit = CreateObject("v_ret_ml_tablea", coord.x, coord.y, coord.z-1, true, false) local labkit = CreateObject("v_ret_ml_tablea", coord.x, coord.y, coord.z-1, true, false)
PlaceObjectOnGroundProperly(labkit) PlaceObjectOnGroundProperly(labkit)
local options = { local options = {
{ event = "md-drugs:client:heatliquid", icon = "fas fa-box-circle-check", label = "Heat Liquid" , data = labkit, }, { event = "md-drugs:client:heatliquid", icon = "fas fa-box-circle-check", label = Lang.targets.lsd.heat, data = labkit, },
{ event = "md-drugs:client:refinequalityacid", icon = "fas fa-box-circle-check", label = "Refine", data = labkit, }, { event = "md-drugs:client:refinequalityacid", icon = "fas fa-box-circle-check", label = Lang.targets.lsd.refine, data = labkit, },
{ event = "md-drugs:client:maketabpaper", icon = "fas fa-box-circle-check", label = "Dab Sheets", data = labkit, }, { event = "md-drugs:client:maketabpaper", icon = "fas fa-box-circle-check", label = Lang.targets.lsd.dab, data = labkit, },
{ event = "md-drugs:client:getlabkitback", icon = "fas fa-box-circle-check", label = "Pick Up", data = labkit, canInteract = function() if tableout then return true end end}, { event = "md-drugs:client:getlabkitback", icon = "fas fa-box-circle-check", label = Lang.targets.lsd.back, data = labkit, canInteract = function() if tableout then return true end end},
} }
AddMultiModel(labkit, options, labkit) AddMultiModel(labkit, options, labkit)
end end
@@ -107,14 +96,14 @@ end)
RegisterNetEvent("md-drugs:client:refinequalityacid", function() RegisterNetEvent("md-drugs:client:refinequalityacid", function()
if not ItemCheck('lsd_one_vial') then return end if not ItemCheck('lsd_one_vial') then return end
if not minigame(2, 8) then TriggerServerEvent("md-drugs:server:failrefinequality") return end if not minigame() then TriggerServerEvent("md-drugs:server:failrefinequality") return end
if not progressbar(Lang.lsd.refine, 4000, 'uncuff') then return end if not progressbar(Lang.lsd.refine, 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:refinequalityacid") TriggerServerEvent("md-drugs:server:refinequalityacid")
end) end)
RegisterNetEvent("md-drugs:client:maketabpaper", function() RegisterNetEvent("md-drugs:client:maketabpaper", function()
if not ItemCheck('tab_paper') then return end if not ItemCheck('tab_paper') then return end
if not minigame(2, 8) then TriggerServerEvent("md-drugs:server:failtabs") return end if not minigame() then TriggerServerEvent("md-drugs:server:failtabs") return end
if not progressbar(Lang.lsd.dip, 4000, 'uncuff') then return end if not progressbar(Lang.lsd.dip, 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:maketabpaper") TriggerServerEvent("md-drugs:server:maketabpaper")
end) end)
@@ -126,7 +115,7 @@ end)
RegisterNetEvent("md-drugs:client:buylabkit", function() RegisterNetEvent("md-drugs:client:buylabkit", function()
if QBCore.Functions.HasItem('lsdlabkit') then Notify('You Have One Idiot', 'error') return end if QBCore.Functions.HasItem('lsdlabkit') then Notify(Lang.lsd.hav, 'error') return end
if not progressbar(Lang.lsd.buykit, 4000, 'uncuff') then return end if not progressbar(Lang.lsd.buykit, 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:getlabkit") TriggerServerEvent("md-drugs:server:getlabkit")
end) end)
+5 -3
View File
@@ -8,17 +8,19 @@ function LoadModel(hash)
Wait(3000) Wait(3000)
end end
end end
local function pick(loc) local function pick(loc)
if not progressbar(Lang.mescaline.pick, 4000, 'uncuff') then return end if not progressbar(Lang.mescaline.pick, 4000, 'uncuff') then return end
TriggerServerEvent("Mescaline:pickupCane", loc) TriggerServerEvent("Mescaline:pickupCane", loc)
end end
RegisterNetEvent('Mescaline:respawnCane', function(loc) RegisterNetEvent('Mescaline:respawnCane', function(loc)
local v = GlobalState.Mescaline[loc] local v = GlobalState.Mescaline[loc]
local hash = GetHashKey(v.model) local hash = GetHashKey(v.model)
if not Mescaline[loc] then if not Mescaline[loc] then
Mescaline[loc] = CreateObject(hash, v.location, false, true, true) Mescaline[loc] = CreateObject(hash, v.location, false, true, true)
Freeze(Mescaline[loc], true, v.heading) Freeze(Mescaline[loc], true, v.heading)
AddSingleModel(Mescaline[loc], {icon = "fas fa-hand",label = "pick Cactus",action = function() pick(loc) end}, loc ) AddSingleModel(Mescaline[loc], {icon = "fas fa-hand",label = lang.targets.mescaline.pick, action = function() pick(loc) end}, loc )
end end
end) end)
@@ -38,7 +40,7 @@ RegisterNetEvent("Mescaline:init", function()
if not v.taken then if not v.taken then
Mescaline[k] = CreateObject(hash, v.location.x, v.location.y, v.location.z, false, true, true) Mescaline[k] = CreateObject(hash, v.location.x, v.location.y, v.location.z, false, true, true)
Freeze(Mescaline[k], true, v.heading) Freeze(Mescaline[k], true, v.heading)
AddSingleModel(Mescaline[k], {icon = "fas fa-hand",label = "pick Cactus",action = function() pick(k) end}, k) AddSingleModel(Mescaline[k], {icon = "fas fa-hand",label = lang.targets.mescaline.pick,action = function() pick(k) end}, k)
end end
end end
end) end)
@@ -82,7 +84,7 @@ local chance2 = math.random(1,100)
if not progressbar(Lang.mescaline.eat, 4000, 'uncuff') then return end if not progressbar(Lang.mescaline.eat, 4000, 'uncuff') then return end
if chance <= Config.Badtrip then if chance <= Config.Badtrip then
AlienEffect() AlienEffect()
clone = ClonePed(PlayerPedId(), false, false, true) local clone = ClonePed(PlayerPedId(), false, false, true)
SetEntityAsMissionEntity(clone) SetEntityAsMissionEntity(clone)
SetEntityVisible(clone, true) SetEntityVisible(clone, true)
SetPedRelationshipGroupHash(clone) SetPedRelationshipGroupHash(clone)
+22 -11
View File
@@ -20,7 +20,7 @@ end
local function dials() local function dials()
if amonia == true then if amonia == true then
if not minigame(2, 8) then if not minigame() then
AddExplosion(1005.773, -3200.402, -38.524, 49, 10, true, false, true, true) AddExplosion(1005.773, -3200.402, -38.524, 49, 10, true, false, true, true)
ClearPedTasks(PlayerPedId()) ClearPedTasks(PlayerPedId())
amonia = nil amonia = nil
@@ -41,7 +41,17 @@ if tray then
Freeze(bucket, true, 90.0) Freeze(bucket, true, 90.0)
SmashMeth() SmashMeth()
Wait(100) Wait(100)
AddSingleModel(bucket, {name = 'bucket',icon = 'fa-solid fa-car',label = 'Bag Meth',action = function() DeleteObject(bucket)amonia = nil heated = nil tray = nil active = nil BagMeth() TriggerServerEvent('md-drugs:server:getmeth')end,}, bucket) AddSingleModel(bucket,
{name = 'bucket',icon = 'fa-solid fa-car',label = Lang.targets.meth.bag,
action = function()
DeleteObject(bucket)
amonia = nil
heated = nil
tray = nil
active = nil
BagMeth()
TriggerServerEvent('md-drugs:server:getmeth')
end,}, bucket)
end end
end end
@@ -74,34 +84,35 @@ end)
CreateThread(function() CreateThread(function()
AddBoxZoneSingle("methTeleOut",Config.MethTeleIn, {name = 'teleout', icon = "fas fa-sign-in-alt", label = "Enter Building", action = function() SetEntityCoords(PlayerPedId(), Config.MethTeleOut) end} ) AddBoxZoneSingle("methTeleOut",Config.MethTeleIn, {name = 'teleout', icon = "fas fa-sign-in-alt", label = Lang.targets.meth.enter, action = function() SetEntityCoords(PlayerPedId(), Config.MethTeleOut) end} )
AddBoxZoneSingle("methtelein",Config.MethTeleOut, {name = 'teleout', icon = "fas fa-sign-in-alt", label = "Exit Building", action = function() SetEntityCoords(PlayerPedId(), Config.MethTeleIn) end} ) AddBoxZoneSingle("methtelein",Config.MethTeleOut, {name = 'teleout', icon = "fas fa-sign-in-alt", label = Lang.targets.meth.exit, action = function() SetEntityCoords(PlayerPedId(), Config.MethTeleIn) end} )
local options = { local options = {
{ name = 'methcook', icon = "fas fa-sign-in-alt", label = "Cook Meth", distance = 2.5, action = function() startcook() end, onSelect = function() startcook() end, { name = 'methcook', icon = "fas fa-sign-in-alt", label = Lang.targets.meth.cook, distance = 2.5, action = function() startcook() end, onSelect = function() startcook() end,
canInteract = function() canInteract = function()
if amonia == nil and active == nil then if amonia == nil and active == nil then
return true return true
end end
end, end,
}, },
{ name = 'grabtray', icon = "fas fa-sign-in-alt", label = "Grab Tray", distance = 2.5, onSelect = function() trayscarry() end, action = function() trayscarry() end, { name = 'grabtray', icon = "fas fa-sign-in-alt", label = Lang.targets.meth.tray, distance = 2.5, onSelect = function() trayscarry() end, action = function() trayscarry() end,
canInteract = function() canInteract = function()
if heated and amonia and tray == nil then return true end if heated and amonia and tray == nil then return true end
end, end,
}, },
} }
AddBoxZoneMultiOptions("cookmeth",vector3(1005.72, -3200.33, -38.52), options ) AddBoxZoneMultiOptions("cookmeth",vector3(1005.72, -3200.33, -38.52), options )
AddBoxZoneSingle('boxmeth', vector3(1012.15, -3194.04, -39.20), {name = 'boxmeth',icon = "fas fa-sign-in-alt",label = "Box Up Meth",action = function() smash()end, AddBoxZoneSingle('boxmeth', vector3(1012.15, -3194.04, -39.20), {name = 'boxmeth',icon = "fas fa-sign-in-alt",label = Lang.targets.meth.box,action = function() smash()end,
canInteract = function() canInteract = function()
if tray then return true end if tray then return true end
end}) end})
AddBoxZoneSingle('adjustdials',vector3(1007.89, -3201.17, -38.99),{ name = 'adjustdials', icon = "fas fa-sign-in-alt", label = "Adjust Dials", distance = 5, action = function() dials() end, AddBoxZoneSingle('adjustdials',vector3(1007.89, -3201.17, -38.99),{ name = 'adjustdials', icon = "fas fa-sign-in-alt", label = Lang.targets.meth.adjust,
distance = 5, action = function() dials() end,
canInteract = function() canInteract = function()
if amonia and heated == nil then return true end end if amonia and heated == nil then return true end end
}) })
if Config.MethHeist == false then if Config.MethHeist == false then
AddBoxZoneMulti('methep', Config.MethEph, {icon = "fas fa-sign-in-alt", label = "Steal Ephedrine", event = 'md-drugs:client:stealeph'}) AddBoxZoneMulti('methep', Config.MethEph, {icon = "fas fa-sign-in-alt", label = Lang.targets.meth.eph, event = 'md-drugs:client:stealeph'})
AddBoxZoneMulti('methace', Config.Methace, {icon = "fas fa-sign-in-alt", label = "Steal Acetone", event = 'md-drugs:client:stealace'}) AddBoxZoneMulti('methace', Config.Methace, {icon = "fas fa-sign-in-alt", label = Lang.targets.meth.ace, event = 'md-drugs:client:stealace'})
end end
end) end)
@@ -114,7 +125,7 @@ if not Config.MethHeist == false then
Freeze(methdealer, true, 220.0) Freeze(methdealer, true, 220.0)
Wait(100) Wait(100)
AddSingleModel(methdealer,{ AddSingleModel(methdealer,{
label = "Get Mission", label = Lang.targets.meth.mission,
icon = "fas fa-eye", icon = "fas fa-eye",
action = function() action = function()
Notify(Lang.meth.mission, "success") Notify(Lang.meth.mission, "success")
+4 -6
View File
@@ -6,13 +6,12 @@ RegisterNetEvent("md-drugs:client:GetOxyCar", function()
lib.requestModel("burrito3", Config.RequestModelTime) lib.requestModel("burrito3", Config.RequestModelTime)
local paid = lib.callback.await('md-drugs:server:payfortruck', false) local paid = lib.callback.await('md-drugs:server:payfortruck', false)
if not paid then return end if not paid then return end
local oxycar = CreateVehicle("burrito3",Config.truckspawn.x, Config.truckspawn.y,Config.truckspawn.z, Config.truckspawn.h, true, false) local oxycar = CreateVehicle("burrito3",Config.truckspawn.x, Config.truckspawn.y,Config.truckspawn.z, Config.truckspawn.w, true, false)
exports[Config.Fuel]:SetFuel(oxycar, 100.0) exports[Config.Fuel]:SetFuel(oxycar, 100.0)
TriggerEvent("vehiclekeys:client:SetOwner", QBCore.Functions.GetPlate(oxycar)) TriggerEvent("vehiclekeys:client:SetOwner", QBCore.Functions.GetPlate(oxycar))
Notify(Lang.oxy.truck, 'success') Notify(Lang.oxy.truck, 'success')
TriggerEvent("md-drugs:client:getoxylocationroute") TriggerEvent("md-drugs:client:getoxylocationroute")
SetVehicleEngineOn(oxycar, true, true) AddSingleModel(oxycar, { event = "md-drugs:client:getfromtrunk", icon = "fas fa-box-circle-check", label = Lang.targets.oxy.pack}, nil )
AddSingleModel(oxycar, { event = "md-drugs:client:getfromtrunk", icon = "fas fa-box-circle-check", label = "Get Package"}, nil )
end) end)
@@ -27,7 +26,7 @@ RegisterNetEvent("md-drugs:client:getoxylocationroute", function()
SetBlipAsShortRange(deliveryBlip, false) SetBlipAsShortRange(deliveryBlip, false)
SetBlipColour(deliveryBlip, 27) SetBlipColour(deliveryBlip, 27)
BeginTextCommandSetBlipName("STRING") BeginTextCommandSetBlipName("STRING")
AddTextComponentSubstringPlayerName(text) AddTextComponentSubstringPlayerName('Oxy Buyer')
EndTextCommandSetBlipName(deliveryBlip) EndTextCommandSetBlipName(deliveryBlip)
SetBlipRoute(deliveryBlip, true) SetBlipRoute(deliveryBlip, true)
local current = "g_m_y_famdnf_01" local current = "g_m_y_famdnf_01"
@@ -39,7 +38,7 @@ RegisterNetEvent("md-drugs:client:getoxylocationroute", function()
until #(GetEntityCoords(PlayerPedId()) - vector3(CurrentLocation.x,CurrentLocation.y,CurrentLocation.z)) < 5.0 until #(GetEntityCoords(PlayerPedId()) - vector3(CurrentLocation.x,CurrentLocation.y,CurrentLocation.z)) < 5.0
RemoveBlip(deliveryBlip) RemoveBlip(deliveryBlip)
PoliceCall(Config.PoliceAlertOxy) PoliceCall(Config.PoliceAlertOxy)
AddSingleModel(oxybuyer, { type = "client", label = "Talk To Buyer", icon = "fas fa-eye", AddSingleModel(oxybuyer, { type = "client", label = Lang.targets.oxy.talk, icon = "fas fa-eye",
action = function() action = function()
if carryPackage then if carryPackage then
if not progressbar(Lang.oxy.hand, 4000, 'uncuff') then return end if not progressbar(Lang.oxy.hand, 4000, 'uncuff') then return end
@@ -78,7 +77,6 @@ end)
RegisterNetEvent("md-drugs:client:giveoxybox", function(data) RegisterNetEvent("md-drugs:client:giveoxybox", function(data)
if carryPackage then if carryPackage then
if not progressbar(Lang.oxy.hand, 4000, 'uncuff') then return end if not progressbar(Lang.oxy.hand, 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:giveoxybox") TriggerServerEvent("md-drugs:server:giveoxybox")
+6 -5
View File
@@ -1,15 +1,16 @@
local QBCore = exports['qb-core']:GetCoreObject() local QBCore = exports['qb-core']:GetCoreObject()
RegisterNetEvent("md-drugs:client:prescriptionpad", function(args) RegisterNetEvent("md-drugs:client:prescriptionpad", function(args)
local icon, event = 'fa-solid fa-file-prescription', 'md-drugs:client:writeprescription'
if QBCore.Functions.GetPlayerData().job.type == Config.PharmaJob then if QBCore.Functions.GetPlayerData().job.type == Config.PharmaJob then
lib.registerContext({ lib.registerContext({
id = 'prescriptionpad', id = 'prescriptionpad',
title = "Prescription Pad", title = "Prescription Pad",
options = { options = {
{title = 'Give Vics', description = 'Give Vics ', icon = 'fa-solid fa-file-prescription', event = 'md-drugs:client:writeprescription', args = {item = 'vicodin_prescription'}}, {title = 'Give Vics', description = 'Give Vics ', icon = icon, event = event, args = {item = 'vicodin_prescription'}},
{title = 'Give Madderal', description = 'Give Madderal ', icon = 'fa-solid fa-file-prescription', event = 'md-drugs:client:writeprescription', args = {item = 'adderal_prescription'}}, {title = 'Give Madderal', description = 'Give Madderal ', icon = icon, event = event, args = {item = 'adderal_prescription'}},
{title = 'Give Morphin',description = 'Give Morphin ',icon = 'fa-solid fa-file-prescription', event = 'md-drugs:client:writeprescription', args = {item = 'morphine_prescription'}}, {title = 'Give Morphin', description = 'Give Morphin ', icon = icon, event = event, args = {item = 'morphine_prescription'}},
{title = 'Give Zany', description = 'Give Zany ', icon = 'fa-solid fa-file-prescription', event = 'md-drugs:client:writeprescription', args = {item = 'xanax_prescription'} }, {title = 'Give Zany', description = 'Give Zany ', icon = icon, event = event, args = {item = 'xanax_prescription'} },
} }
}) })
lib.showContext('prescriptionpad') lib.showContext('prescriptionpad')
@@ -41,7 +42,7 @@ RegisterNetEvent("md-drugs:client:unbottle", function(item)
TriggerServerEvent('md-drugs:server:unbottle', item) TriggerServerEvent('md-drugs:server:unbottle', item)
end) end)
-- TODO: @Mustachedom convert to consumables
RegisterNetEvent('md-drugs:client:takepharma', function(itemName) RegisterNetEvent('md-drugs:client:takepharma', function(itemName)
if not progressbar(Lang.Pharma.consume, 1000, 'eat') then return end if not progressbar(Lang.Pharma.consume, 1000, 'eat') then return end
if itemName == "vicodin" then if itemName == "vicodin" then
+3 -2
View File
@@ -9,6 +9,7 @@ function LoadModel(hash)
Wait(3000) Wait(3000)
end end
end end
local function pick(loc) local function pick(loc)
if not progressbar(Lang.Shrooms.pick, 4000, 'uncuff') then return end if not progressbar(Lang.Shrooms.pick, 4000, 'uncuff') then return end
TriggerServerEvent("shrooms:pickupCane", loc) TriggerServerEvent("shrooms:pickupCane", loc)
@@ -19,7 +20,7 @@ RegisterNetEvent('shrooms:respawnCane', function(loc)
if not shrooms[loc] then if not shrooms[loc] then
shrooms[loc] = CreateObject(hash, v.location, false, true, true) shrooms[loc] = CreateObject(hash, v.location, false, true, true)
Freeze(shrooms[loc], true, v.heading) Freeze(shrooms[loc], true, v.heading)
AddSingleModel(shrooms[loc],{ icon = "fas fa-hand", label = "pick shrooms", action = function() pick(loc) end }, loc ) AddSingleModel(shrooms[loc],{ icon = "fas fa-hand", label = Lang.targets.shrooms.pick, action = function() pick(loc) end }, loc )
end end
end) end)
AddEventHandler('onResourceStart', function(resource) AddEventHandler('onResourceStart', function(resource)
@@ -60,7 +61,7 @@ end)
if not v.taken then if not v.taken then
shrooms[k] = CreateObject(hash, v.location.x, v.location.y, v.location.z, false, true, true) shrooms[k] = CreateObject(hash, v.location.x, v.location.y, v.location.z, false, true, true)
Freeze(shrooms[k], true, v.heading) Freeze(shrooms[k], true, v.heading)
AddSingleModel(shrooms[k],{ icon = "fas fa-hand", label = "pick shrooms", action = function() pick(k) end }, k ) AddSingleModel(shrooms[k],{ icon = "fas fa-hand", label = Lang.targets.shrooms.pick, action = function() pick(k) end }, k )
end end
end end
end) end)
+20 -20
View File
@@ -1,23 +1,23 @@
local QBCore = exports['qb-core']:GetCoreObject() local QBCore = exports['qb-core']:GetCoreObject()
local icon = "fas fa-sign-in-alt"
CreateThread(function() CreateThread(function()
AddBoxZoneMulti('makepowder', Config.MakePowder, { type = "client", event = "md-drugs:client:makepowder", icon = "fas fa-sign-in-alt", label = "chop it up"}) -- coke AddBoxZoneSingle('telecokein', Config.CokeTeleIn, {action = function()tele(Config.CokeTeleOut)end, icon = icon, label = Lang.targets.coke.enter}) -- coke
AddBoxZoneSingle('telecokein', Config.CokeTeleIn, {name = 'teleout',icon = "fas fa-sign-in-alt",label = "Enter Building",action = function() tele(Config.CokeTeleOut) end,}) -- coke AddBoxZoneSingle('telecokeout', Config.CokeTeleOut, {action = function()tele(Config.CokeTeleIn) end, icon = icon, label = Lang.targets.coke.exits}) -- coke
AddBoxZoneSingle('telecokeout', Config.CokeTeleOut, {name = 'teleout',icon = "fas fa-sign-in-alt",label = "Exit Building",action = function() tele(Config.CokeTeleIn) end,}) -- coke AddBoxZoneMulti('makepowder', Config.MakePowder, {event = "md-drugs:client:makepowder", icon = icon, label = Lang.targets.coke.chop}) -- coke
AddBoxZoneMulti('steallysergic', Config.lysergicacid, { type = "client", event = "md-drugs:client:getlysergic", icon = "fas fa-sign-in-alt", label = "stealing Lysergic"}) -- lsd AddBoxZoneMulti('steallysergic', Config.lysergicacid, {event = "md-drugs:client:getlysergic", icon = icon, label = Lang.targets.lsd.lys}) -- lsd
AddBoxZoneMulti('stealdiethylamide', Config.diethylamide, {type = "client", event = "md-drugs:client:getdiethylamide", icon = "fas fa-sign-in-alt", label = "stealing Diethylamide"}) -- lsd AddBoxZoneMulti('stealdiethylamide', Config.diethylamide, {event = "md-drugs:client:getdiethylamide", icon = icon, label = Lang.targets.lsd.die}) -- lsd
AddBoxZoneMulti('gettabs', Config.gettabs, {type = "client", event = "md-drugs:client:buytabs", icon = "fas fa-sign-in-alt", label = "Buy Tabs"}) -- lsd AddBoxZoneMulti('gettabs', Config.gettabs, {event = "md-drugs:client:buytabs", icon = icon, label = Lang.targets.lsd.buyt}) -- lsd
AddBoxZoneMulti('dryheroin', Config.dryplant, {type = "client",event = "md-drugs:client:dryplant", icon = "fas fa-sign-in-alt", label = "Dry Poppies"}) -- heroin AddBoxZoneMulti('dryheroin', Config.dryplant, {event = "md-drugs:client:dryplant", icon = icon, label = Lang.targets.heroin.dry}) -- heroin
AddBoxZoneMulti('cutheroin', Config.cutheroinone, {type = "client", event = "md-drugs:client:cutheroin", icon = "fas fa-sign-in-alt", label = "Cut Heroin"}) -- heroin AddBoxZoneMulti('cutheroin', Config.cutheroinone, {event = "md-drugs:client:cutheroin", icon = icon, label = Lang.targets.heroin.cut}) -- heroin
AddBoxZoneMulti('fillneedle', Config.fillneedle, {type = "client", event = "md-drugs:client:fillneedle", icon = "fas fa-sign-in-alt", label = "Fill Needles"}) -- heroin AddBoxZoneMulti('fillneedle', Config.fillneedle, {event = "md-drugs:client:fillneedle", icon = icon, label = Lang.targets.heroin.fill}) -- heroin
AddBoxZoneMulti('makecrack', Config.makecrack, {type = "client", event = "md-drugs:client:makecrackone", icon = "fas fa-sign-in-alt", label = "Cook Crack"}) -- crack AddBoxZoneMulti('makecrack', Config.makecrack, {event = "md-drugs:client:makecrackone", icon = icon, label = Lang.targets.crack.cook}) -- crack
AddBoxZoneMulti('bagcrack', Config.bagcrack, {type = "client", event = "md-drugs:client:bagcrack", icon = "fas fa-sign-in-alt", label = "Bag Crack"}) -- crack AddBoxZoneMulti('bagcrack', Config.bagcrack, {event = "md-drugs:client:bagcrack", icon = icon, label = Lang.targets.crack.bag}) -- crack
AddBoxZoneMulti('fillprescription', Config.FillPrescription, {type = "client", event = "md-drugs:client:fillprescription", icon = "fas fa-sign-in-alt", label = "Fill Prescription"}) -- pharma AddBoxZoneMulti('fillprescription', Config.FillPrescription, {event = "md-drugs:client:fillprescription", icon = icon, label = Lang.targets.pha.fill}) -- pharma
AddBoxZoneSingle('payfortruck', Config.Payfortruck, { event = "md-drugs:client:GetOxyCar", icon = "fas fa-sign-in-alt", label = "Pay For Truck"}) -- oxy runs AddBoxZoneSingle('payfortruck', Config.Payfortruck, {event = "md-drugs:client:GetOxyCar", icon = icon, label = Lang.targets.oxy.pay}) -- oxy runs
AddBoxZoneSingle('drymescaline', Config.DryOut, { type = "client", event = "md-drugs:client:drymescaline", icon = "fas fa-sign-in-alt", label = "Dry Out"}) -- mescaline AddBoxZoneSingle('drymescaline', Config.DryOut, {event = "md-drugs:client:drymescaline", icon = icon, label = Lang.targets.mescaline.dry}) -- mescaline
AddBoxZoneMulti('stealisosafrole', Config.isosafrole, {type = "client", event = "md-drugs:client:stealisosafrole", icon = "fas fa-sign-in-alt", label = "Steal Isosafrole"}) -- xtc AddBoxZoneMulti('stealisosafrole', Config.isosafrole, {event = "md-drugs:client:stealisosafrole", icon = icon, label = Lang.targets.xtc.iso}) -- xtc
AddBoxZoneMulti('stealmdp2p', Config.mdp2p, {type = "client", event = "md-drugs:client:stealmdp2p", icon = "fas fa-sign-in-alt", label = "Steal MDP2P"}) -- xtc AddBoxZoneMulti('stealmdp2p', Config.mdp2p, {event = "md-drugs:client:stealmdp2p", icon = icon, label = Lang.targets.xtc.mdp}) -- xtc
AddBoxZoneMulti('rawxtcloc', Config.rawxtcloc, {type = "client", event = "md-drugs:client:makingrawxtc", icon = "fas fa-sign-in-alt", label = "Make Raw XTC"}) -- xtc AddBoxZoneMulti('rawxtcloc', Config.rawxtcloc, {event = "md-drugs:client:makingrawxtc", icon = icon, label = Lang.targets.xtc.raw}) -- xtc
AddBoxZoneSingle('buypress', Config.buypress, { type = "client",event = "md-drugs:client:buypress", icon = 'fas fa-eye', label = 'Buy Press'}) -- xtc AddBoxZoneSingle('buypress', Config.buypress, {event = "md-drugs:client:buypress", icon = icon, label = Lang.targets.xtc.press}) -- xtc
AddBoxZoneMulti('stamp', Config.stamp, {type = "client", event = "md-drugs:client:stampwhite", icon = 'fas fa-eye', label = 'Stamp Pills'}) -- xtc AddBoxZoneMulti('stamp', Config.stamp, {event = "md-drugs:client:stampwhite", icon = icon, label = Lang.targets.xtc.stamp}) -- xtc
end) end)
+2
View File
@@ -28,6 +28,7 @@ CreateThread(function()
} }
lib.registerContext({id = 'travellingmerchant',title = "Travelling Merchant", options = ShopMenu}) lib.registerContext({id = 'travellingmerchant',title = "Travelling Merchant", options = ShopMenu})
end end
sorter(ShopMenu, 'title')
end) end)
@@ -44,6 +45,7 @@ RegisterNetEvent("md-drugs:client:travellingmerchantox", function(data)
}, },
{ type = 'number', label = "Amount to buy", description = settext, min = 0, max = max, default = 1 }, { type = 'number', label = "Amount to buy", description = settext, min = 0, max = max, default = 1 },
}) })
if not dialog[1] then return end
if data.cost == "Free" then data.cost = 0 end if data.cost == "Free" then data.cost = 0 end
TriggerServerEvent("md-drugs:server:travellingmerchantox", dialog[2], dialog[1], data.item, data.cost, data.table, data.num ) TriggerServerEvent("md-drugs:server:travellingmerchantox", dialog[2], dialog[1], data.item, data.cost, data.table, data.num )
end) end)
+20 -17
View File
@@ -2,6 +2,7 @@ local QBCore = exports['qb-core']:GetCoreObject()
local WeedPlant = {} local WeedPlant = {}
local exploded = nil local exploded = nil
local drying = false local drying = false
function LoadModel(hash) function LoadModel(hash)
hash = GetHashKey(hash) hash = GetHashKey(hash)
RequestModel(hash) RequestModel(hash)
@@ -29,7 +30,7 @@ RegisterNetEvent('weed:respawnCane', function(loc)
AddSingleModel(WeedPlant[loc], AddSingleModel(WeedPlant[loc],
{ {
icon = "fas fa-hand", icon = "fas fa-hand",
label = "Pick Weed", label = Lang.targets.weed.pick,
action = function() action = function()
if not progressbar(Lang.Weed.pick, 4000, 'uncuff') then return end if not progressbar(Lang.Weed.pick, 4000, 'uncuff') then return end
TriggerServerEvent("weed:pickupCane", loc) TriggerServerEvent("weed:pickupCane", loc)
@@ -53,7 +54,7 @@ RegisterNetEvent("weed:init", function()
AddSingleModel(WeedPlant[k], AddSingleModel(WeedPlant[k],
{ {
icon = "fas fa-hand", icon = "fas fa-hand",
label = "Pick Weed", label = Lang.targets.weed.pick,
action = function() action = function()
if not progressbar(Lang.Weed.pick, 4000, 'uncuff') then return end if not progressbar(Lang.Weed.pick, 4000, 'uncuff') then return end
TriggerServerEvent("weed:pickupCane", k) TriggerServerEvent("weed:pickupCane", k)
@@ -90,7 +91,7 @@ CreateThread(function()
AddBoxZoneMulti('weeddry', Config.WeedDry, { AddBoxZoneMulti('weeddry', Config.WeedDry, {
name = 'dryweed', name = 'dryweed',
icon = "fas fa-sign-in-alt", icon = "fas fa-sign-in-alt",
label = "Dry Weed", label = Lang.targets.weed.dry,
distance = 1, distance = 1,
action = function() action = function()
if not ItemCheck('wetcannabis') then return end if not ItemCheck('wetcannabis') then return end
@@ -101,12 +102,12 @@ CreateThread(function()
local weedplant = CreateObject("bkr_prop_weed_drying_01a", loc.x, loc.y+.2, loc.z, true, false) local weedplant = CreateObject("bkr_prop_weed_drying_01a", loc.x, loc.y+.2, loc.z, true, false)
drying = true drying = true
FreezeEntityPosition(weedplant, true) FreezeEntityPosition(weedplant, true)
Notify("Wait A little Bit To Dry", "success") Notify(Lang.Weed.wait, "success")
Wait(math.random(1000,5000)) Wait(math.random(1000,5000))
Notify("Take Down The Weed", "success") Notify(Lang.Weed.take, "success")
AddSingleModel(weedplant, { AddSingleModel(weedplant, {
icon = "fas fa-sign-in-alt", icon = "fas fa-sign-in-alt",
label = "Pick Up Weed", label = Lang.targets.weed.dpick,
action = function() action = function()
DeleteEntity(weedplant) DeleteEntity(weedplant)
drying = false drying = false
@@ -121,23 +122,23 @@ CreateThread(function()
if hasJob() then return true end end if hasJob() then return true end end
}) })
AddBoxZoneSingle('teleinweedout', Config.Teleout, { name = 'teleout', icon = "fas fa-sign-in-alt", label = "Enter Building", distance = 2.0, action = function() SetEntityCoords(PlayerPedId(),Config.Telein) end, AddBoxZoneSingle('teleinweedout', Config.Teleout, { name = 'teleout', icon = "fas fa-sign-in-alt", label = Lang.targets.coke.enter, distance = 2.0, action = function() SetEntityCoords(PlayerPedId(),Config.Telein) end,
canInteract = function() if hasJob() then return true end end canInteract = function() if hasJob() then return true end end
}) })
AddBoxZoneSingle('teleinweedin', Config.Telein, { name = 'teleout', icon = "fas fa-sign-in-alt", label = "Exit Building", distance = 2.0, action = function() SetEntityCoords(PlayerPedId(),Config.Teleout) end, AddBoxZoneSingle('teleinweedin', Config.Telein, { name = 'teleout', icon = "fas fa-sign-in-alt", label = Lang.targets.coke.exit, distance = 2.0, action = function() SetEntityCoords(PlayerPedId(),Config.Teleout) end,
canInteract = function() if hasJob() then return true end end canInteract = function() if hasJob() then return true end end
}) })
AddBoxZoneSingle('MakeButterCrafting', Config.MakeButter, {label = 'Open Butter Menu', action = function() lib.showContext('ButterCraft') end, icon = "fas fa-sign-in-alt", AddBoxZoneSingle('MakeButterCrafting', Config.MakeButter, {label = Lang.Weed.butt, action = function() lib.showContext('ButterCraft') end, icon = "fas fa-sign-in-alt",
canInteract = function() if hasJob() then return true end end canInteract = function() if hasJob() then return true end end
}) })
AddBoxZoneSingle('makeoil',Config.MakeOil, { AddBoxZoneSingle('makeoil',Config.MakeOil, {
name = 'Oil', name = 'Oil',
icon = "fas fa-sign-in-alt", icon = "fas fa-sign-in-alt",
label = "Make Oil", label = Lang.targets.weed.oil,
action = function() action = function()
if not ItemCheckMulti({'butane', 'grindedweed'}) then return end if not ItemCheckMulti({'butane', 'grindedweed'}) then return end
if not minigame(2, 8) then if not minigame() then
local explosion = math.random(1,100) local explosion = math.random(1,100)
local loc = GetEntityCoords(PlayerPedId()) local loc = GetEntityCoords(PlayerPedId())
if explosion <= 99 then if explosion <= 99 then
@@ -173,10 +174,10 @@ CreateThread(function()
BikerWeedFarm.Plant8.Clear(false) BikerWeedFarm.Plant8.Clear(false)
BikerWeedFarm.Plant9.Clear(false) BikerWeedFarm.Plant9.Clear(false)
RefreshInterior(BikerWeedFarm.interiorId) RefreshInterior(BikerWeedFarm.interiorId)
stove = CreateObject("prop_cooker_03",vector3(1045.49, -3198.46, -38.15-1), true, false) local stove = CreateObject("prop_cooker_03",vector3(1045.49, -3198.46, -38.15-1), true, false)
SetEntityHeading(stove, 270.00) SetEntityHeading(stove, 270.00)
FreezeEntityPosition(stove, true) FreezeEntityPosition(stove, true)
stove2 = CreateObject("prop_cooker_03",vector3(1038.90, -3198.66, -38.17-1), true, false) local stove2 = CreateObject("prop_cooker_03",vector3(1038.90, -3198.66, -38.17-1), true, false)
SetEntityHeading(stove2, 90.00) SetEntityHeading(stove2, 90.00)
FreezeEntityPosition(stove2, true) FreezeEntityPosition(stove2, true)
end) end)
@@ -220,16 +221,15 @@ local current = "u_m_m_jesus_01"
} }
lib.registerContext({id = 'WeedShop',title = "Weed Shop", options = WeedShop}) lib.registerContext({id = 'WeedShop',title = "Weed Shop", options = WeedShop})
end end
sorter(WeedShop, 'title')
end) end)
CreateThread(function() CreateThread(function()
local items = lib.callback.await('md-drugs:server:GetRecipe', false,'weed', 'edibles') local items = lib.callback.await('md-drugs:server:GetRecipe', false,'weed', 'edibles')
local items2 = lib.callback.await('md-drugs:server:GetRecipe', false,'weed', 'blunts') local items2 = lib.callback.await('md-drugs:server:GetRecipe', false,'weed', 'blunts')
local items3 = lib.callback.await('md-drugs:server:GetRecipe', false,'weed', 'bluntwrap') local items3 = lib.callback.await('md-drugs:server:GetRecipe', false,'weed', 'bluntwrap')
local craft = {} local craft, blunt, bluntwrap, label = {}, {}, {}, {}
local blunt = {}
local bluntwrap = {}
local label = {}
for k, v in pairs (items) do for k, v in pairs (items) do
label = {} label = {}
local item = '' local item = ''
@@ -303,6 +303,9 @@ for k, v in pairs (items3) do
} }
lib.registerContext({id = 'mddrugsbluntwraps',title = "Dip Blunt Wrap", options = bluntwrap}) lib.registerContext({id = 'mddrugsbluntwraps',title = "Dip Blunt Wrap", options = bluntwrap})
end end
sorter(craft, 'title')
sorter(blunt, 'title')
sorter(bluntwrap, 'title')
end) end)
RegisterNetEvent("md-drugs:client:MakeWeedItems", function(data) RegisterNetEvent("md-drugs:client:MakeWeedItems", function(data)
+2 -2
View File
@@ -5,7 +5,7 @@ local deliveryBlip = nil
RegisterNetEvent("md-drugs:client:GetLocation", function(drug, notify) RegisterNetEvent("md-drugs:client:GetLocation", function(drug, notify)
if not GetCops(Config.PoliceCount) then return end if not GetCops(Config.PoliceCount) then return end
if miss then if miss then
Notify('Already Called Someone', 'error') Notify(Lang.Wholesale.al, 'error')
else else
TriggerServerEvent('md-drugs:server:RemoveBurner', drug) TriggerServerEvent('md-drugs:server:RemoveBurner', drug)
Notify(notify, 'success') Notify(notify, 'success')
@@ -29,7 +29,7 @@ RegisterNetEvent("md-drugs:client:GetLocation", function(drug, notify)
SetEntityInvincible(drugdealer, true) SetEntityInvincible(drugdealer, true)
AddSingleModel(drugdealer, { AddSingleModel(drugdealer, {
type = "client", type = "client",
label = "Talk To Buyer", label = Lang.Wholesale.talk,
icon = "fas fa-eye", icon = "fas fa-eye",
action = function() action = function()
local luck = math.random(1,100) local luck = math.random(1,100)
+24 -44
View File
@@ -1,7 +1,6 @@
local QBCore = exports['qb-core']:GetCoreObject() local QBCore = exports['qb-core']:GetCoreObject()
local xtcpress = false local xtcpress = false
RegisterNetEvent("md-drugs:client:setpress", function(type) RegisterNetEvent("md-drugs:client:setpress", function(type)
if xtcpress then if xtcpress then
Notify(Lang.xtc.out, 'error') Notify(Lang.xtc.out, 'error')
@@ -15,26 +14,18 @@ RegisterNetEvent("md-drugs:client:setpress", function(type)
local options = { local options = {
{ {
icon = "fas fa-eye", icon = "fas fa-eye",
label = "Make XTC", label = Lang.targets.xtc.make,
distance = 2.0, distance = 2.0,
action = function() action = function() TriggerEvent("md-drugs:client:XTCMenu", type) end,
TriggerEvent("md-drugs:client:XTCMenu", type) onSelect = function() TriggerEvent("md-drugs:client:XTCMenu", type)end,
end,
onSelect = function()
TriggerEvent("md-drugs:client:XTCMenu", type)
end,
canInteract = function() canInteract = function()
if xtcpress then return true end end if xtcpress then return true end end
}, },
{ {
icon = "fas fa-eye", icon = "fas fa-eye",
label = "Pick Up", label = Lang.targets.xtc.pick,
action = function() action = function() TriggerEvent("md-drugs:client:GetPressBack", type, press) end,
TriggerEvent("md-drugs:client:GetPressBack", type, press) onSelect = function() TriggerEvent("md-drugs:client:GetPressBack", type, press) end,
end,
onSelect = function()
TriggerEvent("md-drugs:client:GetPressBack", type, press)
end,
distance = 2.0, distance = 2.0,
canInteract = function() canInteract = function()
if xtcpress then return true end end if xtcpress then return true end end
@@ -84,21 +75,21 @@ RegisterNetEvent("md-drugs:client:XTCMenu", function(type)
end) end)
RegisterNetEvent("md-drugs:client:GetPressBack", function(type, press) RegisterNetEvent("md-drugs:client:GetPressBack", function(type, press)
if not progressbar('Packing Up The Press', 5000, 'uncuff') then return end if not progressbar(Lang.xtc.pickup, 5000, 'uncuff') then return end
DeleteObject(press) DeleteObject(press)
xtcpress = false xtcpress = false
TriggerServerEvent("md-drugs:server:getpressback", type) TriggerServerEvent("md-drugs:server:getpressback", type)
end) end)
RegisterNetEvent("md-drugs:client:stealisosafrole", function(data) RegisterNetEvent("md-drugs:client:stealisosafrole", function(data)
if not minigame(2, 8) then Notify(Lang.xtc.fail, "error") return end if not minigame() then Notify(Lang.xtc.fail, "error") return end
if not progressbar(Lang.xtc.iso, 4000, 'uncuff') then return end if not progressbar(Lang.xtc.iso, 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:stealisosafrole",data.data) TriggerServerEvent("md-drugs:server:stealisosafrole",data.data)
end) end)
RegisterNetEvent("md-drugs:client:stealmdp2p", function(data) RegisterNetEvent("md-drugs:client:stealmdp2p", function(data)
if not minigame(2, 8) then Notify(Lang.xtc.fail, "error") return end if not minigame() then Notify(Lang.xtc.fail, "error") return end
if not progressbar(Lang.xtc.mdp2p, 4000, 'uncuff') then return end if not progressbar(Lang.xtc.mdp2p, 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:stealmdp2p", data.data) TriggerServerEvent("md-drugs:server:stealmdp2p", data.data)
end) end)
@@ -120,47 +111,36 @@ end)
------------------------------------------------------------------ Stamping ------------------------------------------------------------------ Stamping
RegisterNetEvent("md-drugs:client:stampwhite", function(data) RegisterNetEvent("md-drugs:client:stampwhite", function(data)
lib.registerContext({ lib.registerContext({ id = 'stampxtc', title = 'Stamp XTC Menu',
id = 'stampxtc',
title = 'Stamp XTC Menu',
options = { options = {
{ { icon = GetImage('white_xtc'), title = 'White XTC',
icon = GetImage('white_xtc'),
title = 'White XTC',
onSelect = function() onSelect = function()
if not minigame(2, 8) then Notify(Lang.xtc.fail, "error") return end if not minigame() then Notify(Lang.xtc.fail, "error") return end
if not progressbar('Stamping White Pills', 4000, 'uncuff') then return end if not progressbar(string.format(Lang.xtc.stamp, 'White'), 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:stampwhite",data.data) TriggerServerEvent("md-drugs:server:stampwhite",data.data)
end end
}, },
{ { icon = GetImage('red_xtc'), title = 'Red XTC',
icon = GetImage('red_xtc'),
title = 'Red XTC',
onSelect = function() onSelect = function()
if not minigame(2, 8) then Notify(Lang.xtc.fail, "error") return end if not minigame() then Notify(Lang.xtc.fail, "error") return end
if not progressbar('Stamping Red Pills', 4000, 'uncuff') then return end if not progressbar(string.format(Lang.xtc.stamp, 'Red'), 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:stampred", data.data) TriggerServerEvent("md-drugs:server:stampred", data.data)
end end
}, },
{ { icon = GetImage('orange_xtc'), title = 'Orange XTC',
icon = GetImage('orange_xtc'),
title = 'Orange XTC',
onSelect = function() onSelect = function()
if not minigame(2, 8) then Notify(Lang.xtc.fail, "error") return end if not minigame() then Notify(Lang.xtc.fail, "error") return end
if not progressbar('Stamping Orange Pills', 4000, 'uncuff') then return end if not progressbar(string.format(Lang.xtc.stamp, 'Orange'), 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:stamporange", data.data) TriggerServerEvent("md-drugs:server:stamporange", data.data)
end, end,
}, },
{ { icon = GetImage('blue_xtc'), title = 'Blue XTC',
icon = GetImage('blue_xtc'),
title = 'Blue XTC',
onSelect = function() onSelect = function()
if not minigame(2, 8) then Notify(Lang.xtc.fail, "error") return end if not minigame() then Notify(Lang.xtc.fail, "error") return end
if not progressbar('Stamping Blue Pills', 4000, 'uncuff') then return end if not progressbar(string.format(Lang.xtc.stamp, 'Blue'), 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:stampblue", data.data) TriggerServerEvent("md-drugs:server:stampblue", data.data)
end end
}, },
} }
}) })
lib.showContext('stampxtc') lib.showContext('stampxtc')
@@ -168,13 +148,13 @@ end)
RegisterNetEvent("md-drugs:client:getsinglepress", function() RegisterNetEvent("md-drugs:client:getsinglepress", function()
if not progressbar('Buying Press', 4000, 'uncuff') then return end if not progressbar(Lang.xtc.buyp, 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:buypress") TriggerServerEvent("md-drugs:server:buypress")
end) end)
RegisterNetEvent("md-drugs:client:exchangepresses", function(data) RegisterNetEvent("md-drugs:client:exchangepresses", function(data)
if not progressbar('Buying Press', 4000, 'uncuff') then return end if not progressbar(Lang.xtc.buyp, 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:upgradepress", data.data) TriggerServerEvent("md-drugs:server:upgradepress", data.data)
end) end)
+93 -2
View File
@@ -4,17 +4,98 @@ Lang.targets = {
coke = { coke = {
pick = 'Pick Cocaine', pick = 'Pick Cocaine',
cut = 'Cut Cocaine', cut = 'Cut Cocaine',
bag = 'Bag Cocaine' bag = 'Bag Cocaine',
enter = 'Enter Building',
exit = 'Exit Building',
chop = 'Chop Coca Leaves',
}, },
CornerSell = { CornerSell = {
sell = 'Sell %s Of %s For $%s', sell = 'Sell %s Of %s For $%s',
deny = 'Deny Price' deny = 'Deny Price'
}, },
crack = {
cook = 'Cook Crack',
bag = 'Bag Crack'
},
Delivery = { Delivery = {
Deliver = 'Deliver For %s', Deliver = 'Deliver For %s',
open = 'Open %s Shop', open = 'Open %s Shop',
hand = 'Hand Over' hand = 'Hand Over'
} },
heroin = {
pick = 'Pick Poppies',
up = 'Pick Up Table',
dry = 'Dry Poppies',
cut = 'Cut Heroin',
cook = 'Cook Heroin',
kit = 'Buy Heroin Lab Kit',
clean = 'Clean Table',
fill = 'Fill Syringe',
vial = 'Make Vial',
},
lean = {
git = 'Get Task'
},
lsd = {
buy = 'Buy LSD Lab Kit',
heat = 'Heat Liquid',
refine = 'Refine Quality',
paper = 'Make Tab Paper',
back = 'Pick Up Lab Kit',
dab = 'Dab LSD on sheets',
clean = 'Clean Table',
lys = 'Steal Lysergic Acid',
die = 'Steal Diethylamide',
buyt = 'Buy Tabs',
},
mescaline = {
pick = 'Pick Cactus',
dry = 'Dry Out Cactus',
},
meth = {
bag = 'Bag Up Meth',
enter = 'Enter Buidling',
exit = 'Exit Building',
cook = 'Cook Meth',
tray = 'Grab Tray',
box = 'Box Up Meth',
adjust = 'Adjust Temperature',
eph = 'Steal Ephedrine',
ace = 'Steal Acetone',
mission = 'Get Mission'
},
oxy = {
pack = 'Get Oxy Package',
talk = 'Talk To Buyer',
pay = 'Pay For Truck',
},
pha = {
fill = 'Fill Prescription',
},
shrooms = {
pick = 'Pick Shrooms',
},
xtc = {
iso = 'Steal Isosafrole',
mdp = 'Steal MDP2P',
raw = 'Make Raw XTC',
press = 'Buy XTC Press',
stamp = 'Stamp Pills',
make = 'Make XTC',
pick = 'Pick Up Press',
},
weed = {
pick = 'Pick Weed',
dry = 'Dry Weed',
dpick = 'Pick Dried Weed',
butt = 'Open Edible Menu',
oil = 'Make Oil'
},
Wholesale = {
talk = 'Talk To Buyer'
},
} }
Lang.Coke = { Lang.Coke = {
@@ -106,6 +187,7 @@ Lang.lsd = {
buypaper = 'Buying Tab Paper', buypaper = 'Buying Tab Paper',
buykit = 'Buying Lab Kit', buykit = 'Buying Lab Kit',
place = 'Placing Table Down', place = 'Placing Table Down',
hav = 'You Already Have A Table',
-- server -- server
lys = 'You Got Lysergic Acid', lys = 'You Got Lysergic Acid',
die = 'You Got Diethylamide', die = 'You Got Diethylamide',
@@ -169,6 +251,8 @@ Lang.Weed = {
stovehot = 'Stove Is Too Hot Wait 30 Seconds To Cool Down', stovehot = 'Stove Is Too Hot Wait 30 Seconds To Cool Down',
shat = 'Making Shatter', shat = 'Making Shatter',
roll = 'Rolling Blunts', roll = 'Rolling Blunts',
wait = 'Wait A Little Bit For To Drive',
take = 'Taking Down The Weed',
-- --
nodry = 'You Need Wet Cannabis To Dry', nodry = 'You Need Wet Cannabis To Dry',
noweed = 'Cant Roll A Blunt With Air', noweed = 'Cant Roll A Blunt With Air',
@@ -183,6 +267,13 @@ Lang.xtc = {
mdp2p = 'Stealing MDP2P', mdp2p = 'Stealing MDP2P',
iso = 'Stealing Isosafrole', iso = 'Stealing Isosafrole',
fail = 'Dude Its A Circle Not Rocket Science', fail = 'Dude Its A Circle Not Rocket Science',
pickup = 'Picking Up The Press',
stamp = 'Stamping %s Pills',
buyp = "Buying Press",
-- --
cash = 'I need 20k In Cash' cash = 'I need 20k In Cash'
} }
Lang.Wholesale = {
al = 'Already Called Someone!'
}