Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
platecarriervest.c
Go to the documentation of this file.
2 {
3  override void OnWasAttached( EntityAI parent, int slot_id )
4  {
5  super.OnWasAttached( parent, slot_id );
6 
7  if ( GetGame().IsServer() && parent.IsInherited( DayZInfected ) )
8  {
9  float coef = Math.RandomFloatInclusive( 0.2, 0.4 );
10  SetHealth01( "", "", coef);
11  }
12  }
13 
14  //Debug menu Spawn Ground Special
15  override void OnDebugSpawn()
16  {
17  EntityAI entity;
18  if ( Class.CastTo(entity, this) )
19  {
20  entity.GetInventory().CreateInInventory( "PlateCarrierPouches" );
21  entity.GetInventory().CreateInInventory( "PlateCarrierHolster" );
22  }
23  }
24 };
GetGame
proto native CGame GetGame()
DayZInfected
Definition: zombiebase.c:1
Vest_Base
Definition: chestholster.c:1
PlateCarrierVest
Definition: platecarriervest.c:1
Math
Definition: enmath.c:6
Class
Super root of all classes in Enforce script.
Definition: enscript.c:10
EntityAI
Definition: building.c:5