Scripting/Squirrel/Events/Player/onPlayerAction
From VC-MP Wiki
This is called when a player does a /me action. This is called even if the player is muted.
Syntax
function onPlayerAction( player, message )
Parameters
- player - The pointer of the player
- message - The 'action' player did using /me
Example
This example kills the player if they type '/me dies'.
function onPlayerAction( player, text ) { if ( text == "dies" ) { player.Health = 100; MessagePlayer( "You are now dead.", player ); } }
Notes
The functions MessagePlayer and player.Health 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
