Skip to main content

SetRole

Sets a role for players.

Syntax​

SetRole @players newRole spawnFlags? reason?

Arguments​

NameRequiredTypeDescription
playersYesPlayer variable (e.g. @all, @classDPlayers)
newRoleYesRoleTypeId enum value - found using 'serhelp RoleTypeId' command
spawnFlagsNoRoleSpawnFlags enum value - found using 'serhelp RoleSpawnFlags' command. Use '|' character to provide multiple e.g. Val1|Val2|Val3Default: All
reasonNoRoleChangeReason enum value - found using 'serhelp RoleChangeReason' commandDefault: RemoteAdmin

Validated examples using this method​

On a running server​

Use serhelp SetRole to inspect the reference generated by your installed SER version.