-
Notifications
You must be signed in to change notification settings - Fork 0
/
2733.gsc
118 lines (101 loc) · 2.46 KB
/
2733.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
// IW7 GSC SOURCE
// Dumped by https://github.com/xensik/gsc-tool
init()
{
level._id_5B78 = 0;
game["headicon_allies"] = scripts\mp\teams::_id_81B0( "allies" );
game["headicon_axis"] = scripts\mp\teams::_id_81B0( "axis" );
precacheheadicon( game["headicon_allies"] );
precacheheadicon( game["headicon_axis"] );
precacheshader( "waypoint_revive" );
level thread _id_C56E();
for (;;)
{
_id_12E97();
wait 5;
}
}
_id_C56E()
{
for (;;)
{
level waittill( "connected", var_0 );
var_0 thread onplayerspawned();
var_0 thread _id_C577();
}
}
onplayerspawned()
{
self endon( "disconnect" );
for (;;)
{
self waittill( "spawned_player" );
thread _id_10128();
}
}
_id_C577()
{
self endon( "disconnect" );
for (;;)
{
self waittill( "killed_player" );
self._id_016F = "";
}
}
_id_10128()
{
if ( level._id_5B78 )
{
if ( self.pers["team"] == "allies" )
{
self._id_016F = game["headicon_allies"];
self._id_0170 = "allies";
}
else
{
self._id_016F = game["headicon_axis"];
self._id_0170 = "axis";
}
}
}
_id_12E97()
{
var_0 = scripts\mp\utility\game::_id_7F1D( "scr_drawfriend", level._id_5B78 );
if ( level._id_5B78 != var_0 )
{
level._id_5B78 = var_0;
_id_12E96();
}
}
_id_12E96()
{
var_0 = level.players;
for ( var_1 = 0; var_1 < var_0.size; var_1++ )
{
var_2 = var_0[var_1];
if ( isdefined( var_2.pers["team"] ) && var_2.pers["team"] != "spectator" && var_2.sessionstate == "playing" )
{
if ( level._id_5B78 )
{
if ( var_2.pers["team"] == "allies" )
{
var_2._id_016F = game["headicon_allies"];
var_2._id_0170 = "allies";
}
else
{
var_2._id_016F = game["headicon_axis"];
var_2._id_0170 = "axis";
}
continue;
}
var_0 = level.players;
for ( var_1 = 0; var_1 < var_0.size; var_1++ )
{
var_2 = var_0[var_1];
if ( isdefined( var_2.pers["team"] ) && var_2.pers["team"] != "spectator" && var_2.sessionstate == "playing" )
var_2._id_016F = "";
}
}
}
}