@@ -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 )
@@ -1357,9 +1357,11 @@ private string GetColorTreatedString(string message)
1357
1357
private void SendAvailableCommandsMessage ( CCSPlayerController ? player )
1358
1358
{
1359
1359
if ( ! IsPlayerValid ( player ) ) return ;
1360
+
1361
+ ReplyToUserCommand ( player , "Available commands:" ) ;
1362
+
1360
1363
if ( isPractice )
1361
1364
{
1362
- ReplyToUserCommand ( player , $ "{ ChatColors . Green } Available commands: { ChatColors . Default } ") ;
1363
1365
player ! . PrintToChat ( $ " { ChatColors . Green } Spawns: { ChatColors . Default } .spawn, .ctspawn, .tspawn, .bestspawn, .worstspawn") ;
1364
1366
player . PrintToChat ( $ " { ChatColors . Green } Bots: { ChatColors . Default } .bot, .nobots, .crouchbot, .boost, .crouchboost") ;
1365
1367
player . PrintToChat ( $ " { ChatColors . Green } Nades: { ChatColors . Default } .loadnade, .savenade, .importnade, .listnades") ;
@@ -1370,20 +1372,17 @@ private void SendAvailableCommandsMessage(CCSPlayerController? player)
1370
1372
}
1371
1373
if ( readyAvailable )
1372
1374
{
1373
- ReplyToUserCommand ( player , $ "{ ChatColors . Green } Available commands: { ChatColors . Default } ") ;
1374
1375
player ! . PrintToChat ( $ " { ChatColors . Green } Ready/Unready: { ChatColors . Default } .ready, .unready") ;
1375
1376
return ;
1376
1377
}
1377
1378
if ( isSideSelectionPhase )
1378
1379
{
1379
- ReplyToUserCommand ( player , $ "{ ChatColors . Green } Available commands: { ChatColors . Default } ") ;
1380
1380
player ! . PrintToChat ( $ " { ChatColors . Green } Side Selection: { ChatColors . Default } .stay, .switch") ;
1381
1381
return ;
1382
1382
}
1383
1383
if ( matchStarted )
1384
1384
{
1385
1385
string stopCommandMessage = isStopCommandAvailable ? ", .stop" : "" ;
1386
- ReplyToUserCommand ( player , $ "{ ChatColors . Green } Available commands: { ChatColors . Default } ") ;
1387
1386
player ! . PrintToChat ( $ " { ChatColors . Green } Pause/Restore: { ChatColors . Default } .pause, .unpause, .tac, .tech{ stopCommandMessage } ") ;
1388
1387
return ;
1389
1388
}
0 commit comments