# API

## Exports & Events

### addGroup

* Add whole new group as in config
* Side: `server`
* Usage:

```lua
local newGroup = {
    name = 'example',
    requirements = {
        job = 'police',
        grades = {
            'recruit',
            'officer'
        },
        items = {}
    },
    see = {
        'example',
        'example2',
    },
    blip = {
        name = '{PREFIX} {PLAYER_NAME} {SUFFIX}',
        sprite = 60,
        color = 8,
        headingIndicator = true,
        showCone = true,
        category = 7,
    },
    vehicleBlip = {
        color = 3,
        sirenFlash = 1,
    }
    allowPrefixSuffixEdit = true
}

--- void
exports.rcore_job_blips:addGroup(newGroup)

TriggerEvent('rcore_job_blips:groups:addGroup', newGroup)
```

### removeGroup

* Remove group by name. Returns true if group is present and was removed.
* Side: `server`
* Usage:

```lua
local groupName = 'example'

--- boolean (true/false)
local success = exports.rcore_job_blips:removeGroup(groupName)

TriggerEvent('rcore_job_blips:groups:removeGroup', groupName)
```

### addPlayerToGroup

* Adding player to group
* Side: `server`
* Usage:

```lua
local playerId = ...
local groupName = 'example'

--- void
exports.rcore_job_blips:addPlayerToGroup(groupName, playerId)

TriggerEvent('rcore_job_blips:players:addToGroup', groupName, playerId)
```

### removePlayerFromGroup

* Remove player from group
* Side: `server`
* Usage:

```lua
local playerId = ...
local groupName = 'example'

--- void
exports.rcore_job_blips:removePlayerFromGroup(groupName, playerId)

TriggerEvent('rcore_job_blips:players:removeFromGroup', groupName, playerId)
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://documentation.rcore.cz/paid-resources/rcore_job_blips/api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
