My server plays with RTD on very infrequently, and we have a SourceMod admin menu toggle to turn it on and off as such. However, when it's off, the plugin still misleadingly posts the RTD advert. The fix is a very small code change though, so if the plugin author wants to add it - and boy would I appreciate it - here's the code I changed:
OLD:
Code:
public Event_RoundActive(Handle:hEvent, const String:strEventName[], bool:bDontBroadcast)
{
if(GameRules_GetRoundState() == RoundState_RoundRunning)
{
switch(GetRandomIntBetween(1, 2))
{
case 1: PrintToChatAll("%s %T", PLUGIN_PREFIX, "RTD_Advert1", LANG_SERVER, COLOR_PERK_ORANGE, 0x01);
case 2: PrintToChatAll("%s %T", PLUGIN_PREFIX, "RTD_Advert1", LANG_SERVER, COLOR_PERK_ORANGE, 0x01);
}
}
}
NEW:
Code:
public Event_RoundActive(Handle:hEvent, const String:strEventName[], bool:bDontBroadcast)
{
if(GameRules_GetRoundState() == RoundState_RoundRunning)
{
if(GetConVarInt(g_hCvarEnabled))
{
switch(GetRandomIntBetween(1, 2))
{
case 1: PrintToChatAll("%s %T", PLUGIN_PREFIX, "RTD_Advert1", LANG_SERVER, COLOR_PERK_ORANGE, 0x01);
case 2: PrintToChatAll("%s %T", PLUGIN_PREFIX, "RTD_Advert1", LANG_SERVER, COLOR_PERK_ORANGE, 0x01);
}
}
}
}
(I also noticed that that random switch doesn't do anything. Shouldn't case 2 be referring to RTD_Advert2?)