~agrip-hackers/sns/trunk

« back to all changes in this revision

Viewing changes to zq-repo/qc/kteams/commands.qc

  • Committer: Matthew Tylee Atkinson
  • Date: 2008-03-07 20:15:20 UTC
  • Revision ID: mta@agrip.org.uk-20080307201520-uj9sa2jrytx91b2t
Remove non-SNS components.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
Copyright (C) 1996-1997 Id Software, Inc.
3
 
 
4
 
This program is free software; you can redistribute it and/or
5
 
modify it under the terms of the GNU General Public License
6
 
as published by the Free Software Foundation; either version 2
7
 
of the License, or (at your option) any later version.
8
 
 
9
 
This program is distributed in the hope that it will be useful,
10
 
but WITHOUT ANY WARRANTY; without even the implied warranty of
11
 
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
12
 
 
13
 
See the GNU General Public License for more details.
14
 
 
15
 
You should have received a copy of the GNU General Public License
16
 
along with this program; if not, write to the Free Software
17
 
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
18
 
 
19
 
*/
20
 
// commands.qc
21
 
 
22
 
string GetMapName(float f2);
23
 
void SendMessage(string name);
24
 
 
25
 
void() ChangeOvertime =
26
 
{
27
 
        local float f1,f2;
28
 
        local string tmp;
29
 
 
30
 
        if(match_in_progress) return;
31
 
 
32
 
        if(stof(infokey(world, "k_master")) && self.k_admin < 2) {
33
 
                sprint(self, 3, "console: command is locked\n");
34
 
                return;
35
 
        }
36
 
 
37
 
        f1 = stof(infokey(world, "k_overtime"));
38
 
        f2 = stof(infokey(world, "k_exttime"));
39
 
 
40
 
        if(!f1)
41
 
        {
42
 
                if(!f2) 
43
 
                {
44
 
                        localcmd("localinfo k_exttime 1\n");
45
 
                        f2 = 1;
46
 
                }
47
 
 
48
 
                bprint(2, "��������: time based\n");
49
 
                tmp = ftos(f2);
50
 
                bprint(2, "�������� ������ �� ", tmp, " ������");
51
 
                if (f1 == 1) bprint(2, "\n");
52
 
                else bprint(2, "�\n");
53
 
                localcmd("localinfo k_overtime 1\n");
54
 
        }
55
 
        else if(f1 == 1)
56
 
        {
57
 
                bprint(2, "��������: sudden death\n");
58
 
                localcmd("localinfo k_overtime 2\n");
59
 
        }
60
 
        else if(f1 == 2)
61
 
        {
62
 
                bprint(2, "��������: off\n");
63
 
                localcmd("localinfo k_overtime 0\n");
64
 
        }
65
 
};
66
 
 
67
 
void() ChangeOvertimeUp =
68
 
{
69
 
        local float f1;
70
 
        local string tmp;
71
 
 
72
 
        if(match_in_progress) return;
73
 
 
74
 
        if(stof(infokey(world, "k_master")) && self.k_admin < 2)
75
 
        {
76
 
                sprint(self, 3, "console: command is locked\n");
77
 
                return;
78
 
        }
79
 
 
80
 
        f1 = stof(infokey(world, "k_exttime"));
81
 
 
82
 
        if (f1==10){f1=1;}
83
 
        else{f1=f1+1;}
84
 
 
85
 
        tmp = ftos(f1);
86
 
 
87
 
        if (f1==1)
88
 
        {
89
 
               bprint(2, "�������� ������ ��� �� ", tmp, " ������\n");
90
 
        }
91
 
        else
92
 
        {
93
 
               bprint(2, "�������� ������ ��� �� ", tmp, " �������\n");
94
 
        }
95
 
 
96
 
        localcmd("localinfo k_exttime ");
97
 
        localcmd(tmp);
98
 
        localcmd("\n");
99
 
};
100
 
 
101
 
void() SetOfficial =
102
 
{
103
 
        if(match_in_progress) return;
104
 
 
105
 
        if(stof(infokey(world, "k_master")) && self.k_admin < 2)
106
 
        {
107
 
                sprint(self, 3, "console: command is locked\n");
108
 
                return;
109
 
        }
110
 
 
111
 
        if(stof(infokey(world, "k_duel"))) {
112
 
                sprint(self, 3, "console: duel mode disallows you to set league settings\n");
113
 
                return;
114
 
        }
115
 
 
116
 
        localcmd("fraglimit 0\ntimelimit 20\nteamplay 2\ndeathmatch 1\nlocalinfo dq 0\nlocalinfo dr 0\nlocalinfo k_spw 1\nlocalinfo k_dis 1\nlocalinfo k_bzk 0\nlocalinfo k_overtime 1\nlocalinfo k_exttime 5\n");
117
 
        bprint(2, "������ �������� enabled\n");
118
 
};
119
 
 
120
 
void() ListWhoNot =
121
 
{
122
 
        local entity p;
123
 
        local string tmp;
124
 
        local float f1, f2;
125
 
 
126
 
        f1 = CountRPlayers();
127
 
        f2 = CountPlayers();
128
 
        if(f1 == f2) {
129
 
                sprint(self, 2, "All players ready\n");
130
 
                return;
131
 
        }
132
 
        if(!match_in_progress)
133
 
        {
134
 
                if(self.classname == "player" && !self.ready) 
135
 
                {
136
 
                        sprint(self, 2, "Ready yourself first\n");
137
 
                        return;
138
 
                }       
139
 
 
140
 
                if( (time < k_whonottime + 10) )
141
 
                {
142
 
                  sprint(self, 2, "Only one ���� in 10 seconds\n");
143
 
                        return;
144
 
                }
145
 
                k_whonottime = time;
146
 
                bprint(2, "Players ��� ready:\n");
147
 
                bprint(3, "������������������\n");
148
 
 
149
 
                p = find(world, classname, "player");
150
 
                while(p != world) {
151
 
                        if(p.netname != "" && !p.ready) {
152
 
                                tmp = infokey(p, "team");
153
 
                                if(p.k_admin == 2) bprint(2, "� ");
154
 
                                bprint(2, "�", tmp, "� ");
155
 
                                bprint(2, p.netname, " is not ready\n");
156
 
                        }
157
 
                        p = find(p, classname, "player");
158
 
                }
159
 
        } else
160
 
                sprint(self, 2, "Game in progress\n");
161
 
};
162
 
 
163
 
void() ShowCmds =
164
 
{
165
 
        if(self.k_admin == 2) {
166
 
                sprint(self, 2, "�����....... give up admin rights\n������...... playerfire before game\n�������..... (un)lock current map\n����������.. force match to start\n����������.. force match to end\n����������.. toggle pausemode\n������...... toggle mastermode\n����........ toggle kick mode\n��������.... toggle new messages\n�������..... random team pickup\n");
167
 
        } else {
168
 
                sprint(self, 2, "�����...... kombat teams info\n�����...... show game rules\n�����...... when you feel ready\n�����...... unready / vote matchend\n�������.... match control commands\n�����...... qizmo related commands\n��������... fun message commands\n������..... show server settings\n������.... more server settings\n�����...... set defaults\n������..... (un)freeze the map\n����....... list custom maps\n���........ player teamlist\n������..... players not ready\n����....... whonot to everyone\n�������.... player skinlist\n�������.... info on received votes\n������..... vote for pickup game\n�����...... show playerstats\n��������... toggle overtime mode\n����������. change overtime length\n��������... set league settings\n�������.... toggle captain election\n");
169
 
                if(stof(infokey(world, "k_admins"))) {
170
 
                        sprint(self, 2, "�����...... toggle admin-mode\n");
171
 
                        sprint(self, 2, "�����...... toggle admin election\n");
172
 
                }
173
 
        }
174
 
};
175
 
 
176
 
void() ShowVersion =
177
 
{
178
 
        sprint(self, 3, "\nThis is Kombat Teams 2.21\nby kemiKal, Cenobite, Sturm and Fang.\n\nSource, soundbanks, configs etc. at:\nhttp://hosted.barrysworld.com/kteam\n");
179
 
};
180
 
 
181
 
void() SShowCmds =
182
 
{
183
 
        if(self.k_admin == 2) {
184
 
                sprint(self, 2, "�����....... give up admin rights\n������...... playerfire before game\n�������..... (un)lock current map\n����������.. force match to start\n����������.. force match to end\n����������.. toggle pausemode\n������...... toggle mastermode\n����........ toggle kick mode\n��������.... toggle new messages\n�������..... random team pickup\n");
185
 
                sprint(self, 2, "��������.... toggle overtime mode\n����������.. change overtime length\n��������.... set league settings\nyou may also use\n��  ��  ��������  �������\n������  ��������  �����\n����    ������    ������\n�����   ����\n");
186
 
        }
187
 
        else {
188
 
                sprint(self, 2, "������..... show match settings\n������.... more match settings\n���........ camera help text\n���........ player teamlist\n������..... players not ready\n�������.... player skinlist\n�������.... info on received votes\n����....... joins game\n�����...... show playerstats\n");
189
 
                if(stof(infokey(world, "k_admins"))) {
190
 
                        sprint(self, 2, "�����...... toggle admin-mode\n");
191
 
                        sprint(self, 2, "�����...... toggle admin election\n");
192
 
                }
193
 
        }
194
 
};
195
 
 
196
 
void() ShowOpts =
197
 
