Skip to main content

CRole.CreateChanceSpawnSystem

Creates a spawn system for a custom role using a simple chance.

Syntax​

CRole.CreateChanceSpawnSystem role_to_replace replacement_chance

Returns​

reference to CustomRoleSpawnSystem object

Arguments​

NameRequiredTypeDescription
role to replaceYesRoleTypeId enum value - found using 'serhelp RoleTypeId' command
replacement chanceYesA number between 0% and 100% (inclusive)The chance that a player will spawn with this custom role when changing into 'role to replace'

Validated examples using this method​

On a running server​

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