SetPlayerHealth
From GTA Network Wiki
SetPlayerHealthServer-Side Function
![]() |
![]() |
---|
This function sets a player health, to kill a player set their health to -1.
Syntax
void NAPI.Player.SetPlayerHealth(Client player, int health);
Required Arguments
- player: parameter input should be in Client type.
- health: parameter input should be in int type.
Usage example(s)
Setting a player health.
private void OnPlayerRespawnHandler(Client player) { NAPI.Player.SetPlayerHealth(player, 50); // sets the respawned player health to 50. }
Changelog
Version | Description |
---|---|
1.0 | Release. |