{
198
 
        sprint(self, 2, "��������.. -1 mins match time\n������.... +1 mins match time\n��������... -5 mins match time\n������..... +5 mins match time\n���������.. -10 fraglimit\n�������.... +10 fraglimit\n��......... change deathmatch mode\n��......... change teamplay mode\n��������... drop quad when killed\n��������... drop ring when killed\n��������... drop pack when killed\n����....... change locking mode\n�����...... change spawntype\n�����...... toggle sv_maxspeed\n��������... quad, ���, ring & suit\n�����... 2 secs of ��� on respawn\n���������.. best/last weapon dropped\n���������.. underwater discharges\n�������.... toggle spectator talk\n�������.... toggle berzerk mode\n");
199
 
};
200
 
 
201
 
void() ShowQizmo =
202
 
{
203
 
        sprint(self, 2, "����....... lagsettings\n������..... enemy vicinity reporting\n������..... point function\n");
204
 
};
205
 
 
206
 
// ShowMessages and SendMessage command implementations added
207
 
void() ShowMessages =
208
 
{
209
 
        sprint(self, 2, "������..... who killed you last\n������..... who you last killed\n��������... last player joined\n");
210
 
};
211
 
 
212
 
void() SendKillerMsg =
213
 
{
214
 
        SendMessage(self.killer);
215
 
};
216
 
 
217
 
void() SendVictimMsg =
218
 
{
219
 
        SendMessage(self.victim);
220
 
};
221
 
 
222
 
void() SendNewcomerMsg =
223
 
{
224
 
        SendMessage(newcomer);
225
 
};
226
 
 
227
 
void(string name) SendMessage =
228
 
{
229
 
        local string s1, s2;
230
 
        local entity p;
231
 
 
232
 
        p = find(world, classname, "player");
233
 
        while((p != world && p.netname != name) || p == self)
234
 
                p = find(p, classname, "player");
235
 
        if(p != world) {
236
 
                s1 = infokey(self, "premsg");
237
 
                s2 = infokey(self, "postmsg");
238
 
                bprint(3, self.netname, ": ", s1);
239
 
                bprint(2, name);
240
 
                bprint(3, s2, "\n");
241
 
        } else
242
 
                stuffcmd(self, "echo No name to display\n");
243
 
};                      
244
 
 
245
 
void() ShowMaps =
246
 
{
247
 
        local float f1;
248
 
        local string s1, s2;
249
 
 
250
 
        sprint(self, 2, "Vote for maps by typing the mapname,\nfor example \"���\".\n");
251
 
        f1 = stof(infokey(world, "999"));
252
 
        if(f1 > 137) {
253
 
                sprint(self, 2, "\n---���� �� ������ ����\n");
254
 
                f1 = 1000;
255
 
                s1 = ftos(f1);
256
 
                s2 = infokey(world, s1);
257
 
                while(s2 != "") {
258
 
                        if(f1 & 1) {
259
 
                                sprint(self, 2, s2, "\n");
260
 
                        } else {
261
 
                                sprint(self, 2, s2, "   ");
262
 
                        }
263
 
                        f1 = f1 + 1;
264
 
                        s1 = ftos(f1);
265
 
                        s2 = infokey(world, s1);
266
 
                }
267
 
                if(f1 & 1) sprint(self, 2, "\n");
268
 
                sprint(self, 2, "---��� �� ����\n");
269
 
        }
270
 
 
271
 
};
272
 
 
273
 
void() StuffAliases =
274
 
{
275
 
// stuffing for numbers, hope no flooding out
276
 
        stuffcmd(self.owner, "alias 1 impulse 1\nalias 2 impulse 2\nalias 3 impulse 3\nalias 4 impulse 4\nalias 5 impulse 5\nalias 6 impulse 6\nalias 7 impulse 7\nalias 8 impulse 8\nalias 9 impulse 9\n");
277
 
        stuffcmd(self.owner, "alias 10 impulse 10\nalias 11 impulse 11\nalias 12 impulse 12\nalias 13 impulse 13\nalias 14 impulse 14\nalias 15 impulse 15\nalias 16 impulse 16\n");
278
 
 
279
 
 
280
 
 
281
 
 
282
 
 stuffcmd(self.owner, "alias ready impulse 20\n");
283
 
 stuffcmd(self.owner, "alias break impulse 21\n");
284
 
 stuffcmd(self.owner, "alias stats impulse 22\n");
285
 
 stuffcmd(self.owner, "alias status2 impulse 23\n");
286
 
 stuffcmd(self.owner, "alias status impulse 24\n");
287
 
 stuffcmd(self.owner, "alias powerups impulse 25\n");
288
 
 stuffcmd(self.owner, "alias dm impulse 26\n");
289
 
 stuffcmd(self.owner, "alias tp impulse 27\n");
290
 
 stuffcmd(self.owner, "alias timedown1 impulse 28\n");
291
 
 stuffcmd(self.owner, "alias timeup1 impulse 29\n");
292
 
 stuffcmd(self.owner, "alias timedown impulse 30\n");
293
 
 stuffcmd(self.owner, "alias timeup impulse 31\n");
294
 
 stuffcmd(self.owner, "alias fragsdown impulse 32\n");
295
 
 stuffcmd(self.owner, "alias fragsup impulse 33\n");
296
 
 stuffcmd(self.owner, "alias dropquad impulse 34\n");
297
 
 stuffcmd(self.owner, "alias dropring impulse 35\n");
298
 
 stuffcmd(self.owner, "alias discharge impulse 36\n");
299
 
 stuffcmd(self.owner, "alias options impulse 37\n");
300
 
 stuffcmd(self.owner, "alias silence impulse 38\n");
301
 
 stuffcmd(self.owner, "alias advanced impulse 39\n");
302
 
 stuffcmd(self.owner, "alias reset impulse 40\n");
303
 
 stuffcmd(self.owner, "alias rules impulse 41\n");
304
 
 stuffcmd(self.owner, "alias lock impulse 42\n");
305
 
 stuffcmd(self.owner, "alias spawn666 impulse 43\n");
306
 
 stuffcmd(self.owner, "alias berzerk impulse 44\n");
307
 
 stuffcmd(self.owner, "alias master impulse 45\n");
308
 
 stuffcmd(self.owner, "alias time5 impulse 46\n");
309
 
 stuffcmd(self.owner, "alias time10 impulse 47\n");
310
 
 stuffcmd(self.owner, "alias time15 impulse 48\n");
311
 
 stuffcmd(self.owner, "alias time20 impulse 49\n");
312
 
 stuffcmd(self.owner, "alias time25 impulse 50\n");
313
 
 stuffcmd(self.owner, "alias time30 impulse 51\n");
314
 
 stuffcmd(self.owner, "alias whovote impulse 52\n");
315
 
 stuffcmd(self.owner, "alias whoskin impulse 53\n");
316
 
 stuffcmd(self.owner, "alias whonot impulse 54\n");
317
 
 stuffcmd(self.owner, "alias who impulse 55\n");
318
 
 stuffcmd(self.owner, "alias droppack impulse 56\n");
319
 
 stuffcmd(self.owner, "alias fairpacks impulse 57\n");
320
 
 stuffcmd(self.owner, "alias speed impulse 58\n");
321
 
 stuffcmd(self.owner, "alias spawn impulse 59\n");
322
 
 stuffcmd(self.owner, "alias about impulse 60\n");
323
 
 stuffcmd(self.owner, "alias ksound1 impulse 61\n");
324
 
 stuffcmd(self.owner, "alias ksound2 impulse 62\n");
325
 
 stuffcmd(self.owner, "alias ksound3 impulse 63\n");
326
 
 stuffcmd(self.owner, "alias ksound4 impulse 64\n");
327
 
 stuffcmd(self.owner, "alias ksound5 impulse 65\n");
328
 
 stuffcmd(self.owner, "alias ksound6 impulse 66\n");
329
 
 stuffcmd(self.owner, "alias scores impulse 67\n");
330
 
 stuffcmd(self.owner, "alias qizmo impulse 68\n");
331
 
 stuffcmd(self.owner, "alias messages impulse 69\n");
332
 
 stuffcmd(self.owner, "alias killer impulse 70\n");
333
 
 stuffcmd(self.owner, "alias victim impulse 71\n");
334
 
 stuffcmd(self.owner, "alias newcomer impulse 72\n");
335
 
 stuffcmd(self.owner, "alias qlag impulse 73\n");
336
 
 stuffcmd(self.owner, "alias qenemy impulse 74\n");
337
 
 stuffcmd(self.owner, "alias forcepause impulse 75\n");
338
 
 stuffcmd(self.owner, "alias pickup impulse 76\n");
339
 
 stuffcmd(self.owner, "alias qpoint impulse 77\n");
340
 
 stuffcmd(self.owner, "alias maps impulse 78\n");
341
 
 stuffcmd(self.owner, "alias captain impulse 79\n");
342
 
 stuffcmd(self.owner, "alias freeze impulse 80\n");
343
 
 stuffcmd(self.owner, "alias admin impulse 81\n");
344
 
 stuffcmd(self.owner, "alias forcestart impulse 82\n");
345
 
 stuffcmd(self.owner, "alias forcebreak impulse 83\n");
346
 
 stuffcmd(self.owner, "alias prewar impulse 84\n");
347
 
 stuffcmd(self.owner, "alias lockmap impulse 85\n");
348
 
 stuffcmd(self.owner, "alias commands impulse 86\n");
349
 
 stuffcmd(self.owner, "alias kick impulse 87\n");
350
 
 stuffcmd(self.owner, "alias y impulse 88\n");
351
 
 stuffcmd(self.owner, "alias n impulse 89\n");
352
 
 stuffcmd(self.owner, "alias list impulse 90\n");
353
 
 stuffcmd(self.owner, "alias overtime impulse 91\n");
354
 
 stuffcmd(self.owner, "alias overtimeup impulse 92\n");
355
 
 stuffcmd(self.owner, "alias elect impulse 93\n");
356
 
 stuffcmd(self.owner, "alias yes impulse 94\n");
357
 
 stuffcmd(self.owner, "alias no impulse 95\n");
358
 
 stuffcmd(self.owner, "alias deathmsg impulse 96\n");
359
 
 stuffcmd(self.owner, "alias rpickup impulse 97\n");
360
 
 stuffcmd(self.owner, "alias official impulse 98\n");
361
 
#ifdef VWEP_TEST
362
 
 stuffcmd(self.owner, "alias vwep impulse 99\n");
363
 
#endif
364
 
 stuffcmd(self.owner, "alias report impulse 103\n");
365
 
 stuffcmd(self.owner, "alias notready break\n");
366
 
};
367
 
 
368
 
