This commit is contained in:
Mustache Dom committed 2024-10-28 14:35:47 -07:00
1 parent 70c3d9ae15
commit 3c80fbfbb8
10 files changed
+35 -23

No files matched your search

+2 -2
View File
@@ -15,7 +15,7 @@ RegisterNetEvent('coke:respawnCane', function(loc)
if not CocaPlant[loc] then if not CocaPlant[loc] then
CocaPlant[loc] = CreateObject(hash, v.location, false, true, true) CocaPlant[loc] = CreateObject(hash, v.location, false, true, true)
Freeze(CocaPlant[loc], true, v.heading) Freeze(CocaPlant[loc], true, v.heading)
AddSingleModel(CocaPlant[loc], {icon = 'fas fa-hand', label = Lang.targets.coke.pick, action = function() if not pick(loc) then return end end}, loc) AddSingleModel(CocaPlant[loc], {icon = "fa-solid fa-seedling", label = Lang.targets.coke.pick, action = function() if not pick(loc) then return end end}, loc)
end end
end) end)
@@ -31,7 +31,7 @@ RegisterNetEvent("coke:init", function()
if not v.taken then if not v.taken then
CocaPlant[k] = CreateObject(hash, v.location.x, v.location.y, v.location.z, false, true, true) CocaPlant[k] = CreateObject(hash, v.location.x, v.location.y, v.location.z, false, true, true)
Freeze(CocaPlant[k], true, v.heading) Freeze(CocaPlant[k], true, v.heading)
AddSingleModel(CocaPlant[k], {icon = 'fas fa-hand', label = Lang.targets.coke.pick, action = function() if not pick(k) then return end end}, k) AddSingleModel(CocaPlant[k], {icon = "fa-solid fa-seedling", label = Lang.targets.coke.pick, action = function() if not pick(k) then return end end}, k)
end end
end end
end) end)
+10 -1
View File
@@ -2,6 +2,7 @@ local QBCore = exports['qb-core']:GetCoreObject()
local sell = false local sell = false
local sold = false local sold = false
local targbusy = false local targbusy = false
local inZone = false
local function reset(targ) local function reset(targ)
FreezeEntityPosition(targ, false) FreezeEntityPosition(targ, false)
@@ -49,7 +50,7 @@ function Cornersell()
canInteract = function() canInteract = function()
if not targbusy then return true end end, if not targbusy then return true end end,
}, },
{ label = Lang.targets.CornerSell.deny, icon = "fa-solid fa-person-harassing", { label = Lang.targets.CornerSell.deny, icon = "fa-solid fa-person-harassing",
action = function() deny(targ) end, action = function() deny(targ) end,
canInteract = function() canInteract = function()
if not targbusy then return true end end, if not targbusy then return true end end,
@@ -64,6 +65,7 @@ end
RegisterNetEvent('md-drugs:client:cornerselling', function() RegisterNetEvent('md-drugs:client:cornerselling', function()
if not GetCops(QBConfig.MinimumDrugSalePolice) then return end if not GetCops(QBConfig.MinimumDrugSalePolice) then return end
if inZone then Notify(Lang.Cornerselling.no, 'error') return end
local item, amount, price = lib.callback.await('md-drugs:server:cornerselling:getAvailableDrugs', false) local item, amount, price = lib.callback.await('md-drugs:server:cornerselling:getAvailableDrugs', false)
if item ~= 'nothing' then if item ~= 'nothing' then
if sell then if sell then
@@ -80,4 +82,11 @@ RegisterNetEvent('md-drugs:client:cornerselling', function()
else else
Notify(Lang.Cornerselling.nodrugs, 'error') Notify(Lang.Cornerselling.nodrugs, 'error')
end end
end)
CreateThread(function()
for k, v in pairs (QBConfig.NoSellZones) do
local box = lib.zones.box({ coords = v.loc, size = vec3(v.width, v.length, v.height), rotation = 180.0, debug = true,
onEnter = function() inZone = true end, onExit = function() inZone = false end})
end
end) end)
+1 -1
View File
@@ -26,7 +26,7 @@ CreateThread(function()
end end
end, end,
}, },
{ icon = 'fas fa-user-secret', label = string.format(Lang.targets.Delivery.open, v.name), { icon = "fa-solid fa-store", label = string.format(Lang.targets.Delivery.open, v.name),
action = function() TriggerEvent('md-drugs:client:opendealermenu') end, action = function() TriggerEvent('md-drugs:client:opendealermenu') end,
} }
} }
+5 -5
View File
@@ -7,7 +7,7 @@ local herointable = false
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 = Lang.targets.heroin.cook, data = heroinlabkit}, { event = "md-drugs:client:heatliquidheroin", icon = "fa-solid fa-temperature-high", label = Lang.targets.heroin.cook, data = heroinlabkit},
{ 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}, { 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)
@@ -24,7 +24,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 = Lang.targets.heroin.kit, icon = "fas fa-eye", event = "md-drugs:client:buyheroinlabkit", distance = 2.0}, nil ) AddSingleModel(heroinkitdealer, { label = Lang.targets.heroin.kit, icon = "fa-solid fa-money-bill", event = "md-drugs:client:buyheroinlabkit", distance = 2.0}, nil )
end) end)
RegisterNetEvent('heroin:respawnCane', function(loc) RegisterNetEvent('heroin:respawnCane', function(loc)
@@ -33,7 +33,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 = Lang.targets.heroin.pick, action = function() pickher(loc) end}, loc ) AddSingleModel(PoppyPlants[loc], {icon = "fa-solid fa-seedling", label = Lang.targets.heroin.pick, action = function() pickher(loc) end}, loc )
end end
end) end)
@@ -49,7 +49,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 = Lang.targets.heroin.pick, action = function() pickher(k) end}, k ) AddSingleModel(PoppyPlants[k], {icon = "fa-solid fa-seedling", label = Lang.targets.heroin.pick, action = function() pickher(k) end}, k )
end end
end end
end) end)
@@ -106,7 +106,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)
AddMultiModel(dirtylabkitheroin, {event = "md-drugs:client:cleanheroinlabkit",icon = "fas fa-box-circle-check",label = Lang.target.heroin.clean, data = dirtylabkitheroin}, nil ) AddMultiModel(dirtylabkitheroin, {event = "md-drugs:client:cleanheroinlabkit",icon = "fa-solid fa-hand-sparkles",label = Lang.target.heroin.clean, data = dirtylabkitheroin}, 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")
+2 -2
View File
@@ -5,11 +5,11 @@ 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 = Lang.targets.lean.git, icon = "fas fa-eye", event = "md-drugs:client:getsyruplocationtobuy", 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 )
end) end)
RegisterNetEvent("md-drugs:client:getsyruplocationtobuy", function() RegisterNetEvent("md-drugs:client:getsyruplocationtobuy", function()
Notify(Lang.Lean.marked, "success") Notify(Lang.Lean.marked, "success")
SpawnCarPedChase() SpawnCarPedChase()
end) end)
+5 -5
View File
@@ -7,9 +7,9 @@ local function createLabKit(coord, head)
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 = Lang.targets.lsd.heat, data = labkit }, { event = "md-drugs:client:heatliquid", icon = "fa-solid fa-temperature-high", label = Lang.targets.lsd.heat, data = labkit },
{ event = "md-drugs:client:refinequalityacid", icon = "fas fa-box-circle-check", label = Lang.targets.lsd.refine, data = labkit }, { event = "md-drugs:client:refinequalityacid", icon = "fa-solid fa-temperature-high", label = Lang.targets.lsd.refine, data = labkit },
{ event = "md-drugs:client:maketabpaper", icon = "fas fa-box-circle-check", label = Lang.targets.lsd.dab, data = labkit }, { event = "md-drugs:client:maketabpaper", icon = "fa-regular fa-note-sticky", label = Lang.targets.lsd.dab, data = labkit },
{ event = "md-drugs:client:getlabkitback", icon = "fas fa-box-circle-check", label = Lang.targets.lsd.back, data = labkit, canInteract = function() return tableout end } { event = "md-drugs:client:getlabkitback", icon = "fas fa-box-circle-check", label = Lang.targets.lsd.back, data = labkit, canInteract = function() return tableout end }
} }
AddMultiModel(labkit, options, labkit) AddMultiModel(labkit, options, labkit)
@@ -20,7 +20,7 @@ CreateThread(function()
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 = Lang.targets.lsd.buy, icon = "fas fa-eye", event = "md-drugs:client:buylabkit", distance = 2.0}, tabdealer ) AddSingleModel(tabdealer,{ type = "client", label = Lang.targets.lsd.buy, icon = "fa-solid fa-money-bill", event = "md-drugs:client:buylabkit", distance = 2.0}, tabdealer )
end) end)
@@ -72,7 +72,7 @@ RegisterNetEvent("md-drugs:client:heatliquid", function(data)
PlaceObjectOnGroundProperly(dirtylabkit) PlaceObjectOnGroundProperly(dirtylabkit)
SetParticleFxLoopedAlpha(exitPtfx, 3.0) SetParticleFxLoopedAlpha(exitPtfx, 3.0)
Wait(100) Wait(100)
AddMultiModel(dirtylabkit, { event = "md-drugs:client:cleanlabkit", icon = "fas fa-box-circle-check", label = Lang.targets.lsd.clean, data = dirtylabkit}, nil ) AddMultiModel(dirtylabkit, { event = "md-drugs:client:cleanlabkit", icon = "fa-solid fa-hand-sparkles", label = Lang.targets.lsd.clean, data = dirtylabkit}, 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")
+2 -2
View File
@@ -12,7 +12,7 @@ RegisterNetEvent('Mescaline:respawnCane', function(loc)
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 = Lang.targets.mescaline.pick, action = function() pick(loc) end}, loc ) AddSingleModel(Mescaline[loc], {icon = "fa-solid fa-seedling",label = Lang.targets.mescaline.pick, action = function() pick(loc) end}, loc )
end end
end) end)
@@ -28,7 +28,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 = Lang.targets.mescaline.pick,action = function() pick(k) end}, k) AddSingleModel(Mescaline[k], {icon = "fa-solid fa-seedling",label = Lang.targets.mescaline.pick,action = function() pick(k) end}, k)
end end
end end
end) end)
+4 -4
View File
@@ -41,7 +41,7 @@ if tray then
SmashMeth() SmashMeth()
Wait(100) Wait(100)
AddSingleModel(bucket, AddSingleModel(bucket,
{name = 'bucket',icon = 'fa-solid fa-car',label = Lang.targets.meth.bag, canInteract = function() if active == nil then return false end end, {name = 'bucket',icon = "fa-solid fa-sack-xmark",label = Lang.targets.meth.bag, canInteract = function() if active == nil then return false end end,
action = function() action = function()
active = nil active = nil
DeleteObject(bucket) DeleteObject(bucket)
@@ -82,10 +82,10 @@ CreateThread(function()
end) end)
CreateThread(function() CreateThread(function()
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("methTeleOut",Config.MethTeleIn, {name = 'teleout', icon = "fa-solid fa-door-open", 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 = Lang.targets.meth.exit, action = function() SetEntityCoords(PlayerPedId(), Config.MethTeleIn) end} ) AddBoxZoneSingle("methtelein",Config.MethTeleOut, {name = 'teleout', icon = "fa-solid fa-door-closed", 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 = Lang.targets.meth.cook, distance = 2.5, action = function() startcook() end, { name = 'methcook', icon = "fa-solid fa-temperature-high", label = Lang.targets.meth.cook, distance = 2.5, action = 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
+1
View File
@@ -128,6 +128,7 @@ Lang.Cornerselling = {
stop = "Lazy Ass Cant Even Sell Drugs", stop = "Lazy Ass Cant Even Sell Drugs",
nodrugs = "What You Gonna sell? Air?", nodrugs = "What You Gonna sell? Air?",
notcops = "Not Enough Cops", notcops = "Not Enough Cops",
no = 'You Cant Sell Drugs Here!',
-- end client side notifys -- end client side notifys
-- progressbars -- progressbars
sell = "Selling Drugs", sell = "Selling Drugs",
+3 -1
View File
@@ -229,7 +229,9 @@ QBConfig.DeliveryLocations = {
[79] = { ["label"] = "Bahama Mamas", ["coords"] = vector3(-1383.1, -639.99, 28.67),}, [79] = { ["label"] = "Bahama Mamas", ["coords"] = vector3(-1383.1, -639.99, 28.67),},
} }
QBConfig.NoSellZones = {
{loc = vector3(445.11, -991.3, 30.69), width = 10.0, length = 10.0, height = 10.0, rot = 180.0},
}
QBConfig.SellLevel = { QBConfig.SellLevel = {
{price = 0.5, minrep = 0, maxrep = 240, label = 'Rookie'}, {price = 0.5, minrep = 0, maxrep = 240, label = 'Rookie'},
{price = 1.0, minrep = 240, maxrep = 600, label = 'Corner Boy'}, {price = 1.0, minrep = 240, maxrep = 600, label = 'Corner Boy'},