Duty status changed

Triggered after player goes on/off duty server side

Event

RegisterNetEvent("jobs_creator:toggleDuty", function(playerId, jobName, isOnDuty)

end)

Parameters

NameData TypeDescription

playerId

integer

Target player server ID

jobName

string

Player's job id

isOnDuty

boolean

Player new duty status

Example

RegisterNetEvent("jobs_creator:toggleDuty", function(playerId, jobName, isOnDuty)
    if(isOnDuty) then
        TriggerEvent("external_scoreboard:increaseOnDutyCount", jobName)
    else
        TriggerEvent("external_scoreboard:decreaseOnDutyCount", jobName)
    end
end)

Last updated