void(string tog, string key) PrintToggle1 =
369
 
{
370
 
        local float f1;
371
 
 
372
 
        sprint(self, 2, tog);
373
 
        f1 = stof(infokey(world, key));
374
 
        if(!f1) sprint(self, 2, "Off ");
375
 
        else {
376
 
                if(f1 == 1) sprint(self, 2, "On  ");
377
 
                else sprint(self, 2, "Jam ");
378
 
        }
379
 
};
380
 
 
381
 
void(string tog, string key) PrintToggle2 =
382
 
{
383
 
        sprint(self, 2, tog);
384
 
        if(stof(infokey(world, key)) != 0) sprint(self, 2, "On\n");
385
 
        else sprint(self, 2, "Off\n");
386
 
};
387
 
 
388
 
//Ceno
389
 
void(string tog, string key) PrintToggle3 =
390
 
{
391
 
        local float f1;
392
 
 
393
 
        sprint(self, 2, tog);
394
 
        f1 = stof(infokey(world, key));
395
 
 
396
 
        if(f1 == 0) sprint(self, 2, "Off ");
397
 
        else if(f1 == 1) sprint(self, 2, "On  ");
398
 
        else sprint(self, 2, "Lst ");
399
 
 
400
 
};
401
 
 
402
 
void() ModStatus =
403
 
{
404
 
        local entity p;
405
 
        local string tmp;
406
 
 
407
 
        tmp = ftos(k_maxspeed);
408
 
        sprint(self, 2, "��������       ", tmp, "\n");
409
 
        tmp = ftos(deathmatch);
410
 
        sprint(self, 2, "����������     ", tmp, "   ");
411
 
        tmp = ftos(teamplay);
412
 
        sprint(self, 2, "��������       ", tmp, "\n");
413
 
        tmp = ftos(timelimit);
414
 
        sprint(self, 2, "���������      ", tmp, " ");
415
 
        if(timelimit < 10) sprint(self, 2, "  ");
416
 
        else if(timelimit < 100) sprint(self, 2, " ");
417
 
        tmp = ftos(fraglimit);
418
 
        sprint(self, 2, "���������      ", tmp, "\n");
419
 
        PrintToggle1("��������       ", "k_pow");
420
 
        PrintToggle2("������� ���    ", "k_666");
421
 
        PrintToggle1("���� ����      ", "dq");
422
 
        PrintToggle2("���� ����      ", "dr");
423
 
        PrintToggle3("���� ��������� ", "k_frp");
424
 
        PrintToggle2("���� ��������� ", "dp");
425
 
        PrintToggle1("���������      ", "k_dis");
426
 
        PrintToggle2("������� ����   ", "k_bzk");
427
 
 
428
 
        if(match_in_progress == 1) {
429
 
                p = find(world, classname, "timer");
430
 
                tmp = ftos(p.cnt2);
431
 
                sprint(self, 2, "The match will start in ", tmp, " second");
432
 
                if(p.cnt2 != 1) sprint(self, 2, "s");
433
 
                sprint(self, 2, "\n");
434
 
                return;
435
 
        }
436
 
        if(k_velect) {
437
 
                tmp = ftos(k_velect);
438
 
                sprint(self, 2, "Election in progress\n�", tmp, "� votes received\n");
439
 
        }
440
 
        if(k_captains == 2)
441
 
                sprint(self, 2, "Team picking in progress\n");
442
 
        if(k_captains >= 1 && k_captains < 2)
443
 
                sprint(self, 2, "�1� captain present\n");
444
 
        if(match_in_progress == 2) {
445
 
                if(k_sudden_death)
446
 
                        sprint(self, 2, "Sudden death �������� �� ��������\n");
447
 
                else {
448
 
                        p = find(world, classname, "timer");
449
 
                        tmp = ftos(p.cnt - 1);
450
 
                        sprint(self, 2, "Match in progress\n�", tmp, "� full minute");
451
 
                        if(p.cnt != 1) sprint(self, 2, "s");
452
 
                        sprint(self, 2, " left\n");
453
 
                }
454
 
        }
455
 
};
456
 
 
457
 
void() ModStatus2 =
458
 
{
459
 
        local string tmp;
460
 
        local float f1;
461
 
 
462
 
        f1 = stof(infokey(world, "k_spw"));
463
 
        if(f1 == 2) sprint(self, 2, "������ ����� ��������\n");
464
 
        else if(f1 == 1) sprint(self, 2, "�� �����������\n");
465
 
        else sprint(self, 2, "������ �� ��������\n");
466
 
 
467
 
        if(stof(infokey(world, "k_duel")))
468
 
                sprint(self, 2, "������ ����: duel\n");
469
 
        else {
470
 
                sprint(self, 2, "������ ����: team\n");
471
 
                sprint(self, 2, "������ �������: ");
472
 
                if(lock == 0) sprint(self, 2, "off\n");
473
 
                else if(lock == 2) sprint(self, 2, "all\n");
474
 
                else if(lock == 1) sprint(self, 2, "team\n");
475
 
        }
476
 
        if(!match_in_progress) {
477
 
                f1 = CountRTeams();
478
 
                tmp = ftos(f1);
479
 
                sprint(self, 2, "�������� (���: ", tmp);
480
 
                tmp = infokey(world, "k_lockmin");
481
 
                sprint(self, 2, " ���: ", tmp);
482
 
                tmp = infokey(world, "k_lockmax");
483
 
                sprint(self, 2, " ���: ", tmp, ")\n");
484
 
        }
485
 
        sprint(self, 2, "��������: ");
486
 
      if(!stof(infokey(world, "k_spectalk"))) sprint(self, 2, "off\n");
487
 
        else sprint(self, 2, "on\n");
488
 
 
489
 
        sprint(self, 2, "��������: ");
490
 
 
491
 
        f1 = stof(infokey(world, "k_overtime"));
492
 
        if(!f1)
493
 
                sprint(self, 2, "off");
494
 
        else if(f1 == 1) {
495
 
                f1 = stof(infokey(world, "k_exttime"));
496
 
                tmp = infokey(world, "k_exttime");
497
 
                sprint(self, 2, tmp, " minute");
498
 
                if(f1 != 1) sprint(self, 2, "s");
499
 
        } else
500
 
                sprint(self, 2, "sudden death");
501
 
 
502
 
        f1 = stof(infokey(world, "fpd"));
503
 
        sprint(self, 2, "\n", "����� ���: ");
504
 
        if(f1 & 8) sprint(self, 2, "off");
505
 
        else sprint(self, 2, "on");
506
 
        sprint(self, 2, "\n", "����� ������: ");
507
 
        if(f1 & 2) sprint(self, 2, "off");
508
 
        else sprint(self, 2, "on");
509
 
        sprint(self, 2, "\n", "����� ����� ���������: ");
510
 
        if(f1 & 32) sprint(self, 2, "off");
511
 
        else sprint(self, 2, "on");
512
 
        sprint(self, 2, "\n", "����� ��������: ");
513
 
        if(f1 & 128) sprint(self, 2, "off\n");
514
 
        else sprint(self, 2, "on\n");
515
 
 
516
 
        f1 = stof(infokey(world, "k_deathmsg"));
517
 
        sprint(self, 2, "������ �������������: ");
518
 
        if(!f1){
519
 
                sprint(self, 2, "off\n");
520
 
        }
521
 
        else{
522
 
                sprint(self, 2, "on\n");
523
 
        }
524
 
 
525
 
        f1 = stof(infokey(world, "k_allowvoteadmin"));
526
 
        sprint(self, 2, "����� ��������: ");
527
 
        if(!f1){
528
 
                sprint(self, 2, "disallowed\n");
529
 
        }
530
 
        else
531
 
        {
532
 
                sprint(self, 2, "allowed\n");
533
 
        }
534
 
 
535
 
        sprint(self, 2, "����� ����������: ");
536
 
        if(framechecks)
537
 
                sprint(self, 2, "enabled\n");
538
 
        else
539
 
                sprint(self, 2, "disabled\n");
540
 
};
541
 
 
542
 
void() ModStatusVote =
543
 
{
544
 
        local entity p;
545
 
        local string s1;
546
 
        local float f1, f2;
547
 
 
548
 
        if(match_in_progress == 2) {
549
 
                s1 = ftos(k_vbreak);
550
 
                sprint(self, 2, s1, " ����(�) ��� ��������\n");
551
 
        } else {
552
 
                f1 = 0;
553
 
                f2 = 0;
554
 
                p = find(world, classname, "player");
555
 
                while(p != world) {
556
 
                        if(p.netname != "") {
557
 
                                if(p.k_pickup) f1 = f1 + 1;
558
 
                                if(p.k_vote == k_vbreak) f2 = f2 + 1;
559
 
                        }
560
 
                        p = find(p, classname, "player");
561
 
                }
562
 
                s1 = ftos(f1);
563
 
                sprint(self, 2, s1, " ����(�) ��� � ������ ����\n");
564
 
                if(k_vbreak) {
565
 
                        s1 = ftos(f2);
566
 
                        sprint(self, 2, s1, " ����(�) ��� ��� ");
567
 
                        s1 = GetMapName(k_vbreak);
568
 
                        sprint(self, 2, s1, "\n");
569
 
                } 
570
 
                if(k_velect) {
571
 
                        s1 = ftos(k_velect);
572
 
                        sprint(self, 2, s1, " ����(�) ��� ��������\n");
573
 
                }
574
 
        }
575
 
        sprint(self, 2, "--------------\n");
576
 
};
577
 
 
578
 
