function adminDuty(thePlayer, commandName)
if exports.global:isPlayerAdmin(thePlayer) then
local adminduty = getElementData(thePlayer, \"adminduty\")
local username = getPlayerName(thePlayer)
local adminrang = exports.global:getPlayerAdminTitle(thePlayer)
local playerName = getPlayerName(thePlayer)
local pmid = getElementData(thePlayer, \"playerid\")
if (adminduty==0) then
exports[\'anticheat-system\']:changeProtectedElementDataEx(thePlayer, \"adminduty\", 1)
--outputChatBox(\"\".. username .. \" adminszolgálatba lépett! /pm \".. pmid ..\" parancsal írhatsz neki.\", getRootElement(), 0, 255, 0)
exports.infobox:showBox(root, \"info\", \"\".. username .. \" adminszolgálatba lépett! /pm \".. pmid ..\" parancsal írhatsz neki.\")
elseif (adminduty==1) then
exports[\'anticheat-system\']:changeProtectedElementDataEx(thePlayer, \"adminduty\", 0)
--outputChatBox(\"\".. username .. \" kilépett adminszolgálatból! Bármi gond van írj neki /reportban.\", getRootElement(), 255, 0, 0)
exports.infobox:showBox(root, \"info\", \"\".. username .. \" kilépett adminszolgálatból! Bármi gond van írj neki /reportban.\")
end
mysql:query_free(\"UPDATE accounts SET adminduty=\" .. mysql:escape_string(getElementData(thePlayer, \"adminduty\")) .. \" WHERE id = \" .. mysql:escape_string(getElementData(thePlayer, \"gameaccountid\")) )
exports.global:updateNametagColor(thePlayer)
end
end
addCommandHandler(\"adminduty\", adminDuty, false, false)