Player.SetArmor
From GMod Wiki
Function | |
Syntax | Player:SetArmor( Integer Armor ) |
Description: | |
Sets the players armor. | |
Returns: | nil |
In Object: | Player |
Realm: | |
BBCode Link: | [b][url=http://wiki.garrysmod.com/?title=Player.SetArmor]Player.SetArmor [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] |
Example
Description | Sets the players Battery/Armor (Whatever you want to call it) |
---|---|
Used on | |
Code | function SetArmor() player:SetArmor( 1 ) end |
Output | N/A |
Description | Adds 5 armor to any player that types givemearmor in the console |
---|---|
Used on | |
Code | function GiveArmor(ply) ply:SetArmor(ply:Armor() + 5) end concommand.Add("GiveMeArmor",GiveArmor) |
Output | N/A |