Command permission to police only

Hello guys.

Can you help me for how can set this command, for can use only police members?

Code
RegisterCommand('adpolice', function(source, args, rawCommand)
	
    local playerName = GetPlayerName(source)
    local msg = rawCommand:sub(10)
    local name = getIdentity(source)
    fal = name.firstname .. " " .. name.lastname
    TriggerClientEvent('chat:addMessage', -1, {
        template = '<div style="padding: 0.5vw; margin: 0.5vw; background-color: rgba(214, 168, 0, 1); border-radius: 3px;"><i class="fas fa-star"style="font-size:20px;color:black"></i> <b><font color="red">Rendőrség:</font></b> <b><i><font color="white">{1}</font></i></b></div>',
        args = { fal, msg }
    })
end, false)

Thanks before your help.

Well how are you determining a police officer from a regular player?

default esx job system.

im trying build the chat command with

script
   RegisterCommand('adpolice', function(source, args, rawCommand)

local source = source
local xPlayers = ESX.GetPlayers()
local xPlayer = ESX.GetPlayerFromId(xPlayers[i])
if xPlayer.job.name == 'police' then

local playerName = GetPlayerName(source)
local msg = rawCommand:sub(10)
local name = getIdentity(source)
fal = name.firstname .. " " .. name.lastname

TriggerClientEvent('chat:addMessage', -1, {
    template = '<div style="padding: 0.5vw; margin: 0.5vw; background-color: rgba(214, 168, 0, 1); border-radius: 3px;"><i class="fas fa-star"style="font-size:20px;color:black"></i> <b><font color="red">Police:</font></b> <b><i><font color="white">{1}</font></i></b></div>',
    args = { fal, msg }
})
 end
end, false)

and not working. Console not write error for who bad.

@Jaromi_Szabolcs, this is an English only forum.