Garry's Mod Wiki

Player:SetArmor

Player:SetArmor

Player:SetArmor( number Amount )

Description

Sets the player armor to the argument.

Arguments

1 number Amount
The amount that the player armor is going to be set to.

Example

Sets the player armor to 100 when they types "SetArmor" at the console.

concommand.Add( "SetArmor", function( ply ) ply:SetArmor( 100 ) end )
Output: Sets the player armor to 100

Example

Gives the player armor to first vararg when they types "AddArmor" at the console.

concommand.Add( "GiveArmor", function( ply, cmd, args ) local Armor = args[1] or 100 ply:SetArmor( ply:Armor() + Armor ) end )
Output: Adds the player armor to first vararg

Special Pages


Wikis

?

Render Time: 48ms

DB GetPage 32
Generate Html 2
SaveChanges (1) 5
Render Body 0
Render Sidebar 7