@@ -32,6 +32,25 @@ private void PrintToPlayerChat(CCSPlayerController player, string message)
32
32
player . PrintToChat ( $ "{ chatPrefix } { message } ") ;
33
33
}
34
34
35
+ private void ReplyToUserCommand ( CCSPlayerController ? player , string message , bool console = false )
36
+ {
37
+ if ( player == null )
38
+ {
39
+ Server . PrintToConsole ( $ "{ chatPrefix } { message } ") ;
40
+ }
41
+ else
42
+ {
43
+ if ( console )
44
+ {
45
+ player . PrintToConsole ( $ "{ chatPrefix } { message } ") ;
46
+ }
47
+ else
48
+ {
49
+ player . PrintToChat ( $ "{ chatPrefix } { message } ") ;
50
+ }
51
+ }
52
+ }
53
+
35
54
private void LoadAdmins ( )
36
55
{
37
56
string fileName = "MatchZy/admins.json" ;
@@ -1125,25 +1144,6 @@ public bool IsTeamSwapRequired()
1125
1144
return false ;
1126
1145
}
1127
1146
1128
- private void ReplyToUserCommand ( CCSPlayerController ? player , string message , bool console = false )
1129
- {
1130
- if ( player == null )
1131
- {
1132
- Server . PrintToConsole ( $ "[MatchZy] { message } ") ;
1133
- }
1134
- else
1135
- {
1136
- if ( console )
1137
- {
1138
- player . PrintToConsole ( $ "[MatchZy] { message } ") ;
1139
- }
1140
- else
1141
- {
1142
- player . PrintToChat ( $ "{ chatPrefix } { message } ") ;
1143
- }
1144
- }
1145
- }
1146
-
1147
1147
private void PauseMatch ( CCSPlayerController ? player , CommandInfo ? command )
1148
1148
{
1149
1149
if ( isMatchLive && isPaused )
@@ -1356,9 +1356,11 @@ private string GetColorTreatedString(string message)
1356
1356
private void SendAvailableCommandsMessage ( CCSPlayerController ? player )
1357
1357
{
1358
1358
if ( ! IsPlayerValid ( player ) ) return ;
1359
+
1360
+ ReplyToUserCommand ( player , "Available commands:" ) ;
1361
+
1359
1362
if ( isPractice )
1360
1363
{
1361
- ReplyToUserCommand ( player , $ "{ ChatColors . Green } Available commands: { ChatColors . Default } ") ;
1362
1364
player ! . PrintToChat ( $ " { ChatColors . Green } Spawns: { ChatColors . Default } .spawn, .ctspawn, .tspawn, .bestspawn, .worstspawn") ;
1363
1365
player . PrintToChat ( $ " { ChatColors . Green } Bots: { ChatColors . Default } .bot, .nobots, .crouchbot, .boost, .crouchboost") ;
1364
1366
player . PrintToChat ( $ " { ChatColors . Green } Nades: { ChatColors . Default } .loadnade, .savenade, .importnade, .listnades") ;
@@ -1369,20 +1371,17 @@ private void SendAvailableCommandsMessage(CCSPlayerController? player)
1369
1371
}
1370
1372
if ( readyAvailable )
1371
1373
{
1372
- ReplyToUserCommand ( player , $ "{ ChatColors . Green } Available commands: { ChatColors . Default } ") ;
1373
1374
player ! . PrintToChat ( $ " { ChatColors . Green } Ready/Unready: { ChatColors . Default } .ready, .unready") ;
1374
1375
return ;
1375
1376
}
1376
1377
if ( isSideSelectionPhase )
1377
1378
{
1378
- ReplyToUserCommand ( player , $ "{ ChatColors . Green } Available commands: { ChatColors . Default } ") ;
1379
1379
player ! . PrintToChat ( $ " { ChatColors . Green } Side Selection: { ChatColors . Default } .stay, .switch") ;
1380
1380
return ;
1381
1381
}
1382
1382
if ( matchStarted )
1383
1383
{
1384
1384
string stopCommandMessage = isStopCommandAvailable ? ", .stop" : "" ;
1385
- ReplyToUserCommand ( player , $ "{ ChatColors . Green } Available commands: { ChatColors . Default } ") ;
1386
1385
player ! . PrintToChat ( $ " { ChatColors . Green } Pause/Restore: { ChatColors . Default } .pause, .unpause, .tac, .tech{ stopCommandMessage } ") ;
1387
1386
return ;
1388
1387
}
0 commit comments