GivePlayerMoney: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
mNo edit summary |
||
Line 6: | Line 6: | ||
===Required Arguments=== | ===Required Arguments=== | ||
*'''thePlayer:''' | *'''thePlayer:''' the [[player]] to whom you are giving the money. | ||
*'''amount:''' | *'''amount:''' an integer number specifying the amount of money to give to the player. | ||
===Returns=== | ===Returns=== |
Revision as of 14:53, 25 April 2007
Adds money to the player's current money amount.
Syntax
bool givePlayerMoney ( player thePlayer, int amount )
Required Arguments
- thePlayer: the player to whom you are giving the money.
- amount: an integer number specifying the amount of money to give to the player.
Returns
Returns true if the money was added, or false if invalid parameters were passed.
Example
This example gives a player money when he types "givecash" in console.
addCommandHandler ( "givecash", "giveCash" ) --add a handler function for the command "givecash" function giveCash ( thePlayer, command, amount ) --when the givecash command is called givePlayerMoney ( thePlayer, amount ) --give the player money according to the amount end
See Also
- getPlayerTeam
- getPlayerBlurLevel
- setPlayerBlurLevel
- getPlayerSerial
- forcePlayerMap
- getPlayerScriptDebugLevel
- getPlayerFromName
- getPlayerMoney
- getPlayerName
- getPlayerNametagColor
- getPlayerNametagText
- getPlayerPing
- getPlayerWantedLevel
- givePlayerMoney
- isPlayerMapForced
- isPlayerNametagShowing
- setPlayerHudComponentVisible
- setPlayerMoney
- setPlayerNametagColor
- setPlayerNametagShowing
- setPlayerNametagText
- takePlayerMoney
- countPlayersInTeam
- getPlayersInTeam
- isVoiceEnabled
- setControlState
- getControlState