GetPlayerArmor: Difference between revisions
Jump to navigation
Jump to search
m (Visual improvement) |
m (Changed "DeprecatedWithAlt" template to "Deprecated") |
||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
{{Server client function}} | {{Server client function}} | ||
{{ | {{Deprecated|getPedArmor|}} | ||
This function returns a float that contains the current armor for the specified [[player]]. | This function returns a float that contains the current armor for the specified [[player]]. |
Latest revision as of 16:14, 13 February 2015
This function is deprecated. This means that its use is discouraged and that it might not exist in future versions. | |
Please use getPedArmor instead. |
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
- forcePlayerMap
- getAlivePlayers
- getDeadPlayers
- getPlayerACInfo
- getPlayerAnnounceValue
- getPlayerBlurLevel
- getPlayerCount
- getPlayerFromName
- getPlayerIdleTime
- getPlayerIP
- getPlayerMoney
- getPlayerName
- getPlayerNametagColor
- getPlayerNametagText
- getPlayerPing
- getPlayerScriptDebugLevel
- getPlayerSerial
- getPlayerTeam
- getPlayerVersion
- getPlayerWantedLevel
- getRandomPlayer
- givePlayerMoney
- isPlayerMapForced
- isPlayerMuted
- isPlayerNametagShowing
- isVoiceEnabled
- redirectPlayer
- resendPlayerACInfo
- resendPlayerModInfo
- setPlayerAnnounceValue
- setPlayerBlurLevel
- setPlayerHudComponentVisible
- setPlayerMoney
- setPlayerMuted
- setPlayerName
- setPlayerNametagColor
- setPlayerNametagShowing
- setPlayerNametagText
- setPlayerScriptDebugLevel
- setPlayerTeam
- setPlayerVoiceBroadcastTo
- setPlayerVoiceIgnoreFrom
- setPlayerWantedLevel
- spawnPlayer
- takePlayerMoney
- takePlayerScreenShot