swapDuty
swapDuty is an ox_lib callback function, it gets the players current jobname and swaps it to the job specified in the configuration.
- Return:
table
- status:
bool
, - was:
string
, -- old job
- status:
- Callback
- Await
lib.callback('op-vehlock:getKeysOnPlate', false, function(result)
if result.status then
-- state change success
else
-- state change unsuccessfull
end
end)
local swaps = lib.callback.await('op-duty:swapDuty', false)
if swaps.status then
-- state change success
else
-- state change unsuccessfull
end