void() PlayerStatus =
579
 
{
580
 
        local entity p;
581
 
        local string tmp;
582
 
 
583
 
        if(!match_in_progress) {
584
 
                p = find(world, classname, "player");
585
 
                while(p != world) {
586
 
                        if(p.netname != "") {
587
 
                                if(p.k_admin == 2) sprint(self, 2, "* ");
588
 
                                sprint(self, 2, p.netname);
589
 
                                if(p.ready) {
590
 
                                        tmp = infokey(p, "team");
591
 
                                        if(tmp == "") sprint(self, 2, " is ready\n");
592
 
                                        else sprint(self, 2, " is in team �", tmp, "�\n");
593
 
                                } else sprint(self, 3, " is not ready\n");
594
 
                        }
595
 
                        p = find(p, classname, "player");
596
 
                }
597
 
                sprint(self, 2, "--------------\n");
598
 
        } else sprint(self, 2, "Game in progress\n");
599
 
};
600
 
 
601
 
void() PlayerStatusS =
602
 
{
603
 
 
604
 
        local entity p;
605
 
        local string tmp;
606
 
 
607
 
        p = find(world, classname, "player");
608
 
        while(p != world) {
609
 
                if(p.netname != "") {
610
 
                        sprint(self, 2, "�");
611
 
 
612
 
                        tmp = infokey(p, "skin");
613
 
                        sprint(self, 2, tmp, "� ");
614
 
                        sprint(self, 2, p.netname, "\n");
615
 
                }
616
 
                p = find(p, classname, "player");
617
 
        }
618
 
        sprint(self, 2, "--------------\n");
619
 
};
620
 
 
621
 
 
622
 
void() PlayerStatusN =
623
 
{
624
 
        local entity p;
625
 
        local float f1, f2;
626
 
 
627
 
        f1 = CountRPlayers();
628
 
        f2 = CountPlayers();
629
 
        if(f1 == f2) {
630
 
                sprint(self, 2, "All players ready\n");
631
 
                return;
632
 
        }
633
 
        if(match_in_progress) sprint(self, 2, "Game in progress\n");
634
 
        else {
635
 
                sprint(self, 2, "Players ��� ready:\n������������������\n");
636
 
                p = find(world, classname, "player");
637
 
                while(p != world) {
638
 
                        if(p.netname != "" && !p.ready) {
639
 
                                if(p.k_admin == 2) sprint(self, 2, "� ");
640
 
                                sprint(self, 2, p.netname, " is not ready\n");
641
 
                        }
642
 
                        p = find(p, classname, "player");
643
 
                }
644
 
        }
645
 
};
646
 
 
647
 
void() ResetOptions =
648
 
{
649
 
        local string s1;
650
 
 
651
 
        if(match_in_progress) return;
652
 
        if(stof(infokey(world, "k_master")) && self.k_admin < 2) {
653
 
                sprint(self, 3, "console: command is locked\n");
654
 
                return;
655
 
        }
656
 
        s1 = infokey(self, "team");
657
 
        if(self.k_admin != 2 || s1 == "") {
658
 
                localcmd("exec configs/reset.cfg\n");
659
 
        } else {
660
 
                localcmd("exec configs/");
661
 
                localcmd(s1);
662
 
                localcmd(".cfg\n");
663
 
                bprint(2, "*** \"", s1, "\" server setup by ", self.netname, "\n");
664
 
        }
665
 
};
666
 
 
667
 
void() VotePickup =
668
 
{
669
 
        local entity p;
670
 
        local float f1, f2;
671
 
 
672
 
        if(match_in_progress) return;
673
 
        if(k_captains) {
674
 
                sprint(self, 2, "No pickup when captain stuffing\n");
675
 
                return;
676
 
        }
677
 
        if(stof(infokey(world, "k_master")) && self.k_admin < 2) {
678
 
                sprint(self, 3, "console: command is locked\n");
679
 
                return;
680
 
        }
681
 
        self.k_pickup = 1 - self.k_pickup;
682
 
        if(self.k_pickup) bprint(2, self.netname, " ���� pickup!!\n");
683
 
        else bprint(2, self.netname, " ���� no pickup\n");
684
 
        f1 = 0;
685
 
        p = find(world, classname, "player");
686
 
        while(p != world) {
687
 
                if(p.netname != "" && p.k_pickup) f1 = f1 + 1;
688
 
                p = find(p, classname, "player");
689
 
        }
690
 
        f2 = CountPlayers();
691
 
        f2 = (floor(f2 / 2)) + 1;
692
 
        if(self.k_admin < 2) {
693
 
                if(f1 < f2) return;
694
 
                bprint(3, "console: a pickup game it is then\n");
695
 
        } else bprint(3, "console: admin veto for pickup\n");
696
 
        p = find(world, classname, "player");
697
 
        while(p != world) {
698
 
                if(p.netname != "") {
699
 
                        stuffcmd(p, "break\ncolor 0\nteam \"\"\nskin base\n");
700
 
                        p.k_pickup = 0;
701
 
                }
702
 
                p = find(p, classname, "player");
703
 
        }
704
 
};
705
 
 
706
 
void() ReportMe =
707
 
{
708
 
        local entity p;
709
 
        local string t1, t2, h, at, av, wt, wa, pa1, pa2;
710
 
        local float f1, flag;
711
 
 
712
 
        flag = 0;
713
 
        if(infokey(self, "k_nick") != "") flag = 1;
714
 
        pa1 = "�";
715
 
        pa2 = "): ";
716
 
        if(self.items & 8192) at = "ga:";
717
 
        if(self.items & 16384) at = "ya:";
718
 
        if(self.items & 32768) at = "ra:";
719
 
        wt = "axe:";
720
 
        f1 = 0;
721
 
        if(self.items & 1) {
722
 
                wt = "sg:";
723
 
                f1 = self.ammo_shells;
724
 
        }
725
 
        if(self.items & 4) {
726
 
                wt = "ng:";
727
 
                f1 = self.ammo_nails;
728
 
        }
729
 
        if(self.items & 2) {
730
 
                wt = "ssg:";
731
 
                f1 = self.ammo_shells;
732
 
        }
733
 
        if(self.items & 8) {
734
 
                wt = "sng:";
735
 
                f1 = self.ammo_nails;
736
 
        }
737
 
        if(self.items & 16) {
738
 
                wt = "gl:";
739
 
                f1 = self.ammo_rockets;
740
 
        }
741
 
        if(self.items & 64) {
742
 
                wt = "lg:";
743
 
                f1 = self.ammo_cells;
744
 
        }
745
 
        if(self.items & 32) {
746
 
                wt = "rl:";
747
 
                f1 = self.ammo_rockets;
748
 
        }
749
 
    p = find(world, classname, "player");
750
 
        while(p != world) {
751
 
                if(p.netname != "") {
752
 
                        t1 = infokey(self, "team");
753
 
                        t2 = infokey(p, "team");
754
 
                        if(t1 == t2) {
755
 
                                if(flag) {
756
 
                                        t1 = infokey(self, "k_nick");
757
 
                                        sprint(p, 3, t1, "  ");
758
 
                                } else sprint(p, 3, pa1, self.netname, pa2);
759
 
                                if(self.armorvalue != 0) {
760
 
                                        av = ftos(self.armorvalue);
761
 
                                        sprint(p, 3, at, av);
762
 
                                } else sprint(p, 3, "a:0");
763
 
                                h = ftos(self.health);
764
 
                                sprint(p, 3, "  h:", h, "  ", wt);
765
 
                                wa = ftos(f1);
766
 
                                sprint(p, 3, wa);
767
 
                                if(self.items & 524288) sprint(p, 3, "  ������");
768
 
                                if(self.items & 1048576) sprint(p, 3, "  �������");
769
 
                                if(self.items & 4194304) sprint(p, 3, "  �����䜑");
770
 
                                sprint(p, 3, "\n");
771
 
                        }
772
 
                }
773
 
                p = find(p, classname, "player");
774
 
        }
775
 
};
776
 
 
777
 
void() ToggleRespawns =
778
 
{
779
 
        local float tmp;
780
 
 
781
 
        if(match_in_progress) return;
782
 
        if(stof(infokey(world, "k_master")) && self.k_admin < 2) {
783
 
                sprint(self, 3, "console: command is locked\n");
784
 
                return;
785
 
        }
786
 
        tmp = stof(infokey(world, "k_spw"));
787
 
        if(tmp == 2) {
788
 
                bprint(2, "Normal QW respawns (avoid spawnfrags)\n");
789
 
                localcmd("localinfo k_spw 0\n");
790
 
        } else if(tmp == 0) {
791
 
                bprint(2, "KT SpawnSafety\n");
792
 
                localcmd("localinfo k_spw 1\n");
793
 
        } else {
794
 
                bprint(2, "Kombat Teams respawns\n");
795
 
                localcmd("localinfo k_spw 2\n");
796
 
        }
797
 
};
798
 
 
799
 
