SetClass
Raise
This Event is raised when a Player's Role Type is set.
Exceptions: SCP049 revives a Player, Player activated overwatch and Role Type changes to Spectator
Usage
You can use this Event to change the Spawn behavior of a Role
When you change the RoleType won't the other Attributes change as well so the Player will still get the items/ spawn position of the first selected role.
SetClassEvent
EventArgs | Type | Description |
---|---|---|
Player | SynapsePlayer | The Player whose role is being changed |
Allow | bool | If the Server is allowed to change the RoleType |
Role | RoleType | The RoleType that the Player will become |
SpawnReason | SpawnReason | The Reason because of which the Player Role is changed |
Items | List<uint> | The Items which will be given to the Player after his role changed |
EscapeItems | List<SynapseItem> | The Items which the Player had before his role changed when he is trying to escape |
Position | Vector3 | The Position where the Player will spawn |
Rotation | PlayerRotation | The Rotation which the Player will be set after set to the new Role |
Ammo | Dictionary<AmmoType, ushort> | The Ammo the player will get after his role was changed |
Last updated