Scripting/Squirrel/Events/Player/onPlayerCashChange
From VC-MP Wiki
This is called when player's cash amount changes.
Syntax
function onPlayerCashChange( player, oldCash, newCash )
Parameters
- player - The pointer of the player
- oldCash - The amount of cash player had before the change
- newCash - Player's current cash
Example
This example will tell the player if they got more money.
function onPlayerCashChange( player, oldCash, newCash ) { if ( oldCash < newCash ) MessagePlayer( "Yay! You got some more $$!", 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
