Squirrel/Server/Functions/Messages/MessageAllExcept
From Liberty Unleashed Wiki
(Difference between revisions)
(New page: __NOTOC__ Sends a message to every player in the game except to specified ID. It can be customized to your own colour if needed. == Syntax == <code>bool MessageAllExcept( string text, in...) |
Revision as of 15:33, 17 October 2008
Sends a message to every player in the game except to specified ID. It can be customized to your own colour if needed.
Syntax
bool MessageAllExcept( string text, int id, int r, int g, int b )
Arguments
- text - This is the message to send to the player
- id - This is the ID of the player
- r - The ammount of Red to be in the colour
- g - The ammount of Green to be in the colour
- b - The ammount of Blue to be in the colour
Example
This will send a message saying 'Testing message functions...' to all players except the one who uses the command '/message'.
function OnPlayerCommand( id, cmd, text ) { if ( cmd == "message" ) { MessageAllExcept( "Testing message functions...", id, 255, 0, 0 ); } }
Notes
The call OnPlayerCommand was used in in this example. More info about this in the corresponding page.