Scripting/Squirrel/Events/Player/onPlayerPM
From VC-MP Wiki
This is called when a player sends a personal message to another player. This is called even if the player is muted.
Syntax
function onPlayerPM( player, playerTo, message )
Parameters
- player - The pointer of the player
- playerTo - The pointer of the message receiver
- message - The message player said
Example
This example checks if the player has been muted and reminds them if they have.
function onPlayerPM( player, playerTo, text ) { if ( player.IsMuted ) { MessagePlayer( "You are currently muted so nobody can hear you.", player ); } }
Notes
The functions MessagePlayer and player.IsMuted were used in in this example. More info about them in corresponding pages.
Related Events
- onPlayerJoin
- onPlayerPart
- onPlayerCrashDump
- onPlayerSpawn
- onPlayerDeath
- onPlayerKill
- onPlayerTeamKill
- onPlayerChat
- onPlayerAction
- onPlayerPM
- onPlayerFailedPM
- onPlayerTeamChat
- onPlayerCommand
- onPlayerHealthChange
- onPlayerArmourChange
- onPlayerWeaponChange
- onPlayerCashChange
- onPlayerScoreChange
- onPlayerKeyStateChange
- onPlayerMove
- onPlayerRequestClass
- onPlayerRequestAmmunation
- onPlayerRequestAmmuWeapon
- onPlayerStartSpectating
- onPlayerExitSpectating
- onPlayerRconLogin
- onPlayerRconLoginAttempt
- onPlayerFall
- onPlayerVersion
