Squirrel/Client/Functions/Messages/PagerMessage

From Liberty Unleashed Wiki
(Difference between revisions)
Jump to: navigation, search
(Created page with '{{Squirrel/Title|PagerMessage}} {{Squirrel/LUOnly}} This function shows a GTA pager message to one player or all the players ingame. == Syntax == <code>bool PagerMessage( strin…')
 
Line 20: Line 20:
 
== Example ==
 
== Example ==
  
{{Squirrel/NeedsExample}}
+
This command will send the message "Liberty Unleashed FTW" (without the "s) to all the players in the server.
Explanation for the example
+
  
 
<code lang="squirrel">
 
<code lang="squirrel">
-- Todo
+
function onPlayerCommand( player, cmd, text )
 +
{
 +
    if ( cmd == "pager" )
 +
    {
 +
PagerMessage( "Liberty Unleashed FTW", 140, 1, 1 );
 +
    }
 +
   
 +
    return 1;
 +
}
 
</code>
 
</code>
  

Revision as of 19:27, 25 October 2010

Home   |   Squirrel Scripting   |   Server Functions   |   Server Events   |   Client Functions   |   Client Events
LU This function works in Liberty Unleashed only.

This function shows a GTA pager message to one player or all the players ingame.

Syntax

  1. 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.

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.

Example

This command will send the message "Liberty Unleashed FTW" (without the "s) to all the players in the server.

  1.  
  2. function onPlayerCommand( player, cmd, text )
  3. {
  4. if ( cmd == "pager" )
  5. {
  6. PagerMessage( "Liberty Unleashed FTW", 140, 1, 1 );
  7. }
  8. return 1;
  9. }
  10.  

Notes

-- List of used functions and other notes here.

Related Functions

Personal tools
Namespaces

Variants
Actions
Navigation
scripting
Toolbox