Skip to content

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.

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)

boolean - false when the player is dead or not in the world

-- a field surgeon's stitches: the bleeding slows to a trickle for half a minute
SetPlayerBleeding(pid, math.min(GetPlayerBleeding(pid), 0.1), 30)

GetPlayerBleeding · HealPlayer · SetBleedRules · the Vitals group of the index