Skip to main content

Spawning

Gets called when the player is spawning.

Start a script section

!-- OnEvent Spawning
-- require @evPlayer *evRole $evUseSpawnPoint *evSpawnLocation $evHorizontalRotation $evIsAllowed

# Add your instructions here
  • Group: PlayerEvents
  • Cancellable: Yes
  • Event data: PlayerSpawningEventArgs

Injected variables

VariableTypeDescription
@evPlayerplayer valueGets the player who is being spawned.
*evRolereference to PlayerRoleBase objectGets the role that is being applied.
$evUseSpawnPointbool valueGets or sets if spawn point should be used.
*evSpawnLocationreference to Vector3 objectGets or sets spawn location.
$evHorizontalRotationnumber valueGets or sets horizontal rotation of spawn.
$evIsAllowedbool valueWhether the event is allowed to run.