SetRole
Sets a role for players.
Syntax
SetRole @players newRole spawnFlags? reason?
Arguments
| Name | Required | Type | Description |
|---|---|---|---|
players | Yes | Player variable (e.g. @all, @classDPlayers) | |
newRole | Yes | RoleTypeId enum value - found using 'serhelp RoleTypeId' command | |
spawnFlags | No | RoleSpawnFlags enum value - found using 'serhelp RoleSpawnFlags' command. Use '|' character to provide multiple e.g. Val1|Val2|Val3 | Default: All |
reason | No | RoleChangeReason enum value - found using 'serhelp RoleChangeReason' command | Default: RemoteAdmin |
Validated examples using this method
On a running server
Use serhelp SetRole to inspect the reference generated by your installed SER version.