GetChatMessage: Difference between revisions

Headers
m (typo)
Tag: Source edit
(Headers)
Tag: Source edit
Line 7: Line 7:
NOTE: Private chat messages (i.e. those sent using <tt>sayto</tt> or <tt>sayto_idx</tt>) are not accounted for and will not be stored into memory, nor are they retrievable.
NOTE: Private chat messages (i.e. those sent using <tt>sayto</tt> or <tt>sayto_idx</tt>) are not accounted for and will not be stored into memory, nor are they retrievable.


== Parameters ==
=== parameters ===
* ''player'': The number of the player whose chat message you want to retrieve. If you want to retrieve any messages from the server, set this to -1 instead.
* ''player'': The number of the player whose chat message you want to retrieve. If you want to retrieve any messages from the server, set this to -1 instead.
* ''offset'': Which chat message you want to retrieve. If you want the last message sent, set to to 0. If you want the oldest message still stored in memory, set this to 4.
* ''offset'': Which chat message you want to retrieve. If you want the last message sent, set to to 0. If you want the oldest message still stored in memory, set this to 4.


== Return Value ==
=== Return value ===
Returns the chat message as a string, including color codes. If the player doesn't exist or if that player hadn't sent more messages than <tt>offset</tt>, it returns an empty string instead.
Returns the chat message as a string, including color codes. If the player doesn't exist or if that player hadn't sent more messages than <tt>offset</tt>, it returns an empty string instead.