- half done
This commit is contained in:
1 parent
d2f70d78ed
commit
ebc47ba5d7
41 files changed
+1499
-1012
No files matched your search
+13
-9
@@ -1,18 +1,22 @@
|
||||
local locations = ps.callback('md-drugs:server:GetPharmaLocs')
|
||||
|
||||
ps.registerCallback("md-drugs:client:prescriptionpad", function(data, op)
|
||||
if ps.getJobType() ~= 'ems' then return end
|
||||
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}
|
||||
Bridge.Callback.Register("md-drugs:client:prescriptionpad", function(data, op)
|
||||
local job = ps.getPlayerData().job.name
|
||||
if job ~= 'ambulance' then
|
||||
Bridge.Notify.SendNotify(Bridge.Language.Locale('pharma.notPharma'), 'error')
|
||||
return
|
||||
end
|
||||
local input = ps.input(Bridge.Language.Locale('pharma.input.header'), {
|
||||
{type = 'select', title = Bridge.Language.Locale('pharma.input.title1'), options = data},
|
||||
{type = 'select', title = Bridge.Language.Locale('pharma.input.title2'), options = op}
|
||||
})
|
||||
if not input[1] then return end
|
||||
if not ps.progressbar(ps.lang('pharma.write'), 4000, 'notepad') then return end
|
||||
if not ps.progressbar(Bridge.Language.Locale('pharma.write'), 4000, 'notepad') then return end
|
||||
return {who = input[1], what = input[2]}
|
||||
end)
|
||||
|
||||
ps.registerCallback("md-drugs:client:unbottle", function()
|
||||
if not ps.progressbar(ps.lang('pharma.opening'), 4000, 'uncuff') then return end
|
||||
if not ps.progressbar(Bridge.Language.Locale('pharma.opening'), 4000, 'uncuff') then return end
|
||||
return true
|
||||
end)
|
||||
|
||||
@@ -21,9 +25,9 @@ for k, v in pairs (locations.FillPrescription) do
|
||||
ps.boxTarget('pharma' ..k , v.loc, {length = v.l, width = v.w, heading = v.rot}, {
|
||||
{
|
||||
icon = 'fa-solid fa-capsules',
|
||||
label = ps.lang('pharma.targetFill'),
|
||||
label = Bridge.Language.Locale('pharma.targetFill'),
|
||||
action = function()
|
||||
if not ps.progressbar(ps.lang('pharma.fill'), 4000, 'uncuff') then return end
|
||||
if not ps.progressbar(Bridge.Language.Locale('pharma.fill'), 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:fillprescription", k)
|
||||
end,
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user