Faction Hooks
This page details the various hooks associated with a Faction in your schema. These hooks define specific behaviors and actions that occur during different stages of a faction member's lifecycle, such as character creation, spawning, and transfer. Proper implementation of these hooks allows for customized and dynamic interactions within factions.
GetDefaultName
-
Description:
Retrieves the default name for a character upon initial creation within the faction. -
Realm:
Shared
- Parameters:
-
client
(Player
): The client for whom the default name is being retrieved. -
Returns:
String
: The default name for the newly created character. -
Usage Example:
GetDefaultDesc
-
Description:
Retrieves the default description for a character upon initial creation within the faction. -
Realm:
Shared
- Parameters:
-
client
(Player
): The client for whom the default description is being retrieved. -
faction
(Number
): The faction ID for which the default description is being retrieved. -
Returns:
String
: The default description for the newly created character. -
Usage Example:
OnCharCreated
-
Description:
Executes actions when a character is created and assigned to the faction. Typically used to initialize character-specific data or inventory. -
Realm:
-
Server
-
Parameters:
-
client
(Player
): The client that owns the character. -
character
(Character
): The character that has been created. -
Usage Example:
OnSpawn
-
Description:
Executes actions when a faction member spawns in the game world. Useful for setting up player-specific settings or notifications. -
Realm:
Server
- Parameters:
-
client
(Player
): The player that has just spawned. -
Usage Example:
OnTransferred
-
Description:
Executes actions when a character is transferred to the faction. -
Realm:
Server
- Parameters:
-
character
(Character
): The character that was transferred. -
Usage Example: