GetPedArmor: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
mNo edit summary |
||
Line 13: | Line 13: | ||
==Example== | ==Example== | ||
<section name="Client" class="client" show="true"> | |||
This example defines a "showarmor" console command that shows the player that executes it how much armor he has. | This example defines a "showarmor" console command that shows the player that executes it how much armor he has. | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
Line 22: | Line 23: | ||
addCommandHandler ( "showarmor", showArmor ) | addCommandHandler ( "showarmor", showArmor ) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
</section> | |||
==See Also== | ==See Also== | ||
{{Ped functions}} | {{Ped functions}} |
Revision as of 20:25, 25 May 2008
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
Click to collapse [-]
ClientThis 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
- addPedClothes
- getPedClothes
- removePedClothes
- createPed
- getPedAmmoInClip
- getPedArmor
- getPedFightingStyle
- getPedOccupiedVehicle
- getPedOccupiedVehicleSeat
- getPedStat
- getPedTarget
- getPedTotalAmmo
- getPedWalkingStyle
- getPedWeapon
- getPedWeaponSlot
- getPedContactElement
- getValidPedModels
- isPedChoking
- isPedDead
- isPedDoingGangDriveby
- isPedDucked
- isPedHeadless
- isPedInVehicle
- isPedOnFire
- isPedOnGround
- isPedWearingJetpack
- killPed
- removePedFromVehicle
- setPedAnimation
- setPedAnimationProgress
- setPedAnimationSpeed
- setPedArmor
- setPedDoingGangDriveby
- setPedFightingStyle
- setPedHeadless
- setPedOnFire
- setPedStat
- setPedWalkingStyle
- setPedWeaponSlot
- warpPedIntoVehicle