-
-
Notifications
You must be signed in to change notification settings - Fork 9
/
AQS.sma
11032 lines (9022 loc) · 309 KB
/
AQS.sma
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
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/*************************************************************************************
******* PRAGMA ***********************************************************************
*************************************************************************************/
///
/// WHETHER OR NOT TO FORCE ';' AFTER EACH LINE
///
#pragma semicolon 0 /// THE ORPHEU MODULE DOES NOT LIKE THIS TURNED ON
///
/// WHETHER OR NOT TO INCREASE THE MEMORY FOR THIS SCRIPT [[[ DEFAULT 2^22 ( 4194304 ) ]]]
///
#pragma dynamic 4194304 /// B [[[ INCREASE THIS IF YOU ARE GETTING JUNKY ERROR LOGS ]]]
///
/// WHETHER OR NOT TO USE THE '\' AS A CONTROL CHARACTER
///
/// INSTEAD OF THE DEFAULT ONE, WHICH IS '^'
///
#pragma ctrlchar '\'
///
/// SETS THE TAB SIZE ( '\t' AND ' ' ) TO 0
///
/// GLOBALLY
///
#pragma tabsize 0
///
/// REQUIRES THE XSTATS MODULE IF AVAILABLE [ client_death ( ... ) FORWARD EXECUTION ]
///
#pragma reqclass xstats
///
/// XSTATS DEFAULTS [ FOUR MODS SUPPORTED BY NOW ]
///
#pragma defclasslib xstats csx
#pragma defclasslib xstats dodx
#pragma defclasslib xstats tfcx
#pragma defclasslib xstats tsx
/*************************************************************************************
******* INCLUDE **********************************************************************
*************************************************************************************/
///
/// AMX MOD X HEADER FILE
///
#include < amxmodx > /// plugin_init ( ) +
///
/// AMX MOD X CUSTOM HEADER FILE
///
#include < amxmisc > /// get_configsdir ( ) +
///
/// SQL HEADER FILE
///
#include < sqlx > /// SQL_ThreadQuery ( ) +
///
/// FAKE META HEADER FILE
///
#include < fakemeta > /// FM_MessageBegin +
///
/// HAM SANDWICH HEADER FILE [[[ FOR GAMES WITHOUT THE "client_death ( )" FORWARD ( XSTATS MODULE ) AND WITHOUT "DeathMsg" ]]]
///
#include < hamsandwich > /// Ham_Killed +
///
/// REAPI HEADER FILE ( OPTIONAL )
///
#tryinclude < reapi > /// m_flRestartRoundTime +
///
/// ORPHEU HEADER FILE ( OPTIONAL )
///
#tryinclude < orpheu > /// OrpheuRegisterHook ( ) +
///
/// ORPHEU MEMORY HEADER FILE ( OPTIONAL )
///
#tryinclude < orpheu_memory > /// OrpheuMemorySetAtAddress ( ) +
/*************************************************************************************
******* NATIVE ***********************************************************************
*************************************************************************************/
///
/// OLDER AMXX EDITIONS DON'T HAVE THIS [[[ 'SQL_SetCharset ( )' ]]]
///
#if !defined SQL_SetCharset
native bool: SQL_SetCharset(Handle: pSqlDbOrSqlTuple, szCharSet[]);
#endif
static bool: g_bSQL_SetCharset_Unavail = false;
///
/// OLDER AMXX EDITIONS DON'T HAVE THIS [[[ 'get_gamerules_float ( )' ]]]
///
#if !defined get_gamerules_float
native Float: get_gamerules_float(szClass[], szMember[], nIndex);
#endif
static bool: g_bGET_GameRules_Float_Unavail = false;
///
/// OLDER AMXX EDITIONS DON'T HAVE THIS [[[ 'set_gamerules_float ( )' ]]]
///
#if !defined set_gamerules_float
native set_gamerules_float(szClass[], szMember[], Float: fValue, nIndex);
#endif
static bool: g_bSET_GameRules_Float_Unavail = false;
///
/// OLDER AMXX EDITIONS DON'T HAVE THIS [[[ 'get_gamerules_size ( )' ]]]
///
#if !defined get_gamerules_size
native get_gamerules_size(szClass[], szMember[]);
#endif
static bool: g_bGET_GameRules_Size_Unavail = false;
///
/// OLDER AMXX EDITIONS DON'T HAVE THIS [[[ 'strtok2 ( )' ]]]
///
#if !defined strtok2
#define strtok2(%0,%1,%2,%3,%4,%5,%6) strtok(%0, %1, %2, %3, %4, %5, 0 /** AUTO TRIMMING IS BUGGY IN 'strtok ( )' */)
#endif
///
/// OLDER AMXX EDITIONS DON'T HAVE THIS [[[ 'ByteCountToCells ( )' ]]]
///
#if !defined ByteCountToCells
#define ByteCountToCells(%0) abs(%0) /** 'abs ( )' SHOULD WORK JUST FINE */
#endif
///
/// OLDER AMXX EDITIONS DON'T HAVE THIS [[[ 'Invalid_Array' ]]]
///
#if !defined Array
#if !defined Invalid_Array
enum Array
{
Invalid_Array = 0,
};
#endif
#endif
/*************************************************************************************
******* DEFINE ***********************************************************************
*************************************************************************************/
///
/// THE PLUGIN'S VERSION
///
#define QS_PLUGIN_VERSION ( "8.0" ) /// "8.0"
///
/// ###################################################################################################
///
///
/// INCLUDE THE AQS VERSION CONSOLE VARIABLE INTO THE GAME LOGGING SYSTEM
///
#define QS_INCLUDE_VERSION_CVAR_IN_LOGS 0 /// 0
///
/// ###################################################################################################
///
///
/// THE CONFIG FILE NAME
///
#define QS_CFG_FILE_NAME ( "AQS.ini" ) /// "AQS.ini"
///
/// THE LOG FILE NAME
///
#define QS_LOG_FILE_NAME ( "AQS.log" ) /// "AQS.log"
///
/// ###################################################################################################
///
///
/// ON BY DEFAULT TO PLAYERS WHEN THEY JOIN THE GAME SERVER
///
#define QS_ON_BY_DEFAULT ( 1 ) /// 1
///
/// ###################################################################################################
///
///
/// CSTRIKE AND CZERO 'NO' TEAM NUMBER ( UNASSIGNED )
///
#define QS_CSCZ_TEAM_NO ( 0 ) /// 0
///
/// CSTRIKE AND CZERO 'TE' TEAM NUMBER ( TERRORIST )
///
#define QS_CSCZ_TEAM_TE ( 1 ) /// 1
///
/// CSTRIKE AND CZERO 'CT' TEAM NUMBER ( COUNTER-TERRORIST )
///
#define QS_CSCZ_TEAM_CT ( 2 ) /// 2
///
/// CSTRIKE AND CZERO 'SP' TEAM NUMBER ( SPECTATOR )
///
#define QS_CSCZ_TEAM_SP ( 3 ) /// 3
///
/// ###################################################################################################
///
///
/// TEAM KILL
///
#define QS_TEAM_KILL_YES ( 1 ) /// 1
///
/// NO TEAM KILL
///
#define QS_TEAM_KILL_NO ( 0 ) /// 0
///
/// ###################################################################################################
///
///
/// EXECUTE THE TASK ON THE NEXT FRAME ( AS SOON AS POSSIBLE )
///
#define QS_TASK_DELAY_NEXT_FRAME ( 0.000000 ) /// 0
///
/// ###################################################################################################
///
///
/// THE SIZE OF AN ARRAY OF PLAYERS
///
#define QS_PLAYERS_ARRAY_SIZE ( 1 + QS_MAX_PLAYERS ) /// 1 + QS_MAX_PLAYERS [ 33 ]
///
/// ###################################################################################################
///
///
/// SECONDS DELAY BETWEEN DISPLAYING MULTIPLE PLAYER EVENTS ( SOUNDS & MESSAGES )
///
/// VERSION 7.5 & - ⤵
///
/// THIS VALUE WAS 0.000000
///
#define QS_DISPLAY_PLAYER_EVENT_DELAY ( 0.412345 ) /// .412345
///
/// ###################################################################################################
///
///
/// CS/ CZ ROUND END EXTENSION STEP
///
/// WHEN THE ROUND ENDS, DEPENDING ON HOW MANY SOUNDS/ MESSAGES ARE STILL LEFT TO BE PLAYED/ DISPLAYED, EXTENDS A BIT THE ROUND END PERIOD [ SECOND(S) ]
///
#define QS_ROUND_END_EXTENSION_STEP ( 0.050025 ) /// .050025
///
/// ###################################################################################################
///
///
/// SECONDS DELAY TO SHOW THE INFORMATION MESSAGE REGARDING '/SOUNDS' COMMAND
///
/// AFTER THE PLAYER JOINS THE GAME SERVER
///
#define QS_PLUGIN_INFO_DELAY ( 6.000000 ) /// 6
///
/// ###################################################################################################
///
///
/// THE HATTRICK FEATURE :: ROUND END PERIOD SECONDS EXTENSION
///
#define QS_HATTRICK_ROUND_END_PERIOD_EX ( 1.000000 ) /// 1
///
/// THE FLAWLESS VICTORY FEATURE :: ROUND END PERIOD SECONDS EXTENSION
///
#define QS_FLAWLESS_ROUND_END_PERIOD_EX ( 1.000000 ) /// 1
///
/// ###################################################################################################
///
///
/// THE HATTRICK FEATURE :: ROUND END TRIGGER DELAY /// # CS/ CZ # ///
///
#define QS_HATTRICK_ROUND_END_DELAY ( 2.800000 ) /// 2.8 [[[ CS/ CZ ]]]
///
/// THE HATTRICK FEATURE :: ROUND END TRIGGER DELAY /// # DAY OF DEFEAT # ///
///
#define QS_HATTRICK_ROUND_END_DELAY_DOD ( 0.000001 ) /// .000001 [[[ DAY OF DEFEAT ]]]
///
/// ###################################################################################################
///
///
/// THE FLAWLESS VICTORY FEATURE :: ROUND END TRIGGER DELAY
///
#define QS_FLAWLESS_ROUND_END_DELAY ( 1.200000 ) /// 1.2
///
/// ###################################################################################################
///
///
/// THE FLAWLESS VICTORY FEATURE :: MINIMUM TOTAL PLAYERS IN A TEAM IN ORDER TO ALLOW THE FLAWLESS VICTORY FEATURE TO BE TRIGGERED FOR THAT TEAM
///
#define QS_FLAWLESS_MIN_PLAYERS_IN_TEAM ( 2 ) /// 2
///
/// ###################################################################################################
///
///
/// KNIFE MAXIMUM DISTANCE IN UNITS BETWEEN THE TWO PLAYERS IN ORDER TO TRIGGER THE "KNIFE KILL" EVENT
///
#define QS_KNIFE_MAX_DISTANCE_UNITS ( 256 ) /// 256
///
/// ###################################################################################################
///
///
/// THE LAST MAN STANDING FEATURE :: TRIGGER DELAY
///
#define QS_STANDING_TRIGGER_DELAY ( 1.000000 ) /// 1
///
/// ###################################################################################################
///
///
/// THE DOUBLE KILL FEATURE :: TRIGGER TIME FRAME
///
/// THE KILLER MUST KILL TWO VICTIMS WITHIN THIS TIME FRAME TO TRIGGER THE DOUBLE KILL EVENT
///
#define QS_DOUBLE_KILL_DELAY ( 0.100000 ) /// .1
///
/// ###################################################################################################
///
///
/// THE ROUND START FEATURE :: DAY OF DEFEAT MINIMUM DELAY SECONDS
///
#define QS_ROUND_START_MIN_DOD_DELAY ( 1.300000 ) /// 1.3
///
/// ###################################################################################################
///
///
/// IF THE STEAM SERVERS ARE DOWN OR IF THE MYSQL SERVER IS DOWN
///
/// WAIT A FEW SECONDS BEFORE PERFORMING VALIDITY CHECKS AGAIN
///
#define QS_CONNECTION_DELAY ( 2.000000 ) /// 2
///
/// ###################################################################################################
///
///
/// INVALID REQUIRED KILLS [[[ A TRULY HUGE NUMBER ]]]
///
#define QS_INVALID_REQ_KILLS ( 0x0FFFFFFF ) /// 268435455 [[[ 0x0FFFFFFF ]]]
///
/// INVALID TEAM ID
///
#define QS_INVALID_TEAM ( 0x000000FF ) /// 255 [[[ 0x000000FF ]]]
///
/// INVALID ENTITY ID
///
#define QS_INVALID_ENTITY ( -1 ) /// -1
///
/// INVALID PLAYER ID
///
#define QS_INVALID_PLAYER ( 0 ) /// 0
///
/// INVALID PLAYER USER ID
///
#define QS_INVALID_USER_ID ( -1 ) /// -1
///
/// INVALID CONSOLE VARIABLE INDEX
///
#define QS_INVALID_CON_VAR ( 0 ) /// 0
///
/// INVALID USER MESSAGE ID
///
#define QS_INVALID_MSG ( 0 ) /// 0
///
/// INVALID WEAPON ID
///
#define QS_INVALID_WEAPON ( 0 ) /// 0
///
/// INVALID HIT PLACE ID
///
#define QS_INVALID_PLACE ( 0 ) /// 0
///
/// INVALID HUD MSG SYNC OBJECT
///
#define QS_INVALID_HUD_MSG_SYNC_OBJECT ( -1 ) /// -1
///
/// ###################################################################################################
///
///
/// MINIMUM PLAYER USER ID
///
#define QS_MIN_USER_ID ( 0 ) /// 0
///
/// MINIMUM PLAYER ID
///
#define QS_MIN_PLAYER ( 1 ) /// 1
///
/// MINIMUM ENTITY ID
///
#define QS_MIN_ENTITY_ID ( 0 ) /// 0
///
/// ###################################################################################################
///
///
/// MAXIMUM PLAYERS THE GAME SERVER CAN HANDLE
///
#define QS_MAX_PLAYERS ( 32 ) /// 32
///
/// ###################################################################################################
///
///
/// MAXIMUM NUMBER STRING LENGTH
///
#define QS_NUMBER_MAX_LEN ( 16 ) /// 16
///
/// MAXIMUM CHAT COMMAND LENGTH
///
#define QS_COMMAND_MAX_LEN ( 24 ) /// 24
///
/// MAXIMUM PLAYER NAME LENGTH
///
#define QS_NAME_MAX_LEN ( 32 ) /// 32
///
/// MAXIMUM PLAYER STEAM LENGTH
///
#define QS_STEAM_MAX_LEN ( 32 ) /// 32
///
/// MAXIMUM TEAM NAME LENGTH
///
#define QS_TEAM_MAX_LEN ( 48 ) /// 48
///
/// GAME MOD NAME MAXIMUM LENGTH
///
#define QS_MOD_MAX_LEN ( 64 ) /// 64
///
/// WORD MAXIMUM LENGTH [ "GUY", "MAN STANDING", "ONE", "COUNTER-TERRORIST", ... ]
///
#define QS_WORD_MAX_LEN ( 64 ) /// 64
///
/// CHAT PHRASE MAXIMUM LENGTH
///
#define QS_CHAT_PHRASE_MAX_LEN ( 128 ) /// 128
///
/// MAXIMUM SQL QUERY STRING LENGTH
///
#define QS_SQL_QUERY_MAX_LEN ( 128 ) /// 128
///
/// SOUND FILE PATH MAXIMUM LENGTH
///
#define QS_SND_MAX_LEN ( 256 ) /// 256
///
/// GAME MESSAGE MAXIMUM LENGTH ( `write_string ( )` )
///
#define QS_GAME_MESSAGE_MAX_LEN ( 256 ) /// 256
///
/// HUD MESSAGE'S MAXIMUM LENGTH
///
#define QS_HUD_MSG_MAX_LEN ( 384 ) /// 384
///
/// ###################################################################################################
///
///
/// EVERYONE ( ALL PLAYERS )
///
#define QS_EVERYONE ( QS_INVALID_PLAYER ) /// QS_INVALID_PLAYER [ 0 ]
///
/// ###################################################################################################
///
///
/// THE WORLDSPAWN
///
#define QS_WORLDSPAWN ( QS_MIN_ENTITY_ID ) /// QS_MIN_ENTITY_ID [ 0 ]
///
/// ###################################################################################################
///
///
/// THE WORLDSPAWN'S NAME
///
#define QS_WORLDSPAWN_NAME ( "WORLDSPAWN" ) /// "WORLDSPAWN"
///
/// ###################################################################################################
///
///
/// THE DEFAULT WORD FOR THE 'THE LAST MAN STANDING' EVENT
///
#define QS_TLMSTANDING_WORD ( "MAN STANDING" ) /// "MAN STANDING"
///
/// ###################################################################################################
///
///
/// THE DEFAULT WORD FOR THE 'GRENADE' WEAPON
///
#define QS_DEF_GRENADE_NAME ( "NADE" ) /// "NADE"
///
/// THE DEFAULT WORD FOR THE 'KNIFE' WEAPON
///
#define QS_DEF_KNIFE_NAME ( "KNIF" ) /// "KNIF"
///
/// ###################################################################################################
///
///
/// THE DEFAULT CHAT COMMAND #0 ( CAN STILL BE EDITED INTO THE INI FILE )
///
#define QS_DEF_CHAT_CMD_0 ( "!sounds" ) /// "!sounds"
///
/// THE DEFAULT CHAT COMMAND #1 ( CAN STILL BE EDITED INTO THE INI FILE )
///
#define QS_DEF_CHAT_CMD_1 ( ".sounds" ) /// ".sounds"
///
/// THE DEFAULT CHAT COMMAND #2 ( CAN STILL BE EDITED INTO THE INI FILE )
///
#define QS_DEF_CHAT_CMD_2 ( "/sounds" ) /// "/sounds"
///
/// THE DEFAULT CHAT COMMAND #3 ( CAN STILL BE EDITED INTO THE INI FILE )
///
#define QS_DEF_CHAT_CMD_3 ( ",sounds" ) /// ",sounds"
///
/// ###################################################################################################
///
///
/// NEGATIVE BYTE ( FOR A RANDOM HUD MESSAGE COLOR OR MAYBE NOT USING A CUSTOM HUD MESSAGE COLOR FOR THIS EVENT )
///
#define QS_NEGATIVE_BYTE ( -1 ) /// -1
///
/// ###################################################################################################
///
///
/// MINIMUM UNSIGNED BYTE
///
#define QS_MIN_BYTE ( 0x00000000 ) /// 0 [[[ 0x00000000 ]]]
///
/// MEDIUM UNSIGNED BYTE
///
#define QS_MEDIUM_BYTE ( 0x0000007F ) /// 127 [[[ 0x0000007F ]]]
///
/// BIG UNSIGNED BYTE
///
#define QS_BIG_BYTE ( 0x000000BF ) /// 191 [[[ 0x000000BF ]]]
///
/// MAXIMUM UNSIGNED BYTE
///
#define QS_MAX_BYTE ( 0x000000FF ) /// 255 [[[ 0x000000FF ]]]
///
/// ###################################################################################################
///
///
/// CENTERED HUD MESSAGE'S "X" POSITION
///
#define QS_HUD_MSG_X_POS ( -1.000000 ) /// -1
///
/// ###################################################################################################
///
///
/// HUD MESSAGE'S HOLD TIME ( SECONDS TO BE DISPLAYED )
///
#define QS_HUD_MSG_HOLD_TIME ( 5.000000 ) /// 5
///
/// ###################################################################################################
///
///
/// HUD MESSAGE'S EFFECTS
///
#define QS_HUD_MSG_EFFECTS ( 0 ) /// 0
///
/// ###################################################################################################
///
///
/// HUD MESSAGE'S EFFECTS TIME
///
#define QS_HUD_MSG_EFFECTS_TIME ( 0.000001 ) /// .000001
///
/// ###################################################################################################
///
///
/// HUD MESSAGE'S FADE IN TIME
///
#define QS_HUD_MSG_FADE_IN_TIME ( 0.000001 ) /// .000001
///
/// ###################################################################################################
///
///
/// HUD MESSAGE'S FADE OUT TIME
///
#define QS_HUD_MSG_FADE_OUT_TIME ( 0.000001 ) /// .000001
///
/// ###################################################################################################
///
///
/// HUD MESSAGE'S ALPHA AMOUNT ( 255 = MAX & 0 = MIN )
///
#define QS_HUD_MSG_ALPHA_AMOUNT ( 255 ) /// 255
///
/// ###################################################################################################
///
///
/// [ MONSTER KILL, MULTI KILL, UNSTOPPABLE, .. ] HUD MESSAGE'S "Y" ( VERTICAL ) POSITION
///
#define QS_STREAK_Y_POS ( 0.180000 ) /// .18
///
/// [ MONSTER KILL, MULTI KILL, UNSTOPPABLE, .. ] HUD MESSAGE'S "Y" ( VERTICAL ) POSITION <<<--- DAY OF DEFEAT --->>>
///
#define QS_STREAK_Y_POS_DOD ( 0.160000 ) /// .16
/// @@@@
/// ### "imessage.amxx" ( 0.200000 ) /// .2
/// @@@@
///
/// [ SUICIDE, KNIFE, GRENADE, .. ] HUD MESSAGE'S "Y" ( VERTICAL ) POSITION
///
#define QS_EVENT_Y_POS ( 0.220000 ) /// .22
///
/// [ SUICIDE, KNIFE, GRENADE, .. ] HUD MESSAGE'S "Y" ( VERTICAL ) POSITION <<<--- DAY OF DEFEAT --->>>
///
#define QS_EVENT_Y_POS_DOD ( 0.240000 ) /// .24
///
/// [ REVENGE ] HUD MESSAGE'S "Y" ( VERTICAL ) POSITION
///
#define QS_REVENGE_Y_POS ( 0.240000 ) /// .24
///
/// [ REVENGE ] HUD MESSAGE'S "Y" ( VERTICAL ) POSITION <<<--- DAY OF DEFEAT --->>>
///
#define QS_REVENGE_Y_POS_DOD ( 0.280000 ) /// .28
///
/// [ THE LAST MAN STANDING ] CSTRIKE AND CZERO HUD MESSAGE'S "Y" ( VERTICAL ) POSITION
///
#define QS_STANDING_Y_POS ( 0.260000 ) /// .26
///
/// [ FLAWLESS VICTORY EVENT ] HUD MESSAGE'S "Y" ( VERTICAL ) POSITION
///
#define QS_FLAWLESS_Y_POS ( 0.280000 ) /// .28
///
/// [ HATTRICK ( THE LEADER OF THE ROUND ) ] HUD MESSAGE'S "Y" ( VERTICAL ) POSITION
///
#define QS_HATTRICK_Y_POS ( 0.300000 ) /// .3
///
/// [ HATTRICK ( THE LEADER OF THE ROUND ) ] HUD MESSAGE'S "Y" ( VERTICAL ) POSITION <<<--- DAY OF DEFEAT --->>>
///
#define QS_HATTRICK_Y_POS_DOD ( 0.320000 ) /// .32
///
/// [ PREPARE TO FIGHT, .. ] HUD MESSAGE'S "Y" ( VERTICAL ) POSITION
///
#define QS_ROUND_Y_POS ( 0.320000 ) /// .32
///
/// [ PREPARE TO FIGHT, .. ] HUD MESSAGE'S "Y" ( VERTICAL ) POSITION <<<--- DAY OF DEFEAT --->>>
///
#define QS_ROUND_Y_POS_DOD ( 0.320000 ) /// .32
///
/// ###################################################################################################
///
#if !defined client_disconnected
#define QS_ON_PLAYER_DISCONNECTED client_disconnect(nPlayer) /** OLD AMX MOD X */
#define QS_ON_PLAYER_DISCONNECTED_OLD /** OLD AMX MOD X */
#else /// !defined client_disconnected
#define QS_ON_PLAYER_DISCONNECTED client_disconnected(nPlayer, bool: bDrop, szMsg[], nMsgMaxLen) /** NEW AMX MOD X */
#define QS_ON_PLAYER_DISCONNECTED_NEW /** NEW AMX MOD X */
#endif
///
/// ###################################################################################################
///
///
/// DEATHMSG USER MESSAGE'S 'BYTE' STATUSES
///
enum /** DEATHMSG USER MESSAGE'S 'BYTE' STATUS */
{
QS_DEATHMSG_NONE = 0, QS_DEATHMSG_KILLER = 1, QS_DEATHMSG_VICTIM = 2, QS_DEATHMSG_MAX = 3,
};
///
/// ###################################################################################################
///
///
/// HUD MESSAGE PURPOSES
///
enum /** HUD MESSAGE PURPOSE */
{
QS_HUD_STREAK = 0, QS_HUD_EVENT = 1, QS_HUD_REVENGE = 2, QS_HUD_STANDING = 3, QS_HUD_FLAWLESS = 4, QS_HUD_HATTRICK = 5, QS_HUD_ROUND = 6, QS_HUD_MAX = 7,
};
///
/// ###################################################################################################
///
///
/// CUSTOM COLORED CHAT SAY TEXT COLORS
///
enum /** CUSTOM COLORED CHAT SAY TEXT COLOR */
{
QS_CC_ST_X03_MIN = 33, QS_CC_ST_X03_GREY = QS_CC_ST_X03_MIN, QS_CC_ST_X03_RED = 34, QS_CC_ST_X03_BLUE = 35, QS_CC_ST_X03_MAX = QS_CC_ST_X03_BLUE,
};
///
/// ###################################################################################################
///
///
/// THE TEAM RETRIEVAL METHOD(S)
///
enum /** THE TEAM RETRIEVAL METHOD */
{
QS_TEAM_RETRIEVAL_AMX_MOD_X = 0, QS_TEAM_RETRIEVAL_DEFAULT = QS_TEAM_RETRIEVAL_AMX_MOD_X, QS_TEAM_RETRIEVAL_FAKE_META = 1, QS_TEAM_RETRIEVAL_PRIVATE_DATA = 2,
QS_TEAM_RETRIEVAL_LAST_ENTRY = QS_TEAM_RETRIEVAL_PRIVATE_DATA,
};
/*************************************************************************************
******* GLOBAL VARIABLES *************************************************************
*************************************************************************************/
///
/// THE PLUGIN ON/ OFF
///
static bool: g_bEnabled = false;
///
/// CHAT '/SOUNDS' COMMAND ON/ OFF
///
static bool: g_bChatCmd = false;
///
/// THE CHAT COMMANDS
///
static Array: g_pChatCmds = Invalid_Array;
///
/// THE CHAT COMMAND(S) AVAILABLE
///
static g_nChatCmds = 0;
///
/// '/SOUNDS' CHAT INFO AFTER THE PLAYER JOINS THE GAME SERVER ON/ OFF
///
static bool: g_bChatInfo = false;
///
/// '/SOUNDS' CHAT INFO SECONDS DELAY
///
static Float: g_fChatInfoDelaySeconds = QS_PLUGIN_INFO_DELAY;
///
/// WHEN TRUE, DO NOT SHOW THE CHAT '/SOUNDS' INFORMATION ANYMORE IF IT HAS ALREADY BEEN SHOWN TO THAT STEAM
///
static bool: g_bSkipExisting = false;
///
/// WHEN TRUE, DO NOT SHOW THAT THE USER HAS TYPED '/sounds' INTO THE CHAT AREA
///
static bool: g_bHideCmd = false;
#if defined amxclient_cmd && defined RegisterHamPlayer
///
/// NOTHING TO DO ON THE NEWER AMXX EDITIONS
///
#else /// defined amxclient_cmd && defined RegisterHamPlayer
///
/// WHETHER OR NOT THE HAMSANDWICH FORWARDS ARE REGISTERED FOR THE BOTS ( FAKE PLAYERS ) IN OLDER AMXX EDITIONS
///
static bool: g_bAreTheFakePlayersRegistered = false;
///
/// "bot_quota" CONVAR INDEX
///
static g_nQuotaConVar = QS_INVALID_CON_VAR;
#endif
///
/// SECONDS DELAY BETWEEN DISPLAYING MULTIPLE PLAYER EVENTS ( SOUNDS & MESSAGES )
///
static Float: g_fSecDelayDisplayPlayerEvents = QS_DISPLAY_PLAYER_EVENT_DELAY;
///
/// CS/ CZ ROUND END EXTENSION STEP
///
static Float: g_fRoundEndExtensionStep = QS_ROUND_END_EXTENSION_STEP;
///
/// THE TEAM RETRIEVAL METHOD
///
static g_nTeamRetrieval = QS_TEAM_RETRIEVAL_DEFAULT;
///
/// THE CUSTOM TEAM MEMBER OFFSET
///
static g_nTeamMemberOffs = 0;
///
/// THE CUSTOM TEAM MEMBER OFFSET LINUX DIFFERENCE
///
static g_nTeamMemberOffsLinuxDiff = 0;
///
/// AMX MOD X GAME DATA OUTDATED YES/ NO
///
static bool: g_bGameDataError = false;
#if defined _orpheu_included
///
/// ORPHEU UNAVAILABLE YES/ NO
///
static bool: g_bOrpheuUnavailable = false;
///
/// ORPHEU ERROR YES/ NO
///
static bool: g_bOrpheuError = false;
#endif
#if defined _reapi_included
///
/// REAPI UNAVAILABLE YES/ NO
///
static bool: g_bReAPIUnavailable = false;
///
/// REAPI ERROR YES/ NO
///
static bool: g_bReAPIError = false;
#endif
/**
* HEAD SHOT
*/
///
/// HEAD SHOT ON/ OFF
///
static bool: g_bHShot = false;
///
/// HEAD SHOT IF TEAM KILL
///
static bool: g_bHShotIfTeamKill = false;
///
/// HEAD SHOT MESSAGE ON/ OFF
///
static bool: g_bHShotMsg = false;
///
/// HEAD SHOT MESSAGE
///
static g_szHShotMsg[QS_HUD_MSG_MAX_LEN] = { EOS, ... };
///