Player.SetArmor

From GMod Wiki

Revision as of 00:29, 6 October 2010 by Jcw87 (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Function
Syntax Player:SetArmor( Integer Armor )
Description:
Sets the players armor.
Returns: nil
In Object: Player
Realm: NewerServer.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=Player.SetArmor]Player.SetArmor [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Example

DescriptionSets the players Battery/Armor (Whatever you want to call it)
Used onNewerServer.png
Code
function SetArmor()
    player:SetArmor( 1 )
end
OutputN/A


DescriptionAdds 5 armor to any player that types givemearmor in the console
Used onNewerServer.png
Code
function GiveArmor(ply)
    ply:SetArmor(ply:Armor() + 5)
end
concommand.Add("GiveMeArmor",GiveArmor)
OutputN/A


See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox