@@ -70,6 +70,7 @@ bool bMyJBWarden;
7070bool bGangs ;
7171bool bSteamWorks = true ;
7272bool bHideTag [MAXPLAYERS +1 ];
73+ bool bHasRoundEnded ;
7374
7475int iRank [MAXPLAYERS +1 ] = {- 1 , ...};
7576int iNextDefTag ;
@@ -141,6 +142,7 @@ public void OnPluginStart()
141142 //Event hooks
142143 if (! HookEventEx (" round_end" , Event_RoundEnd ))
143144 LogError (" Failed to hook \" round_end\" , \" sm_hextags_roundend\" won't produce any effect." );
145+ HookEvent (" round_start" , Event_RoundStart );
144146
145147 hVibilityCookie = RegClientCookie (" HexTags_Visibility" , " Show or hide the tags." , CookieAccess_Private );
146148 hSelTagCookie = RegClientCookie (" HexTags_SelectedTag" , " Selected Tag" , CookieAccess_Private );
@@ -508,12 +510,18 @@ public Action RankMe_LoadTags(int client, int rank, any data)
508510
509511public void Event_RoundEnd (Event event , const char [] name , bool dontBroadcast )
510512{
513+ bHasRoundEnded = true ;
511514 if (! cv_bParseRoundEnd .BoolValue )
512515 return ;
513-
516+
514517 for (int i = 1 ; i <= MaxClients ; i ++ )if (IsClientInGame (i ))OnClientPostAdminCheck (i );
515518}
516519
520+ public void Event_RoundStart (Event event , const char [] name , bool dontBroadcast )
521+ {
522+ bHasRoundEnded = false ;
523+ }
524+
517525public Action CP_OnChatMessage (int & author , ArrayList recipients , char [] flagstring , char [] name , char [] message , bool & processcolors , bool & removecolors )
518526{
519527 Debug_Setup (true , false , false , true ); // Disable chat.
@@ -1011,7 +1019,10 @@ public Action Timer_ForceTag(Handle timer)
10111019 if (StrEqual (sTag , selectedTags [i ].ScoreTag ))
10121020 continue ;
10131021
1014- LogMessage (" %L was changed by an external plugin, forcing him back to the HexTags' default one!" , i , sTag );
1022+ if (! bHasRoundEnded ){
1023+ LogMessage (" %L was changed by an external plugin, forcing him back to the HexTags' default one!" , i , sTag );
1024+ }
1025+
10151026 CS_SetClientClanTag (i , selectedTags [i ].ScoreTag );
10161027 }
10171028}
@@ -1297,4 +1308,4 @@ public int Native_AddCustomSelector(Handle plugin, int numParams)
12971308public int Native_RemoveCustomSelector (Handle plugin , int numParams )
12981309{
12991310 return pfCustomSelector .RemoveFunction (plugin , GetNativeFunction (1 ));
1300- }
1311+ }
0 commit comments