Hooks
Hooks provided by the Rumour module for managing rumour spreading mechanics.
Overview
The Rumour module adds an anonymous rumour chat command, hiding of the sender's identity, encouragement for roleplay intrigue, a cooldown to prevent spam, and admin logging of rumour messages.. It provides comprehensive hook integration for customizing managing rumour spreading mechanics and extending functionality.
CanSendRumour
đ Purpose
Called to determine if a player can send a rumour.
â° When Called
After validation but before the rumour is sent.
âī¸ Parameters
| Parameter | Type | Description |
|---|---|---|
client |
Player | The player attempting to send the rumour |
rumourMessage |
string | The rumour message |
âŠī¸ Returns
boolean - Return false to prevent sending
đ Realm
Server
Overview
The Rumour module adds an anonymous rumour chat command, hiding of the sender's identity, encouragement for roleplay intrigue, a cooldown to prevent spam, and admin logging of rumour messages.. It provides comprehensive hook integration for customizing managing rumour spreading mechanics and extending functionality.
PreRumourCommand
đ Purpose
Called before the rumour command is processed.
â° When Called
When the rumour command is executed, before any validation.
âī¸ Parameters
| Parameter | Type | Description |
|---|---|---|
client |
Player | The player using the command |
arguments |
table | The command arguments |
âŠī¸ Returns
nil
đ Realm
Server
Overview
The Rumour module adds an anonymous rumour chat command, hiding of the sender's identity, encouragement for roleplay intrigue, a cooldown to prevent spam, and admin logging of rumour messages.. It provides comprehensive hook integration for customizing managing rumour spreading mechanics and extending functionality.
RumourAttempt
đ Purpose
Called when a player attempts to send a rumour.
â° When Called
After validation passes, before cooldown check.
âī¸ Parameters
| Parameter | Type | Description |
|---|---|---|
client |
Player | The player attempting to send |
rumourMessage |
string | The rumour message |
âŠī¸ Returns
nil
đ Realm
Server
Overview
The Rumour module adds an anonymous rumour chat command, hiding of the sender's identity, encouragement for roleplay intrigue, a cooldown to prevent spam, and admin logging of rumour messages.. It provides comprehensive hook integration for customizing managing rumour spreading mechanics and extending functionality.
RumourFactionDisallowed
đ Purpose
Called when a player's faction is not allowed to send rumours.
â° When Called
When the player's faction is not criminal.
âī¸ Parameters
| Parameter | Type | Description |
|---|---|---|
client |
Player | The player whose faction is disallowed |
faction |
table | The player's faction data (may be nil) |
âŠī¸ Returns
nil
đ Realm
Server
Overview
The Rumour module adds an anonymous rumour chat command, hiding of the sender's identity, encouragement for roleplay intrigue, a cooldown to prevent spam, and admin logging of rumour messages.. It provides comprehensive hook integration for customizing managing rumour spreading mechanics and extending functionality.
RumourNoMessage
đ Purpose
Called when a rumour command is used without a message.
â° When Called
When the message argument is empty.
âī¸ Parameters
| Parameter | Type | Description |
|---|---|---|
client |
Player | The player who sent empty message |
âŠī¸ Returns
nil
đ Realm
Server
Overview
The Rumour module adds an anonymous rumour chat command, hiding of the sender's identity, encouragement for roleplay intrigue, a cooldown to prevent spam, and admin logging of rumour messages.. It provides comprehensive hook integration for customizing managing rumour spreading mechanics and extending functionality.
RumourRevealed
đ Purpose
Called when a rumour is revealed to police.
â° When Called
When the reveal roll succeeds.
âī¸ Parameters
| Parameter | Type | Description |
|---|---|---|
client |
Player | The player who sent the rumour |
âŠī¸ Returns
nil
đ Realm
Server
Overview
The Rumour module adds an anonymous rumour chat command, hiding of the sender's identity, encouragement for roleplay intrigue, a cooldown to prevent spam, and admin logging of rumour messages.. It provides comprehensive hook integration for customizing managing rumour spreading mechanics and extending functionality.
RumourRevealRoll
đ Purpose
Called when the reveal roll is performed.
â° When Called
After the random reveal chance is calculated.
âī¸ Parameters
| Parameter | Type | Description |
|---|---|---|
client |
Player | The player who sent the rumour |
revealChance |
number | The reveal chance percentage |
revealMath |
boolean | Whether the reveal succeeded |
âŠī¸ Returns
nil
đ Realm
Server
Overview
The Rumour module adds an anonymous rumour chat command, hiding of the sender's identity, encouragement for roleplay intrigue, a cooldown to prevent spam, and admin logging of rumour messages.. It provides comprehensive hook integration for customizing managing rumour spreading mechanics and extending functionality.
RumourSent
đ Purpose
Called when a rumour has been sent to players.
â° When Called
After the rumour messages are sent to eligible players.
âī¸ Parameters
| Parameter | Type | Description |
|---|---|---|
client |
Player | The player who sent the rumour |
rumourMessage |
string | The rumour message |
revealMath |
boolean | Whether the rumour was revealed to police |
âŠī¸ Returns
nil
đ Realm
Server
Overview
The Rumour module adds an anonymous rumour chat command, hiding of the sender's identity, encouragement for roleplay intrigue, a cooldown to prevent spam, and admin logging of rumour messages.. It provides comprehensive hook integration for customizing managing rumour spreading mechanics and extending functionality.
RumourValidationFailed
đ Purpose
Called when rumour validation fails.
â° When Called
When CanSendRumour returns false.
âī¸ Parameters
| Parameter | Type | Description |
|---|---|---|
client |
Player | The player whose validation failed |
rumourMessage |
string | The rumour message that failed |
âŠī¸ Returns
nil
đ Realm
Server