GetPlayerArmor: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
Line 10: Line 10:


==Example==
==Example==
<syntaxhighlight lang="lua">armor = getPlayerArmor ( findPlayer ( "Someguy" ) )
<syntaxhighlight lang="lua">-- get health of 'someguy' and show it in the chat
outputChatBox ( "Someguy's current Armor: ", armor, "." )</syntaxhighlight>
tmpplayer = getPlayerFromNick ( "someguy" )
armor = getPlayerArmor ( tmpplayer )
outputChatBox ( "The player's armor is: " .. armor )</syntaxhighlight>


==See Also==
==See Also==
{{Player functions}}
{{Player functions}}

Revision as of 07:48, 26 May 2006

Description

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

Example

-- get health of 'someguy' and show it in the chat
tmpplayer = getPlayerFromNick ( "someguy" )
armor = getPlayerArmor ( tmpplayer )
outputChatBox ( "The player's armor is: " .. armor )

See Also