Add files via upload

This commit is contained in:
Mustache Dom authored and GitHub committed 2024-05-02 18:34:14 -07:00
1 parent 7d9d4a030d
commit f9709311af
20 files changed
+1701 -3894

No files matched your search

+75 -174
View File
@@ -2,14 +2,6 @@ local QBCore = exports['qb-core']:GetCoreObject()
local CocaPlant = {}
local PoppyPlants = {}
local herointable = false
function LoadModel(hash)
hash = GetHashKey(hash)
RequestModel(hash)
while not HasModelLoaded(hash) do
Wait(3000)
end
end
local function loadParticle(dict)
if not HasNamedPtfxAssetLoaded(dict) then
RequestNamedPtfxAsset(dict)
@@ -19,25 +11,21 @@ local function loadParticle(dict)
end
SetPtfxAssetNextCall(dict)
end
CreateThread(function()
local Ped = "g_m_y_famdnf_01"
lib.requestModel("g_m_y_famdnf_01", Config.requestModelTime)
labkitlocation = Config.buyheroinlabkit
heroinkitdealer = CreatePed(0, Ped,labkitlocation.x, labkitlocation.y, labkitlocation.z-1, 180.0, false, false)
lib.requestModel("g_m_y_famdnf_01", Config.RequestModelTime)
local labkitlocation = Config.buyheroinlabkit
local heroinkitdealer = CreatePed(0, Ped, labkitlocation.x, labkitlocation.y, labkitlocation.z-1, labkitlocation.w, false, false)
FreezeEntityPosition(heroinkitdealer, true)
SetEntityInvincible(heroinkitdealer, true)
exports['qb-target']:AddTargetEntity(heroinkitdealer, {
options = {
{
type = "client",
label = "Buy Heroin Lab Kit",
icon = "fas fa-eye",
event = "md-drugs:client:buyheroinlabkit"
},
}
})
local options = {
{ label = "Buy Heroin Lab Kit", icon = "fas fa-eye", event = "md-drugs:client:buyheroinlabkit", distance = 2.0},
}
if Config.oxtarget then
exports.ox_target:addLocalEntity(heroinkitdealer, options)
else
exports['qb-target']:AddTargetEntity(heroinkitdealer, { options = options, distance = 2.0})
end
end)
---- plant spawns dont edit
@@ -55,15 +43,8 @@ RegisterNetEvent('heroin:respawnCane', function(loc)
icon = "fas fa-hand",
label = "pick Poppies",
action = function()
QBCore.Functions.Progressbar("pick_cane", "picking heroin", 2000, false, true, {
disableMovement = true, disableCarMovement = true, disableMouse = false, disableCombat = true, },
{ animDict = 'amb@prop_human_bum_bin@idle_a', anim = 'idle_a', flags = 47, },
{}, {}, function()
TriggerServerEvent("heroin:pickupCane", loc)
ClearPedTasks(PlayerPedId())
end, function() -- Cancel
ClearPedTasks(PlayerPedId())
end)
if not progressbar(Lang.Heroin.pick, 4000, 'uncuff') then return end
TriggerServerEvent("heroin:pickupCane", loc)
end
}
},
@@ -95,15 +76,8 @@ RegisterNetEvent("heroin:init", function()
icon = "fas fa-hand",
label = "Pick Poppies",
action = function()
QBCore.Functions.Progressbar("pick_cane", "Picking Heroin", 2000, false, true, {
disableMovement = true, disableCarMovement = true, disableMouse = false, disableCombat = true, },
{ animDict = 'amb@prop_human_bum_bin@idle_a', anim = 'idle_a', flags = 47, },
{}, {}, function()
TriggerServerEvent("heroin:pickupCane", k)
ClearPedTasks(PlayerPedId())
end, function() -- Cancel
ClearPedTasks(PlayerPedId())
end)
if not progressbar(Lang.Heroin.pick, 4000, 'uncuff') then return end
TriggerServerEvent("heroin:pickupCane", k)
end
}
},
@@ -140,172 +114,99 @@ AddEventHandler('onResourceStart', function(resource)
end)
---- plant stop end
RegisterNetEvent("md-drugs:client:dryplant")
AddEventHandler("md-drugs:client:dryplant", function()
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
QBCore.Functions.Progressbar("drink_something", "drying out these poppies!", 4000, false, true, {
disableMovement = false,
disableCarMovement = false,
disableMouse = false,
disableCombat = true,
disableInventory = true,
}, {}, {}, {}, function()-- Done
TriggerServerEvent("md-drugs:server:dryplant")
ClearPedTasks(PlayerPedId())
end)
RegisterNetEvent("md-drugs:client:dryplant", function(data)
if not progressbar(Lang.Heroin.dryout, 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:dryplant",data.data)
end)
RegisterNetEvent("md-drugs:client:cutheroin")
AddEventHandler("md-drugs:client:cutheroin", function()
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
QBCore.Functions.Progressbar("drink_something", "cutting the heroin!", 4000, false, true, {
disableMovement = false,
disableCarMovement = false,
disableMouse = false,
disableCombat = true,
disableInventory = true,
}, {}, {}, {}, function()-- Done
TriggerServerEvent("md-drugs:server:cutheroin")
ClearPedTasks(PlayerPedId())
end)
RegisterNetEvent("md-drugs:client:cutheroin", function(data)
if not ItemCheck('bakingsoda') then return end
if not progressbar(Lang.Heroin.cutting, 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:cutheroin", data.data)
end)
RegisterNetEvent("md-drugs:client:buyheroinlabkit")
AddEventHandler("md-drugs:client:buyheroinlabkit", function()
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
QBCore.Functions.Progressbar("drink_something", "Shhhhh!", 4000, false, true, {
disableMovement = false,
disableCarMovement = false,
disableMouse = false,
disableCombat = true,
disableInventory = true,
}, {}, {}, {}, function()-- Done
TriggerServerEvent("md-drugs:server:getheroinlabkit")
ClearPedTasks(PlayerPedId())
end)
RegisterNetEvent("md-drugs:client:buyheroinlabkit", function()
if not progressbar(Lang.Heroin.secret, 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:getheroinlabkit")
end)
RegisterNetEvent("md-drugs:client:setheroinlabkit")
AddEventHandler("md-drugs:client:setheroinlabkit", function()
if herointable then
QBCore.Functions.Notify('You Already Have A Table Out', 'error')
Notify(Lang.Heroin.tableout, 'error')
else
local PedCoords = GetEntityCoords(PlayerPedId())
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
if not progressbar(Lang.Heroin.table, 4000, 'uncuff') then TriggerServerEvent('md-drugs:server:getheroinlabkitback') return end
herointable = true
ClearPedTasks(PlayerPedId())
heroinlabkit = CreateObject("v_ret_ml_tablea", PedCoords.x+1, PedCoords.y+1, PedCoords.z-1, true, false)
local heroinlabkit = CreateObject("v_ret_ml_tablea", PedCoords.x+1, PedCoords.y+1, PedCoords.z-1, true, false)
PlaceObjectOnGroundProperly(heroinlabkit)
exports['qb-target']:AddTargetEntity(heroinlabkit, {
options = {
{
event = "md-drugs:client:heatliquidheroin",
icon = "fas fa-box-circle-check",
label = "Cook Heroin",
},
{
event = "md-drugs:client:getheroinkitback",
icon = "fas fa-box-circle-check",
label = "Pick Up",
canInteract = function()
if herointable then return true end end
},
}
})
end
local options = {
{ event = "md-drugs:client:heatliquidheroin", icon = "fas fa-box-circle-check", label = "Cook Heroin", 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},
}
if Config.oxtarget then
exports.ox_target:addLocalEntity(heroinlabkit, options)
else
exports['qb-target']:AddTargetEntity(heroinlabkit, {options = options})
end
end
end)
RegisterNetEvent("md-drugs:client:heatliquidheroin")
AddEventHandler("md-drugs:client:heatliquidheroin", function()
RegisterNetEvent("md-drugs:client:heatliquidheroin", function(data)
local PedCoords = GetEntityCoords(PlayerPedId())
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
exports['ps-ui']:Circle(function(success)
if success then
TriggerServerEvent("md-drugs:server:heatliquidheroin")
ClearPedTasks(PlayerPedId())
else
TriggerServerEvent("md-drugs:server:failheatingheroin")
ClearPedTasks(PlayerPedId())
DeleteObject(heroinlabkit)
if not ItemCheck('emptyvial') then return end
if not minigame(2, 8) then
TriggerServerEvent("md-drugs:server:failheatingheroin")
DeleteObject(data.data)
Wait(100)
dirtylabkitheroin = CreateObject("v_ret_ml_tablea", PedCoords.x+1, PedCoords.y+1, PedCoords.z-1, true, false)
local dirtylabkitheroin = CreateObject("v_ret_ml_tablea", PedCoords.x+1, PedCoords.y+1, PedCoords.z-1, true, false)
loadParticle("core")
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)
ClearPedTasks(PlayerPedId())
SetPedToRagdoll(PlayerPedId(), 1300, 1300, 0, 0, 0, 0)
exports['qb-target']:AddTargetEntity(dirtylabkitheroin, {
options = {
{
event = "md-drugs:client:cleanheroinlabkit",
icon = "fas fa-box-circle-check",
label = "Clean It",
SetPedToRagdoll(PlayerPedId(), 1300, 1300, 0, 0, 0, 0)
local options = {
{ event = "md-drugs:client:cleanheroinlabkit", icon = "fas fa-box-circle-check", label = "Clean It", data = dirtylabkitheroin}
}
}
})
end
end, 1, 8) -- NumberOfCircles, MS
if Config.OxTarget then
exports.ox_target:addLocalEntity(dirtylabkitheroin, { options = options})
else
exports['qb-target']:AddTargetEntity(dirtylabkitheroin, {options = options})
end
return end
if not progressbar(Lang.Heroin.success, 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:heatliquidheroin")
end)
RegisterNetEvent("md-drugs:client:cleanheroinlabkit")
AddEventHandler("md-drugs:client:cleanheroinlabkit", function()
TriggerEvent('animations:client:EmoteCommandStart', {'clean'})
QBCore.Functions.Progressbar("drink_something", "Cleaning", 4000, false, true, {
disableMovement = false,
disableCarMovement = false,
disableMouse = false,
disableCombat = true,
disableInventory = true,
}, {}, {}, {}, function()-- Done
TriggerServerEvent("md-drugs:server:removecleaningkitheroin")
ClearPedTasks(PlayerPedId())
end)
RegisterNetEvent("md-drugs:client:cleanheroinlabkit", function(data)
if not ItemCheck('cleaningkit') then return end
if not progressbar(Lang.Heroin.clean, 4000, 'clean') then return end
TriggerServerEvent("md-drugs:server:removecleaningkitheroin", data.data)
end)
RegisterNetEvent("md-drugs:client:deletedirtyheroin")
AddEventHandler("md-drugs:client:deletedirtyheroin", function()
DeleteObject(dirtylabkitheroin)
RegisterNetEvent("md-drugs:client:deletedirtyheroin", function(data)
DeleteObject(data)
herointable = false
Wait(1000)
TriggerEvent("md-drugs:client:setheroinlabkit")
end)
RegisterNetEvent("md-drugs:client:getheroinkitback")
AddEventHandler("md-drugs:client:getheroinkitback", function()
herointable = false
DeleteObject(heroinlabkit)
TriggerServerEvent("md-drugs:server:getheroinlabkitback")
ClearPedTasks(PlayerPedId())
end)
RegisterNetEvent("md-drugs:client:fillneedle")
AddEventHandler("md-drugs:client:fillneedle", function()
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
QBCore.Functions.Progressbar("drink_something", "Filling Needles!", 1000, false, true, {
disableMovement = false,
disableCarMovement = false,
disableMouse = false,
disableCombat = true,
disableInventory = true,
}, {}, {}, {}, function()-- Done
exports['ps-ui']:Circle(function(success)
if success then
TriggerServerEvent("md-drugs:server:fillneedle")
ClearPedTasks(PlayerPedId())
else
TriggerServerEvent("md-drugs:server:failheroin")
ClearPedTasks(PlayerPedId())
end
end, 2, 8) -- NumberOfCircles,
end)
RegisterNetEvent("md-drugs:client:getheroinkitback", function(data)
if not progressbar(Lang.Heroin.pickup, 4000, 'uncuff') then return end
herointable = false
DeleteObject(data.data)
TriggerServerEvent("md-drugs:server:getheroinlabkitback")
end)
RegisterNetEvent("md-drugs:client:fillneedle", function(data)
if not minigame(2, 8) then TriggerServerEvent("md-drugs:server:failheroin", data.data) return end
if not progressbar(Lang.Heroin.needles, 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:fillneedle", data.data)
end)