patch for pharma, new callback to do animations and progressbar checks
This commit is contained in:
1 parent
f1ed2c0860
commit
cf5cfba909
7 files changed
+63
-68
No files matched your search
+4
-13
@@ -1,15 +1,10 @@
|
||||
local QBCore = exports['qb-core']:GetCoreObject()
|
||||
|
||||
lib.callback.register("md-drugs:client:prescriptionpad", function(data)
|
||||
lib.callback.register("md-drugs:client:prescriptionpad", function(data, op)
|
||||
if not QBCore.Functions.GetPlayerData().job.type == 'ems' then return end
|
||||
local input = lib.inputDialog('Who To Give A Prescription To?',{
|
||||
{type = 'select', label = 'Player Name', options = data},
|
||||
{type = 'select', label = 'Prescription', options = {
|
||||
{label = 'Vicodin', value = 'vicodin_prescription'},
|
||||
{label = 'Adderal', value = 'adderal_prescription'},
|
||||
{label = 'Morphine', value = 'morphine_prescription'},
|
||||
{label = 'Xanax', value = 'xanax_prescription'}
|
||||
}}})
|
||||
{type = 'select', label = 'Prescription', options = op}})
|
||||
if not progressbar(Lang.Pharma.write, 4000, 'notepad') then return end
|
||||
return {who = input[1], what = input[2]}
|
||||
end)
|
||||
@@ -19,11 +14,7 @@ RegisterNetEvent("md-drugs:client:fillprescription", function(data)
|
||||
TriggerServerEvent("md-drugs:server:fillprescription", data.data)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:unbottle", function(item)
|
||||
lib.callback.register("md-drugs:client:unbottle", function()
|
||||
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)
|
||||
return true
|
||||
end)
|
||||
Reference in new issue
Block a user