SetPlayerHealth: Difference between revisions
(Created page with "Sets the health of a player. {{CSharpContainer| {{#tag:pre|void {{Template:CSharp_Serverside_namespace}}Player.SetPlayerHealth(Client player, int health);}} {{Parameters}} *...") |
No edit summary |
||
| (3 intermediate revisions by one other user not shown) | |||
| Line 1: | Line 1: | ||
Sets the health of a player. | Sets the health of a player - if you use -1, the player will get killed. | ||
{{CSharpContainer| | {{CSharpContainer| | ||
{{#tag:pre|void {{Template:CSharp_Serverside_namespace}}Player.SetPlayerHealth( | {{#tag:pre|void {{Template:CSharp_Serverside_namespace}}Player.SetPlayerHealth(Player player, int health);}} | ||
{{Parameters}} | {{Parameters}} | ||
*'''player:''' Parameter input should be in ''' | *'''player:''' Parameter input should be in '''Player''' type. | ||
*'''health:''' Parameter input should be in ''' | *'''health:''' Parameter input should be in '''int''' type. | ||
{{Example}} | {{Example}} | ||
Latest revision as of 13:54, 23 December 2022
Sets the health of a player - if you use -1, the player will get killed.
C# Syntax
void NAPI.Player.SetPlayerHealth(Player player, int health);
Parameters
- player: Parameter input should be in Player type.
- health: Parameter input should be in int type.
Example
NAPI.Player.SetPlayerHealth(player, 100);