DayZ 1.24
Loading...
Searching...
No Matches
Bleeding.c
Go to the documentation of this file.
1//checks for critical blood level and kills the character if bellow
3{
4 protected const float BLOOD_DECREMENT_PER_SEC = -10;
5 PluginAdminLog m_AdminLog;
6
7 override void Init()
8 {
10 m_ID = eModifiers.MDF_BLEEDING;
13
14 if (GetGame().IsServer())
15 m_AdminLog = PluginAdminLog.Cast(GetPlugin(PluginAdminLog));
16
18 }
19
21 {
22 float blood = player.GetHealth("", "Blood");
23
25 return true;
26 return false;
27
28 }
29
31 {
32 player.SetHealth("", "", -1000);
33
34 if (m_AdminLog)
35 m_AdminLog.BleedingOut(player);
36 }
37
39 {
40
41 }
42
44 {
45 return false;
46 }
47
48 override void OnTick(PlayerBase player, float deltaT)
49 {
50
51 }
52};
int m_ID
ID of effect, given by SEffectManager when registered (automatically done when playing through it)
Definition Effect.c:49
bool m_TrackActivatedTime
void DisableDeactivateCheck()
float m_TickIntervalActive
float m_TickIntervalInactive
const int DEFAULT_TICK_TIME_INACTIVE
const int DEFAULT_TICK_TIME_ACTIVE
PluginBase GetPlugin(typename plugin_type)
override void OnActivate(PlayerBase player)
Definition Bleeding.c:30
const float BLOOD_DECREMENT_PER_SEC
Definition Bleeding.c:4
override void Init()
Definition Bleeding.c:7
override void OnTick(PlayerBase player, float deltaT)
Definition Bleeding.c:48
PluginAdminLog m_AdminLog
Definition Bleeding.c:5
override bool ActivateCondition(PlayerBase player)
Definition Bleeding.c:20
override void OnDeactivate(PlayerBase player)
Definition Bleeding.c:38
override bool DeactivateCondition(PlayerBase player)
Definition Bleeding.c:43
static const int BLOOD_THRESHOLD_FATAL
eModifiers
Definition eModifiers.c:2
proto native CGame GetGame()