GetPlayerArmor
Jump to navigation
Jump to search
This function is deprecated. This means that its use is discouraged and that it might not exist in future versions, but there should be a more generic way to perform what it does. | |
Please use getPedArmor
This function returns a float that contains the current armor for the specified player.
Syntax
float getPlayerArmor ( player thePlayer )
Required Arguments
- thePlayer: The player whose armor you want to check
Returns
A float with the armor, false if an invalid player was given.
Example
This example defines a "showarmor" console command that shows the player that executes it how much armor he has.
Click to collapse [-]
Clientfunction showArmor ( ) local me = getLocalPlayer ( ) local armor = getPlayerArmor ( me ) outputChatBox( "Your armor: " .. armor, me ) end addCommandHandler ( "showarmor", showArmor )
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