Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
ak101.c
Go to the documentation of this file.
2 {
3  override RecoilBase SpawnRecoilObject()
4  {
5  return new Ak101Recoil(this);
6  }
7 
8  //Debug menu Spawn Ground Special
9  override void OnDebugSpawn()
10  {
11  GameInventory inventory = GetInventory();
12 
13  inventory.CreateInInventory( "AK_Bayonet" );
14  inventory.CreateInInventory( "AK_PlasticBttstck" );
15  inventory.CreateInInventory( "AK_RailHndgrd" );
16  inventory.CreateInInventory( "PSO1Optic" );
17  inventory.CreateInInventory( "UniversalLight" );
18  inventory.CreateInInventory( "Battery9V" );
19  inventory.CreateInInventory( "Battery9V" );
20 
21  SpawnAttachedMagazine("Mag_AK101_30Rnd");
22  }
23 };
24 
26 {
27  override bool CanEnterIronsights()
28  {
29  ItemOptics optic = GetAttachedOptics();
30  if (optic && PSO1Optic.Cast(optic) || PSO11Optic.Cast(optic) || KazuarOptic.Cast(optic))
31  return true;
32  return super.CanEnterIronsights();
33  }
34 };
AKM_Base
Definition: akm.c:1
AK101_Base
Definition: ak101.c:1
RecoilBase
Definition: recoilbase.c:1
AK101
Definition: ak101.c:25
Ak101Recoil
Definition: ak101recoil.c:1
KazuarOptic
Definition: optics.c:14
ItemOptics
Definition: itemoptics.c:1
GameInventory
script counterpart to engine's class Inventory
Definition: inventory.c:78