Squirrel/Client/Events/Player/onClientCashChange
From Liberty Unleashed Wiki
(Difference between revisions)
(→Notes) |
|||
Line 1: | Line 1: | ||
{{Squirrel/Title|onClientCashChange}} | {{Squirrel/Title|onClientCashChange}} | ||
− | This is called when the clients | + | This is called when the clients cash changes. |
== Syntax == | == Syntax == | ||
− | <code | + | <code>function onClientCashChange( int oldcash, int newcash )</code> |
=== Arguments === | === Arguments === | ||
− | * ''' | + | * '''oldcash''' - The player's old cash value |
− | * ''' | + | * '''newcash''' - The player's new cash value |
=== Returns === | === Returns === | ||
− | + | This event does not handle return values. | |
− | + | ||
== Example == | == Example == | ||
− | This example will | + | This example will message the player when their cash changes. |
− | |||
− | |||
<code lang="squirrel"> | <code lang="squirrel"> | ||
− | function onClientCashChange( | + | function onClientCashChange( oldcash, newcash ) |
− | + | { | |
− | + | Message( "You now have $" + newcash ); | |
+ | |||
+ | return 1; | ||
} | } | ||
</code> | </code> | ||
Line 32: | Line 31: | ||
− | The | + | The function [[Squirrel/Client/Functions/Messages/Message|Message]] was used in this example. More info about it can be found in the corresponding page. |
== Related Events == | == Related Events == | ||
{{Squirrel/Client/Events/Player}} | {{Squirrel/Client/Events/Player}} |
Latest revision as of 19:08, 14 April 2011
This is called when the clients cash changes.
[edit] Syntax
function onClientCashChange( int oldcash, int newcash )
[edit] Arguments
- oldcash - The player's old cash value
- newcash - The player's new cash value
[edit] Returns
This event does not handle return values.
[edit] Example
This example will message the player when their cash changes.
function onClientCashChange( oldcash, newcash ) { Message( "You now have $" + newcash ); return 1; }
[edit] Notes
The function Message was used in this example. More info about it can be found in the corresponding page.
[edit] Related Events
- onClientArmourChange
- onClientCashChange
- onClientCollideWithPlayer
- onClientCommand
- onClientDeath
- onClientFall
- onClientHealthChange
- onClientHurt
- onClientKill
- onClientKeyStateChange
- onClientRequestClass
- onClientRequestSpawn
- onClientShot
- onClientSpawn
- onClientUseDetonator
- onClientWeaponChange
- onPlayerDeath
- onPlayerJoin
- onPlayerKill
- onPlayerPart
- onPlayerSpawn