Squirrel/Server/Events/Player/onPlayerChat
From Liberty Unleashed Wiki
(Difference between revisions)
(New page: __NOTOC__ This is called when a player sends a message in the main chat. This event is also called even if the player is muted. == Syntax == <code>function onPlayerChat( player, message ...) |
Revision as of 07:09, 9 January 2010
This is called when a player sends a message in the main chat. This event is also called even if the player is muted.
Syntax
function onPlayerChat( player, message )
Parameters
- player - The player pointer
- message - The message the player sent
Example
This example checks if the player has been muted, and if they are, sends a message to them stating they have been muted.
function onPlayerChat( player, text ) { if ( player.Muted ) { MessagePlayer( "You are currently muted", player ); } }
Notes
The functions MessagePlayer and player.Muted were used in in this example. More info about them in the corresponding pages.
Related Events
- onPlayerAction
- onPlayerArmourChange
- onPlayerCashChange
- onPlayerChat
- onPlayerCommand
- onPlayerConnect
- onPlayerDeath
- onPlayerFall
- onPlayerHealthChange
- onPlayerIslandChange
- onPlayerJoin
- onPlayerKeyStateChange
- onPlayerKill
- onPlayerPart
- onPlayerScoreChange
- onPlayerSkinChange
- onPlayerSpawn
- onPlayerUpdate
- onPlayerTeamChange
- onPlayerUseDetonator
- onPlayerVirtualWorldChange
- onPlayerWeaponChange