Open Road MP

mp.roles

Roles of players (moderator, driver, ...), kept by Open Road MP account. Admins come from server.cfg (admins).

set

mp.roles.set(player: PlayerRef, role: string | null): void

Gives the player a role (a name of your choice, e.g. "moderator"), or takes it with null. Kept by account in <gamemode>/data/roles.json.

get

mp.roles.get(player: PlayerRef): string | null

The player's role, or null. Admins from server.cfg without a role get "admin".

has

mp.roles.has(player: PlayerRef, role: string): boolean

Whether the player has this role. Admins (server.cfg) have every role.

On this page