SetPlayerArmor: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 16: | Line 16: | ||
This example removes the armor of a player. | This example removes the armor of a player. | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
function armorOff ( | function armorOff ( thePlayer, command ) | ||
setPlayerArmor ( | setPlayerArmor ( thePlayer, 0 ) | ||
end | end | ||
Revision as of 10:30, 16 August 2007
This function allows you to set the armor value of a player.
Syntax
bool setPlayerArmor ( player thePlayer, float playerArmor )
Required Arguments
- thePlayer: the player whose armor you want to modify.
- playerArmor: the amount of armor you want to set on the player. Valid values are from 0 to 100.
Returns
Returns true if the armor was changed succesfully. Returns false if an invalid player is specified, or the armor value specified is out of acceptable range.
Example
Click to collapse [-]
ServerThis example removes the armor of a player.
function armorOff ( thePlayer, command ) setPlayerArmor ( thePlayer, 0 ) end addCommandHandler ( "armoroff", armorOff )
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