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
| Name | Required | Type | Description |
|---|---|---|---|
role to replace | Yes | RoleTypeId enum value - found using 'serhelp RoleTypeId' command | |
replacement chance | Yes | A 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.