2024-01-13 22:23:17 -08:00
|
|
|
|
2024-11-23 14:38:23 -08:00
|
|
|
lib.callback.register("md-drugs:client:prescriptionpad", function(data, op)
|
2024-12-12 15:26:48 -08:00
|
|
|
if getJobType() ~= 'ems' then return end
|
2024-11-23 02:21:39 -08:00
|
|
|
local input = lib.inputDialog('Who To Give A Prescription To?',{
|
|
|
|
|
{type = 'select', label = 'Player Name', options = data},
|
2024-11-23 14:38:23 -08:00
|
|
|
{type = 'select', label = 'Prescription', options = op}})
|
2024-12-16 03:34:20 -08:00
|
|
|
if not input[1] then return end
|
2024-11-23 02:21:39 -08:00
|
|
|
if not progressbar(Lang.Pharma.write, 4000, 'notepad') then return end
|
|
|
|
|
return {who = input[1], what = input[2]}
|
2024-01-13 22:23:17 -08:00
|
|
|
end)
|
|
|
|
|
|
2024-05-02 18:34:14 -07:00
|
|
|
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)
|
2024-01-13 22:23:17 -08:00
|
|
|
end)
|
|
|
|
|
|
2024-11-23 14:38:23 -08:00
|
|
|
lib.callback.register("md-drugs:client:unbottle", function()
|
2024-05-02 18:34:14 -07:00
|
|
|
if not progressbar(Lang.Pharma.open, 4000, 'uncuff') then return end
|
2024-11-23 14:38:23 -08:00
|
|
|
return true
|
2024-01-13 22:23:17 -08:00
|
|
|
end)
|