Main file of the Extra Commands plugin, which adds several commands for server administration; defines the server-side hooks that reapply a character's custom bodygroups and skin.
PostPlayerSpawn restores the CustomBodyGroup and CustomSkin character data set by /CharSetBodyGroup and
/CharSetSkin, and PlayerUnragdolled restores the bodygroups when the player gets up from a ragdoll.
Summary
Hooks
Called after a player gets up from a ragdoll; reapplies the character's custom bodygroups.
Called just after a player spawns; reapplies the character's custom bodygroups and skin.
Hooks
PLUGIN:PlayerUnragdolled(player, state, ragdollTable)
server gamemodes/cwhl2rp/plugins/extracommands/plugin/sh_plugin.lua:46Implements hook PlayerUnragdolled
Called after a player gets up from a ragdoll; reapplies the character's custom bodygroups.
Parameters
- player Player The player who was unragdolled
- state Number The ragdoll state being set, a
RAGDOLL_*value such asRAGDOLL_RESET - ragdollTable Map The player's ragdoll data
PLUGIN:PostPlayerSpawn(player, lightSpawn, changeClass, firstSpawn)
server gamemodes/cwhl2rp/plugins/extracommands/plugin/sh_plugin.lua:32Implements hook PostPlayerSpawn
Called just after a player spawns; reapplies the character's custom bodygroups and skin.
The values come from the CustomBodyGroup and CustomSkin character data set by the
CharSetBodyGroup and CharSetSkin commands.
Parameters
- player Player The player who spawned
- lightSpawn Boolean Whether this was a light spawn
- changeClass Boolean Whether the player spawned because their class changed
- firstSpawn Boolean Whether this is the character's first spawn