-
Notifications
You must be signed in to change notification settings - Fork 0
/
admin_commands.sma
1518 lines (1248 loc) · 55.6 KB
/
admin_commands.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
/* ===========================================================================
----------------------
-*- Admin Commands -*-
----------------------
(c) 2018 - Taurus
Website: https://genjero.com
=========================================================================== */
// Includes
#include < amxmodx >
#include < amxmisc >
#include < cstrike >
#include < fakemeta >
#include < fun >
#include < hamsandwich >
// Semicolon coding style
#pragma semicolon 1;
// Turns stuff into bitsums
#define turn_into_bit(%1) ( 1 << ( %1 ) )
// Bitsums!
#define bit_set(%1,%2) ( %1 |= turn_into_bit( %2 - 1 ) )
#define bit_del(%1,%2) ( %1 &= ~ turn_into_bit( %2 - 1 ) )
#define bit_get(%1,%2) ( %1 & turn_into_bit( %2 - 1 ) )
// Checks whether a player is valid or not
#define is_user_valid(%1) ( 1 <= %1 <= MaxClients )
#define is_user_valid_connected(%1) ( is_user_valid( %1 ) && bit_get( g_bIsConnected, %1 ) )
#define is_user_valid_alive(%1) ( is_user_valid( %1 ) && bit_get( g_bIsAlive, %1 ) )
// Version details is in the plugin_init( ) comment block before plugin registration
#define PLUGIN_VERSION "1.1.0"
// Prefix for the plugin
#define PLUGIN_PREFIX "^1[^4AC^1]"
// Authentication information - Function: GetAuthenticationInfo( )
enum AuthenticationInfo ( )
{
AuthenticationInfo_Name = 0, // Returns player's name
AuthenticationInfo_AuthID, // Returns player's auth ID (SteamID, ValveID)
AuthenticationInfo_IP // Returns player's IP
};
// Admin command target
enum AdminCommandTarget ( )
{
AdminCommandTarget_All = 0, // Targets all players for a certain command
AdminCommandTarget_Terrorist, // Targets terrorists for a certain command
AdminCommandTarget_CT // Targets counter-terrorists for a certain command
};
// Admin command target skip
enum AdminCommandTargetSkip ( )
{
AdminCommandTargetSkip_None = 0, // Skips no one
AdminCommandTargetSkip_Bots, // Skips bots
AdminCommandTargetSkip_Dead, // Skips dead players
AdminCommandTargetSkip_Alive // Skips alive players
};
// Admin command target flag
enum AdminCommandTargetFlag ( <<= 1 )
{
AdminCommandTargetFlag_None = 0, // Does not prevent using a command on a player unless player is not present
AdminCommandTargetFlag_Immunity = 1, // Prevent using command on players with immunity
AdminCommandTargetFlag_Alive, // Prevent using command on alive players
AdminCommandTargetFlag_Bots // Prevent using command on bots
};
// Integers
new g_iShowActivity;
new g_iLog;
new g_iRespawnAlive;
// Bitsums
new g_bIsConnected;
new g_bIsAlive;
new g_bHasInfiniteNoclip;
new g_bHasInfiniteGodmode;
// Plugin starts!
public plugin_init( )
{
/* ===========================================================================
---------------------------
-*- Version Information -*-
---------------------------
Version string is divided into three parts:
A- Major version number -> Major changes, new functions and updates
B- Minor version number -> Better codes, major optimisations
C- Beta version number -> Brief updates and bug fixes
- If major version number changes, both minor and beta reset to 0
- If minor version number changes, only beta resets to 0
- If beta version number changes, nothing resets
This plugin supports only AMX Mod X 1.8.3, so compiling this plugin
with AMX Mod X 1.8.2 compiler will throw serious errors, and I will
not support it!
-----------------
-*- Changelog -*-
-----------------
v1.0.0 - First release - 29-05-2018 / Tuesday (In Development)
- Created the basic structure of the plugin
- Added the command "ac_health"
v1.0.1 - Beta release - 29-05-2018 / Tuesday (In Development)
- Added the command "ac_armour" for admins with ADMIN_LEVEL_A access
- Added the command "ac_noclip" for admins with ADMIN_LEVEL_A access
- Added the command "ac_godmode" for admins with ADMIN_LEVEL_A access
v1.0.2 - Beta release - 03-06-2018 / Sunday (In Development)
- Added the command "ac_money" for admins with ADMIN_LEVEL_A access
- Updated syntax text for "ac_noclip" and "ac_godmode" commands
- Updated "amx_show_activity" cvar retrieving method
v1.0.3 - Beta release - 07-06-2018 / Thursday (In Development)
- Updated noclip command to be set until disabled
- Updated godmode command to be set until disabled
v1.0.4 - Beta release - 08-06-2018 / Friday (In Development)
- Added the command "ac_revive" for admins with ADMIN_LEVEL_A access
- Added the command "ac_transfer" for admins with ADMIN_LEVEL_A access
- Fixed bug with infinite noclip not set immediately
- Fixed bug with infinite godmode not set immediately
- Updated 'GetTeamTarget( )' to also skip alive players
v1.0.5 - Beta release - 19-06-2018 / Tuesday (In Development)
- Added AMX Mod X 1.8.3 support, now the plugin won't support 1.8.2
v1.0.6 - Beta release - 20-06-2018 / Wednesday (In Development)
- Stablised plugin, it will not cause problems with your server
- Fixed typos in the chat messages
v1.0.7 - Beta release - 22-06-2018 / Friday (In Development)
- Added support for the old folks "amx_" prefix for the commands
- Updated show activity code, now it uses "bind_pcvar_num( )" instead
v1.1.0 - Beta release - 23-06-2018 / Saturday (In Development)
- Added the 'GetCommandTarget( )' function to retrieve target player ID
- Added the 'SeekImmunitySkip( )' function for custom immunity skip
- Added a cvar to check whether should the plugin log commands or not
- Added a cvar to check whether should the plugin respawn alive or not
- Added a feature for noclip so players press SHIFT to gain speed
- Updated plugin functionality and checks in loops
=========================================================================== */
/* ===========================================================================
-----------------
-*- Todo List -*-
-----------------
Todos are marked with 4 different characters with different meaning,
on every new version, this todo list is removed and probably added to
the next version changelog, new entries here are based on testing the
plugin in a test server or suggestions from beta testers
[ - ] -> Not implemented (Pending)
[ + ] -> Implemented, completely done and tested
[ * ] -> Implemented, completely done but not tested
[ x ] -> Cancelled
Date: 29-05-2018 - Day: Tuesday
[ + ] Add the command "ac_armour" - ADMIN_LEVEL_A (v1.0.1)
[ + ] Add the command "ac_noclip" - ADMIN_LEVEL_A (v1.0.1)
[ + ] Add the command "ac_godmode" - ADMIN_LEVEL_A (v1.0.1)
[ + ] Add the command "ac_money" - ADMIN_LEVEL_A (v1.0.2)
Date: 07-06-2018 - Day: Thursday
[ + ] Update noclip command to be set until disabled (v1.0.3)
[ + ] Update godmode command to be set until disabled (v1.0.3)
[ + ] Add the command "ac_revive" - ADMIN_LEVEL_A (v1.0.4)
[ + ] Add the command "ac_transfer" - ADMIN_LEVEL_A (v1.0.4)
[ x ] Add the command "ac_spectate" - ADMIN_LEVEL_A
Date: 08-06-2018 - Day: Friday
[ + ] Fix bug with infinite noclip not set immediately (v1.0.4)
[ + ] Fix bug with infinite godmode not set immediately (v1.0.4)
Date: 14-06-2018 - Day: Thursday
[ - ] Add the command "ac_swap" - ADMIN_LEVEL_A
[ - ] Add the command "ac_teamswap" - ADMIN_LEVEL_A
[ - ] Add the command "ac_glow" - ADMIN_LEVEL_A
[ - ] Add the command "ac_slay" - ADMIN_LEVEL_B
[ - ] Add the command "ac_autoslay" - ADMIN_LEVEL_B
[ - ] Add the command "ac_exec" - ADMIN_LEVEL_B
[ - ] Add the command "ac_restart" - ADMIN_LEVEL_B
=========================================================================== */
// Register our plugin
register_plugin( "Admin Commands", PLUGIN_VERSION, "Taurus" );
// Make servers using this plugin easier to find
register_cvar( "ac_version", PLUGIN_VERSION, FCVAR_SERVER | FCVAR_SPONLY );
set_cvar_string( "ac_version", PLUGIN_VERSION );
// Register dictionary
register_dictionary_color( "admin_commands.txt" );
// Plugin cvars :D
bind_pcvar_num( register_cvar( "ac_log", "1" ), g_iLog );
bind_pcvar_num( register_cvar( "ac_respawn_alive", "1" ), g_iRespawnAlive );
// Console commands
register_concmd( "ac_health", "ConCmd_Health", ADMIN_LEVEL_A, "<nick | #user_id | auth_id | @team> <#HP>" );
register_concmd( "ac_armour", "ConCmd_Armour", ADMIN_LEVEL_A, "<nick | #user_id | auth_id | @team> <#AP>" );
register_concmd( "ac_money", "ConCmd_Money", ADMIN_LEVEL_A, "<nick | #user_id | auth_id | @team> <#Money>" );
register_concmd( "ac_noclip", "ConCmd_Noclip", ADMIN_LEVEL_A, "<nick | #user_id | auth_id | @team> <0 | 1 | 2>" );
register_concmd( "ac_godmode", "ConCmd_Godmode", ADMIN_LEVEL_A, "<nick | #user_id | auth_id | @team> <0 | 1 | 2>" );
register_concmd( "ac_revive", "ConCmd_Revive", ADMIN_LEVEL_A, "<nick | #user_id | auth_id | @team>" );
register_concmd( "ac_transfer", "ConCmd_Transfer", ADMIN_LEVEL_A, "<nick | #user_id | auth_id | @team> <T | CT | SPEC>" );
// Old folks support
register_concmd( "amx_health", "ConCmd_Health", ADMIN_LEVEL_A, "<nick | #user_id | auth_id | @team> <#HP>" );
register_concmd( "amx_armour", "ConCmd_Armour", ADMIN_LEVEL_A, "<nick | #user_id | auth_id | @team> <#AP>" );
register_concmd( "amx_money", "ConCmd_Money", ADMIN_LEVEL_A, "<nick | #user_id | auth_id | @team> <#Money>" );
register_concmd( "amx_noclip", "ConCmd_Noclip", ADMIN_LEVEL_A, "<nick | #user_id | auth_id | @team> <0 | 1 | 2>" );
register_concmd( "amx_godmode", "ConCmd_Godmode", ADMIN_LEVEL_A, "<nick | #user_id | auth_id | @team> <0 | 1 | 2>" );
register_concmd( "amx_revive", "ConCmd_Revive", ADMIN_LEVEL_A, "<nick | #user_id | auth_id | @team>" );
register_concmd( "amx_transfer", "ConCmd_Transfer", ADMIN_LEVEL_A, "<nick | #user_id | auth_id | @team> <T | CT | SPEC>" );
// Fakemeta forward
register_forward( FM_CmdStart, "fw_CmdStart" );
// Hamsandwich
RegisterHamPlayer( Ham_Spawn, "fw_Spawn_Post", true );
RegisterHamPlayer( Ham_Killed, "fw_Killed_Pre" );
}
public plugin_cfg( )
{
// Bind "amx_show_activity" value into g_iShowActivity
bind_pcvar_num( get_cvar_pointer( "amx_show_activity" ), g_iShowActivity );
}
public client_putinserver( id )
{
// Set bitsum
bit_set( g_bIsConnected, id );
// Clear bitsum
bit_del( g_bIsAlive, id );
bit_del( g_bHasInfiniteNoclip, id );
bit_del( g_bHasInfiniteGodmode, id );
}
public client_disconnected( id )
{
// Clear bitsum
bit_del( g_bIsConnected, id );
bit_del( g_bIsAlive, id );
bit_del( g_bHasInfiniteNoclip, id );
bit_del( g_bHasInfiniteGodmode, id );
}
public ConCmd_Health( id, iAccess, command_id )
{
// No access?
if( !cmd_access( id, iAccess, command_id, 3 ) )
return PLUGIN_HANDLED;
// Retrieve arguments
new szTarget[ 32 ], szHealth[ 8 ], temp_id, current_health;
read_argv( 1, szTarget, charsmax( szTarget ) );
read_argv( 2, szHealth, charsmax( szHealth ) );
// Regardless of the target, define new health
new new_health = str_to_num( szHealth );
// What's our argument
if( szTarget[ 0 ] == '@' )
{
// Declare and define some variables
new iPlayers[ MAX_PLAYERS ], iCount, AdminCommandTarget:iTargetTeam = GetTeamTarget( szTarget, iPlayers, iCount, AdminCommandTargetSkip_Dead );
// No players could be targeted
if( !iCount )
{
console_print( id, "%L", id, "CMD_ERROR_NO_PLAYERS" );
return PLUGIN_HANDLED;
}
// Do command on players
for( new iLoop = 0; iLoop < iCount; iLoop ++ )
{
// Save into a variable to prevent re-indexing
temp_id = iPlayers[ iLoop ];
// Player is not in-game?
if( !bit_get( g_bIsConnected, temp_id ) )
continue;
// Immunity skip check
if( SeekImmunitySkip( id, temp_id ) )
continue;
// Get current player's health
current_health = get_user_health( temp_id );
// Update player's health
set_user_health( temp_id, current_health + new_health );
}
switch( iTargetTeam )
{
// All?
case AdminCommandTarget_All:
{
// Notice message format
switch( g_iShowActivity )
{
case 1: client_print_color( 0, print_team_default, "%s %L", PLUGIN_PREFIX, LANG_SERVER, "CMD_HEALTH_ALL_NO_NAME", new_health );
case 2: client_print_color( 0, print_team_default, "%s %L", PLUGIN_PREFIX, LANG_SERVER, "CMD_HEALTH_ALL", GetAuthenticationInfo( id, AuthenticationInfo_Name ), new_health );
}
// Log administrative action
if( g_iLog )
Log( "ADMIN %s <%s><%s> - Gave %d HP to ALL (Players: %d)", GetAuthenticationInfo( id, AuthenticationInfo_Name ), GetAuthenticationInfo( id, AuthenticationInfo_AuthID ), GetAuthenticationInfo( id, AuthenticationInfo_IP ), new_health, iCount );
}
// Terrorists?
case AdminCommandTarget_Terrorist:
{
// Notice message format
switch( g_iShowActivity )
{
case 1: client_print_color( 0, print_team_red, "%s %L", PLUGIN_PREFIX, LANG_SERVER, "CMD_HEALTH_T_NO_NAME", new_health );
case 2: client_print_color( 0, print_team_red, "%s %L", PLUGIN_PREFIX, LANG_SERVER, "CMD_HEALTH_T", GetAuthenticationInfo( id, AuthenticationInfo_Name ), new_health );
}
// Log administrative action
if( g_iLog )
Log( "ADMIN %s <%s><%s> - Gave %d HP to TERRORISTS (Players: %d)", GetAuthenticationInfo( id, AuthenticationInfo_Name ), GetAuthenticationInfo( id, AuthenticationInfo_AuthID ), GetAuthenticationInfo( id, AuthenticationInfo_IP ), new_health, iCount );
}
// Counter-Terrorists?
case AdminCommandTarget_CT:
{
// Notice message format
switch( g_iShowActivity )
{
case 1: client_print_color( 0, print_team_blue, "%s %L", PLUGIN_PREFIX, LANG_SERVER, "CMD_HEALTH_CT_NO_NAME", new_health );
case 2: client_print_color( 0, print_team_blue, "%s %L", PLUGIN_PREFIX, LANG_SERVER, "CMD_HEALTH_CT", GetAuthenticationInfo( id, AuthenticationInfo_Name ), new_health );
}
// Log administrative action
if( g_iLog )
Log( "ADMIN %s <%s><%s> - Gave %d HP to COUNTER-TERRORISTS (Players: %d)", GetAuthenticationInfo( id, AuthenticationInfo_Name ), GetAuthenticationInfo( id, AuthenticationInfo_AuthID ), GetAuthenticationInfo( id, AuthenticationInfo_IP ), new_health, iCount );
}
}
}
else
{
// Define a single player target id
temp_id = GetCommandTarget( id, szTarget, AdminCommandTargetFlag_Immunity | AdminCommandTargetFlag_Alive );
// Validate player
if( !is_user_valid_connected( temp_id ) )
return PLUGIN_HANDLED;
// Get current player's health
current_health = get_user_health( temp_id );
// Update player's health
set_user_health( temp_id, current_health + new_health );
// Notice message format
switch( g_iShowActivity )
{
case 1: client_print_color( 0, temp_id, "%s %L", PLUGIN_PREFIX, LANG_SERVER, "CMD_HEALTH_PLAYER_NO_NAME", new_health, GetAuthenticationInfo( temp_id, AuthenticationInfo_Name ) );
case 2: client_print_color( 0, temp_id, "%s %L", PLUGIN_PREFIX, LANG_SERVER, "CMD_HEALTH_PLAYER", GetAuthenticationInfo( id, AuthenticationInfo_Name ), new_health, GetAuthenticationInfo( temp_id, AuthenticationInfo_Name ) );
}
// Log administrative action
if( g_iLog )
Log( "ADMIN %s <%s><%s> - Gave %d HP to %s <%s><%s>", GetAuthenticationInfo( id, AuthenticationInfo_Name ), GetAuthenticationInfo( id, AuthenticationInfo_AuthID ), GetAuthenticationInfo( id, AuthenticationInfo_IP ), new_health, GetAuthenticationInfo( temp_id, AuthenticationInfo_Name ), GetAuthenticationInfo( temp_id, AuthenticationInfo_AuthID ), GetAuthenticationInfo( temp_id, AuthenticationInfo_IP ) );
}
return PLUGIN_HANDLED;
}
public ConCmd_Armour( id, iAccess, command_id )
{
// No access?
if( !cmd_access( id, iAccess, command_id, 3 ) )
return PLUGIN_HANDLED;
// Retrieve arguments
new szTarget[ 32 ], szArmour[ 8 ], temp_id, current_armour;
read_argv( 1, szTarget, charsmax( szTarget ) );
read_argv( 2, szArmour, charsmax( szArmour ) );
// Regardless of the target, define new armour
new new_armour = str_to_num( szArmour );
// What's our argument
if( szTarget[ 0 ] == '@' )
{
// Declare and define some variables
new iPlayers[ MAX_PLAYERS ], iCount, AdminCommandTarget:iTargetTeam = GetTeamTarget( szTarget, iPlayers, iCount, AdminCommandTargetSkip_Dead );
// No players could be targeted
if( !iCount )
{
console_print( id, "%L", id, "CMD_ERROR_NO_PLAYERS" );
return PLUGIN_HANDLED;
}
// Do command on players
for( new iLoop = 0; iLoop < iCount; iLoop ++ )
{
// Save into a variable to prevent re-indexing
temp_id = iPlayers[ iLoop ];
// Player is not in-game?
if( !bit_get( g_bIsConnected, temp_id ) )
continue;
// Immunity skip check
if( SeekImmunitySkip( id, temp_id ) )
continue;
// Get current player's armour
current_armour = get_user_armor( temp_id );
// Update player's armour
set_user_armor( temp_id, current_armour + new_armour );
}
switch( iTargetTeam )
{
// All?
case AdminCommandTarget_All:
{
// Notice message format
switch( g_iShowActivity )
{
case 1: client_print_color( 0, print_team_default, "%s %L", PLUGIN_PREFIX, LANG_SERVER, "CMD_ARMOUR_ALL_NO_NAME", new_armour );
case 2: client_print_color( 0, print_team_default, "%s %L", PLUGIN_PREFIX, LANG_SERVER, "CMD_ARMOUR_ALL", GetAuthenticationInfo( id, AuthenticationInfo_Name ), new_armour );
}
// Log administrative action
if( g_iLog )
Log( "ADMIN %s <%s><%s> - Gave %d AP to ALL (Players: %d)", GetAuthenticationInfo( id, AuthenticationInfo_Name ), GetAuthenticationInfo( id, AuthenticationInfo_AuthID ), GetAuthenticationInfo( id, AuthenticationInfo_IP ), new_armour, iCount );
}
// Terrorists?
case AdminCommandTarget_Terrorist:
{
// Notice message format
switch( g_iShowActivity )
{
case 1: client_print_color( 0, print_team_red, "%s %L", PLUGIN_PREFIX, LANG_SERVER, "CMD_ARMOUR_T_NO_NAME", new_armour );
case 2: client_print_color( 0, print_team_red, "%s %L", PLUGIN_PREFIX, LANG_SERVER, "CMD_ARMOUR_T", GetAuthenticationInfo( id, AuthenticationInfo_Name ), new_armour );
}
// Log administrative action
if( g_iLog )
Log( "ADMIN %s <%s><%s> - Gave %d AP to TERRORISTS (Players: %d)", GetAuthenticationInfo( id, AuthenticationInfo_Name ), GetAuthenticationInfo( id, AuthenticationInfo_AuthID ), GetAuthenticationInfo( id, AuthenticationInfo_IP ), new_armour, iCount );
}
// Counter-Terrorists?
case AdminCommandTarget_CT:
{
// Notice message format
switch( g_iShowActivity )
{
case 1: client_print_color( 0, print_team_blue, "%s %L", PLUGIN_PREFIX, LANG_SERVER, "CMD_ARMOUR_CT_NO_NAME", new_armour );
case 2: client_print_color( 0, print_team_blue, "%s %L", PLUGIN_PREFIX, LANG_SERVER, "CMD_ARMOUR_CT", GetAuthenticationInfo( id, AuthenticationInfo_Name ), new_armour );
}
// Log administrative action
if( g_iLog )
Log( "ADMIN %s <%s><%s> - Gave %d AP to COUNTER-TERRORISTS (Players: %d)", GetAuthenticationInfo( id, AuthenticationInfo_Name ), GetAuthenticationInfo( id, AuthenticationInfo_AuthID ), GetAuthenticationInfo( id, AuthenticationInfo_IP ), new_armour, iCount );
}
}
}
else
{
// Define a single player target id
temp_id = GetCommandTarget( id, szTarget, AdminCommandTargetFlag_Immunity | AdminCommandTargetFlag_Alive );
// Validate player
if( !is_user_valid_connected( temp_id ) )
return PLUGIN_HANDLED;
// Get current player's armour
current_armour = get_user_armor( temp_id );
// Update player's armour
set_user_armor( temp_id, current_armour + new_armour );
// Notice message format
switch( g_iShowActivity )
{
case 1: client_print_color( 0, temp_id, "%s %L", PLUGIN_PREFIX, LANG_SERVER, "CMD_ARMOUR_PLAYER_NO_NAME", new_armour, GetAuthenticationInfo( temp_id, AuthenticationInfo_Name ) );
case 2: client_print_color( 0, temp_id, "%s %L", PLUGIN_PREFIX, LANG_SERVER, "CMD_ARMOUR_PLAYER", GetAuthenticationInfo( id, AuthenticationInfo_Name ), new_armour, GetAuthenticationInfo( temp_id, AuthenticationInfo_Name ) );
}
// Log administrative action
if( g_iLog )
Log( "ADMIN %s <%s><%s> - Gave %d AP to %s <%s><%s>", GetAuthenticationInfo( id, AuthenticationInfo_Name ), GetAuthenticationInfo( id, AuthenticationInfo_AuthID ), GetAuthenticationInfo( id, AuthenticationInfo_IP ), new_armour, GetAuthenticationInfo( temp_id, AuthenticationInfo_Name ), GetAuthenticationInfo( temp_id, AuthenticationInfo_AuthID ), GetAuthenticationInfo( temp_id, AuthenticationInfo_IP ) );
}
return PLUGIN_HANDLED;
}
public ConCmd_Money( id, iAccess, command_id )
{
// No access?
if( !cmd_access( id, iAccess, command_id, 3 ) )
return PLUGIN_HANDLED;
// Retrieve arguments
new szTarget[ 32 ], szMoney[ 8 ], temp_id, current_money;
read_argv( 1, szTarget, charsmax( szTarget ) );
read_argv( 2, szMoney, charsmax( szMoney ) );
// Regardless of the target, define new money
new new_money = str_to_num( szMoney );
// What's our argument
if( szTarget[ 0 ] == '@' )
{
// Declare and define some variables
new iPlayers[ MAX_PLAYERS ], iCount, AdminCommandTarget:iTargetTeam = GetTeamTarget( szTarget, iPlayers, iCount, AdminCommandTargetSkip_Bots );
// No players could be targeted
if( !iCount )
{
console_print( id, "%L", id, "CMD_ERROR_NO_PLAYERS" );
return PLUGIN_HANDLED;
}
// Do command on players
for( new iLoop = 0; iLoop < iCount; iLoop ++ )
{
// Save into a variable to prevent re-indexing
temp_id = iPlayers[ iLoop ];
// Player is not in-game?
if( !bit_get( g_bIsConnected, temp_id ) )
continue;
// Immunity skip check
if( SeekImmunitySkip( id, temp_id ) )
continue;
// Get current player's money
current_money = cs_get_user_money( temp_id );
// Update player's money
cs_set_user_money( temp_id, current_money + new_money );
}
switch( iTargetTeam )
{
// All?
case AdminCommandTarget_All:
{
// Notice message format
switch( g_iShowActivity )
{
case 1: client_print_color( 0, print_team_default, "%s %L", PLUGIN_PREFIX, LANG_SERVER, "CMD_MONEY_ALL_NO_NAME", new_money );
case 2: client_print_color( 0, print_team_default, "%s %L", PLUGIN_PREFIX, LANG_SERVER, "CMD_MONEY_ALL", GetAuthenticationInfo( id, AuthenticationInfo_Name ), new_money );
}
// Log administrative action
if( g_iLog )
Log( "ADMIN %s <%s><%s> - Gave %d money to ALL (Players: %d)", GetAuthenticationInfo( id, AuthenticationInfo_Name ), GetAuthenticationInfo( id, AuthenticationInfo_AuthID ), GetAuthenticationInfo( id, AuthenticationInfo_IP ), new_money, iCount );
}
// Terrorists?
case AdminCommandTarget_Terrorist:
{
// Notice message format
switch( g_iShowActivity )
{
case 1: client_print_color( 0, print_team_red, "%s %L", PLUGIN_PREFIX, LANG_SERVER, "CMD_MONEY_T_NO_NAME", new_money );
case 2: client_print_color( 0, print_team_red, "%s %L", PLUGIN_PREFIX, LANG_SERVER, "CMD_MONEY_T", GetAuthenticationInfo( id, AuthenticationInfo_Name ), new_money );
}
// Log administrative action
if( g_iLog )
Log( "ADMIN %s <%s><%s> - Gave %d money to TERRORISTS (Players: %d)", GetAuthenticationInfo( id, AuthenticationInfo_Name ), GetAuthenticationInfo( id, AuthenticationInfo_AuthID ), GetAuthenticationInfo( id, AuthenticationInfo_IP ), new_money, iCount );
}
// Counter-Terrorists?
case AdminCommandTarget_CT:
{
// Notice message format
switch( g_iShowActivity )
{
case 1: client_print_color( 0, print_team_blue, "%s %L", PLUGIN_PREFIX, LANG_SERVER, "CMD_MONEY_CT_NO_NAME", new_money );
case 2: client_print_color( 0, print_team_blue, "%s %L", PLUGIN_PREFIX, LANG_SERVER, "CMD_MONEY_CT", GetAuthenticationInfo( id, AuthenticationInfo_Name ), new_money );
}
// Log administrative action
if( g_iLog )
Log( "ADMIN %s <%s><%s> - Gave %d money to COUNTER-TERRORISTS (Players: %d)", GetAuthenticationInfo( id, AuthenticationInfo_Name ), GetAuthenticationInfo( id, AuthenticationInfo_AuthID ), GetAuthenticationInfo( id, AuthenticationInfo_IP ), new_money, iCount );
}
}
}
else
{
// Define a single player target id
temp_id = GetCommandTarget( id, szTarget, AdminCommandTargetFlag_Immunity | AdminCommandTargetFlag_Bots );
// Validate player
if( !is_user_valid_connected( temp_id ) )
return PLUGIN_HANDLED;
// Get current player's money
current_money = cs_get_user_money( temp_id );
// Update player's money
cs_set_user_money( temp_id, current_money + new_money );
// Notice message format
switch( g_iShowActivity )
{
case 1: client_print_color( 0, temp_id, "%s %L", PLUGIN_PREFIX, LANG_SERVER, "CMD_MONEY_PLAYER_NO_NAME", new_money, GetAuthenticationInfo( temp_id, AuthenticationInfo_Name ) );
case 2: client_print_color( 0, temp_id, "%s %L", PLUGIN_PREFIX, LANG_SERVER, "CMD_MONEY_PLAYER", GetAuthenticationInfo( id, AuthenticationInfo_Name ), new_money, GetAuthenticationInfo( temp_id, AuthenticationInfo_Name ) );
}
// Log administrative action
if( g_iLog )
Log( "ADMIN %s <%s><%s> - Gave %d money to %s <%s><%s>", GetAuthenticationInfo( id, AuthenticationInfo_Name ), GetAuthenticationInfo( id, AuthenticationInfo_AuthID ), GetAuthenticationInfo( id, AuthenticationInfo_IP ), new_money, GetAuthenticationInfo( temp_id, AuthenticationInfo_Name ), GetAuthenticationInfo( temp_id, AuthenticationInfo_AuthID ), GetAuthenticationInfo( temp_id, AuthenticationInfo_IP ) );
}
return PLUGIN_HANDLED;
}
public ConCmd_Noclip( id, iAccess, command_id )
{
// No access?
if( !cmd_access( id, iAccess, command_id, 3 ) )
return PLUGIN_HANDLED;
// Retrieve arguments
new szTarget[ 32 ], szNoclip[ 2 ], temp_id;
read_argv( 1, szTarget, charsmax( szTarget ) );
read_argv( 2, szNoclip, charsmax( szNoclip ) );
// Regardless of the target, define new noclip
new new_noclip = clamp( str_to_num( szNoclip ), 0, 2 );
// What's our argument
if( szTarget[ 0 ] == '@' )
{
// Declare and define some variables
new iPlayers[ MAX_PLAYERS ], iCount, AdminCommandTarget:iTargetTeam = GetTeamTarget( szTarget, iPlayers, iCount, AdminCommandTargetSkip_Dead );
// No players could be targeted
if( !iCount )
{
console_print( id, "%L", id, "CMD_ERROR_NO_PLAYERS" );
return PLUGIN_HANDLED;
}
// Do command on players
for( new iLoop = 0; iLoop < iCount; iLoop ++ )
{
// Save into a variable to prevent re-indexing
temp_id = iPlayers[ iLoop ];
// Player is not in-game?
if( !bit_get( g_bIsConnected, temp_id ) )
continue;
// Immunity skip check
if( SeekImmunitySkip( id, temp_id ) )
continue;
// Update player's noclip
set_user_noclip( temp_id, new_noclip ? 1 : 0 );
// Should we set infinite noclip?
if( new_noclip > 1 )
bit_set( g_bHasInfiniteNoclip, temp_id );
else
bit_del( g_bHasInfiniteNoclip, temp_id );
}
switch( iTargetTeam )
{
// All?
case AdminCommandTarget_All:
{
// Notice message format
switch( g_iShowActivity )
{
case 1: client_print_color( 0, print_team_default, "%s %L", PLUGIN_PREFIX, LANG_SERVER, "CMD_NOCLIP_ALL_NO_NAME", new_noclip );
case 2: client_print_color( 0, print_team_default, "%s %L", PLUGIN_PREFIX, LANG_SERVER, "CMD_NOCLIP_ALL", GetAuthenticationInfo( id, AuthenticationInfo_Name ), new_noclip );
}
// Log administrative action
if( g_iLog )
Log( "ADMIN %s <%s><%s> - Set noclip to %d for ALL (Players: %d)", GetAuthenticationInfo( id, AuthenticationInfo_Name ), GetAuthenticationInfo( id, AuthenticationInfo_AuthID ), GetAuthenticationInfo( id, AuthenticationInfo_IP ), new_noclip, iCount );
}
// Terrorists?
case AdminCommandTarget_Terrorist:
{
// Notice message format
switch( g_iShowActivity )
{
case 1: client_print_color( 0, print_team_red, "%s %L", PLUGIN_PREFIX, LANG_SERVER, "CMD_NOCLIP_T_NO_NAME", new_noclip );
case 2: client_print_color( 0, print_team_red, "%s %L", PLUGIN_PREFIX, LANG_SERVER, "CMD_NOCLIP_T", GetAuthenticationInfo( id, AuthenticationInfo_Name ), new_noclip );
}
// Log administrative action
if( g_iLog )
Log( "ADMIN %s <%s><%s> - Set noclip to %d for TERRORISTS (Players: %d)", GetAuthenticationInfo( id, AuthenticationInfo_Name ), GetAuthenticationInfo( id, AuthenticationInfo_AuthID ), GetAuthenticationInfo( id, AuthenticationInfo_IP ), new_noclip, iCount );
}
// Counter-Terrorists?
case AdminCommandTarget_CT:
{
// Notice message format
switch( g_iShowActivity )
{
case 1: client_print_color( 0, print_team_blue, "%s %L", PLUGIN_PREFIX, LANG_SERVER, "CMD_NOCLIP_CT_NO_NAME", new_noclip );
case 2: client_print_color( 0, print_team_blue, "%s %L", PLUGIN_PREFIX, LANG_SERVER, "CMD_NOCLIP_CT", GetAuthenticationInfo( id, AuthenticationInfo_Name ), new_noclip );
}
// Log administrative action
if( g_iLog )
Log( "ADMIN %s <%s><%s> - Set noclip to %d for COUNTER-TERRORISTS (Players: %d)", GetAuthenticationInfo( id, AuthenticationInfo_Name ), GetAuthenticationInfo( id, AuthenticationInfo_AuthID ), GetAuthenticationInfo( id, AuthenticationInfo_IP ), new_noclip, iCount );
}
}
}
else
{
// Define a single player target id
temp_id = GetCommandTarget( id, szTarget, AdminCommandTargetFlag_Immunity | AdminCommandTargetFlag_Alive );
// Validate player
if( !is_user_valid_connected( temp_id ) )
return PLUGIN_HANDLED;
// Update player's noclip
set_user_noclip( temp_id, new_noclip ? 1 : 0 );
// Should we set infinite noclip?
if( new_noclip > 1 )
bit_set( g_bHasInfiniteNoclip, temp_id );
else
bit_del( g_bHasInfiniteNoclip, temp_id );
// Notice message format
switch( g_iShowActivity )
{
case 1: client_print_color( 0, temp_id, "%s %L", PLUGIN_PREFIX, LANG_SERVER, "CMD_NOCLIP_PLAYER_NO_NAME", new_noclip, GetAuthenticationInfo( temp_id, AuthenticationInfo_Name ) );
case 2: client_print_color( 0, temp_id, "%s %L", PLUGIN_PREFIX, LANG_SERVER, "CMD_NOCLIP_PLAYER", GetAuthenticationInfo( id, AuthenticationInfo_Name ), new_noclip, GetAuthenticationInfo( temp_id, AuthenticationInfo_Name ) );
}
// Log administrative action
if( g_iLog )
Log( "ADMIN %s <%s><%s> - Set noclip to %d for %s <%s><%s>", GetAuthenticationInfo( id, AuthenticationInfo_Name ), GetAuthenticationInfo( id, AuthenticationInfo_AuthID ), GetAuthenticationInfo( id, AuthenticationInfo_IP ), new_noclip, GetAuthenticationInfo( temp_id, AuthenticationInfo_Name ), GetAuthenticationInfo( temp_id, AuthenticationInfo_AuthID ), GetAuthenticationInfo( temp_id, AuthenticationInfo_IP ) );
}
return PLUGIN_HANDLED;
}
public ConCmd_Godmode( id, iAccess, command_id )
{
// No access?
if( !cmd_access( id, iAccess, command_id, 3 ) )
return PLUGIN_HANDLED;
// Retrieve arguments
new szTarget[ 32 ], szGodmode[ 2 ], temp_id;
read_argv( 1, szTarget, charsmax( szTarget ) );
read_argv( 2, szGodmode, charsmax( szGodmode ) );
// Regardless of the target, define new godmode
new new_godmode = clamp( str_to_num( szGodmode ), 0, 2 );
// What's our argument
if( szTarget[ 0 ] == '@' )
{
// Declare and define some variables
new iPlayers[ MAX_PLAYERS ], iCount, AdminCommandTarget:iTargetTeam = GetTeamTarget( szTarget, iPlayers, iCount, AdminCommandTargetSkip_Dead );
// No players could be targeted
if( !iCount )
{
console_print( id, "%L", id, "CMD_ERROR_NO_PLAYERS" );
return PLUGIN_HANDLED;
}
// Do command on players
for( new iLoop = 0; iLoop < iCount; iLoop ++ )
{
// Save into a variable to prevent re-indexing
temp_id = iPlayers[ iLoop ];
// Player is not in-game?
if( !bit_get( g_bIsConnected, temp_id ) )
continue;
// Immunity skip check
if( SeekImmunitySkip( id, temp_id ) )
continue;
// Update player's godmode
set_user_godmode( temp_id, new_godmode ? 1 : 0 );
// Should we set infinite godmode?
if( new_godmode > 1 )
bit_set( g_bHasInfiniteGodmode, temp_id );
else
bit_del( g_bHasInfiniteGodmode, temp_id );
}
switch( iTargetTeam )
{
// All?
case AdminCommandTarget_All:
{
// Notice message format
switch( g_iShowActivity )
{
case 1: client_print_color( 0, print_team_default, "%s %L", PLUGIN_PREFIX, LANG_SERVER, "CMD_GODMODE_ALL_NO_NAME", new_godmode );
case 2: client_print_color( 0, print_team_default, "%s %L", PLUGIN_PREFIX, LANG_SERVER, "CMD_GODMODE_ALL", GetAuthenticationInfo( id, AuthenticationInfo_Name ), new_godmode );
}
// Log administrative action
if( g_iLog )
Log( "ADMIN %s <%s><%s> - Set godmode to %d for ALL (Players: %d)", GetAuthenticationInfo( id, AuthenticationInfo_Name ), GetAuthenticationInfo( id, AuthenticationInfo_AuthID ), GetAuthenticationInfo( id, AuthenticationInfo_IP ), new_godmode, iCount );
}
// Terrorists?
case AdminCommandTarget_Terrorist:
{
// Notice message format
switch( g_iShowActivity )
{
case 1: client_print_color( 0, print_team_red, "%s %L", PLUGIN_PREFIX, LANG_SERVER, "CMD_GODMODE_T_NO_NAME", new_godmode );
case 2: client_print_color( 0, print_team_red, "%s %L", PLUGIN_PREFIX, LANG_SERVER, "CMD_GODMODE_T", GetAuthenticationInfo( id, AuthenticationInfo_Name ), new_godmode );
}
// Log administrative action
if( g_iLog )
Log( "ADMIN %s <%s><%s> - Set godmode to %d for TERRORISTS (Players: %d)", GetAuthenticationInfo( id, AuthenticationInfo_Name ), GetAuthenticationInfo( id, AuthenticationInfo_AuthID ), GetAuthenticationInfo( id, AuthenticationInfo_IP ), new_godmode, iCount );
}
// Counter-Terrorists?
case AdminCommandTarget_CT:
{
// Notice message format
switch( g_iShowActivity )
{
case 1: client_print_color( 0, print_team_blue, "%s %L", PLUGIN_PREFIX, LANG_SERVER, "CMD_GODMODE_CT_NO_NAME", new_godmode );
case 2: client_print_color( 0, print_team_blue, "%s %L", PLUGIN_PREFIX, LANG_SERVER, "CMD_GODMODE_CT", GetAuthenticationInfo( id, AuthenticationInfo_Name ), new_godmode );
}
// Log administrative action
if( g_iLog )
Log( "ADMIN %s <%s><%s> - Set godmode to %d for COUNTER-TERRORISTS (Players: %d)", GetAuthenticationInfo( id, AuthenticationInfo_Name ), GetAuthenticationInfo( id, AuthenticationInfo_AuthID ), GetAuthenticationInfo( id, AuthenticationInfo_IP ), new_godmode, iCount );
}
}
}
else
{
// Define a single player target id
temp_id = GetCommandTarget( id, szTarget, AdminCommandTargetFlag_Immunity | AdminCommandTargetFlag_Alive );
// Validate player
if( !is_user_valid_connected( temp_id ) )
return PLUGIN_HANDLED;
// Update player's godmode
set_user_godmode( temp_id, new_godmode ? 1 : 0 );
// Should we set infinite godmode?
if( new_godmode > 1 )
bit_set( g_bHasInfiniteGodmode, temp_id );
else
bit_del( g_bHasInfiniteGodmode, temp_id );
// Notice message format
switch( g_iShowActivity )
{
case 1: client_print_color( 0, temp_id, "%s %L", PLUGIN_PREFIX, LANG_SERVER, "CMD_GODMODE_PLAYER_NO_NAME", new_godmode, GetAuthenticationInfo( temp_id, AuthenticationInfo_Name ) );
case 2: client_print_color( 0, temp_id, "%s %L", PLUGIN_PREFIX, LANG_SERVER, "CMD_GODMODE_PLAYER", GetAuthenticationInfo( id, AuthenticationInfo_Name ), new_godmode, GetAuthenticationInfo( temp_id, AuthenticationInfo_Name ) );
}
// Log administrative action
if( g_iLog )
Log( "ADMIN %s <%s><%s> - Set godmode to %d for %s <%s><%s>", GetAuthenticationInfo( id, AuthenticationInfo_Name ), GetAuthenticationInfo( id, AuthenticationInfo_AuthID ), GetAuthenticationInfo( id, AuthenticationInfo_IP ), new_godmode, GetAuthenticationInfo( temp_id, AuthenticationInfo_Name ), GetAuthenticationInfo( temp_id, AuthenticationInfo_AuthID ), GetAuthenticationInfo( temp_id, AuthenticationInfo_IP ) );
}
return PLUGIN_HANDLED;
}
public ConCmd_Revive( id, iAccess, command_id )
{
// No access?
if( !cmd_access( id, iAccess, command_id, 2 ) )
return PLUGIN_HANDLED;
// Retrieve arguments
new szTarget[ 32 ], temp_id;
read_argv( 1, szTarget, charsmax( szTarget ) );
// What's our argument
if( szTarget[ 0 ] == '@' )
{
// Declare and define some variables
new iPlayers[ MAX_PLAYERS ], iCount, AdminCommandTarget:iTargetTeam = GetTeamTarget( szTarget, iPlayers, iCount, g_iRespawnAlive ? AdminCommandTargetSkip_None : AdminCommandTargetSkip_Alive );
// No players could be targeted
if( !iCount )
{
console_print( id, "%L", id, "CMD_ERROR_NO_PLAYERS" );
return PLUGIN_HANDLED;
}
// Do command on players
for( new iLoop = 0; iLoop < iCount; iLoop ++ )
{
// Save into a variable to prevent re-indexing
temp_id = iPlayers[ iLoop ];
// Player is not in-game?
if( !bit_get( g_bIsConnected, temp_id ) )
continue;
// Immunity skip check
if( SeekImmunitySkip( id, temp_id ) )
continue;
// Revive target!
ExecuteHamB( Ham_CS_RoundRespawn, temp_id );
}
switch( iTargetTeam )
{
// All?
case AdminCommandTarget_All:
{
// Notice message format
switch( g_iShowActivity )
{
case 1: client_print_color( 0, print_team_default, "%s %L", PLUGIN_PREFIX, LANG_SERVER, "CMD_REVIVE_ALL_NO_NAME" );
case 2: client_print_color( 0, print_team_default, "%s %L", PLUGIN_PREFIX, LANG_SERVER, "CMD_REVIVE_ALL", GetAuthenticationInfo( id, AuthenticationInfo_Name ) );
}
// Log administrative action
if( g_iLog )
Log( "ADMIN %s <%s><%s> - Revived ALL (Players: %d)", GetAuthenticationInfo( id, AuthenticationInfo_Name ), GetAuthenticationInfo( id, AuthenticationInfo_AuthID ), GetAuthenticationInfo( id, AuthenticationInfo_IP ), iCount );
}
// Terrorists?
case AdminCommandTarget_Terrorist:
{
// Notice message format
switch( g_iShowActivity )
{
case 1: client_print_color( 0, print_team_red, "%s %L", PLUGIN_PREFIX, LANG_SERVER, "CMD_REVIVE_T_NO_NAME" );
case 2: client_print_color( 0, print_team_red, "%s %L", PLUGIN_PREFIX, LANG_SERVER, "CMD_REVIVE_T", GetAuthenticationInfo( id, AuthenticationInfo_Name ) );
}
// Log administrative action
if( g_iLog )
Log( "ADMIN %s <%s><%s> - Revived TERRORISTS (Players: %d)", GetAuthenticationInfo( id, AuthenticationInfo_Name ), GetAuthenticationInfo( id, AuthenticationInfo_AuthID ), GetAuthenticationInfo( id, AuthenticationInfo_IP ), iCount );
}
// Counter-Terrorists?
case AdminCommandTarget_CT:
{
// Notice message format
switch( g_iShowActivity )
{
case 1: client_print_color( 0, print_team_blue, "%s %L", PLUGIN_PREFIX, LANG_SERVER, "CMD_REVIVE_CT_NO_NAME" );
case 2: client_print_color( 0, print_team_blue, "%s %L", PLUGIN_PREFIX, LANG_SERVER, "CMD_REVIVE_CT", GetAuthenticationInfo( id, AuthenticationInfo_Name ) );
}
// Log administrative action
if( g_iLog )
Log( "ADMIN %s <%s><%s> - Revived COUNTER-TERRORISTS (Players: %d)", GetAuthenticationInfo( id, AuthenticationInfo_Name ), GetAuthenticationInfo( id, AuthenticationInfo_AuthID ), GetAuthenticationInfo( id, AuthenticationInfo_IP ), iCount );
}
}
}