SetPlayerBleeding
Sets how fast the player bleeds, in place of their open wounds.
One wound of rate health a second for seconds (left out = the rules’ seconds, SetBleedRules) replaces every open
wound, capped by the rules’ maxRate; 0 stops the bleeding, as a bandage does. The player’s client shows it. A bleed-out
is a death by the last attacker.
Syntax
Section titled “Syntax”SetPlayerBleeding(pid, rate [, seconds])| Parameter | Type | |
|---|---|---|
pid |
number | the player |
rate |
number | health lost per second; 0 stops the bleeding |
seconds |
number | how long it bleeds; left out = the rules’ seconds (optional) |
Returns
Section titled “Returns”boolean - false when the player is dead or not in the world
Example
Section titled “Example”-- a field surgeon's stitches: the bleeding slows to a trickle for half a minuteSetPlayerBleeding(pid, math.min(GetPlayerBleeding(pid), 0.1), 30)See also
Section titled “See also”GetPlayerBleeding · HealPlayer · SetBleedRules · the Vitals group of the index
