Skip to main content

playerAduty

exports["RiP-Admin"]:playerAduty(playerSource, callback) 

This function returns if player is in aduty mode

Arguments

NameTypeOptionalExplenation
playerSourceIntegerNoplayer server id/source
callbackFunctionYesretuns aduty state

Returned Table

NameTypeExplenation
sourceIntegerplayer source
identifierStringplayer identifier
adutyBooleanis in aduty mode
timeIntegeraduty mode stated timestamp

Example

local xPlayer = ESX.GetPlayerFromId(source)

exports["RiP-Admin"]:playerAduty(xPlayer.source, function(callback)
if callback and callback.aduty then
print("Player is in aduty mode since "..callback.time)
else
print("Player is not in aduty mode")
end
end)
local isAduty = exports["RiP-Admin"]:playerAduty(xPlayer.source)
if isAduty then
print("Player is in aduty mode")
else
print("Player is not in aduty mode")
end