MessageAllExcept

From Liberty Unleashed Wiki
Jump to: navigation, search
Home   |   Squirrel Scripting   |   Server Functions   |   Server Events   |   Client Functions   |   Client Events

Sends a message to every player in the game except to specified player. It can be customized to your own colour if needed.

Syntax

  1. bool MessageAllExcept( string text, Player plr, [ int r, int g, int b ] )
  1. bool MessageAllExcept( string text, Player plr, [ Colour col ] )

Arguments

  • text - This is the message to send to players
  • plr - This is the player object for the player not to send the message
  • r - The amount of Red to be in the colour. This argument is optional
  • g - The amount of Green to be in the colour. This argument is optional
  • b - The amount of Blue to be in the colour. This argument is optional
  • col - The colour to use for the message. This argument is optional

Example

This will send a message saying 'Testing message functions...' to all players except the one who uses the command '/message'.

  1.  
  2. function onPlayerCommand( player, cmd, text )
  3. {
  4. if ( cmd == "message" )
  5. {
  6. MessageAllExcept( "Testing message functions...", player, 255, 0, 0 );
  7. }
  8. return 1;
  9. }
  10.  

Notes

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

Related Functions

Personal tools
Namespaces

Variants
Actions
Navigation
scripting
Toolbox