Server-side hooks of the Custom Spawn plugin that move a player to their character's CustomSpawn position on
spawn.
PostPlayerSpawn teleports the player and restores the saved eye angles on full spawns, when the point was set on
the current map. ShouldSavePlayerSpawn stops the spawn saver from storing a position for characters that have a
custom spawn.
Summary
Hooks
Called just after a player spawns; moves the player to their character's custom spawn point.
Called when the spawn saver wants to store where a player left; skipped for characters with a custom spawn.
Hooks
cwCustomSpawn:PostPlayerSpawn(player, bLightSpawn, bChangeClass, bFirstSpawn)
server gamemodes/cwhl2rp/plugins/customspawn/plugin/sv_hooks.lua:25Implements hook PostPlayerSpawn
Called just after a player spawns; moves the player to their character's custom spawn point.
Only applies on full spawns and when the custom spawn was set on the current map; the saved eye angles are restored too.
Parameters
- player Player The player who spawned
- bLightSpawn Boolean Whether this was a light spawn that keeps position and loadout
- bChangeClass Boolean Whether the player spawned because their class changed
- bFirstSpawn Boolean Whether this is the character's first spawn
cwCustomSpawn:ShouldSavePlayerSpawn(player)
server gamemodes/cwhl2rp/plugins/customspawn/plugin/sv_hooks.lua:11Implements hook ShouldSavePlayerSpawn
Called when the spawn saver wants to store where a player left; skipped for characters with a custom spawn.
Parameters
- player Player The player whose position would be saved
Returns
- Boolean
falsewhen the character has a custom spawn, otherwisenilto let other hooks decide