Player/Armor

From Garry's Mod
Jump to: navigation, search
 Player:Armor( )

Contents

Description

Returns the player's armor.

Returns

number

The player's armor.

Examples

Example

Loops through all the players and checks if they have any armor, if they do not, then sets their armor to 100.

for _, v in pairs( player.GetAll( ) ) do
    if v:Armor( ) == 0 then
         v:SetArmor( 100 )
    end
end


Personal tools
Navigation