Dayz
Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
Toggle main menu visibility
Loading...
Searching...
No Matches
platecarriervest.c
Go to the documentation of this file.
1
class
PlateCarrierVest
:
Vest_Base
2
{
3
override
void
OnWasAttached
(
EntityAI
parent,
int
slot_id )
4
{
5
super.OnWasAttached( parent, slot_id );
6
7
if
(
g_Game
.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
};
25
class
PlateCarrierVest_Black
extends
PlateCarrierVest
{};
26
class
PlateCarrierVest_Camo
extends
PlateCarrierVest
{};
27
class
PlateCarrierVest_Green
extends
PlateCarrierVest
{};
28
class
PlateCarrierVest_Winter
extends
PlateCarrierVest
{};
Class
Super root of all classes in Enforce script.
Definition
enscript.c:11
DayZInfected
Definition
zombiebase.c:2
EntityAI
Definition
inventoryitem.c:2
Math
Definition
enmath.c:7
PlateCarrierVest
Definition
platecarriervest.c:2
PlateCarrierVest::OnDebugSpawn
override void OnDebugSpawn()
Definition
platecarriervest.c:15
PlateCarrierVest::OnWasAttached
override void OnWasAttached(EntityAI parent, int slot_id)
Definition
platecarriervest.c:3
Vest_Base
Definition
chestholster.c:1
g_Game
DayZGame g_Game
Definition
dayzgame.c:3942
Class::CastTo
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.
Math::RandomFloatInclusive
static float RandomFloatInclusive(float min, float max)
Returns a random float number between and min [inclusive] and max [inclusive].
Definition
enmath.c:106
Games
Dayz
scripts
4_world
entities
itembase
clothing
platecarriervest.c
Generated by
1.17.0