Hooks hooksserver
Part of Spawn Saver
Hooks called by Spawn Saver
Summary
Hooks
Decides whether a player is moved to the spot saved with their character.
Decides whether the place where a player stands is written into their character.
Hooks
ShouldRestorePlayerSpawn(target, character, spawn_point)
server plugins/spawnsaver/plugin/sv_plugin.lua:64Decides whether a player is moved to the spot saved with their character. Called on the server when a character that has a spot inside the world of the current map is loaded, after its player has spawned, while the 'spawn_where_left' config is on. The plugin itself refuses for players who are dead, ragdolled, in observer mode or in noclip.
Parameters
- target Player the player who has loaded the character
- character Character the loaded character
- spawn_point Map the saved spot: map, position and angles
Returns
- Boolean return false to leave the player at the regular spawn point
Called from
Call sites
Decides whether the place where a player stands is written into their character. Called on the server every time the active character of a living player is saved, while the 'spawn_where_left' config is on. The plugin itself refuses for players who are ragdolled, in observer mode or in noclip.
Parameters
- target Player the player whose character is being saved
- character Character their active character
Returns
- Boolean return false to keep the spot that was saved before