void() ToggleRespawn666 =
800
 
{
801
 
        local float tmp;
802
 
 
803
 
        if(match_in_progress) return;
804
 
        if(stof(infokey(world, "k_master")) && self.k_admin < 2) {
805
 
                sprint(self, 3, "console: command is locked\n");
806
 
                return;
807
 
        }
808
 
        tmp = stof(infokey(world, "k_666"));
809
 
        bprint(2, "������� ��� ");
810
 
        if(tmp != 0) {
811
 
                bprint(2, "disabled\n");
812
 
                localcmd("localinfo k_666 0\n");
813
 
        } else {
814
 
                bprint(2, "enabled\n");
815
 
                localcmd("localinfo k_666 1\n");
816
 
        }
817
 
};
818
 
 
819
 
void() TogglePowerups =
820
 
{
821
 
        local float tmp;
822
 
        local entity p, old;
823
 
 
824
 
        if(match_in_progress) return;
825
 
        if(stof(infokey(world, "k_master")) && self.k_admin < 2) {
826
 
                sprint(self, 3, "console: command is locked\n");
827
 
                return;
828
 
        }
829
 
        tmp = stof(infokey(world, "k_pow"));
830
 
        bprint(2, "�������� ");
831
 
        if(tmp == 2) {
832
 
                bprint(2, "disabled\n");
833
 
                localcmd("localinfo k_pow 0\n");
834
 
            p = findradius('0 0 0', 999999);
835
 
                while(p) {
836
 
                        old = p.chain;
837
 
                        if(p.classname == "item_artifact_invulnerability") p.effects = p.effects - (p.effects & 128);
838
 
                        if(p.classname == "item_artifact_super_damage") p.effects = p.effects - (p.effects & 64);
839
 
                        p = old;
840
 
                }
841
 
        } else if(!tmp) {
842
 
                bprint(2, "enabled\n");
843
 
                localcmd("localinfo k_pow 1\n");
844
 
                p = findradius('0 0 0', 999999);
845
 
                while(p) {
846
 
                        old = p.chain;
847
 
                        if(p.classname == "item_artifact_invulnerability") p.effects = p.effects | 128;
848
 
                        if(p.classname == "item_artifact_super_damage") p.effects = p.effects | 64;
849
 
                        p = old;
850
 
                }
851
 
        } else {
852
 
                bprint(2, "enabled (timer jammer)\n");
853
 
                localcmd("localinfo k_pow 2\n");
854
 
        }
855
 
};
856
 
 
857
 
void() ToggleDischarge =
858
 
{
859
 
        local float tmp;
860
 
 
861
 
        if(match_in_progress) return;
862
 
        if(stof(infokey(world, "k_master")) && self.k_admin < 2) {
863
 
                sprint(self, 3, "console: command is locked\n");
864
 
                return;
865
 
        }
866
 
        tmp = stof(infokey(world, "k_dis"));
867
 
        bprint(2, "���������� ");
868
 
        if(tmp != 0) {
869
 
                bprint(2, "disabled\n");
870
 
                localcmd("localinfo k_dis 0\n");
871
 
        } else {
872
 
                bprint(2, "enabled\n");
873
 
                localcmd("localinfo k_dis 1\n");
874
 
        }
875
 
};
876
 
 
877
 
void() ChangeDM =
878
 
{
879
 
        local string tmp;
880
 
 
881
 
        if(match_in_progress) return;
882
 
        if(stof(infokey(world, "k_master")) && self.k_admin < 2) {
883
 
                sprint(self, 3, "console: command is locked\n");
884
 
                return;
885
 
        }
886
 
        deathmatch = deathmatch + 1;
887
 
        if(deathmatch == 6) deathmatch = 1;
888
 
        tmp = ftos(deathmatch);
889
 
        cvar_set("deathmatch", tmp);
890
 
        if(deathmatch == 1) tmp = "�";
891
 
        else if(deathmatch == 2) tmp = "�";
892
 
        else if(deathmatch == 3) tmp = "�";
893
 
        else if(deathmatch == 4) tmp = "�";
894
 
        else tmp = "�";
895
 
        bprint(2, "Deathmatch ", tmp, "\n");
896
 
};
897
 
 
898
 
void() ChangeTP =
899
 
{
900
 
        local string tmp;
901
 
 
902
 
        if(match_in_progress) return;
903
 
        if(stof(infokey(world, "k_master")) && self.k_admin < 2) {
904
 
                sprint(self, 3, "console: command is locked\n");
905
 
                return;
906
 
        }
907
 
 
908
 
        if(stof(infokey(world, "k_duel"))) {
909
 
                sprint(self, 3, "console: duel mode disallows you to change teamplay setting\n");
910
 
                return;
911
 
        }
912
 
 
913
 
        teamplay = teamplay + 1;
914
 
        if(teamplay == 4) teamplay = 0;
915
 
        tmp = ftos(teamplay);
916
 
        cvar_set("teamplay", tmp);
917
 
        if(teamplay == 0) tmp = "�";
918
 
        else if(teamplay == 1) tmp = "�";
919
 
        else if(teamplay == 2) tmp = "�";
920
 
        else tmp = "�";
921
 
        bprint(2, "Teamplay ", tmp, "\n");
922
 
};
923
 
 
924
 
void(float t) TimeDown =
925
 
{
926
 
        local string tmp;
927
 
 
928
 
        if(match_in_progress) return;
929
 
        if(stof(infokey(world, "k_master")) && self.k_admin < 2) {
930
 
                sprint(self, 3, "console: command is locked\n");
931
 
                return;
932
 
        }
933
 
        timelimit = timelimit - t;
934
 
        if(timelimit < 5) timelimit = 5;
935
 
        tmp = ftos(timelimit);
936
 
        bprint(2, "����� ������ ��� �� ", tmp, " �������\n");
937
 
        cvar_set("timelimit", tmp);
938
 
};
939
 
 
940
 
void(float t) TimeUp =
941
 
{
942
 
        local string tmp;
943
 
        local float top;
944
 
 
945
 
        if(match_in_progress) return;
946
 
        if(stof(infokey(world, "k_master")) && self.k_admin < 2) {
947
 
                sprint(self, 3, "console: command is locked\n");
948
 
                return;
949
 
        }
950
 
        timelimit = timelimit + t;
951
 
        top = stof(infokey(world, "k_timetop"));
952
 
        if(timelimit > top) timelimit = top;
953
 
        tmp = ftos(timelimit);
954
 
        bprint(2, "����� ������ ��� �� ", tmp, " �������\n");
955
 
        cvar_set("timelimit", tmp);
956
 
};
957
 
 
958
 
void(float t) TimeSet =
959
 
{
960
 
        local string tmp;
961
 
 
962
 
 
963
 
        local float top;
964
 
 
965
 
        if(match_in_progress) return;
966
 
        if(stof(infokey(world, "k_master")) && self.k_admin < 2) {
967
 
                sprint(self, 3, "console: command is locked\n");
968
 
                return;
969
 
        }
970
 
        timelimit = t;
971
 
        top = stof(infokey(world, "k_timetop"));
972
 
 
973
 
        if(timelimit > top) timelimit = top;
974
 
        tmp = ftos(timelimit);
975
 
        bprint(2, "����� ������ ��� �� ", tmp, " �������\n");
976
 
        cvar_set("timelimit", tmp);
977
 
};
978
 
 
979
 
void() FragsDown =
980
 
{
981
 
        local string tmp;
982
 
 
983
 
        if(match_in_progress) return;
984
 
        if(stof(infokey(world, "k_master")) && self.k_admin < 2) {
985
 
                sprint(self, 3, "console: command is locked\n");
986
 
                return;
987
 
        }
988
 
        fraglimit = fraglimit - 10;
989
 
        if(fraglimit < 0) fraglimit = 0;
990
 
        tmp = ftos(fraglimit);
991
 
        bprint(2, "��������� ��� �� ", tmp, "\n");
992
 
        cvar_set("fraglimit", tmp);
993
 
};
994
 
 
995
 
void() FragsUp =
996
 
{
997
 
        local string tmp;
998
 
 
999
 
        if(match_in_progress) return;
1000
 
        if(stof(infokey(world, "k_master")) && self.k_admin < 2) {
1001
 
                sprint(self, 3, "console: command is locked\n");
1002
 
                return;
1003
 
        }
1004
 
        fraglimit = fraglimit + 10;
1005
 
        if(fraglimit > 100) fraglimit = 100;
1006
 
        tmp = ftos(fraglimit);
1007
 
        bprint(2, "��������� ��� �� ", tmp, "\n");
1008
 
        cvar_set("fraglimit", tmp);
1009
 
};
1010
 
 
1011
 
void() ToggleDropQuad =
1012
 
{
1013
 
        local float dq;
1014
 
 
1015
 
        if(match_in_progress) return;
1016
 
        if(stof(infokey(world, "k_master")) && self.k_admin < 2) {
1017
 
                sprint(self, 3, "console: command is locked\n");
1018
 
                return;
1019
 
        }
1020
 
        dq = stof(infokey(world, "dq"));
1021
 
        if(dq != 0) {
1022
 
                localcmd("localinfo dq 0\n");
1023
 
                bprint(2, "�������� off\n");
1024
 
                return;
1025
 
        }
1026
 
        localcmd("localinfo dq 1\n");
1027
 
        bprint(2, "�������� on\n");
1028
 
};
1029
 
 
1030
 
void() ToggleDropRing =
1031
 
