GetPlayerArmor: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 7: | Line 7: | ||
===Required Arguments=== | ===Required Arguments=== | ||
*'''player''': The [[player]] whose armor you want to check | *'''player''': The [[player]] whose armor you want to check | ||
==Returns== | |||
A ''float'' with the armor, ''false'' if a invalid player was given. | |||
==Example== | ==Example== | ||
This example | This example outputs the amount of armor the player who calls the function 'showArmor' currently has. | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
armor = getPlayerArmor ( | function showArmor( player ) | ||
outputChatBox ( " | local armor = getPlayerArmor(player) | ||
outputChatBox("Your armor: "..armor) | |||
end | |||
addCommandHandler("showArmor", showArmor) | |||
</syntaxhighlight> | |||
==See Also== | ==See Also== | ||
{{Player functions}} | {{Player functions}} |
Revision as of 21:49, 29 July 2007
This function returns a float that contains the current armor for the specified player.
Syntax
float getPlayerArmor ( player player )
Required Arguments
- player: The player whose armor you want to check
Returns
A float with the armor, false if a invalid player was given.
Example
This example outputs the amount of armor the player who calls the function 'showArmor' currently has.
function showArmor( player ) local armor = getPlayerArmor(player) outputChatBox("Your armor: "..armor) 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