Files
md-drugs/client/pharma.lua
T

31 lines
1.2 KiB
Lua
Raw Normal View History

2025-08-06 02:25:06 -06:00
local locations = ps.callback('md-drugs:server:GetPharmaLocs')
2025-08-09 03:10:00 -06:00
2025-07-01 03:09:46 -07:00
ps.registerCallback("md-drugs:client:prescriptionpad", function(data, op)
2025-07-17 02:06:17 -05:00
if ps.getJobType() ~= 'ems' then return end
2025-08-09 03:10:00 -06:00
local input = ps.input(ps.lang('pharma.input.header'), {
{type = 'select', title = ps.lang('pharma.input.title1'), options = data},
{type = 'select', title = ps.lang('pharma.input.title2'), options = op}
2025-07-18 01:19:12 -07:00
})
2024-12-16 03:34:20 -08:00
if not input[1] then return end
2025-08-09 03:10:00 -06:00
if not ps.progressbar(ps.lang('pharma.write'), 4000, 'notepad') then return end
2025-08-06 02:25:06 -06:00
return {who = input[1], what = input[2]}
2024-01-13 22:23:17 -08:00
end)
2025-07-01 03:09:46 -07:00
ps.registerCallback("md-drugs:client:unbottle", function()
2025-08-09 03:10:00 -06:00
if not ps.progressbar(ps.lang('pharma.opening'), 4000, 'uncuff') then return end
return true
2024-01-13 22:23:17 -08:00
end)
2025-07-18 01:19:12 -07:00
2025-08-06 02:25:06 -06:00
for k, v in pairs (locations.FillPrescription) do
2025-07-18 01:19:12 -07:00
ps.boxTarget('pharma' ..k , v.loc, {length = v.l, width = v.w, heading = v.rot}, {
{
icon = 'fa-solid fa-capsules',
2025-08-09 03:10:00 -06:00
label = ps.lang('pharma.targetFill'),
2025-07-18 01:19:12 -07:00
action = function()
2025-08-09 03:10:00 -06:00
if not ps.progressbar(ps.lang('pharma.fill'), 4000, 'uncuff') then return end
2025-07-18 01:19:12 -07:00
TriggerServerEvent("md-drugs:server:fillprescription", k)
2025-08-09 03:10:00 -06:00
end,
2025-07-18 01:19:12 -07:00
}
})
end