{
1032
 
        local float dr;
1033
 
 
1034
 
        if(match_in_progress) return;
1035
 
        if(stof(infokey(world, "k_master")) && self.k_admin < 2) {
1036
 
                sprint(self, 3, "console: command is locked\n");
1037
 
                return;
1038
 
        }
1039
 
        dr = stof(infokey(world, "dr"));
1040
 
        if(dr != 0) {
1041
 
                localcmd("localinfo dr 0\n");
1042
 
                bprint(2, "�������� off\n");
1043
 
                return;
1044
 
        }
1045
 
        localcmd("localinfo dr 1\n");
1046
 
        bprint(2, "�������� on\n");
1047
 
};
1048
 
 
1049
 
void() ToggleDropPack =
1050
 
{
1051
 
        local float dp;
1052
 
 
1053
 
        if(match_in_progress) return;
1054
 
        if(stof(infokey(world, "k_master")) && self.k_admin < 2) {
1055
 
                sprint(self, 3, "console: command is locked\n");
1056
 
                return;
1057
 
        }
1058
 
        dp = stof(infokey(world, "dp"));
1059
 
        if(dp != 0) {
1060
 
                localcmd("localinfo dp 0\n");
1061
 
                bprint(2, "��������� off\n");
1062
 
                return;
1063
 
        }
1064
 
        localcmd("localinfo dp 1\n");
1065
 
        bprint(2, "��������� on\n");
1066
 
};
1067
 
 
1068
 
void() ToggleFairPacks =
1069
 
{
1070
 
        local float f1;
1071
 
 
1072
 
    if(match_in_progress) return;
1073
 
        if(stof(infokey(world, "k_master")) && self.k_admin < 2) {
1074
 
                sprint(self, 3, "console: command is locked\n");
1075
 
                return;
1076
 
        }
1077
 
        f1 = stof(infokey(world, "k_frp"));
1078
 
        if(f1==0)
1079
 
        {
1080
 
                localcmd("localinfo k_frp 1\n");
1081
 
                bprint(2, "��������� enabled - drop best weapon.\n");
1082
 
                return;
1083
 
        }
1084
 
        else if(f1==1)
1085
 
        {
1086
 
                localcmd("localinfo k_frp 2\n");
1087
 
                bprint(2, "��������� enabled - drop last fired weapon.\n");
1088
 
                return;
1089
 
        }
1090
 
        else if(f1==2)
1091
 
 
1092
 
{
1093
 
                localcmd("localinfo k_frp 0\n");
1094
 
                bprint(2, "��������� disabled\n");
1095
 
                return;
1096
 
        }
1097
 
};
1098
 
 
1099
 
void() ToggleSpeed =
1100
 
{
1101
 
        local string s1;
1102
 
        local entity p;
1103
 
 
1104
 
        if(match_in_progress) return;
1105
 
        if(stof(infokey(world, "k_master")) && self.k_admin < 2) {
1106
 
                sprint(self, 3, "console: command is locked\n");
1107
 
                return;
1108
 
        }
1109
 
        if(k_maxspeed != 320) k_maxspeed = 320;
1110
 
        else k_maxspeed = stof(infokey(world, "k_highspeed"));
1111
 
        s1 = ftos(k_maxspeed);
1112
 
        bprint(2, "�������� ��� �� ");
1113
 
        bprint(2, s1);
1114
 
        bprint(2, "\n");
1115
 
        cvar_set("sv_maxspeed", s1);
1116
 
        p = find(world, classname, "player");
1117
 
        while(p != world) {
1118
 
                p.maxspeed = k_maxspeed;
1119
 
                p = find(p, classname, "player");
1120
 
        }
1121
 
};
1122
 
 
1123
 
void() ToggleBerzerk =
1124
 
{
1125
 
        local float tmp;
1126
 
 
1127
 
        if(match_in_progress) return;
1128
 
        if(stof(infokey(world, "k_master")) && self.k_admin < 2) {
1129
 
                sprint(self, 3, "console: command is locked\n");
1130
 
                return;
1131
 
        }
1132
 
        tmp = stof(infokey(world, "k_bzk"));
1133
 
        if(tmp != 0) {
1134
 
                localcmd("localinfo k_bzk 0\n");
1135
 
                bprint(2, "������� ���� off\n");
1136
 
                return;
1137
 
        }
1138
 
        localcmd("localinfo k_bzk 1\n");
1139
 
        bprint(2, "������� ���� on\n");
1140
 
}
1141
 
 
1142
 
#ifdef VWEP_TEST
1143
 
void ToggleVwep ()
1144
 
{
1145
 
    float tmp;
1146
 
 
1147
 
    if(match_in_progress)
1148
 
        return;
1149
 
    if(stof(infokey(world, "k_master")) && self.k_admin < 2) {
1150
 
        sprint(self, 3, "console: command is locked\n");
1151
 
        return;
1152
 
    }
1153
 
    tmp = stof(infokey(world, "vwep"));
1154
 
    if(tmp != 0) {
1155
 
        localcmd("localinfo vwep 0\n");
1156
 
        bprint(2, "vwep ���� off\nrequires map restart\n");   //TODO: change vwep for red text version
1157
 
        return;
1158
 
    }
1159
 
    localcmd("localinfo vwep 1\n");
1160
 
    bprint(2, "vwep ���� on\nrequires map restart\n");
1161
 
}
1162
 
#endif
1163
 
 
1164
 
void() ToggleSpecTalk =
1165
 
{
1166
 
        local float tmp, tmp2;
1167
 
        local string s1;
1168
 
 
1169
 
        if(match_in_progress && self.k_admin < 2) return;
1170
 
        tmp2 = stof(infokey(world, "fpd"));
1171
 
 
1172
 
        tmp2 = tmp2 - (tmp2 & 64);
1173
 
        if(match_in_progress == 2) {
1174
 
                tmp = stof(infokey(world, "k_spectalk"));
1175
 
                bprint(2, "Spectalk ");
1176
 
                if(tmp != 0) {
1177
 
                        localcmd("sv_spectalk 0\nserverinfo fpd ");
1178
 
                        tmp2 = tmp2 + 64;
1179
 
                        s1 = ftos(tmp2);
1180
 
                        localcmd(s1);
1181
 
                        localcmd("\nlocalinfo k_spectalk 0\n");
1182
 
                        bprint(2, "off: ������� ��� �� ������ ���� ����������\n");
1183
 
                        return;
1184
 
                }
1185
 
                localcmd("sv_spectalk 1\nserverinfo fpd ");
1186
 
                s1 = ftos(tmp2);
1187
 
                localcmd(s1);
1188
 
                localcmd("\nlocalinfo k_spectalk 1\n");
1189
 
                bprint(2, "on: ������� ��� ��� ���� ����������\n");
1190
 
                return;
1191
 
        } else {
1192
 
                if(stof(infokey(world, "k_master")) && self.k_admin < 2) {
1193
 
                        sprint(self, 3, "console: command is locked\n");
1194
 
                        return;
1195
 
                }
1196
 
                tmp = stof(infokey(world, "k_spectalk"));
1197
 
                bprint(2, "Spectalk ");
1198
 
                if(tmp != 0) {
1199
 
                        localcmd("localinfo k_spectalk 0\n");
1200
 
                        bprint(2, "off: ������� ������ ���� ���������� ������ ����\n");
1201
 
                        return;
1202
 
                }
1203
 
                localcmd("localinfo k_spectalk 1\n");
1204
 
                bprint(2, "on: ������� ��� ���� ���������� ������ ����\n");
1205
 
        }
1206
 
};
1207
 
 
1208
 
void() ShowRules =
1209
 
{
1210
 
        local string s1;
1211
 
 
1212
 
        if(stof(infokey(world, "k_duel"))) sprint(self, 2, "Server is in duelmode.\n");
1213
 
        else sprint(self, 2, "Bind ������ to a key.\nPressing that key will send\nyour status to your teammates.\nTyping ������ during game\nwill print time left and teamscores.\nAlso available during game\nare ����� and ����������.\n\nRemember that telefragging a teammate\ndoes not result in frags.\n");
1214
 
        if(stof(infokey(world, "k_bzk")) != 0) {
1215
 
                s1 = infokey(world, "k_btime");
1216
 
                sprint(self, 2, "\nBERZERK mode is activated!\nThis means that when only ", s1, " seconds\nremains of the game, all players\ngets QUAD/OCTA powered.\n");
1217
 
        }
1218
 
        sprint(self, 2, "\n");
1219
 
};
1220
 
 
1221
 
void() ChangeLock =
1222
 
{
1223
 
        if(match_in_progress) return;
1224
 
        if(stof(infokey(world, "k_master")) && self.k_admin < 2) {
1225
 
                sprint(self, 3, "console: command is locked\n");
1226
 
                return;
1227
 
        }
1228
 
        lock = lock + 1;
1229
 
    if(lock > 2) lock = 0;
1230
 
        if(lock == 0) bprint(2, "������ ������� off\n");
1231
 
        else if(lock == 2) bprint(2, "������ ������ - players cannot connect during game\n");
1232
 
        else if(lock == 1) bprint(2, "�������� �� - only players in existing teams can connect during game\n");
1233
 
};
1234
 
 
1235
 
void(string sndname) TeamSay =
1236
 
{
1237
 
        local entity p;
1238
 
        local string t1, t2;
1239
 
 
1240
 
    p = find(world, classname, "player");
1241
 
        while(p != world) {
1242
 
                if(p != self && teamplay && p.netname != "" && ((stof(infokey(p, "k_flags"))) & 1)) {
1243
 
                        t1 = infokey(self, "team");
1244
 
                        t2 = infokey(p, "team");
1245
 
                        if(t1 == t2) {
1246
 
                                stuffcmd(p, "play ");
1247
 
                                t1 = infokey(p, "k_sdir");
1248
 
                                if(t1) {
1249
 
                                        stuffcmd(p, t1);
1250
 
                                        stuffcmd(p, "/");
1251
 
                                }
1252
 
                                stuffcmd(p, sndname);
1253
 
                                stuffcmd(p, "\n");
1254
 
                        }
1255
 
                }
1256
 
                p = find(p, classname, "player");
1257
 
        }
1258
 
};
1259
 
 
1260
 
