> For the complete documentation index, see [llms.txt](https://docs.deltarix.store/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.deltarix.store/paid-assets/mdt-v2/exports/server/getofficer.md).

# GetOfficer

***

Get a officers data

```lua
-- @param data table The data to be checked. { source = int, stateid = string }
-- @return table: { stateid, fullname, alias, callsign, badgeumber, status, image, department, rank, lastSeen, activity, activity_data, suspended, suspended_date, roles }
exports.drx_mdt:GetOfficer()
```

***

Example using source

```lua
local function getOfficerBySource(source)
  local officer = exports.drx_mdt:GetOfficer({ source = source })
end
```

Example using stateid

```lua
local function getOfficerByStateid(source)
  local stateid = exports.drx_mdt:GetStateId({ source = source })
  local officer = exports.drx_mdt:GetOfficer({ stateid = stateid })
end
```
