Server

isStaff

Check the player staff status

local result = exports.HRAdminMenu:isStaff(playerId: integer, returnGroup: boolean?): boolean, string?

doesGroupExist

Check does group exists

local result = exports.HRAdminMenu:doesGroupExist(group: string?): boolean

setStaff

Set someone as a staff member

local result = exports.HRAdminMenu:setStaff(playerId: integer, group: string): 'playerFoundInStaff'|'invalidGroup'|'idDoesNotExist'?

removeStaff

Remove someone from the staff

local result = exports.HRAdminMenu:removeStaff(playerId: integer): 'playerIsNotStaff'|'idDoesNotExist'|string

getPlayerGroup

Get someone's staff group

local result = exports.HRAdminMenu:getPlayerGroup(playerId: integer): string|'idDoesNotExist'?

getStaff

Get all the registered staff members

local result = exports.HRAdminMenu:getStaff(): table[]

--[[ Result format:
{
    {
        name = 'Henry', -- steam/fivem name
        steamHex = 'steam:00000',
        license = 'license:00000',
        discordId = 'discord:00000',
        group = 'mod'
    },
    {
        name = 'Ann',
        steamHex = 'steam:00000',
        license = 'license:00000',
        discordId = 'discord:00000',
        group = 'admin'
    }
}
]]

getActiveStaff

Get all the staff members in the server

local result = exports.HRAdminMenu:getActiveStaff(): table[]

--[[ Result format:
{
    {
        id = 1,
        name = 'Henry', -- steam/fivem name
        steamHex = 'steam:00000',
        license = 'license:00000',
        discordId = 'discord:00000',
        group = 'mod'
    },
    {
        id = 2,
        name = 'Ann',
        steamHex = 'steam:00000',
        license = 'license:00000',
        discordId = 'discord:00000',
        group = 'admin'
    }
}
]]

Last updated