void() PrintScores =
1261
 
{
1262
 
        local string tmp, tmp2;
1263
 
        local entity p;
1264
 
        local float f1, f2;
1265
 
 
1266
 
        if(match_in_progress != 2) {
1267
 
                sprint(self, 2, "no game - no scores.\n");
1268
 
                return;
1269
 
        }
1270
 
        
1271
 
        // Check to see if scores changed from last time you hit scores command.
1272
 
        // DO this by checking if k_nochange is 0. 
1273
 
        // which is set in ClientObituary in client.qc
1274
 
        if( (k_showscores) && k_nochange == 0)
1275
 
        {
1276
 
                k_scores1 = 0;
1277
 
                k_scores2 = 0;
1278
 
                p = find(world, classname, "player");
1279
 
                while(p != world) {
1280
 
                        if(p.netname != "" && p.k_accepted == 2) {
1281
 
                                f1 = f1 + 1;
1282
 
                                tmp = infokey(world, "k_team1");
1283
 
                                tmp2 = infokey(p, "team");
1284
 
                                if(tmp == tmp2) k_scores1 = k_scores1 + p.frags;
1285
 
                                else k_scores2 = k_scores2 + p.frags;
1286
 
                        }
1287
 
                        p = find(p, classname, "player");
1288
 
                }
1289
 
                p = find(world, classname, "ghost");
1290
 
                while(p != world) {
1291
 
                        tmp = ftos(p.k_teamnum);
1292
 
                        tmp2 = infokey(world, tmp);
1293
 
                        tmp = infokey(world, "k_team1");
1294
 
                        if(tmp == tmp2) k_scores1 = k_scores1 + p.frags;
1295
 
                        else k_scores2 = k_scores2 + p.frags;
1296
 
                        p = find(p, classname, "ghost");
1297
 
                }
1298
 
                k_nochange = 1;
1299
 
        }
1300
 
        if(k_sudden_death) sprint(self, 2, "Sudden death �������� �� ��������\n");
1301
 
        p = find(world, classname, "timer");
1302
 
        if(p != world) {
1303
 
                f1 = p.cnt;
1304
 
                f2 = p.cnt2;
1305
 
                if(f2 == 60) f2 = 0;
1306
 
                else f1 = f1 - 1;
1307
 
 
1308
 
                if(f1) {
1309
 
                        tmp = ftos(f1);
1310
 
                        sprint(self, 2, "�", tmp, "� full minute");
1311
 
                        if(f1 > 1)
1312
 
                        sprint(self, 2, "s");
1313
 
                }
1314
 
                else {
1315
 
                tmp = ftos(f2);
1316
 
                sprint(self, 2, "�", tmp, "� second");
1317
 
                if(f2 > 1)
1318
 
                        sprint(self, 2, "s");
1319
 
                }
1320
 
                sprint(self, 2, " left\n");
1321
 
 
1322
 
        }
1323
 
        if(k_showscores) {
1324
 
                if(k_scores1 > k_scores2) {
1325
 
                        tmp = infokey(world, "k_team1");
1326
 
                        sprint(self, 2, "���� �", tmp, "� = ");
1327
 
                        tmp = ftos(k_scores1);
1328
 
                        sprint(self, 2, tmp, "\n");
1329
 
                        tmp = infokey(world, "k_team2");
1330
 
                        sprint(self, 2, "���� �", tmp, "� = ");
1331
 
                        tmp = ftos(k_scores2);
1332
 
                        sprint(self, 2, tmp, "\n");
1333
 
                } else {
1334
 
                        tmp = infokey(world, "k_team2");
1335
 
                        sprint(self, 2, "���� �", tmp, "� = ");
1336
 
                        tmp = ftos(k_scores2);
1337
 
                        sprint(self, 2, tmp, "\n");
1338
 
                        tmp = infokey(world, "k_team1");
1339
 
                        sprint(self, 2, "���� �", tmp, "� = ");
1340
 
                        tmp = ftos(k_scores1);
1341
 
                        sprint(self, 2, tmp, "\n");
1342
 
                }
1343
 
        }
1344
 
};
1345
 
 
1346
 
 
1347
 
void() PlayerStats =
1348
 
{
1349
 
        local float f1;
1350
 
        local entity p, p2;
1351
 
        local string tmp, tmp2;
1352
 
 
1353
 
        if(match_in_progress != 2) {
1354
 
                sprint(self, 2, "no game - no statistics.\n");
1355
 
                return;
1356
 
        }
1357
 
 
1358
 
        f1 = CountTeams();
1359
 
        sprint(self, 2, "������ ����������:\n����� (����) ");
1360
 
        if(!stof(infokey(world, "k_duel")) && f1 && teamplay)
1361
 
                sprint(self, 2, "����������� ");
1362
 
        sprint(self, 2, "� ����������\n������������������������");
1363
 
        if(!stof(infokey(world, "k_duel")) && f1 && teamplay)
1364
 
                sprint(self, 2, "������������");
1365
 
        sprint(self, 2, "�\n");
1366
 
        p = find(world, classname, "player");
1367
 
        while(p != world) {
1368
 
                if(p.netname != "" && p.k_accepted == 2 && p.ready) {
1369
 
                        p2 = p;
1370
 
                        while (p2 != world) {
1371
 
                                tmp = infokey(p, "team");
1372
 
                                tmp2 = infokey(p2, "team");
1373
 
                                if(tmp == tmp2) {
1374
 
                                        sprint(self, 2, "�", tmp2, "� ");
1375
 
                                        sprint(self, 2, p2.netname, ": ");
1376
 
                                        tmp = ftos(p2.frags);
1377
 
                                        sprint(self, 2, tmp, " (");
1378
 
                                        tmp = ftos(p2.frags - p2.deaths);
1379
 
                                        sprint(self, 2, tmp, ") ");
1380
 
                                        if(!stof(infokey(world, "k_duel")) && f1 && teamplay) {
1381
 
                                                tmp = ftos(p2.friendly);
1382
 
                                                sprint(self, 2, tmp, " ");
1383
 
                                        }
1384
 
                                        if(p2.frags < 1)
1385
 
                                                p2.efficiency = 0;
1386
 
                                        else
1387
 
                                                p2.efficiency = p2.frags / (p2.frags + p2.deaths) * 100;
1388
 
                                        tmp = ftos(p2.efficiency);
1389
 
                                        if(floor(p2.efficiency) == p2.efficiency) sprint(self, 2, "� ");
1390
 
                                        else sprint(self, 2, "�");
1391
 
                                        sprint(self, 2, tmp, "%\n");
1392
 
                                        p2.ready = 0;
1393
 
                                }
1394
 
                                p2 = find(p2, classname, "player");
1395
 
                        }
1396
 
                }
1397
 
                p = find(p, classname, "player");
1398
 
        }
1399
 
        p = find(world, classname, "player");
1400
 
        while(p != world) {
1401
 
                p.ready = 1;
1402
 
                p = find(p, classname, "player");
1403
 
        }
1404
 
};
1405
 
 
1406
 
/*
1407
 
void() ToggleQTimer =
1408
 
{
1409
 
        local float f1, f2;
1410
 
        local string s1;
1411
 
 
1412
 
        if(match_in_progress) return;
1413
 
        if(stof(infokey(world, "k_master")) && self.k_admin < 2) {
1414
 
                sprint(self, 3, "console: command is locked\n");
1415
 
                return;
1416
 
        }
1417
 
        f1 = stof(infokey(world, "fpd"));
1418
 
        f2 = f1 - (f1 & 2);
1419
 
        if(f1 & 2) {
1420
 
                localcmd("serverinfo fpd ");
1421
 
                s1 = ftos(f2);
1422
 
                localcmd(s1);
1423
 
                localcmd("\n");
1424
 
                bprint(2, "����� ������ allowed\n");
1425
 
                return;
1426
 
        } else {
1427
 
                localcmd("serverinfo fpd ");
1428
 
                f2 = f2 + 2;
1429
 
                s1 = ftos(f2);
1430
 
                localcmd(s1);
1431
 
                localcmd("\n");
1432
 
                bprint(2, "����� ������ disallowed\n");
1433
 
        }
1434
 
};
1435
 
*/
1436
 
 
1437
 
void() ToggleQLag =
1438
 
{
1439
 
        local float f1, f2;
1440
 
        local string s1;
1441
 
 
1442
 
        if(match_in_progress) return;
1443
 
        if(stof(infokey(world, "k_master")) && self.k_admin < 2) {
1444
 
                sprint(self, 3, "console: command is locked\n");
1445
 
                return;
1446
 
        }
1447
 
        f1 = stof(infokey(world, "fpd"));
1448
 
        f2 = f1 - (f1 & 8);
1449
 
        if(f1 & 8) {
1450
 
                localcmd("serverinfo fpd ");
1451
 
                s1 = ftos(f2);
1452
 
                localcmd(s1);
1453
 
                localcmd("\n");
1454
 
                bprint(2, "����� ��� �������� in effect\n");
1455
 
 
1456
 
                return;
1457
 
        } else {
1458
 
                localcmd("serverinfo fpd ");
1459
 
                f2 = f2 + 8;
1460
 
                s1 = ftos(f2);
1461
 
                localcmd(s1);
1462
 
                localcmd("\n");
1463
 
                bprint(2, "����� ��� �������� not in effect\n");
1464
 
        }
1465
 
};
1466
 
 
1467
 
