Squirrel/Server/Functions/Messages/BigMessage

From Liberty Unleashed Wiki
(Difference between revisions)
Jump to: navigation, search
(New page: __NOTOC__ This function sends a big GTA announcement message to a player or all the players in the game. == Syntax == ''BigMessage'' can take 2 different lists of parameters. These are: ...)
 
(Notable)
 
(4 intermediate revisions by 3 users not shown)
Line 1: Line 1:
__NOTOC__
+
{{Squirrel/Title|BigMessage}}
 
This function sends a big GTA announcement message to a player or all the players in the game.
 
This function sends a big GTA announcement message to a player or all the players in the game.
  
Line 16: Line 16:
 
* '''plr''' - The pointer to the player who should get the message
 
* '''plr''' - The pointer to the player who should get the message
  
== Example ==
+
== Example 1 ==
  
{{Squirrel/NeedsExample}}
 
 
<code lang="squirrel">
 
<code lang="squirrel">
-- todo
+
function onPlayerCommand( player, cmd, text )
 +
{
 +
if ( cmd == "bigmessage" )
 +
{
 +
if ( text ) BigMessage( text, 5000, 1 );
 +
}
 +
}
 
</code>
 
</code>
 +
 +
This command will send a big message to all players for 5 seconds, with style 1 using the text specified.
 +
 +
== Example 2 ==
 +
 +
<code lang="squirrel">
 +
function onPlayerCommand( player, cmd, text )
 +
{
 +
if ( cmd == "bigmessage2" )
 +
{
 +
if ( text ) BigMessage( player, text, 5000, 1 );
 +
}
 +
}
 +
</code>
 +
 +
This command will send a big message to the command user for 5 seconds, with style 1 using the text specified.
  
 
=== Notes ===
 
=== Notes ===
  
-- Example notes here
+
The call [[Squirrel/Server/Events/Player/onPlayerCommand|onPlayerCommand]] was used in in this example. More info about this in the corresponding page.
 +
 
 +
=== Notable ===
 +
You Can Coloured The Test By Useing ( ~y~ ,~b~ , ~r~, ~bl~ ) And More But You Must But This Before The Test Like This>> <code lang="squirrel"> BigMessage( player, "~w~ Welcome To The ~b~ Server.", 5000, 1 ); </code>
  
 
== Related Functions ==
 
== Related Functions ==
  
 
{{Squirrel/Server/Functions/Messages}}
 
{{Squirrel/Server/Functions/Messages}}

Latest revision as of 14:09, 10 August 2013

Home   |   Squirrel Scripting   |   Server Functions   |   Server Events   |   Client Functions   |   Client Events

This function sends a big GTA announcement message to a player or all the players in the game.

[edit] Syntax

BigMessage can take 2 different lists of parameters. These are:

  1. bool BigMessage( string text, int time, int type )
  1. bool BigMessage( Player plr, string text, int time, int type )

[edit] Arguments

  • text - This is the message to send to players
  • time - This is how long the message will stay on screen
  • type - The type of the announcement message
  • plr - The pointer to the player who should get the message

[edit] Example 1

  1.  
  2. function onPlayerCommand( player, cmd, text )
  3. {
  4. if ( cmd == "bigmessage" )
  5. {
  6. if ( text ) BigMessage( text, 5000, 1 );
  7. }
  8. }
  9.  

This command will send a big message to all players for 5 seconds, with style 1 using the text specified.

[edit] Example 2

  1.  
  2. function onPlayerCommand( player, cmd, text )
  3. {
  4. if ( cmd == "bigmessage2" )
  5. {
  6. if ( text ) BigMessage( player, text, 5000, 1 );
  7. }
  8. }
  9.  

This command will send a big message to the command user for 5 seconds, with style 1 using the text specified.

[edit] Notes

The call onPlayerCommand was used in in this example. More info about this in the corresponding page.

[edit] Notable

You Can Coloured The Test By Useing ( ~y~ ,~b~ , ~r~, ~bl~ ) And More But You Must But This Before The Test Like This>>
  1. BigMessage( player, "~w~ Welcome To The ~b~ Server.", 5000, 1 );

[edit] Related Functions

Personal tools
Namespaces

Variants
Actions
Navigation
scripting
Toolbox