OnClientChatMessage: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
m (→‎Example: event is not cancelable - example is wrong)
No edit summary
Line 14: Line 14:
==Source==
==Source==
The [[event system#Event source|source]] of this event is the root element.
The [[event system#Event source|source]] of this event is the root element.
==Cancel effect==
If this event is [[Event system#Canceling|canceled]], the game's chat system won't deliver the posts. You may use [[outputChatBox]] to send the messages then.
Cancelling this event also means the chat will not appear in the chatbox[[outputServerLog]] - See the second example.
==Example==
==Example==
This event doesn't have an example added yet
This event doesn't have an example added yet

Revision as of 08:59, 8 April 2013

This event is triggered when any text is output to chatbox, including MTA's hardcoded messages.

Parameters

string text, int r, int g, int b
  • text: The text that was output to chatbox
  • r: The amount of red in the color of the text.
  • g: The amount of green in the color of the text.
  • b: The amount of blue in the color of the text.

Source

The source of this event is the root element.

Cancel effect

If this event is canceled, the game's chat system won't deliver the posts. You may use outputChatBox to send the messages then. Cancelling this event also means the chat will not appear in the chatboxoutputServerLog - See the second example.

Example

This event doesn't have an example added yet

See Also

Client other events


Client event functions