SetJoiningPlayersParameters

From The KillerJim Mod Wiki

Gamemode::SetJoiningPlayersParameters

SetJoiningPlayersParameters.png

Server Only Function - This is an function executes only on the server.

Description

When players join a server running your game-mode they will be initially handled by the parameter supplied to this function. It is therefore recommended that you call this from the GameModeActivated event to ensure that your required parameters are set prior to any players joining.

This function can be called to modify the handling of joining users at any time, however it is recommended that you handle any changes in your game-mode logic.

Arguments
1 PlayerJoinParameters joinParameters
A structure representing the initial parameters used to handle players that join the game. The following fields are provided:

bool JoinAsSpectator (default : true) - When players join should they spawn initially as a spectator?

float SpawnDelay (default : 2) - If spawned as spectator, how long should we wait to spawn as player (0 = never)

bool RespawnOnDeath (default : true) - Should a player respawn when they are killed?

float RespawnDelay (default : 3) - Seconds to wait before respawning (0 = instantly respawn)

'float RemoveDeadPlayersTimeout (default : 10) - seconds to wait before dead bodies are cleaned up (removed)

Playing

Developers

Developer Reference