12 {
14 {
16 {
17 if ( obj.IsInherited(PlayerBase) )
18 {
19
20 string cfg = "CfgVehicles BarbedWire barbedWireShockEnergyConsumption";
23 PlayerBase player = PlayerBase.Cast( obj );
24
25 if ( energy_consumed )
26 {
27
28
29
30
31
32 player.MessageImportant( "*SCRATCH and ELECTROCUTION*" );
33
34
37 }
38 else
39 {
40
41
42
43
44 player.MessageImportant( "*SCRATCH*" );
45
46
48 }
49 }
50 else
51 {
52
53 if ( obj.IsInherited(ManBase) )
54 {
55 ManBase AI_unit = ManBase.Cast( obj );
56 AI_unit.SetHealth("", "", 0);
57 }
58 }
59 }
60 }
61 }
ItemBase m_ParentBarbedWire
void SoundElectricShock()
proto native float ConfigGetFloat(string path)
Get float value from config on path.
proto native CGame GetGame()