-
Notifications
You must be signed in to change notification settings - Fork 0
/
2715.gsc
147 lines (119 loc) · 3.68 KB
/
2715.gsc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
// IW7 GSC SOURCE
// Dumped by https://github.com/xensik/gsc-tool
init()
{
level._id_9040 = [];
level._id_9040["low_damage"] = 25;
level._id_9040["standard"] = 50;
level._id_9040["standard_cp"] = 50;
level._id_9040["high_damage"] = 75;
}
updatedamagefeedback( var_0, var_1, var_2, var_3, var_4 )
{
if ( !isplayer( self ) && !scripts\mp\utility\game::_id_9EF0( self ) )
return;
if ( !isdefined( var_3 ) )
var_3 = "standard";
if ( !isdefined( var_4 ) )
var_4 = 0;
if ( ( !isdefined( level._id_4D4E ) || !level._id_4D4E ) && !var_4 )
{
if ( !isdefined( self._id_903F ) )
self._id_903F = 0;
self._id_903F++;
self setclientomnvar( "ui_hitmarker_audio_events", self._id_903F % 16 );
}
switch ( var_0 )
{
case "none":
break;
case "hitmotionsensor":
case "hitbulletstorm":
case "hiticontrophysystem":
case "hiticonarmorup":
case "hithealthshield":
case "hiticonempimmune":
case "hitspawnprotection":
case "hitlowdamage":
case "hitcritical":
case "hitmorehealth":
case "hitblastshield":
case "hittacresist":
case "thermobaric_debuff":
case "hitjuggernaut":
case "hitlightarmor":
case "hitequip":
self setclientomnvar( "damage_feedback_icon", var_0 );
self setclientomnvar( "damage_feedback_icon_notify", gettime() );
_id_12EA8( var_3, var_1, var_2 );
break;
default:
_id_12EA8( var_3, var_1, var_2 );
break;
}
}
_id_12EA8( var_0, var_1, var_2 )
{
if ( !isdefined( var_0 ) )
return;
if ( !isdefined( var_1 ) )
var_1 = 0;
var_2 = 0;
var_3 = _id_7F03( var_0 );
if ( isdefined( self._id_A99E ) && self._id_A99E == gettime() && var_3 <= self._id_A99D && !var_1 )
return;
self._id_A99E = gettime();
self._id_A99D = var_3;
self setclientomnvar( "damage_feedback", var_0 );
self setclientomnvar( "damage_feedback_notify", gettime() );
if ( var_1 )
self setclientomnvar( "damage_feedback_kill", 1 );
else
self setclientomnvar( "damage_feedback_kill", 0 );
if ( var_2 )
self setclientomnvar( "damage_feedback_headshot", 1 );
else
self setclientomnvar( "damage_feedback_headshot", 0 );
}
_id_7F03( var_0 )
{
if ( !isdefined( level._id_9040[var_0] ) )
return 0;
return level._id_9040[var_0];
}
_id_917F( var_0 )
{
var_1 = 0;
if ( isdefined( level._id_4D4E ) && level._id_4D4E )
var_1 = 1;
if ( !isplayer( self ) )
return;
switch ( var_0 )
{
case "throwingknife":
case "scavenger":
if ( !var_1 )
self playlocalsound( "scavenger_pack_pickup" );
if ( !level._id_8B38 )
self setclientomnvar( "damage_feedback_other", var_0 );
break;
case "scavenger_eqp":
if ( !var_1 )
self playlocalsound( "scavenger_pack_pickup" );
if ( !level._id_8B38 )
self setclientomnvar( "damage_feedback_other", var_0 );
break;
case "boxofguns":
if ( !var_1 )
self playlocalsound( "mp_box_guns_ammo" );
if ( !level._id_8B38 )
self setclientomnvar( "damage_feedback_other", var_0 );
break;
case "eqp_ping":
if ( !var_1 )
self playsoundtoplayer( "mp_cranked_countdown", self );
if ( !level._id_8B38 )
self setclientomnvar( "damage_feedback_other", var_0 );
break;
}
}