SetPlayerArmor: Difference between revisions

From Onset Developer Wiki
Created page with "{{Info|Function|Server|1.0}} {{FuncDescription|__EDIT_ME__}} {{FuncSyntax|SetPlayerArmor(player, armor)}} {{FuncParameters}} {{FuncParam|player|__EDIT_ME__}} {{FuncParam|ar..."
 
28days (talk | contribs)
No edit summary
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Info|Function|Server|1.0}}
{{Info|Function|Server|1.0}}


{{FuncDescription|__EDIT_ME__}}
{{FuncDescription|Set the armor of the player.}}


{{FuncSyntax|SetPlayerArmor(player, armor)}}
{{FuncSyntax|SetPlayerArmor(player, armor)}}


{{FuncParameters}}
{{FuncParameters}}
{{FuncParam|player|__EDIT_ME__}}
{{FuncParam|player|The player identifier.}}
{{FuncParam|armor|__EDIT_ME__}}
{{FuncParam|armor|The armor value.}}


{{FuncReturnValue|__EDIT_ME__}}
{{FuncReturnValue|This function doesn't have a return value.}}


== Example ==
== Example ==
__EDIT_ME__
<syntaxhighlight lang="Lua">
--This command allows players to set refill their armor
function armor(player)
  SetPlayerArmor(player, 100)
end
AddCommand('armor', armor)
 
</syntaxhighlight>


{{RelatedFunctions}}
{{RelatedFunctions}}
__EDIT_ME__
* [[GetPlayerArmor]]

Latest revision as of 15:50, 19 November 2019

SetPlayerArmor

Type: Function
Context: Server
Introduced: v1.0

Description

Set the armor of the player.

Syntax

SetPlayerArmor(player, armor)

Parameters

  • player
    The player identifier.
  • armor
    The armor value.

Return Value

  • This function doesn't have a return value.

Example

--This command allows players to set refill their armor
function armor(player)
   SetPlayerArmor(player, 100)
end
AddCommand('armor', armor)

See also