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

+33 -134
View File
@@ -1,157 +1,56 @@
local QBCore = exports['qb-core']:GetCoreObject()
RegisterCommand('prescriptionpad', function()
if QBCore.Functions.GetPlayerData().job.name == Config.PharmaJob then
RegisterNetEvent("md-drugs:client:prescriptionpad", function(args)
if QBCore.Functions.GetPlayerData().job.type == Config.PharmaJob then
lib.registerContext({
id = 'prescriptionpad',
title = "Prescription Pad",
options = {
{
title = 'Give Vicodin',
description = 'Give Vicodin ',
icon = 'fa-solid fa-file-prescription',
event = 'md-drugs:client:givevicodinprescription',
},
{
title = 'Give Adderal',
description = 'Give Adderal ',
icon = 'fa-solid fa-file-prescription',
event = 'md-drugs:client:giveadderalprescription',
},
{
title = 'Give Morphine',
description = 'Give Morphine ',
icon = 'fa-solid fa-file-prescription',
event = 'md-drugs:client:givemorphineprescription',
},
{
title = 'Give Xanax',
description = 'Give Vicodin ',
icon = 'fa-solid fa-file-prescription',
event = 'md-drugs:client:givexanaxprescription',
},
{title = 'Give Vics', description = 'Give Vics ', icon = 'fa-solid fa-file-prescription', event = 'md-drugs:client:writeprescription', args = {item = 'vicodin_prescription'}},
{title = 'Give Madderal', description = 'Give Madderal ', icon = 'fa-solid fa-file-prescription', event = 'md-drugs:client:writeprescription', args = {item = 'adderal_prescription'}},
{title = 'Give Morphin',description = 'Give Morphin ',icon = 'fa-solid fa-file-prescription', event = 'md-drugs:client:writeprescription', args = {item = 'morphine_prescription'}},
{title = 'Give Zany', description = 'Give Zany ', icon = 'fa-solid fa-file-prescription', event = 'md-drugs:client:writeprescription', args = {item = 'xanax_prescription'} },
}
})
lib.showContext('prescriptionpad')
lib.showContext('prescriptionpad')
else
QBCore.Functions.Notify("Youre Not A Medical Person", "error")
Notify(Lang.Pharma.notems, "error")
end
end)
RegisterNetEvent("md-drugs:client:givevicodinprescription")
AddEventHandler("md-drugs:client:givevicodinprescription", function()
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
QBCore.Functions.Progressbar("drink_something", "Getting The Prescription Written", 4000, false, true, {
disableMovement = false,
disableCarMovement = false,
disableMouse = false,
disableCombat = true,
disableInventory = true,
}, {}, {}, {}, function()-- Done
TriggerServerEvent("md-drugs:server:givevicodinprescription")
ClearPedTasks(PlayerPedId())
end)
end)
RegisterNetEvent("md-drugs:client:giveadderalprescription")
AddEventHandler("md-drugs:client:giveadderalprescription", function()
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
QBCore.Functions.Progressbar("drink_something", "Getting The Prescription Written", 4000, false, true, {
disableMovement = false,
disableCarMovement = false,
disableMouse = false,
disableCombat = true,
disableInventory = true,
}, {}, {}, {}, function()-- Done
TriggerServerEvent("md-drugs:server:giveadderalprescription")
ClearPedTasks(PlayerPedId())
end)
RegisterNetEvent("md-drugs:client:writeprescription", function(args)
if not progressbar(Lang.Pharma.write, 4000, 'notepad') then return end
TriggerServerEvent("md-drugs:server:giveprescription", args.item)
end)
RegisterNetEvent("md-drugs:client:givemorphineprescription")
AddEventHandler("md-drugs:client:givemorphineprescription", function()
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
QBCore.Functions.Progressbar("drink_something", "Getting The Prescription Written", 4000, false, true, {
disableMovement = false,
disableCarMovement = false,
disableMouse = false,
disableCombat = true,
disableInventory = true,
}, {}, {}, {}, function()-- Done
TriggerServerEvent("md-drugs:server:givemorphineprescription")
ClearPedTasks(PlayerPedId())
end)
end)
RegisterNetEvent("md-drugs:client:givexanaxprescription")
AddEventHandler("md-drugs:client:givexanaxprescription", function()
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
QBCore.Functions.Progressbar("drink_something", "Getting The Prescription Written", 4000, false, true, {
disableMovement = false,
disableCarMovement = false,
disableMouse = false,
disableCombat = true,
disableInventory = true,
}, {}, {}, {}, function()-- Done
TriggerServerEvent("md-drugs:server:givexanaxprescription")
ClearPedTasks(PlayerPedId())
end)
RegisterNetEvent("md-drugs:client:fillprescription", function(data)
if not progressbar(Lang.Pharma.fill, 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:fillprescription", data.data)
end)
RegisterNetEvent("md-drugs:client:fillprescription")
AddEventHandler("md-drugs:client:fillprescription", function()
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
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")
ClearPedTasks(PlayerPedId())
end)
end)
RegisterNetEvent("md-drugs:client:openingvicodin")
AddEventHandler("md-drugs:client:openingvicodin", function()
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
QBCore.Functions.Progressbar("drink_something", "Opening Bottle", 4000, false, true, {
disableMovement = false,
disableCarMovement = false,
disableMouse = false,
disableCombat = true,
disableInventory = true,
}, {}, {}, {}, function()-- Done
ClearPedTasks(PlayerPedId())
end)
RegisterNetEvent("md-drugs:client:unbottle", function(item)
if not progressbar(Lang.Pharma.open, 4000, 'uncuff') then return end
if item.name == 'vicodinbottle' then item = 'vicodin' end
if item.name == 'adderalbottle' then item = 'adderal' end
if item.name == 'morphinebottle' then item = 'morphine' end
if item.name == 'xanaxbottle' then item = 'xanax' end
TriggerServerEvent('md-drugs:server:unbottle', item)
end)
RegisterNetEvent('md-drugs:client:takepharma', function(itemName)
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)
if itemName == "vicodin" then
exports['ps-buffs']:AddHealthBuff(10000, 20)
elseif itemName == "adderal" then
exports['ps-buffs']:StaminaBuffEffect(5000, 1.3)
elseif itemName == "xanax" then
exports['ps-buffs']:AddStressBuff(10000, 25)
else
exports['ps-buffs']:AddHealthBuff(10000, 40)
end
end, function() -- Cancel
StopAnimTask(PlayerPedId(), "mp_suicide", "pill", 1.0)
QBCore.Functions.Notify("Canceled", "error")
end)
if not progressbar(Lang.Pharma.consume, 1000, 'eat') then return end
if itemName == "vicodin" then
exports['ps-buffs']:AddHealthBuff(10000, 20)
elseif itemName == "adderal" then
exports['ps-buffs']:StaminaBuffEffect(5000, 1.3)
elseif itemName == "xanax" then
exports['ps-buffs']:AddStressBuff(10000, 25)
else
exports['ps-buffs']:AddHealthBuff(10000, 40)
end
end)