void() ToggleQEnemy =
1468
 
{
1469
 
        local float f1, f2;
1470
 
        local string s1;
1471
 
 
1472
 
        if(match_in_progress) return;
1473
 
        if(stof(infokey(world, "k_master")) && self.k_admin < 2) {
1474
 
                sprint(self, 3, "console: command is locked\n");
1475
 
                return;
1476
 
        }
1477
 
        f1 = stof(infokey(world, "fpd"));
1478
 
        f2 = f1 - (f1 & 32);
1479
 
        if(f1 & 32) {
1480
 
                localcmd("serverinfo fpd ");
1481
 
                s1 = ftos(f2);
1482
 
                localcmd(s1);
1483
 
                localcmd("\n");
1484
 
                bprint(2, "����� ����� ��������� allowed\n");
1485
 
                return;
1486
 
        } else {
1487
 
                localcmd("serverinfo fpd ");
1488
 
                f2 = f2 + 32;
1489
 
                s1 = ftos(f2);
1490
 
                localcmd(s1);
1491
 
 
1492
 
                localcmd("\n");
1493
 
                bprint(2, "����� ����� ��������� disallowed\n");
1494
 
        }
1495
 
};
1496
 
 
1497
 
void() ToggleQPoint =
1498
 
{
1499
 
        local float f1, f2;
1500
 
        local string s1;
1501
 
 
1502
 
        if(match_in_progress) return;
1503
 
        if(stof(infokey(world, "k_master")) && self.k_admin < 2) {
1504
 
                sprint(self, 3, "console: command is locked\n");
1505
 
                return;
1506
 
        }
1507
 
        f1 = stof(infokey(world, "fpd"));
1508
 
        f2 = f1 - (f1 & 128);
1509
 
        if(f1 & 128) {
1510
 
                localcmd("serverinfo fpd ");
1511
 
                s1 = ftos(f2);
1512
 
                localcmd(s1);
1513
 
                localcmd("\n");
1514
 
                bprint(2, "����� �������� enabled\n");
1515
 
                return;
1516
 
        } else {
1517
 
                localcmd("serverinfo fpd ");
1518
 
                f2 = f2 + 128;
1519
 
                s1 = ftos(f2);
1520
 
                localcmd(s1);
1521
 
                localcmd("\n");
1522
 
                bprint(2, "����� �������� disabled\n");
1523
 
        }
1524
 
};
1525
 
 
1526
 
void() ToggleFreeze =
1527
 
{
1528
 
        local float f1;
1529
 
 
1530
 
        if(match_in_progress) return;
1531
 
        if(stof(infokey(world, "k_master")) && self.k_admin != 2) {
1532
 
                sprint(self, 3, "console: command is locked\n");
1533
 
                return;
1534
 
        }
1535
 
        f1 = stof(infokey(world, "k_freeze"));
1536
 
        if(f1) {
1537
 
                localcmd("localinfo k_freeze 0\n");
1538
 
                bprint(2, self.netname, " unfreezes map\n");
1539
 
        } else {
1540
 
                localcmd("localinfo k_freeze 1\n");
1541
 
                bprint(2, self.netname, " freezes map\n");
1542
 
        }
1543
 
};
1544
 
 
1545
 
float() CaptainImpulses =
1546
 
{
1547
 
// s: return 0 if captain mode is set and no captain things were entered
1548
 
        if(k_captains == 2 && self.impulse != 79) {
1549
 
                if(self.impulse > 16 || !self.k_captain) return 0;
1550
 
// s: return 1 if it's a player picker impulse
1551
 
                return 1;
1552
 
        }
1553
 
// s: return 2 if nothing interesting
1554
 
        return 2;
1555
 
};
1556
 
 
1557
 
void() TeamCommands =
1558
 
{
1559
 
        if(self.impulse < 20 || self.impulse > 99) return;
1560
 
        if(self.impulse == 86) ShowCmds();
1561
 
        else if(self.impulse == 67) PrintScores();
1562
 
        else if(self.impulse == 22) PlayerStats();
1563
 
        else if(self.impulse == 37) ShowOpts();
1564
 
        else if(self.impulse == 20) PlayerReady();
1565
 
        else if(self.impulse == 21) PlayerBreak();
1566
 
        else if(self.impulse == 24) ModStatus();
1567
 
        else if(self.impulse == 23) ModStatus2();
1568
 
        else if(self.impulse == 55) PlayerStatus();
1569
 
        else if(self.impulse == 53) PlayerStatusS();
1570
 
        else if(self.impulse == 54) PlayerStatusN();
1571
 
        else if(self.impulse == 52) ModStatusVote();
1572
 
        else if(self.impulse == 59) ToggleRespawns();
1573
 
        else if(self.impulse == 25) TogglePowerups();
1574
 
        else if(self.impulse == 36) ToggleDischarge();
1575
 
        else if(self.impulse == 26) ChangeDM();
1576
 
        else if(self.impulse == 27) ChangeTP();
1577
 
        else if(self.impulse == 28) TimeDown(1);
1578
 
        else if(self.impulse == 29) TimeUp(1);
1579
 
        else if(self.impulse == 30) TimeDown(5);
1580
 
        else if(self.impulse == 31) TimeUp(5);
1581
 
        else if(self.impulse == 32) FragsDown();
1582
 
        else if(self.impulse == 33) FragsUp();
1583
 
        else if(self.impulse == 34) ToggleDropQuad();
1584
 
        else if(self.impulse == 35) ToggleDropRing();
1585
 
        else if(self.impulse == 56) ToggleDropPack();
1586
 
 
1587
 
    else if(self.impulse == 38) ToggleSpecTalk();
1588
 
        else if(self.impulse == 40) ResetOptions();
1589
 
        else if(self.impulse == 41) ShowRules();
1590
 
        else if(self.impulse == 42) ChangeLock();
1591
 
        else if(self.impulse == 78) ShowMaps();
1592
 
        else if(self.impulse == 43) ToggleRespawn666();
1593
 
        else if(self.impulse == 81) ReqAdmin();
1594
 
        else if(self.impulse == 82) AdminForceStart();
1595
 
        else if(self.impulse == 83) AdminForceBreak();
1596
 
        else if(self.impulse == 75) AdminForcePause();
1597
 
        else if(self.impulse == 76) VotePickup();
1598
 
        else if(self.impulse == 84) TogglePreWar();
1599
 
        else if(self.impulse == 85) ToggleMapLock();
1600
 
        else if(self.impulse == 45) ToggleMaster();
1601
 
        else if(self.impulse == 58) ToggleSpeed();
1602
 
        else if(self.impulse == 57) ToggleFairPacks();
1603
 
        else if(self.impulse == 60) ShowVersion();
1604
 
        else if(self.impulse == 46) TimeSet(5);
1605
 
        else if(self.impulse == 47) TimeSet(10);
1606
 
        else if(self.impulse == 48) TimeSet(15);
1607
 
        else if(self.impulse == 49) TimeSet(20);
1608
 
        else if(self.impulse == 50) TimeSet(25);
1609
 
        else if(self.impulse == 51) TimeSet(30);
1610
 
        else if(self.impulse == 44) ToggleBerzerk();
1611
 
        else if(self.impulse == 61) TeamSay("ktsound1.wav");
1612
 
        else if(self.impulse == 62) TeamSay("ktsound2.wav");
1613
 
        else if(self.impulse == 63) TeamSay("ktsound3.wav");
1614
 
        else if(self.impulse == 64) TeamSay("ktsound4.wav");
1615
 
        else if(self.impulse == 65) TeamSay("ktsound5.wav");
1616
 
        else if(self.impulse == 66) TeamSay("ktsound6.wav");
1617
 
        else if(self.impulse == 68) ShowQizmo();
1618
 
        
1619
 
        else if(self.impulse == 69) ShowMessages();
1620
 
        else if(self.impulse == 70) SendKillerMsg();
1621
 
        else if(self.impulse == 71) SendVictimMsg();
1622
 
        else if(self.impulse == 72) SendNewcomerMsg();
1623
 
 
1624
 
//      else if(self.impulse == CMD_qtimer) ToggleQTimer();
1625
 
        else if(self.impulse == 73) ToggleQLag();
1626
 
        else if(self.impulse == 74) ToggleQEnemy();
1627
 
        else if(self.impulse == 77) ToggleQPoint();
1628
 
 
1629
 
    else if(self.impulse == 87) AdminKick();
1630
 
    else if(self.impulse == 88) YesKick();
1631
 
    else if(self.impulse == 89) DontKick();
1632
 
    else if(self.impulse == 90) ListWhoNot();
1633
 
    else if(self.impulse == 91) ChangeOvertime();
1634
 
    else if(self.impulse == 92) ChangeOvertimeUp();
1635
 
    else if(self.impulse == 93) VoteAdmin();
1636
 
    else if(self.impulse == 94) VoteYes();
1637
 
    else if(self.impulse == 95) VoteNo();
1638
 
    else if(self.impulse == 79) BecomeCaptain();
1639
 
    else if(self.impulse == 80) ToggleFreeze();
1640
 
        else if(self.impulse == 96) Deathmsg();
1641
 
    else if(self.impulse == 97) RandomPickup();
1642
 
    else if(self.impulse == 98) SetOfficial();
1643
 
#ifdef VWEP_TEST
1644
 
    else if(self.impulse == 99) ToggleVwep();
1645
 
#endif
1646
 
}