Hooks
Hooks provided by the Bodygrouper module for managing player bodygroups and skins.
Overview
The Body Grouper module provides an interactive bodygroup editing system that allows players to customize their character models through a dedicated closet interface. It includes administrative controls for inspecting other players' bodygroups, configurable closet models, and comprehensive hook integration for managing bodygroup changes, validation, and synchronization across the server.
BodygrouperApplyAttempt
đ Purpose
Called when a player attempts to apply bodygroup and skin changes.
â° When Called
When the server receives a bodygroup change request, before validation.
âī¸ Parameters
| Parameter | Type | Description |
|---|---|---|
client |
Player | The player attempting to apply changes |
target |
Player | The target player whose bodygroups will be changed |
skin |
number | The skin index to apply |
groups |
table | Table of bodygroup indices and values to apply |
âŠī¸ Returns
nil
đ Realm
Server
BodygrouperClosetAddUser
đ Purpose
Called when a player is added to a bodygroup closet entity.
â° When Called
When a player enters/uses a bodygroup closet entity.
âī¸ Parameters
| Parameter | Type | Description |
|---|---|---|
closet |
Entity | The bodygroup closet entity |
user |
Player | The player being added to the closet |
âŠī¸ Returns
nil
đ Realm
Server
BodygrouperClosetClosed
đ Purpose
Called when a bodygroup closet is closed (last user removed).
â° When Called
When the last user is removed from the closet.
âī¸ Parameters
| Parameter | Type | Description |
|---|---|---|
closet |
Entity | The bodygroup closet entity that was closed |
âŠī¸ Returns
nil
đ Realm
Server
BodygrouperClosetOpened
đ Purpose
Called when a bodygroup closet is opened (first user added).
â° When Called
When the first user enters the closet.
âī¸ Parameters
| Parameter | Type | Description |
|---|---|---|
closet |
Entity | The bodygroup closet entity that was opened |
âŠī¸ Returns
nil
đ Realm
Server
BodygrouperClosetRemoveUser
đ Purpose
Called when a player is removed from a bodygroup closet entity.
â° When Called
When a player leaves/ends use of a bodygroup closet entity.
âī¸ Parameters
| Parameter | Type | Description |
|---|---|---|
closet |
Entity | The bodygroup closet entity |
user |
Player | The player being removed from the closet |
âŠī¸ Returns
nil
đ Realm
Server
BodygrouperInvalidGroup
đ Purpose
Called when an invalid bodygroup value is detected during validation.
â° When Called
When a bodygroup value exceeds the maximum allowed for that bodygroup.
âī¸ Parameters
| Parameter | Type | Description |
|---|---|---|
client |
Player | The player who attempted the change |
target |
Player | The target player |
bodygroupIndex |
number | The invalid bodygroup index |
value |
number | The invalid value that was attempted |
âŠī¸ Returns
nil
đ Realm
Server
BodygrouperInvalidSkin
đ Purpose
Called when an invalid skin value is detected during validation.
â° When Called
When a skin index exceeds the maximum allowed skins for the model.
âī¸ Parameters
| Parameter | Type | Description |
|---|---|---|
client |
Player | The player who attempted the change |
target |
Player | The target player |
skin |
number | The invalid skin index |
âŠī¸ Returns
nil
đ Realm
Server
BodygrouperMenuClosed
đ Purpose
Called when the bodygrouper menu is closed on the client.
â° When Called
When the menu panel is removed on the client.
âī¸ Parameters
None
âŠī¸ Returns
nil
đ Realm
Client
BodygrouperMenuClosedServer
đ Purpose
Called when the bodygrouper menu is closed on the server.
â° When Called
When the server receives the menu close network message.
âī¸ Parameters
| Parameter | Type | Description |
|---|---|---|
client |
Player | The player who closed the menu |
âŠī¸ Returns
nil
đ Realm
Server
BodygrouperMenuOpened
đ Purpose
Called when the bodygrouper menu is opened on the client.
â° When Called
When the menu panel is created and displayed on the client.
âī¸ Parameters
| Parameter | Type | Description |
|---|---|---|
menu |
Panel | The bodygrouper menu panel |
target |
Player | The target player whose bodygroups are being edited |
âŠī¸ Returns
nil
đ Realm
Client
BodygrouperValidated
đ Purpose
Called when bodygroup changes have passed validation.
â° When Called
After all validation checks pass, before applying changes.
âī¸ Parameters
| Parameter | Type | Description |
|---|---|---|
client |
Player | The player applying changes |
target |
Player | The target player |
skin |
number | The validated skin index |
groups |
table | The validated bodygroup table |
âŠī¸ Returns
nil
đ Realm
Server
PostBodygroupApply
đ Purpose
Called after bodygroup changes have been applied to the character.
â° When Called
After the skin and bodygroups are set on both the player and character.
âī¸ Parameters
| Parameter | Type | Description |
|---|---|---|
client |
Player | The player who applied changes |
target |
Player | The target player |
skin |
number | The skin that was applied |
groups |
table | The bodygroups that were applied |
âŠī¸ Returns
nil
đ Realm
Server
PreBodygroupApply
đ Purpose
Called before bodygroup changes are applied to the character.
â° When Called
After validation passes, before setting the skin and bodygroups.
âī¸ Parameters
| Parameter | Type | Description |
|---|---|---|
client |
Player | The player applying changes |
target |
Player | The target player |
skin |
number | The skin to be applied |
groups |
table | The bodygroups to be applied |
âŠī¸ Returns
nil
đ Realm
Server
PreBodygrouperMenuOpen
đ Purpose
Called before the bodygrouper menu is opened.
â° When Called
When the viewBodygroups command is executed, before sending the menu to the client.
âī¸ Parameters
| Parameter | Type | Description |
|---|---|---|
client |
Player | The player opening the menu |
target |
Player | The target player whose bodygroups will be edited |
âŠī¸ Returns
nil
đ Realm
Server