Scripting/Squirrel/Events/Player/onPlayerArmourChange
From VC-MP Wiki
This is called when player's armour amount changes.
Syntax
function onPlayerArmourChange( player, oldArmour, newArmour )
Parameters
- player - The pointer of the player
- oldArmour - The amount of armour player had before the change
- newArmour - The current armour amount
Example
This will alert the server without armour pickups about an armour cheater:
function onPlayerArmourChange( player, oldarm, newarm ) { if ( ( oldarm > newarm ) && ( player.IsSpawned ) ) Message( "Armour hax alert! Player: " + player.Name ); }
Notes
The functions Message, player.Name and player.IsSpawned 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
