Scripting/Squirrel/Functions/Misc/ClientMessageToAll
From VC-MP Wiki
NOTE: This function has been added in VC:MP 0.3z r2. It will not work in previous versions.
This function sends a coloured message to all clients.
Syntax
bool ClientMessageToAll( string message, int r, int g, int b )
Arguments
- message - The message to send
- r - The amount of red in the colour
- g - The amount of green in the colour
- b - The amount of blue in the colour
Example
We will create a custom function for a colour and then call it. I have chosen the red colour.
function Msg( text ) { ClientMessageToAll( text, 255, 0, 0 ); } function onPlayerCommand( player, cmd, text ) { if ( cmd == "text" ) { Msg( "This is a nice red message!" ); } }
Notes
The call onPlayerCommand was used in in this example. More info about this in the corresponding page.
Related Functions
- Message
- MessagePlayer
- MessageAllExcept
- PrivMessage
- PrivMessageAll
- ClientMessage
- ClientMessageToAll
- Announce
- AnnounceAll
- SendPlayerMessage
- KickPlayer
- BanPlayer
- BanIP
- UnbanIP
- GetWeaponName
- GetWeaponID
- GetDistrictName
- GetSkinName
- GetTickCount
- GetTime
- GetFullTime
- IsNum
- BindKey
- UnbindKey
- CallFunc
- InPoly
- DistanceFromPoint
- ReloadScripts
