197 lines
7.3 KiB
Lua
197 lines
7.3 KiB
Lua
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)
|
|
|