Squirrel/Client/Functions/Messages/PagerMessage
From Liberty Unleashed Wiki
(Difference between revisions)
Jack Bauer (Talk | contribs) |
|||
(2 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{Squirrel/Title|PagerMessage}} | {{Squirrel/Title|PagerMessage}} | ||
{{Squirrel/LUOnly}} | {{Squirrel/LUOnly}} | ||
− | This function shows a GTA pager message to | + | This function shows a GTA pager message to the client. |
== Syntax == | == Syntax == | ||
Line 19: | Line 19: | ||
== Example == | == Example == | ||
− | |||
− | |||
− | |||
<code lang="squirrel"> | <code lang="squirrel"> | ||
− | function | + | |
+ | function onClientCommand( szCommand, szText ) | ||
{ | { | ||
− | + | if ( szCommand == "pager" ) | |
− | + | { | |
− | + | if ( szText ) PagerMessage( pPlayer, szText, 140, 1, 2 ); | |
− | + | } | |
− | + | ||
− | + | return 1; | |
} | } | ||
+ | |||
</code> | </code> | ||
=== Notes === | === Notes === | ||
− | + | The call [[Squirrel/Client/Events/Player/onClientCommand|onClientCommand]] was used in in this example. More info about this in the corresponding page. | |
== Related Functions == | == Related Functions == | ||
{{Squirrel/Client/Functions/Messages}} | {{Squirrel/Client/Functions/Messages}} |
Latest revision as of 11:57, 28 October 2010
This function shows a GTA pager message to the client.
[edit] Syntax
bool PagerMessage( string text, int speed, int something2, int sound )
On the speed setting, the lower the number, the faster the message scrolls across, 140 is a good setting.
For sound, the options available are 0, 1 and 2.
[edit] Arguments
- text - This is the message to be sent via the pager
- speed - This is how quick the message is scrolled across.
- something2 - Unknown
- sound - This is what ring tone the pager plays.
[edit] Example
function onClientCommand( szCommand, szText ) { if ( szCommand == "pager" ) { if ( szText ) PagerMessage( pPlayer, szText, 140, 1, 2 ); } return 1; }
[edit] Notes
The call onClientCommand was used in in this example. More info about this in the corresponding page.
[edit] Related Functions
- BigMessage
- ClearMessages
- ConsoleMessage
- Message
- PagerMessage
- SmallMessage