CRole.SetCallbacks
Sets the callbacks for a provided custom role.
Syntaxโ
CRole.SetCallbacks custom_role on_spawning? on_removing?
Argumentsโ
| Name | Required | Type | Description |
|---|---|---|---|
custom role | Yes | Custom role id e.g. myCustomRole | |
on spawning | No | A name of a function defined above e.g. MyFunction. It has to have these arguments: @player *role | This will be called when a player is being spawned with this role. |
on removing | No | A name of a function defined above e.g. MyFunction. It has to have these arguments: @player *role | This will be called when this role is being taken away from a player. |
On a running serverโ
Use serhelp CRole.SetCallbacks to inspect the reference generated by your installed SER version.