-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathzm_counter.gsc
43 lines (41 loc) · 1.51 KB
/
zm_counter.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
init() {
level thread onPlayerConnect();
}
onPlayerConnect() {
for (;;) {
level waittill("connected", player);
player thread drawZombiesCounter();
}
}
drawZombiesCounter() {
self endon("disconnect");
level endon("end_game");
level waittill("start_of_round");
self.zombiesCounter = maps/mp/gametypes_zm/_hud_util::createFontString("hudsmall", 1.9);
self.zombiesCounter maps/mp/gametypes_zm/_hud_util::setPoint("CENTER", "CENTER", "CENTER", 190);
self.zombiesCounter.alpha = 0;
while (1) {
self.zombiesCounter setValue((maps/mp/zombies/_zm_utility::get_round_enemy_array().size + level.zombie_total));
if ((maps/mp/zombies/_zm_utility::get_round_enemy_array().size + level.zombie_total) != 0) {
self.zombiesCounter.label = & "Zombies: ^1";
if (self.zombiesCounter.alpha != 1) {
self.zombiesCounter fadeovertime(0.5);
self.zombiesCounter.alpha = 1;
}
} else {
self.zombiesCounter.label = & "Zombies: ^6";
for (i = 0; i < 15; i++) {
if (self.zombiesCounter.alpha == 1) {
self.zombiesCounter fadeovertime(0.5);
self.zombiesCounter.alpha = 0;
} else {
self.zombiesCounter fadeovertime(0.5);
self.zombiesCounter.alpha = 1;
}
wait 0.5;
}
level waittill("start_of_round");
}
wait 0.05;
}
}