API

Exports & Events

addGroup

  • Add whole new group as in config

  • Side: server

  • Usage:

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:

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:

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:

local playerId = ...
local groupName = 'example'

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

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

Last updated