GetPedArmor

From Multi Theft Auto: Wiki
Revision as of 19:59, 25 May 2008 by Arc (talk | contribs)
Jump to navigation Jump to search

This function returns the current armor of the specified ped.

Syntax

float getPedArmor ( ped thePed )

Required Arguments

  • thePed: The ped whose armor you want to check

Returns

A float with the armor, false if an invalid ped was given.

Example

This example defines a "showarmor" console command that shows the player that executes it how much armor he has.

function showArmor ( )
	local me = getLocalPlayer ( )
	local armor = getPedArmor ( me )
	outputChatBox( "Your armor: " .. armor )
end
addCommandHandler ( "showarmor", showArmor )

See Also