Add files via upload

This commit is contained in:
Mustache Dom authored and GitHub committed 2023-03-22 15:45:25 -07:00
commit d043772a5f
84 files changed
+3741

No files matched your search

+265
View File
@@ -0,0 +1,265 @@
local QBCore = exports['qb-core']:GetCoreObject()
local CocaPlant = {}
function LoadModel(hash)
hash = GetHashKey(hash)
RequestModel(hash)
while not HasModelLoaded(hash) do
Wait(3000)
end
end
RegisterNetEvent('coke:respawnCane', function(loc)
local v = GlobalState.CocaPlant[loc]
local hash = GetHashKey(v.model)
--if not HasModelLoaded(hash) then LoadModel(hash) end
if not CocaPlant[loc] then
CocaPlant[loc] = CreateObject(hash, v.location, false, true, true)
SetEntityAsMissionEntity(CocaPlant[loc], true, true)
FreezeEntityPosition(CocaPlant[loc], true)
SetEntityHeading(CocaPlant[loc], v.heading)
exports['qb-target']:AddTargetEntity(CocaPlant[loc], {
options = { {
icon = "fas fa-hand",
label = "pick Cocaine",
action = function()
QBCore.Functions.Progressbar("pick_cane", "picking Cocaine Leaves", 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("coke:pickupCane", loc)
ClearPedTasks(PlayerPedId())
end, function() -- Cancel
ClearPedTasks(PlayerPedId())
end)
end
}
},
distance = 3.0
})
end
end)
RegisterNetEvent('coke:removeCane', function(loc)
if DoesEntityExist(CocaPlant[loc]) then DeleteEntity(CocaPlant[loc]) end
CocaPlant[loc] = nil
end)
RegisterNetEvent("coke:init", function()
for k, v in pairs (GlobalState.CocaPlant) do
local hash = GetHashKey(v.model)
if not HasModelLoaded(hash) then LoadModel(hash) end
if not v.taken then
CocaPlant[k] = CreateObject(hash, v.location.x, v.location.y, v.location.z, false, true, true)
SetEntityAsMissionEntity(CocaPlant[k], true, true)
FreezeEntityPosition(CocaPlant[k], true)
SetEntityHeading(CocaPlant[k], v.heading)
exports['qb-target']:AddTargetEntity(CocaPlant[k], {
options = { {
icon = "fas fa-hand",
label = "pick cocaine",
action = function()
QBCore.Functions.Progressbar("pick_cane", "picking Cocaine Leaves", 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("coke:pickupCane", k)
ClearPedTasks(PlayerPedId())
end, function() -- Cancel
ClearPedTasks(PlayerPedId())
end)
end
}
},
distance = 3.0
})
end
end
end)
AddEventHandler('onResourceStart', function(resource)
if resource == GetCurrentResourceName() then
LoadModel('prop_plant_01a')
TriggerEvent('coke:init')
end
end)
RegisterNetEvent('QBCore:Client:OnPlayerLoaded', function()
Wait(3000)
LoadModel('prop_plant_01a')
TriggerEvent('coke:init')
end)
AddEventHandler('onResourceStop', function(resourceName)
if GetCurrentResourceName() == resourceName then
SetModelAsNoLongerNeeded(GetHashKey('prop_plant_01a'))
for k, v in pairs(CocaPlant) do
if DoesEntityExist(v) then
DeleteEntity(v) SetEntityAsNoLongerNeeded(v)
end
end
end
end)
RegisterNetEvent("md-drugs:client:makepowder")
AddEventHandler("md-drugs:client:makepowder", function()
RequestAnimDict("mp_arresting")
while (not HasAnimDictLoaded("mp_arresting")) do
Citizen.Wait(4000)
end
TaskPlayAnim(PlayerPedId(), "mp_arresting" ,"a_uncuff" ,8.0, -8.0, -1, 1, 0, false, false, false )
local PedCoords = GetEntityCoords(PlayerPedId())
QBCore.Functions.Progressbar("drink_something", "chopping plants to powder", 4000, false, true, {
disableMovement = false,
disableCarMovement = false,
disableMouse = false,
disableCombat = true,
disableInventory = true,
}, {}, {}, {}, function()-- Done
TriggerServerEvent("md-drugs:server:makepowder")
Citizen.Wait(4000)
ClearPedTasks(PlayerPedId())
end)
end)
RegisterNetEvent("md-drugs:client:cutcokeone")
AddEventHandler("md-drugs:client:cutcokeone", function()
RequestAnimDict("mp_arresting")
while (not HasAnimDictLoaded("mp_arresting")) do
Citizen.Wait(4000)
end
TaskPlayAnim(PlayerPedId(), "mp_arresting" ,"a_uncuff" ,8.0, -8.0, -1, 1, 0, false, false, false )
local PedCoords = GetEntityCoords(PlayerPedId())
QBCore.Functions.Progressbar("drink_something", "cutting coke to increase profits yeeee!", 4000, false, true, {
disableMovement = false,
disableCarMovement = false,
disableMouse = false,
disableCombat = true,
disableInventory = true,
}, {}, {}, {}, function()-- Done
TriggerServerEvent("md-drugs:server:cutcokeone")
Citizen.Wait(4000)
ClearPedTasks(PlayerPedId())
end)
end)
RegisterNetEvent("md-drugs:client:cutcoketwo")
AddEventHandler("md-drugs:client:cutcoketwo", function()
RequestAnimDict("mp_arresting")
while (not HasAnimDictLoaded("mp_arresting")) do
Citizen.Wait(4000)
end
TaskPlayAnim(PlayerPedId(), "mp_arresting" ,"a_uncuff" ,8.0, -8.0, -1, 1, 0, false, false, false )
local PedCoords = GetEntityCoords(PlayerPedId())
QBCore.Functions.Progressbar("drink_something", "cutting coke to increase profits yeeee!", 4000, false, true, {
disableMovement = false,
disableCarMovement = false,
disableMouse = false,
disableCombat = true,
disableInventory = true,
}, {}, {}, {}, function()-- Done
TriggerServerEvent("md-drugs:server:cutcoketwo")
Citizen.Wait(4000)
ClearPedTasks(PlayerPedId())
end)
end)
RegisterNetEvent("md-drugs:client:cutcokethree")
AddEventHandler("md-drugs:client:cutcokethree", function()
RequestAnimDict("mp_arresting")
while (not HasAnimDictLoaded("mp_arresting")) do
Citizen.Wait(4000)
end
TaskPlayAnim(PlayerPedId(), "mp_arresting" ,"a_uncuff" ,8.0, -8.0, -1, 1, 0, false, false, false )
local PedCoords = GetEntityCoords(PlayerPedId())
QBCore.Functions.Progressbar("drink_something", "cutting coke to increase profits yeeee!", 4000, false, true, {
disableMovement = false,
disableCarMovement = false,
disableMouse = false,
disableCombat = true,
disableInventory = true,
}, {}, {}, {}, function()-- Done
TriggerServerEvent("md-drugs:server:cutcokethree")
Citizen.Wait(4000)
ClearPedTasks(PlayerPedId())
end)
end)
RegisterNetEvent("md-drugs:client:bagcoke")
AddEventHandler("md-drugs:client:bagcoke", function()
RequestAnimDict("mp_arresting")
while (not HasAnimDictLoaded("mp_arresting")) do
Citizen.Wait(4000)
end
TaskPlayAnim(PlayerPedId(), "mp_arresting" ,"a_uncuff" ,8.0, -8.0, -1, 1, 0, false, false, false )
local PedCoords = GetEntityCoords(PlayerPedId())
QBCore.Functions.Progressbar("drink_something", "Bilbo Baggin this bitch!", 4000, false, true, {
disableMovement = false,
disableCarMovement = false,
disableMouse = false,
disableCombat = true,
disableInventory = true,
}, {}, {}, {}, function()-- Done
TriggerServerEvent("md-drugs:server:bagcoke")
Citizen.Wait(4000)
ClearPedTasks(PlayerPedId())
end)
end)
RegisterNetEvent("md-drugs:client:bagcoketwo")
AddEventHandler("md-drugs:client:bagcoketwo", function()
RequestAnimDict("mp_arresting")
while (not HasAnimDictLoaded("mp_arresting")) do
Citizen.Wait(4000)
end
TaskPlayAnim(PlayerPedId(), "mp_arresting" ,"a_uncuff" ,8.0, -8.0, -1, 1, 0, false, false, false )
local PedCoords = GetEntityCoords(PlayerPedId())
QBCore.Functions.Progressbar("drink_something", "Bilbo Baggin this bitch!", 4000, false, true, {
disableMovement = false,
disableCarMovement = false,
disableMouse = false,
disableCombat = true,
disableInventory = true,
}, {}, {}, {}, function()-- Done
TriggerServerEvent("md-drugs:server:bagcoketwo")
Citizen.Wait(4000)
ClearPedTasks(PlayerPedId())
end)
end)
RegisterNetEvent("md-drugs:client:bagcokethree")
AddEventHandler("md-drugs:client:bagcokethree", function()
RequestAnimDict("mp_arresting")
while (not HasAnimDictLoaded("mp_arresting")) do
Citizen.Wait(4000)
end
TaskPlayAnim(PlayerPedId(), "mp_arresting" ,"a_uncuff" ,8.0, -8.0, -1, 1, 0, false, false, false )
local PedCoords = GetEntityCoords(PlayerPedId())
QBCore.Functions.Progressbar("drink_something", "Bilbo Baggin this bitch!", 4000, false, true, {
disableMovement = false,
disableCarMovement = false,
disableMouse = false,
disableCombat = true,
disableInventory = true,
}, {}, {}, {}, function()-- Done
TriggerServerEvent("md-drugs:server:bagcokethree")
Citizen.Wait(4000)
ClearPedTasks(PlayerPedId())
end)
end)
+111
View File
@@ -0,0 +1,111 @@
local QBCore = exports['qb-core']:GetCoreObject()
RegisterNetEvent("md-drugs:client:makecrackone")
AddEventHandler("md-drugs:client:makecrackone", function()
RequestAnimDict("mp_arresting")
while (not HasAnimDictLoaded("mp_arresting")) do
Citizen.Wait(4000)
end
TaskPlayAnim(PlayerPedId(), "mp_arresting" ,"a_uncuff" ,8.0, -8.0, -1, 1, 0, false, false, false )
local PedCoords = GetEntityCoords(PlayerPedId())
QBCore.Functions.Progressbar("drink_something", "Cooking Crack", 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:makecrackone")
Citizen.Wait(4000)
ClearPedTasks(PlayerPedId())
else
TriggerServerEvent("md-drugs:server:failcrackone")
Citizen.Wait(4000)
ClearPedTasks(PlayerPedId())
end
end, 3, 8) -- NumberOfCircles,
end)
end)
RegisterNetEvent("md-drugs:client:makecracktwo")
AddEventHandler("md-drugs:client:makecracktwo", function()
RequestAnimDict("mp_arresting")
while (not HasAnimDictLoaded("mp_arresting")) do
Citizen.Wait(4000)
end
TaskPlayAnim(PlayerPedId(), "mp_arresting" ,"a_uncuff" ,8.0, -8.0, -1, 1, 0, false, false, false )
local PedCoords = GetEntityCoords(PlayerPedId())
QBCore.Functions.Progressbar("drink_something", "Cooking Crack", 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:makecracktwo")
Citizen.Wait(4000)
ClearPedTasks(PlayerPedId())
else
TriggerServerEvent("md-drugs:server:failcracktwo")
Citizen.Wait(4000)
ClearPedTasks(PlayerPedId())
end
end, 3, 8) -- NumberOfCircles,
end)
end)
RegisterNetEvent("md-drugs:client:makecrackthree")
AddEventHandler("md-drugs:client:makecrackthree", function()
RequestAnimDict("mp_arresting")
while (not HasAnimDictLoaded("mp_arresting")) do
Citizen.Wait(4000)
end
TaskPlayAnim(PlayerPedId(), "mp_arresting" ,"a_uncuff" ,8.0, -8.0, -1, 1, 0, false, false, false )
local PedCoords = GetEntityCoords(PlayerPedId())
QBCore.Functions.Progressbar("drink_something", "Cooking Crack", 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:makecrackthree")
Citizen.Wait(4000)
ClearPedTasks(PlayerPedId())
else
TriggerServerEvent("md-drugs:server:failcrackthree")
Citizen.Wait(4000)
ClearPedTasks(PlayerPedId())
end
end, 3, 8) -- NumberOfCircles,
end)
end)
RegisterNetEvent("md-drugs:client:bagcrack")
AddEventHandler("md-drugs:client:bagcrack", function()
RequestAnimDict("mp_arresting")
while (not HasAnimDictLoaded("mp_arresting")) do
Citizen.Wait(4000)
end
TaskPlayAnim(PlayerPedId(), "mp_arresting" ,"a_uncuff" ,8.0, -8.0, -1, 1, 0, false, false, false )
local PedCoords = GetEntityCoords(PlayerPedId())
QBCore.Functions.Progressbar("drink_something", "bagging some good good", 4000, false, true, {
disableMovement = false,
disableCarMovement = false,
disableMouse = false,
disableCombat = true,
disableInventory = true,
}, {}, {}, {}, function()-- Done
TriggerServerEvent("md-drugs:server:bagcrack")
Citizen.Wait(4000)
ClearPedTasks(PlayerPedId())
end)
end)
+281
View File
@@ -0,0 +1,281 @@
local QBCore = exports['qb-core']:GetCoreObject()
local CocaPlant = {}
local PoppyPlants = {}
function LoadModel(hash)
hash = GetHashKey(hash)
RequestModel(hash)
while not HasModelLoaded(hash) do
Wait(3000)
end
end
RegisterNetEvent('heroin:respawnCane', function(loc)
local v = GlobalState.PoppyPlants[loc]
local hash = GetHashKey(v.model)
--if not HasModelLoaded(hash) then LoadModel(hash) end
if not PoppyPlants[loc] then
PoppyPlants[loc] = CreateObject(hash, v.location, false, true, true)
SetEntityAsMissionEntity(PoppyPlants[loc], true, true)
FreezeEntityPosition(PoppyPlants[loc], true)
SetEntityHeading(PoppyPlants[loc], v.heading)
exports['qb-target']:AddTargetEntity(PoppyPlants[loc], {
options = { {
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)
end
}
},
distance = 3.0
})
end
end)
RegisterNetEvent('heroin:removeCane', function(loc)
if DoesEntityExist(PoppyPlants[loc]) then DeleteEntity(PoppyPlants[loc]) end
PoppyPlants[loc] = nil
end)
RegisterNetEvent("heroin:init", function()
for k, v in pairs (GlobalState.PoppyPlants) do
local hash = GetHashKey(v.model)
if not HasModelLoaded(hash) then LoadModel(hash) end
if not v.taken then
PoppyPlants[k] = CreateObject(hash, v.location.x, v.location.y, v.location.z, false, true, true)
SetEntityAsMissionEntity(PoppyPlants[k], true, true)
FreezeEntityPosition(PoppyPlants[k], true)
SetEntityHeading(PoppyPlants[k], v.heading)
exports['qb-target']:AddTargetEntity(PoppyPlants[k], {
options = { {
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)
end
}
},
distance = 3.0
})
end
end
end)
AddEventHandler('onResourceStart', function(resource)
if resource == GetCurrentResourceName() then
LoadModel('prop_plant_01b')
TriggerEvent('heroin:init')
end
end)
RegisterNetEvent('QBCore:Client:OnPlayerLoaded', function()
Wait(3000)
LoadModel('prop_plant_01b')
TriggerEvent('heroin:init')
end)
AddEventHandler('onResourceStop', function(resourceName)
if GetCurrentResourceName() == resourceName then
SetModelAsNoLongerNeeded(GetHashKey('prop_plant_01b'))
for k, v in pairs(PoppyPlants) do
if DoesEntityExist(v) then
DeleteEntity(v) SetEntityAsNoLongerNeeded(v)
end
end
end
end)
RegisterNetEvent("md-drugs:client:dryplant")
AddEventHandler("md-drugs:client:dryplant", function()
RequestAnimDict("mp_arresting")
while (not HasAnimDictLoaded("mp_arresting")) do
Citizen.Wait(4000)
end
TaskPlayAnim(PlayerPedId(), "mp_arresting" ,"a_uncuff" ,8.0, -8.0, -1, 1, 0, false, false, false )
local PedCoords = GetEntityCoords(PlayerPedId())
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")
Citizen.Wait(4000)
ClearPedTasks(PlayerPedId())
end)
end)
RegisterNetEvent("md-drugs:client:cutheroin")
AddEventHandler("md-drugs:client:cutheroin", function()
RequestAnimDict("mp_arresting")
while (not HasAnimDictLoaded("mp_arresting")) do
Citizen.Wait(4000)
end
TaskPlayAnim(PlayerPedId(), "mp_arresting" ,"a_uncuff" ,8.0, -8.0, -1, 1, 0, false, false, false )
local PedCoords = GetEntityCoords(PlayerPedId())
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")
Citizen.Wait(4000)
ClearPedTasks(PlayerPedId())
end)
end)
RegisterNetEvent("md-drugs:client:cutherointwo")
AddEventHandler("md-drugs:client:cutherointwo", function()
RequestAnimDict("mp_arresting")
while (not HasAnimDictLoaded("mp_arresting")) do
Citizen.Wait(4000)
end
TaskPlayAnim(PlayerPedId(), "mp_arresting" ,"a_uncuff" ,8.0, -8.0, -1, 1, 0, false, false, false )
local PedCoords = GetEntityCoords(PlayerPedId())
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:cutherointwo")
Citizen.Wait(4000)
ClearPedTasks(PlayerPedId())
end)
end)
RegisterNetEvent("md-drugs:client:cutherointhree")
AddEventHandler("md-drugs:client:cutherointhree", function()
RequestAnimDict("mp_arresting")
while (not HasAnimDictLoaded("mp_arresting")) do
Citizen.Wait(4000)
end
TaskPlayAnim(PlayerPedId(), "mp_arresting" ,"a_uncuff" ,8.0, -8.0, -1, 1, 0, false, false, false )
local PedCoords = GetEntityCoords(PlayerPedId())
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:cutherointhree")
Citizen.Wait(4000)
ClearPedTasks(PlayerPedId())
end)
end)
RegisterNetEvent("md-drugs:client:buyheroinlabkit")
AddEventHandler("md-drugs:client:buyheroinlabkit", function()
RequestAnimDict("mp_arresting")
while (not HasAnimDictLoaded("mp_arresting")) do
Citizen.Wait(4000)
end
TaskPlayAnim(PlayerPedId(), "mp_arresting" ,"a_uncuff" ,8.0, -8.0, -1, 1, 0, false, false, false )
local PedCoords = GetEntityCoords(PlayerPedId())
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")
Citizen.Wait(4000)
ClearPedTasks(PlayerPedId())
end)
end)
RegisterNetEvent("md-drugs:client:heatliquidheroin")
AddEventHandler("md-drugs:client:heatliquidheroin", function()
RequestAnimDict("mp_arresting")
while (not HasAnimDictLoaded("mp_arresting")) do
Citizen.Wait(4000)
end
TaskPlayAnim(PlayerPedId(), "mp_arresting" ,"a_uncuff" ,8.0, -8.0, -1, 1, 0, false, false, false )
local PedCoords = GetEntityCoords(PlayerPedId())
QBCore.Functions.Progressbar("drink_something", "Heating Heroin!", 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:heatliquidheroin")
Citizen.Wait(4000)
ClearPedTasks(PlayerPedId())
else
TriggerServerEvent("md-drugs:server:failheatingheroin")
Citizen.Wait(4000)
ClearPedTasks(PlayerPedId())
end
end, 1, 8) -- NumberOfCircles,
end)
end)
RegisterNetEvent("md-drugs:client:fillneedle")
AddEventHandler("md-drugs:client:fillneedle", function()
RequestAnimDict("mp_arresting")
while (not HasAnimDictLoaded("mp_arresting")) do
Citizen.Wait(4000)
end
TaskPlayAnim(PlayerPedId(), "mp_arresting" ,"a_uncuff" ,8.0, -8.0, -1, 1, 0, false, false, false )
local PedCoords = GetEntityCoords(PlayerPedId())
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")
Citizen.Wait(4000)
ClearPedTasks(PlayerPedId())
else
TriggerServerEvent("md-drugs:server:failheroin")
Citizen.Wait(4000)
ClearPedTasks(PlayerPedId())
end
end, 2, 8) -- NumberOfCircles,
end)
end)
+597
View File
@@ -0,0 +1,597 @@
local QBCore = exports['qb-core']:GetCoreObject()
RegisterNetEvent("md-drugs:client:getlysergic")
AddEventHandler("md-drugs:client:getlysergic", function()
RequestAnimDict("mp_arresting")
while (not HasAnimDictLoaded("mp_arresting")) do
Citizen.Wait(4000)
end
TaskPlayAnim(PlayerPedId(), "mp_arresting" ,"a_uncuff" ,8.0, -8.0, -1, 1, 0, false, false, false )
local PedCoords = GetEntityCoords(PlayerPedId())
QBCore.Functions.Progressbar("drink_something", "Stealing Lysergic Acid!", 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:getlysergic")
Citizen.Wait(4000)
ClearPedTasks(PlayerPedId())
else
Citizen.Wait(4000)
ClearPedTasks(PlayerPedId())
end
end, 1, 8) -- NumberOfCircles, MS
end)
end)
RegisterNetEvent("md-drugs:client:getdiethylamide")
AddEventHandler("md-drugs:client:getdiethylamide", function()
RequestAnimDict("mp_arresting")
while (not HasAnimDictLoaded("mp_arresting")) do
Citizen.Wait(4000)
end
TaskPlayAnim(PlayerPedId(), "mp_arresting" ,"a_uncuff" ,8.0, -8.0, -1, 1, 0, false, false, false )
local PedCoords = GetEntityCoords(PlayerPedId())
QBCore.Functions.Progressbar("drink_something", "Stealing Diethylamide!", 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:getdiethylamide")
Citizen.Wait(4000)
ClearPedTasks(PlayerPedId())
else
Citizen.Wait(4000)
ClearPedTasks(PlayerPedId())
end
end, 1, 8) -- NumberOfCircles, MS
end)
end)
RegisterNetEvent("md-drugs:client:heatliquid")
AddEventHandler("md-drugs:client:heatliquid", function()
RequestAnimDict("mp_arresting")
while (not HasAnimDictLoaded("mp_arresting")) do
Citizen.Wait(4000)
end
TaskPlayAnim(PlayerPedId(), "mp_arresting" ,"a_uncuff" ,8.0, -8.0, -1, 1, 0, false, false, false )
local PedCoords = GetEntityCoords(PlayerPedId())
QBCore.Functions.Progressbar("drink_something", "Heating Liquids!", 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:heatliquid")
Citizen.Wait(4000)
ClearPedTasks(PlayerPedId())
else
TriggerServerEvent("md-drugs:server:failheating")
Citizen.Wait(4000)
ClearPedTasks(PlayerPedId())
end
end, 1, 8) -- NumberOfCircles, MS
end)
end)
RegisterNetEvent("md-drugs:client:refinequalityacid")
AddEventHandler("md-drugs:client:refinequalityacid", function()
RequestAnimDict("mp_arresting")
while (not HasAnimDictLoaded("mp_arresting")) do
Citizen.Wait(4000)
end
TaskPlayAnim(PlayerPedId(), "mp_arresting" ,"a_uncuff" ,8.0, -8.0, -1, 1, 0, false, false, false )
local PedCoords = GetEntityCoords(PlayerPedId())
QBCore.Functions.Progressbar("drink_something", "Refining The Quality!", 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:refinequalityacid")
Citizen.Wait(4000)
ClearPedTasks(PlayerPedId())
else
TriggerServerEvent("md-drugs:server:failrefinequality")
Citizen.Wait(4000)
ClearPedTasks(PlayerPedId())
end
end, 1, 8) -- NumberOfCircles, MS
end)
end)
RegisterNetEvent("md-drugs:client:maketabpaperone")
AddEventHandler("md-drugs:client:maketabpaperone", function()
RequestAnimDict("mp_arresting")
while (not HasAnimDictLoaded("mp_arresting")) do
Citizen.Wait(4000)
end
TaskPlayAnim(PlayerPedId(), "mp_arresting" ,"a_uncuff" ,8.0, -8.0, -1, 1, 0, false, false, false )
local PedCoords = GetEntityCoords(PlayerPedId())
QBCore.Functions.Progressbar("drink_something", "Dropping Tabs!", 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:maketabpaperone")
Citizen.Wait(4000)
ClearPedTasks(PlayerPedId())
else
TriggerServerEvent("md-drugs:server:failtabsone")
Citizen.Wait(4000)
ClearPedTasks(PlayerPedId())
end
end, 3, 8) -- NumberOfCircles,
end)
end)
RegisterNetEvent("md-drugs:client:maketabpapertwo")
AddEventHandler("md-drugs:client:maketabpapertwo", function()
RequestAnimDict("mp_arresting")
while (not HasAnimDictLoaded("mp_arresting")) do
Citizen.Wait(4000)
end
TaskPlayAnim(PlayerPedId(), "mp_arresting" ,"a_uncuff" ,8.0, -8.0, -1, 1, 0, false, false, false )
local PedCoords = GetEntityCoords(PlayerPedId())
QBCore.Functions.Progressbar("drink_something", "Dropping Tabs!", 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:maketabpapertwo")
Citizen.Wait(4000)
ClearPedTasks(PlayerPedId())
else
TriggerServerEvent("md-drugs:server:failtabstwo")
Citizen.Wait(4000)
ClearPedTasks(PlayerPedId())
end
end, 3, 8) -- NumberOfCircles,
end)
end)
RegisterNetEvent("md-drugs:client:maketabpaperthree")
AddEventHandler("md-drugs:client:maketabpaperthree", function()
RequestAnimDict("mp_arresting")
while (not HasAnimDictLoaded("mp_arresting")) do
Citizen.Wait(4000)
end
TaskPlayAnim(PlayerPedId(), "mp_arresting" ,"a_uncuff" ,8.0, -8.0, -1, 1, 0, false, false, false )
local PedCoords = GetEntityCoords(PlayerPedId())
QBCore.Functions.Progressbar("drink_something", "Dropping Tabs!", 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:maketabpaperthree")
Citizen.Wait(4000)
ClearPedTasks(PlayerPedId())
else
TriggerServerEvent("md-drugs:server:failtabsthree")
Citizen.Wait(4000)
ClearPedTasks(PlayerPedId())
end
end, 3, 8) -- NumberOfCircles,
end)
end)
RegisterNetEvent("md-drugs:client:maketabpaperfour")
AddEventHandler("md-drugs:client:maketabpaperfour", function()
RequestAnimDict("mp_arresting")
while (not HasAnimDictLoaded("mp_arresting")) do
Citizen.Wait(4000)
end
TaskPlayAnim(PlayerPedId(), "mp_arresting" ,"a_uncuff" ,8.0, -8.0, -1, 1, 0, false, false, false )
local PedCoords = GetEntityCoords(PlayerPedId())
QBCore.Functions.Progressbar("drink_something", "Dropping Tabs!", 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:maketabpaperfour")
Citizen.Wait(4000)
ClearPedTasks(PlayerPedId())
else
TriggerServerEvent("md-drugs:server:failtabsfour")
Citizen.Wait(4000)
ClearPedTasks(PlayerPedId())
end
end, 3, 8) -- NumberOfCircles,
end)
end)
RegisterNetEvent("md-drugs:client:maketabpaperfive")
AddEventHandler("md-drugs:client:maketabpaperfive", function()
RequestAnimDict("mp_arresting")
while (not HasAnimDictLoaded("mp_arresting")) do
Citizen.Wait(4000)
end
TaskPlayAnim(PlayerPedId(), "mp_arresting" ,"a_uncuff" ,8.0, -8.0, -1, 1, 0, false, false, false )
local PedCoords = GetEntityCoords(PlayerPedId())
QBCore.Functions.Progressbar("drink_something", "Dropping Tabs!", 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:maketabpaperfive")
Citizen.Wait(4000)
ClearPedTasks(PlayerPedId())
else
TriggerServerEvent("md-drugs:server:failtabsfive")
Citizen.Wait(4000)
ClearPedTasks(PlayerPedId())
end
end, 3, 8) -- NumberOfCircles,
end)
end)
RegisterNetEvent("md-drugs:client:maketabpapersix")
AddEventHandler("md-drugs:client:maketabpapersix", function()
RequestAnimDict("mp_arresting")
while (not HasAnimDictLoaded("mp_arresting")) do
Citizen.Wait(4000)
end
TaskPlayAnim(PlayerPedId(), "mp_arresting" ,"a_uncuff" ,8.0, -8.0, -1, 1, 0, false, false, false )
local PedCoords = GetEntityCoords(PlayerPedId())
QBCore.Functions.Progressbar("drink_something", "Dropping Tabs!", 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:maketabpapersix")
Citizen.Wait(4000)
ClearPedTasks(PlayerPedId())
else
TriggerServerEvent("md-drugs:server:failtabsix")
Citizen.Wait(4000)
ClearPedTasks(PlayerPedId())
end
end, 3, 8) -- NumberOfCircles,
end)
end)
RegisterNetEvent("md-drugs:client:cutsheet")
AddEventHandler("md-drugs:client:cutsheet", function()
RequestAnimDict("mp_arresting")
while (not HasAnimDictLoaded("mp_arresting")) do
Citizen.Wait(4000)
end
TaskPlayAnim(PlayerPedId(), "mp_arresting" ,"a_uncuff" ,8.0, -8.0, -1, 1, 0, false, false, false )
local PedCoords = GetEntityCoords(PlayerPedId())
QBCore.Functions.Progressbar("drink_something", "Cutting Sheets", 4000, false, true, {
disableMovement = false,
disableCarMovement = false,
disableMouse = false,
disableCombat = true,
disableInventory = true,
}, {}, {}, {}, function()-- Done
Citizen.Wait(4000)
ClearPedTasks(PlayerPedId())
end)
end)
RegisterNetEvent("md-drugs:client:buytabs")
AddEventHandler("md-drugs:client:buytabs", function()
RequestAnimDict("mp_arresting")
while (not HasAnimDictLoaded("mp_arresting")) do
Citizen.Wait(4000)
end
TaskPlayAnim(PlayerPedId(), "mp_arresting" ,"a_uncuff" ,8.0, -8.0, -1, 1, 0, false, false, false )
local PedCoords = GetEntityCoords(PlayerPedId())
QBCore.Functions.Progressbar("drink_something", "Buying Tab Paper", 4000, false, true, {
disableMovement = false,
disableCarMovement = false,
disableMouse = false,
disableCombat = true,
disableInventory = true,
}, {}, {}, {}, function()-- Done
Citizen.Wait(4000)
TriggerServerEvent("md-drugs:server:gettabpaper")
ClearPedTasks(PlayerPedId())
end)
end)
RegisterNetEvent("md-drugs:client:buylabkit")
AddEventHandler("md-drugs:client:buylabkit", function()
RequestAnimDict("mp_arresting")
while (not HasAnimDictLoaded("mp_arresting")) do
Citizen.Wait(4000)
end
TaskPlayAnim(PlayerPedId(), "mp_arresting" ,"a_uncuff" ,8.0, -8.0, -1, 1, 0, false, false, false )
local PedCoords = GetEntityCoords(PlayerPedId())
QBCore.Functions.Progressbar("drink_something", "Buying A Lab Kit", 4000, false, true, {
disableMovement = false,
disableCarMovement = false,
disableMouse = false,
disableCombat = true,
disableInventory = true,
}, {}, {}, {}, function()-- Done
Citizen.Wait(4000)
TriggerServerEvent("md-drugs:server:getlabkit")
ClearPedTasks(PlayerPedId())
end)
end)
RegisterNetEvent("md-drugs:client:getdirtykit")
AddEventHandler("md-drugs:client:getdirtykit", function()
RequestAnimDict("mp_arresting")
while (not HasAnimDictLoaded("mp_arresting")) do
Citizen.Wait(4000)
end
TaskPlayAnim(PlayerPedId(), "mp_arresting" ,"a_uncuff" ,8.0, -8.0, -1, 1, 0, false, false, false )
local PedCoords = GetEntityCoords(PlayerPedId())
QBCore.Functions.Progressbar("drink_something", "Ruining Your Kit", 4000, false, true, {
disableMovement = false,
disableCarMovement = false,
disableMouse = false,
disableCombat = true,
disableInventory = true,
}, {}, {}, {}, function()-- Done
Citizen.Wait(4000)
TriggerServerEvent("md-drugs:server:getdirtykit")
ClearPedTasks(PlayerPedId())
end)
end)
function MethBagEffect()
local startStamina = 8
TrevorEffect()
SetRunSprintMultiplierForPlayer(PlayerId(), 1.49)
while startStamina > 0 do
Wait(1000)
if math.random(5, 100) < 10 then
RestorePlayerStamina(PlayerId(), 1.0)
end
startStamina = startStamina - 1
if math.random(5, 100) < 51 then
TrevorEffect()
end
end
startStamina = 0
SetRunSprintMultiplierForPlayer(PlayerId(), 1.0)
end
function TrevorEffect()
StartScreenEffect("DrugsTrevorClownsFightIn", 3.0, 0)
Wait(3000)
StartScreenEffect("DrugsTrevorClownsFight", 3.0, 0)
Wait(3000)
StartScreenEffect("DrugsTrevorClownsFightOut", 3.0, 0)
StopScreenEffect("DrugsTrevorClownsFight")
StopScreenEffect("DrugsTrevorClownsFightIn")
StopScreenEffect("DrugsTrevorClownsFightOut")
end
function EcstasyEffect()
local startStamina = 30
SetFlash(0, 0, 500, 7000, 500)
while startStamina > 0 do
Wait(1000)
startStamina = startStamina - 1
RestorePlayerStamina(PlayerId(), 1.0)
if math.random(1, 100) < 51 then
SetFlash(0, 0, 500, 7000, 500)
ShakeGameplayCam('SMALL_EXPLOSION_SHAKE', 0.08)
end
end
if IsPedRunning(PlayerPedId()) then
SetPedToRagdoll(PlayerPedId(), math.random(1000, 3000), math.random(1000, 3000), 3, 0, 0, 0)
end
startStamina = 0
end
function CokeBaggyEffect()
local startStamina = 20
local ped = PlayerPedId()
AlienEffect()
SetRunSprintMultiplierForPlayer(PlayerId(), 1.1)
while startStamina > 0 do
Wait(1000)
if math.random(1, 100) < 20 then
RestorePlayerStamina(PlayerId(), 1.0)
end
startStamina = startStamina - 1
if math.random(1, 100) < 10 and IsPedRunning(ped) then
SetPedToRagdoll(ped, math.random(1000, 3000), math.random(1000, 3000), 3, 0, 0, 0)
end
if math.random(1, 300) < 10 then
AlienEffect()
Wait(math.random(3000, 6000))
end
end
if IsPedRunning(ped) then
SetPedToRagdoll(ped, math.random(1000, 3000), math.random(1000, 3000), 3, 0, 0, 0)
end
startStamina = 0
SetRunSprintMultiplierForPlayer(PlayerId(), 1.0)
end
function AlienEffect()
StartScreenEffect("DrugsMichaelAliensFightIn", 3.0, 0)
Wait(math.random(5000, 8000))
StartScreenEffect("DrugsMichaelAliensFight", 3.0, 0)
Wait(math.random(5000, 8000))
StartScreenEffect("DrugsMichaelAliensFightOut", 3.0, 0)
StopScreenEffect("DrugsMichaelAliensFightIn")
StopScreenEffect("DrugsMichaelAliensFight")
StopScreenEffect("DrugsMichaelAliensFightOut")
end
RegisterNetEvent('md-drugs:client:takesmileytabs', function()
QBCore.Functions.Progressbar("use_lsd", "Have Fun!", 1750, false, true, {
disableMovement = false,
disableCarMovement = false,
disableMouse = false,
disableCombat = true,
}, {
animDict = "mp_suicide",
anim = "pill",
flags = 49,
}, {}, {}, function() -- Done
StopAnimTask(PlayerPedId(), "mp_suicide", "pill", 1.0)
TriggerEvent("evidence:client:SetStatus", "widepupils", 300)
AlienEffect()
end, function() -- Cancel
StopAnimTask(PlayerPedId(), "mp_suicide", "pill", 1.0)
QBCore.Functions.Notify("Canceled", "error")
end)
end)
RegisterNetEvent('md-drugs:client:takewildcherrytabs', function()
QBCore.Functions.Progressbar("use_lsd", "Have Fun!", 1750, false, true, {
disableMovement = false,
disableCarMovement = false,
disableMouse = false,
disableCombat = true,
}, {
animDict = "mp_suicide",
anim = "pill",
flags = 49,
}, {}, {}, function() -- Done
StopAnimTask(PlayerPedId(), "mp_suicide", "pill", 1.0)
TriggerEvent("evidence:client:SetStatus", "widepupils", 300)
AlienEffect()
end, function() -- Cancel
StopAnimTask(PlayerPedId(), "mp_suicide", "pill", 1.0)
QBCore.Functions.Notify("Canceled", "error")
end)
end)
RegisterNetEvent('md-drugs:client:takeyinyangtabs', function()
QBCore.Functions.Progressbar("use_lsd", "Have Fun!", 1750, false, true, {
disableMovement = false,
disableCarMovement = false,
disableMouse = false,
disableCombat = true,
}, {
animDict = "mp_suicide",
anim = "pill",
flags = 49,
}, {}, {}, function() -- Done
StopAnimTask(PlayerPedId(), "mp_suicide", "pill", 1.0)
TriggerEvent("evidence:client:SetStatus", "widepupils", 300)
AlienEffect()
end, function() -- Cancel
StopAnimTask(PlayerPedId(), "mp_suicide", "pill", 1.0)
QBCore.Functions.Notify("Canceled", "error")
end)
end)
RegisterNetEvent('md-drugs:client:takepineappletabs', function()
QBCore.Functions.Progressbar("use_lsd", "Have Fun!", 1750, false, true, {
disableMovement = false,
disableCarMovement = false,
disableMouse = false,
disableCombat = true,
}, {
animDict = "mp_suicide",
anim = "pill",
flags = 49,
}, {}, {}, function() -- Done
StopAnimTask(PlayerPedId(), "mp_suicide", "pill", 1.0)
TriggerEvent("evidence:client:SetStatus", "widepupils", 300)
EcstasyEffect()
end, function() -- Cancel
StopAnimTask(PlayerPedId(), "mp_suicide", "pill", 1.0)
QBCore.Functions.Notify("Canceled", "error")
end)
end)
RegisterNetEvent('md-drugs:client:takebarttabs', function()
QBCore.Functions.Progressbar("use_lsd", "Have Fun!", 1750, false, true, {
disableMovement = false,
disableCarMovement = false,
disableMouse = false,
disableCombat = true,
}, {
animDict = "mp_suicide",
anim = "pill",
flags = 49,
}, {}, {}, function() -- Done
StopAnimTask(PlayerPedId(), "mp_suicide", "pill", 1.0)
TriggerEvent("evidence:client:SetStatus", "widepupils", 300)
TrevorEffect()
end, function() -- Cancel
StopAnimTask(PlayerPedId(), "mp_suicide", "pill", 1.0)
QBCore.Functions.Notify("Canceled", "error")
end)
end)
RegisterNetEvent('md-drugs:client:takegratefuldeadtabs', function()
QBCore.Functions.Progressbar("use_lsd", "Have Fun!", 10000, false, true, {
disableMovement = false,
disableCarMovement = false,
disableMouse = false,
disableCombat = true,
}, {
animDict = "mp_suicide",
anim = "pill",
flags = 49,
}, {}, {}, function() -- Done
StopAnimTask(PlayerPedId(), "mp_suicide", "pill", 1.0)
TriggerEvent("evidence:client:SetStatus", "widepupils", 300)
TrevorEffect()
Wait(15000)
EcstasyEffect()
end, function() -- Cancel
StopAnimTask(PlayerPedId(), "mp_suicide", "pill", 1.0)
QBCore.Functions.Notify("Canceled", "error")
end)
end)
---------------------------------------------------------------- LSD EFFECTS
+196
View File
@@ -0,0 +1,196 @@
local QBCore = exports['qb-core']:GetCoreObject()
RegisterNetEvent("md-drugs:client:fillprescription")
AddEventHandler("md-drugs:client:fillprescription", function()
RequestAnimDict("mp_arresting")
while (not HasAnimDictLoaded("mp_arresting")) do
Citizen.Wait(4000)
end
TaskPlayAnim(PlayerPedId(), "mp_arresting" ,"a_uncuff" ,8.0, -8.0, -1, 1, 0, false, false, false )
local PedCoords = GetEntityCoords(PlayerPedId())
QBCore.Functions.Progressbar("drink_something", "Picking Up Your Prescription", 4000, false, true, {
disableMovement = false,
disableCarMovement = false,
disableMouse = false,
disableCombat = true,
disableInventory = true,
}, {}, {}, {}, function()-- Done
TriggerServerEvent("md-drugs:server:fillprescription")
Citizen.Wait(4000)
ClearPedTasks(PlayerPedId())
end)
end)
RegisterNetEvent("md-drugs:client:openingvicodin")
AddEventHandler("md-drugs:client:openingvicodin", function()
RequestAnimDict("mp_arresting")
while (not HasAnimDictLoaded("mp_arresting")) do
Citizen.Wait(4000)
end
TaskPlayAnim(PlayerPedId(), "mp_arresting" ,"a_uncuff" ,8.0, -8.0, -1, 1, 0, false, false, false )
local PedCoords = GetEntityCoords(PlayerPedId())
QBCore.Functions.Progressbar("drink_something", "Opening Bottle", 4000, false, true, {
disableMovement = false,
disableCarMovement = false,
disableMouse = false,
disableCombat = true,
disableInventory = true,
}, {}, {}, {}, function()-- Done
TriggerServerEvent("md-drugs:server:openingvicodin")
Citizen.Wait(4000)
ClearPedTasks(PlayerPedId())
end)
end)
RegisterNetEvent("md-drugs:client:openingadderal")
AddEventHandler("md-drugs:client:openingadderal", function()
RequestAnimDict("mp_arresting")
while (not HasAnimDictLoaded("mp_arresting")) do
Citizen.Wait(4000)
end
TaskPlayAnim(PlayerPedId(), "mp_arresting" ,"a_uncuff" ,8.0, -8.0, -1, 1, 0, false, false, false )
local PedCoords = GetEntityCoords(PlayerPedId())
QBCore.Functions.Progressbar("drink_something", "Opening Bottle", 4000, false, true, {
disableMovement = false,
disableCarMovement = false,
disableMouse = false,
disableCombat = true,
disableInventory = true,
}, {}, {}, {}, function()-- Done
TriggerServerEvent("md-drugs:server:openingadderal")
Citizen.Wait(4000)
ClearPedTasks(PlayerPedId())
end)
end)
RegisterNetEvent("md-drugs:client:openingmorphine")
AddEventHandler("md-drugs:client:openingmorphine", function()
RequestAnimDict("mp_arresting")
while (not HasAnimDictLoaded("mp_arresting")) do
Citizen.Wait(4000)
end
TaskPlayAnim(PlayerPedId(), "mp_arresting" ,"a_uncuff" ,8.0, -8.0, -1, 1, 0, false, false, false )
local PedCoords = GetEntityCoords(PlayerPedId())
QBCore.Functions.Progressbar("drink_something", "Opening Bottle", 4000, false, true, {
disableMovement = false,
disableCarMovement = false,
disableMouse = false,
disableCombat = true,
disableInventory = true,
}, {}, {}, {}, function()-- Done
TriggerServerEvent("md-drugs:server:openingmorphine")
Citizen.Wait(4000)
ClearPedTasks(PlayerPedId())
end)
end)
RegisterNetEvent("md-drugs:client:openingxanax")
AddEventHandler("md-drugs:client:openingxanax", function()
RequestAnimDict("mp_arresting")
while (not HasAnimDictLoaded("mp_arresting")) do
Citizen.Wait(4000)
end
TaskPlayAnim(PlayerPedId(), "mp_arresting" ,"a_uncuff" ,8.0, -8.0, -1, 1, 0, false, false, false )
local PedCoords = GetEntityCoords(PlayerPedId())
QBCore.Functions.Progressbar("drink_something", "Opening Bottle", 4000, false, true, {
disableMovement = false,
disableCarMovement = false,
disableMouse = false,
disableCombat = true,
disableInventory = true,
}, {}, {}, {}, function()-- Done
TriggerServerEvent("md-drugs:server:openingxanax")
Citizen.Wait(4000)
ClearPedTasks(PlayerPedId())
end)
end)
RegisterNetEvent('md-drugs:client:takevicodin', function()
QBCore.Functions.Progressbar("use_lsd", "Get Pain Relief!", 1750, false, true, {
disableMovement = false,
disableCarMovement = false,
disableMouse = false,
disableCombat = true,
}, {
animDict = "mp_suicide",
anim = "pill",
flags = 49,
}, {}, {}, function() -- Done
StopAnimTask(PlayerPedId(), "mp_suicide", "pill", 1.0)
TriggerEvent("evidence:client:SetStatus", "widepupils", 300)
exports['ps-buffs']:AddHealthBuff(10000, 20)
-- exports["qb-smallresources"]:DoAcid(240000)
end, function() -- Cancel
StopAnimTask(PlayerPedId(), "mp_suicide", "pill", 1.0)
QBCore.Functions.Notify("Canceled", "error")
end)
end)
RegisterNetEvent('md-drugs:client:takeadderal', function()
QBCore.Functions.Progressbar("use_lsd", "Get Hyper!", 1750, false, true, {
disableMovement = false,
disableCarMovement = false,
disableMouse = false,
disableCombat = true,
}, {
animDict = "mp_suicide",
anim = "pill",
flags = 49,
}, {}, {}, function() -- Done
StopAnimTask(PlayerPedId(), "mp_suicide", "pill", 1.0)
TriggerEvent("evidence:client:SetStatus", "widepupils", 300)
exports['ps-buffs']:StaminaBuffEffect(15000, 1.4)
-- exports["qb-smallresources"]:DoAcid(240000)
end, function() -- Cancel
StopAnimTask(PlayerPedId(), "mp_suicide", "pill", 1.0)
QBCore.Functions.Notify("Canceled", "error")
end)
end)
RegisterNetEvent('md-drugs:client:takexanax', function()
QBCore.Functions.Progressbar("use_lsd", "Taking a chill Pill!", 1750, false, true, {
disableMovement = false,
disableCarMovement = false,
disableMouse = false,
disableCombat = true,
}, {
animDict = "mp_suicide",
anim = "pill",
flags = 49,
}, {}, {}, function() -- Done
StopAnimTask(PlayerPedId(), "mp_suicide", "pill", 1.0)
TriggerEvent("evidence:client:SetStatus", "widepupils", 300)
exports['ps-buffs']:AddStressBuff(10000, 25)
-- exports["qb-smallresources"]:DoAcid(240000)
end, function() -- Cancel
StopAnimTask(PlayerPedId(), "mp_suicide", "pill", 1.0)
QBCore.Functions.Notify("Canceled", "error")
end)
end)
RegisterNetEvent('md-drugs:client:takemorphine', function()
QBCore.Functions.Progressbar("use_lsd", "Get Major Pain Relief!", 1750, false, true, {
disableMovement = false,
disableCarMovement = false,
disableMouse = false,
disableCombat = true,
}, {
animDict = "mp_suicide",
anim = "pill",
flags = 49,
}, {}, {}, function() -- Done
StopAnimTask(PlayerPedId(), "mp_suicide", "pill", 1.0)
TriggerEvent("evidence:client:SetStatus", "widepupils", 300)
exports['ps-buffs']:AddHealthBuff(10000, 40)
-- exports["qb-smallresources"]:DoAcid(240000)
end, function() -- Cancel
StopAnimTask(PlayerPedId(), "mp_suicide", "pill", 1.0)
QBCore.Functions.Notify("Canceled", "error")
end)
end)
+132
View File
@@ -0,0 +1,132 @@
local QBCore = exports['qb-core']:GetCoreObject()
local shrooms = {}
function LoadModel(hash)
hash = GetHashKey(hash)
RequestModel(hash)
while not HasModelLoaded(hash) do
Wait(3000)
end
end
RegisterNetEvent('shrooms:respawnCane', function(loc)
local v = GlobalState.shrooms[loc]
local hash = GetHashKey(v.model)
--if not HasModelLoaded(hash) then LoadModel(hash) end
if not shrooms[loc] then
shrooms[loc] = CreateObject(hash, v.location, false, true, true)
SetEntityAsMissionEntity(shrooms[loc], true, true)
FreezeEntityPosition(shrooms[loc], true)
SetEntityHeading(shrooms[loc], v.heading)
exports['qb-target']:AddTargetEntity(shrooms[loc], {
options = { {
icon = "fas fa-hand",
label = "pick shrooms",
action = function()
QBCore.Functions.Progressbar("pick_cane", "picking shrooms", 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("shrooms:pickupCane", loc)
ClearPedTasks(PlayerPedId())
end, function() -- Cancel
ClearPedTasks(PlayerPedId())
end)
end
}
},
distance = 3.0
})
end
end)
AddEventHandler('onResourceStart', function(resource)
if resource == GetCurrentResourceName() then
LoadModel('prop_stoneshroom1')
TriggerEvent('shrooms:init')
end
end)
RegisterNetEvent('shrooms:removeCane', function(loc)
if DoesEntityExist(shrooms[loc]) then DeleteEntity(shrooms[loc]) end
shrooms[loc] = nil
end)
RegisterNetEvent('QBCore:Client:OnPlayerLoaded', function()
Wait(3000)
LoadModel('prop_stoneshroom1')
TriggerEvent('shrooms:init')
end)
RegisterNetEvent("shrooms:init", function()
for k, v in pairs (GlobalState.shrooms) do
local hash = GetHashKey(v.model)
if not HasModelLoaded(hash) then LoadModel(hash) end
if not v.taken then
shrooms[k] = CreateObject(hash, v.location.x, v.location.y, v.location.z, false, true, true)
SetEntityAsMissionEntity(shrooms[k], true, true)
FreezeEntityPosition(shrooms[k], true)
SetEntityHeading(shrooms[k], v.heading)
exports['qb-target']:AddTargetEntity(shrooms[k], {
options = { {
icon = "fas fa-hand",
label = "Pick shrooms",
action = function()
QBCore.Functions.Progressbar("pick_cane", "Picking Shrooms", 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("shrooms:pickupCane", k)
ClearPedTasks(PlayerPedId())
end, function() -- Cancel
ClearPedTasks(PlayerPedId())
end)
end
}
},
distance = 3.0
})
end
end
end)
function EcstasyEffect()
local startStamina = 30
SetFlash(0, 0, 500, 7000, 500)
while startStamina > 0 do
Wait(1000)
startStamina = startStamina - 1
RestorePlayerStamina(PlayerId(), 1.0)
if math.random(1, 100) < 51 then
SetFlash(0, 0, 500, 7000, 500)
ShakeGameplayCam('SMALL_EXPLOSION_SHAKE', 0.08)
end
end
if IsPedRunning(PlayerPedId()) then
SetPedToRagdoll(PlayerPedId(), math.random(1000, 3000), math.random(1000, 3000), 3, 0, 0, 0)
end
startStamina = 0
end
RegisterNetEvent('md-drugs:client:takeshrooms', function()
QBCore.Functions.Progressbar("use_lsd", "Have Fun!", 1750, false, true, {
disableMovement = false,
disableCarMovement = false,
disableMouse = false,
disableCombat = true,
}, {
animDict = "mp_suicide",
anim = "pill",
flags = 49,
}, {}, {}, function() -- Done
StopAnimTask(PlayerPedId(), "mp_suicide", "pill", 1.0)
TriggerEvent("evidence:client:SetStatus", "widepupils", 300)
EcstasyEffect()
-- exports["qb-smallresources"]:DoAcid(240000)
end, function() -- Cancel
StopAnimTask(PlayerPedId(), "mp_suicide", "pill", 1.0)
QBCore.Functions.Notify("Canceled", "error")
end)
end)
+458
View File
@@ -0,0 +1,458 @@
local QBCore = exports['qb-core']:GetCoreObject()
CreateThread(function()
exports['qb-target']:AddBoxZone("makepowdercoke",Config.makecokepowder,1.5, 1.75, { -- 963.37, -2122.95, 31.47
name = "makepowdercoke",
heading = 11.0,
debugPoly = false,
minZ = Config.makecokepowder-2,
maxZ = Config.makecokepowder+2,
}, {
options = {
{
type = "client",
event = "md-drugs:client:makepowder",
icon = "fas fa-sign-in-alt",
label = "chop it up",
},
},
distance = 2.5
})
exports['qb-target']:AddBoxZone("cutcokepowder",Config.cutcokeone,1.5, 1.75, { -- 963.37, -2122.95, 31.47
name = "cutcokepowder",
heading = 11.0,
debugPoly = false,
minZ = Config.cutcokeone-2,
maxZ = Config.cutcokeone+2,
}, {
options = {
{
type = "client",
event = "md-drugs:client:cutcokeone",
icon = "fas fa-sign-in-alt",
label = "cut up",
},
},
distance = 2.5
})
exports['qb-target']:AddBoxZone("cutcokepowdertwo",Config.cutcoke2,1.5, 1.75, { -- 963.37, -2122.95, 31.47
name = "cutcokepowdertwo",
heading = 11.0,
debugPoly = false,
minZ = Config.cutcoke2-2,
maxZ = Config.cutcoke2+2,
}, {
options = {
{
type = "client",
event = "md-drugs:client:cutcoketwo",
icon = "fas fa-sign-in-alt",
label = "cut up",
},
},
distance = 2.5
})
exports['qb-target']:AddBoxZone("cutcokepowderthree",Config.cutcoke3,1.5, 1.75, { -- 963.37, -2122.95, 31.47
name = "cutcokepowderthree",
heading = 11.0,
debugPoly = false,
minZ = Config.cutcoke3-2,
maxZ = Config.cutcoke3+2,
}, {
options = {
{
type = "client",
event = "md-drugs:client:cutcokethree",
icon = "fas fa-sign-in-alt",
label = "cut up",
},
},
distance = 2.5
})
exports['qb-target']:AddBoxZone("bagcokepowder",Config.bagcoke,1.5, 1.75, { -- 963.37, -2122.95, 31.47
name = "bagcokepowder",
heading = 11.0,
debugPoly = false,
minZ = Config.bagcoke-2,
maxZ = Config.bagcoke+2,
}, {
options = {
{
type = "client",
event = "md-drugs:client:bagcoke",
icon = "fas fa-sign-in-alt",
label = "bagging",
},
},
distance = 2.5
})
exports['qb-target']:AddBoxZone("bagcoketwo",Config.bagcoke2,1.5, 1.75, { -- 963.37, -2122.95, 31.47
name = "bagcoketwo",
heading = 11.0,
debugPoly = false,
minZ = Config.bagcoke2-2,
maxZ = Config.bagcoke2+2,
}, {
options = {
{
type = "client",
event = "md-drugs:client:bagcoketwo",
icon = "fas fa-sign-in-alt",
label = "bagging",
},
},
distance = 2.5
})
exports['qb-target']:AddBoxZone("bagcokethree",Config.bagcoke3,1.5, 1.75, { -- 963.37, -2122.95, 31.47
name = "bagcokethree",
heading = 11.0,
debugPoly = false,
minZ = Config.bagcoke3-2,
maxZ = Config.bagcoke3+2,
}, {
options = {
{
type = "client",
event = "md-drugs:client:bagcokethree",
icon = "fas fa-sign-in-alt",
label = "bagging",
},
},
distance = 2.5
})
----- LSD
exports['qb-target']:AddBoxZone("getlysergic",Config.lysergicacid,1.5, 1.75, { -- 963.37, -2122.95, 31.47
name = "getlysergic",
heading = 156.0,
debugPoly = false,
minZ = Config.lysergicacid-2,
maxZ = Config.lysergicacid+2,
}, {
options = {
{
type = "client",
event = "md-drugs:client:getlysergic",
icon = "fas fa-sign-in-alt",
label = "stealing",
},
},
distance = 2.5
})
exports['qb-target']:AddBoxZone("getdiethylamide",Config.diethylamide,1.5, 1.75, { -- 963.37, -2122.95, 31.47
name = "getdiethylamide",
heading = 156.0,
debugPoly = false,
minZ = Config.diethylamide-2,
maxZ = Config.diethylamide+2,
}, {
options = {
{
type = "client",
event = "md-drugs:client:getdiethylamide",
icon = "fas fa-sign-in-alt",
label = "stealing",
},
},
distance = 2.5
})
exports['qb-target']:AddBoxZone("refinequalityacid", Config.acidrefine,1.5, 1.75, { -- 963.37, -2122.95, 31.47
name = "refinequalityacid",
heading = 156.0,
debugPoly = false,
minZ = Config.acidrefine-2,
maxZ = Config.acidrefine+2,
}, {
options = {
{
type = "client",
event = "md-drugs:client:refinequalityacid",
icon = "fas fa-sign-in-alt",
label = "Refine",
item = "lsd_one_vial"
},
},
distance = 2.5
})
exports['qb-target']:AddBoxZone("maketabpaperone",Config.maketabs1,1.5, 1.75, { -- 963.37, -2122.95, 31.47
name = "maketabpaperone",
heading = 156.0,
debugPoly = false,
minZ = Config.maketabs1-2,
maxZ = Config.maketabs1+2,
}, {
options = {
{
type = "client",
event = "md-drugs:client:maketabpaperone",
icon = "fas fa-sign-in-alt",
label = "Make Tabs",
item = "lsd_one_vial",
},
},
distance = 2.5
})
exports['qb-target']:AddBoxZone("maketabpapertwo",Config.maketabs2 ,1.5, 1.75, { -- 963.37, -2122.95, 31.47
name = "maketabpapertwo",
heading = 156.0,
debugPoly = false,
minZ = Config.maketabs2-2,
maxZ = Config.maketabs2+2,
}, {
options = {
{
type = "client",
event = "md-drugs:client:maketabpapertwo",
icon = "fas fa-sign-in-alt",
label = "Make Tabs",
item = "lsd_vial_two",
},
},
distance = 2.5
})
exports['qb-target']:AddBoxZone("maketabpaperthree",Config.maketabs3,1.5, 1.75, { -- 963.37, -2122.95, 31.47
name = "maketabpaperthree",
heading = 156.0,
debugPoly = false,
minZ = Config.maketabs3-2,
maxZ = Config.maketabs3+3,
}, {
options = {
{
type = "client",
event = "md-drugs:client:maketabpaperthree",
icon = "fas fa-sign-in-alt",
label = "Make Tabs",
item = "lsd_vial_three",
},
},
distance = 2.5
})
exports['qb-target']:AddBoxZone("maketabpaperfour",Config.maketabs4,1.5, 1.75, { -- 963.37, -2122.95, 31.47
name = "maketabpaperfour",
heading = 156.0,
debugPoly = false,
minZ = Config.maketabs4-2,
maxZ = Config.maketabs4+2,
}, {
options = {
{
type = "client",
event = "md-drugs:client:maketabpaperfour",
icon = "fas fa-sign-in-alt",
label = "Make Tabs",
item = "lsd_vial_four",
},
},
distance = 2.5
})
exports['qb-target']:AddBoxZone("maketabpaperfive",Config.maketabs5,1.5, 1.75, { -- 963.37, -2122.95, 31.47
name = "maketabpaperfive",
heading = 156.0,
debugPoly = false,
minZ = Config.maketabs5-2,
maxZ = Config.maketabs5+2,
}, {
options = {
{
type = "client",
event = "md-drugs:client:maketabpaperfive",
icon = "fas fa-sign-in-alt",
label = "Make Tabs",
item = "lsd_vial_five",
},
},
distance = 2.5
})
exports['qb-target']:AddBoxZone("maketabpapersix",Config.maketabs6,1.5, 1.75, { -- 963.37, -2122.95, 31.47
name = "maketabpapersix",
heading = 156.0,
debugPoly = false,
minZ = Config.maketabs6-2,
maxZ = Config.maketabs6+2,
}, {
options = {
{
type = "client",
event = "md-drugs:client:maketabpapersix",
icon = "fas fa-sign-in-alt",
label = "Make Tabs",
item = "lsd_vial_six",
},
},
distance = 2.5
})
exports['qb-target']:AddBoxZone("gettabpaper",Config.gettabs,1.5, 1.75, { -- 963.37, -2122.95, 31.47
name = "gettabpaper",
heading = 156.0,
debugPoly = false,
minZ = Config.gettabs-2,
maxZ = Config.gettabs+2,
}, {
options = {
{
type = "client",
event = "md-drugs:client:buytabs",
icon = "fas fa-sign-in-alt",
label = "Buy Tabs",
item = Config.dirtymoney
},
},
distance = 2.5
})
exports['qb-target']:AddBoxZone("buylabkit",Config.buylsdlabkit,1.5, 1.75, { -- 963.37, -2122.95, 31.47
name = "buylabkit",
heading = 156.0,
debugPoly = false,
minZ = Config.buylsdlabkit-2,
maxZ = Config.buylsdlabkit+2,
}, {
options = {
{
type = "client",
event = "md-drugs:client:buylabkit",
icon = "fas fa-sign-in-alt",
label = "Buy A Kit",
item = Config.dirtymoney
},
},
distance = 2.5
})
exports['qb-target']:AddBoxZone("dryplant",Config.dryplant,1.5, 1.75, { -- 963.37, -2122.95, 31.47
name = "dryplant",
heading = 156.0,
debugPoly = false,
minZ = Config.dryplant-2,
maxZ = Config.dryplant+2,
}, {
options = {
{
type = "client",
event = "md-drugs:client:dryplant",
icon = "fas fa-sign-in-alt",
label = "Dry out",
},
},
distance = 2.5
})
exports['qb-target']:AddBoxZone("cutheroin",Config.cutheroinone,1.5, 1.75, { -- 963.37, -2122.95, 31.47
name = "cutheroin",
heading = 156.0,
debugPoly = false,
minZ = Config.cutheroinone-2,
maxZ = Config.cutheroinone+2,
}, {
options = {
{
type = "client",
event = "md-drugs:client:cutheroin",
icon = "fas fa-sign-in-alt",
label = "Cut Heroin",
},
},
distance = 2.5
})
exports['qb-target']:AddBoxZone("fillneedle",Config.fillneedle,1.5, 1.75, { -- 963.37, -2122.95, 31.47
name = "fillneedle",
heading = 156.0,
debugPoly = false,
minZ = Config.fillneedle-2,
maxZ = Config.fillneedle+2,
}, {
options = {
{
type = "client",
event = "md-drugs:client:fillneedle",
icon = "fas fa-sign-in-alt",
label = "Fill Needles",
},
},
distance = 2.5
})
exports['qb-target']:AddBoxZone("buyheroinlabkit",Config.buyheroinlabkit,1.5, 1.75, { -- 963.37, -2122.95, 31.47
name = "buyheroinlabkit",
heading = 156.0,
debugPoly = false,
minZ = Config.buyheroinlabkit-2,
maxZ = Config.buyheroinlabkit+2,
}, {
options = {
{
type = "client",
event = "md-drugs:client:buyheroinlabkit",
icon = "fas fa-sign-in-alt",
label = "Buy A Kit",
item = Config.dirtymoney
},
},
distance = 2.5
})
exports['qb-target']:AddBoxZone("crackmakeone",Config.makecrack,1.5, 1.75, { -- 963.37, -2122.95, 31.47
name = "crackmakeone",
heading = 156.0,
debugPoly = false,
minZ = Config.makecrack-2,
maxZ = Config.makecrack+2,
}, {
options = {
{
type = "client",
event = "md-drugs:client:makecrackone",
icon = "fas fa-sign-in-alt",
label = "cook some crack",
},
},
distance = 2.5
})
exports['qb-target']:AddBoxZone("bagcrack",Config.bagcrack,1.5, 1.75, { -- 963.37, -2122.95, 31.47
name = "bagcrack",
heading = 156.0,
debugPoly = false,
minZ = Config.bagcrack-2,
maxZ = Config.bagcrack+2,
}, {
options = {
{
type = "client",
event = "md-drugs:client:bagcrack",
icon = "fas fa-sign-in-alt",
label = "cook some crack",
},
},
distance = 2.5
})
exports['qb-target']:AddBoxZone("pharmapresc",vector3(-491.57, -341.0, 42.32),1.5, 1.75, { -- 963.37, -2122.95, 31.47
name = "pharmapresc",
heading = 156.0,
debugPoly = false,
minZ = 40,
maxZ = 44,
}, {
options = {
{
type = "client",
event = "md-drugs:client:fillprescription",
icon = "fas fa-sign-in-alt",
label = "Fill Prescription",
},
},
distance = 2.5
})
end)