Squirrel/Client/Functions/Messages/SmallMessage
From Liberty Unleashed Wiki
(Difference between revisions)
(Created page with "{{Squirrel/Title|SmallMessage}} This function sends a small GTA style text to the client. == Syntax == ''SmallMessage'' has an parameter. <code>bool SmallMessage( string te...") |
Revision as of 11:03, 12 November 2013
This function sends a small GTA style text to the client.
Syntax
SmallMessage has an parameter.
bool SmallMessage( 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
Example
function onClientCommand ( szCommand, szParams ) { if ( cmd == "smallmsg" ) { if ( text ) SmallMessage ( "Hi! :)", 5000, 1 ); } return 1; }
This command will show a small message, with type 0, lasting 5 seconds, showing the specified text, for the command user.
Notes
The call onPlayerCommand was used in in this example. More info about this in the corresponding page.