Module core.plugins.bodybags.sv_blood
Blood Management Library
Module Overview
Functions
| PLUGIN:CreateBlood() | Create a random blood sample from the template. |
| PLUGIN:GenerateBlood(ply) | Generate blood for a player. |
| PLUGIN:GetBloodFromPly(ply) | Get the generated blood from a player. |
| PLUGIN:GetPlyFromBlood(template) | Get the player attached to a blood. |
| PLUGIN:TickBlood(bloodData) | Update blood and decay it. |
| PLUGIN:ApplyBlood(target, from) | Apply blood to a target from a player. |
| PLUGIN:ApplyBloodInRadius(target, radius) | Apply blood in a radius around a target. |
- PLUGIN:CreateBlood()
-
Create a random blood sample from the template.
Returns:
-
The created blood sample.
- PLUGIN:GenerateBlood(ply)
-
Generate blood for a player.
Parameters:
- ply The player to generate blood for.
Returns:
-
The generated blood.
- PLUGIN:GetBloodFromPly(ply)
-
Get the generated blood from a player.
Will generate blood if none exists.
Parameters:
- ply The player to get blood from.
Returns:
-
Their blood.
- PLUGIN:GetPlyFromBlood(template)
-
Get the player attached to a blood.
Parameters:
- template The blood to check.
Returns:
-
[entity | false] The entity attached, or false if it doesn't exist.
- PLUGIN:TickBlood(bloodData)
-
Update blood and decay it.
Parameters:
- bloodData The blood data.
Returns:
-
The decayed blood.
- PLUGIN:ApplyBlood(target, from)
-
Apply blood to a target from a player.
Parameters:
- target The target to apply blood to.
- from The player whos blood is from.
- PLUGIN:ApplyBloodInRadius(target, radius)
-
Apply blood in a radius around a target.
Parameters:
- target The target to apply blood from.
- radius The radius to apply blood in.