Skip to content

Commit ea8151a

Browse files
committed
Fixed #8822 (Remove "voiceptt: This server does not have voice enabled" for players)
1 parent 17237de commit ea8151a

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

MTA10/mods/deathmatch/ClientCommands.cpp

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -767,7 +767,15 @@ void COMMAND_VoicePushToTalk ( const char* szCmdLine )
767767
if ( g_pClientGame->GetVoiceRecorder()->IsEnabled() )
768768
g_pClientGame->GetVoiceRecorder()-> UpdatePTTState ( atoi(szCmdLine) );
769769
else
770-
g_pCore->GetConsole ()->Print ( "voiceptt: This server does not have voice enabled" );
770+
{
771+
// Show warning only once per server
772+
static bool bDone = false;
773+
if ( !bDone )
774+
{
775+
bDone = true;
776+
g_pCore->GetConsole ()->Print ( "voiceptt: This server does not have voice enabled" );
777+
}
778+
}
771779
}
772780

773781
void COMMAND_ServerInfo ( const char* szCmdLine )

0 commit comments

Comments
 (0)