Squirrel/Server/Functions/Messages/BigMessage
From Liberty Unleashed Wiki
(Difference between revisions)
(→Notes) |
(→Notable) |
||
Line 49: | Line 49: | ||
=== Notable === | === Notable === | ||
− | You Can Coloured The Test By Useing ( ~y~ ,~b~ , ~r~, ~bl~ ) And More But You Must But This Before The Test Like This>> | + | 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"> </code> |
== Related Functions == | == Related Functions == | ||
{{Squirrel/Server/Functions/Messages}} | {{Squirrel/Server/Functions/Messages}} |
Revision as of 14:08, 10 August 2013
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:
bool BigMessage( string text, int time, int type )
bool BigMessage( Player plr, string text, int time, int type )
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
Example 1
function onPlayerCommand( player, cmd, text ) { if ( cmd == "bigmessage" ) { if ( text ) BigMessage( text, 5000, 1 ); } }
This command will send a big message to all players for 5 seconds, with style 1 using the text specified.
Example 2
function onPlayerCommand( player, cmd, text ) { if ( cmd == "bigmessage2" ) { if ( text ) BigMessage( player, text, 5000, 1 ); } }
This command will send a big message to the command user for 5 seconds, with style 1 using the text specified.
Notes
The call onPlayerCommand was used in in this example. More info about this in the corresponding page.