Scripting/Squirrel/Functions/Misc/ClientMessage
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 the specified client.
Syntax
bool ClientMessage( string message, Player plr, int r, int g, int b )
Arguments
- message - The message to send
- plr - The player to send the mesage to
- 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
This command will send a red message saying 'hello' to the player.
function onPlayerCommand( player, cmd, text ) { if ( cmd == "hello" ) { ClientMessage( "hello!", player, 255, 0, 0 ); } }
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
