Kartik Scripts

Toggle Duty

Why do I need to click Toggle Duty twice after joining the server?

When you join or leave the server, the MDT automatically sets you off duty by default. This is intentional and done to accurately track duty time, preventing any inconsistencies.

As a result, you may need to click “Toggle Duty” twice after joining:

  • First click: attempts to go on duty, but MDT resets it.
  • Second click: successfully puts you on duty.

You can avoid this double click by changing the default duty state in your job config:


For qbx_core:

File: qbx_core/shared/jobs.lua

['police'] = {
    label = 'LSPD',
    type = 'leo',
    defaultDuty = false, -- 👈 Change this to false
    offDutyPay = false,
    grades = {
        [0] = { name = 'Recruit', payment = 50 },
        [1] = { name = 'Officer', payment = 75 },
        [2] = { name = 'Sergeant', payment = 100 },
        [3] = { name = 'Lieutenant', payment = 125 },
        [4] = { name = 'Chief', isboss = true, bankAuth = true, payment = 150 },
    },
}

For qb-core:

File: qb-core/shared/jobs.lua

police = {
    label = 'Law Enforcement',
    type = 'leo',
    defaultDuty = false, -- 👈 Change this to false
    offDutyPay = false,
    grades = {
        ['0'] = { name = 'Recruit', payment = 50 },
        ['1'] = { name = 'Officer', payment = 75 },
        ['2'] = { name = 'Sergeant', payment = 100 },
        ['3'] = { name = 'Lieutenant', payment = 125 },
        ['4'] = { name = 'Chief', isboss = true, payment = 150 },
    },
}

After making the change, don't forget to restart your server.
This will ensure your players start in the correct duty state without needing to double toggle.


On this page