Scripting/Squirrel/Events/Player/onPlayerScoreChange
From VC-MP Wiki
This is called when player's score changes.
Syntax
function onPlayerScoreChange( player, oldScore, newScore )
Parameters
- player - The pointer of the player
- oldScore - Player's old score before the change
- newScore - The current score
Example
This will remind the player if they got a negative score.
function onPlayerScoreChange( player, oldScore, newScore ) { if ( ( oldScore < newScore ) && ( newScore < 0 ) ) MessagePlayer( "You got only " + newScore + " points. You disappoint me!", player ); }
Notes
The function MessagePlayer was used in in this example. More info about it in the corresponding page.
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
