is it possible to hook the appearance of the l4d scoreboard "campaign score" that you see on map transition and then surpress it from showing? Not hackish like loading next map immidiately after round end, I want to really surpress the scoreboard "overlay"?
Like change it from:
map1 -> [scoreboard] -> map2 -> [scoreboad] -> map3 -> [scoreboad] -> map4 -> [scoreboad]
to:
map1 -> map2 -> map3 -> map4
Is that even possible?
I tried to hook the user message for the campaign score but I only see a usermessage for the
scoreboard prior to the campaign board as "multimap_vs_scoreboard"
This script would prevent all scores from showing up, I am unsure what it does to the actual scores so try at own risk. For versus probably other usermessage for compaign.
Code:
/*
// ====================================================================================================
: )
// ====================================================================================================
Change Log:
1.0.1 (16-November-2021)
- Initial release.
// ====================================================================================================
*/
// ====================================================================================================
// Plugin Info - define
// ====================================================================================================
#define PLUGIN_NAME "[L4D1] prevent scores from showing"
#define PLUGIN_AUTHOR "Finishlast"
#define PLUGIN_DESCRIPTION "Plugin will prevent scores from showing"
#define PLUGIN_VERSION "1.0.1"
#define PLUGIN_URL "https://forums.alliedmods.net/showthread.php?p="
// ====================================================================================================
// Plugin Info
// ====================================================================================================
public Plugin myinfo =
{
name = PLUGIN_NAME,
author = PLUGIN_AUTHOR,
description = PLUGIN_DESCRIPTION,
version = PLUGIN_VERSION,
url = PLUGIN_URL
}
// ====================================================================================================
// Includes
// ====================================================================================================
#include <sourcemod>
#include <sdktools>
#include <sdkhooks>
// ====================================================================================================
// Pragmas
// ====================================================================================================
#pragma semicolon 1
#pragma newdecls required
// ====================================================================================================
// Plugin Start
// ====================================================================================================
public APLRes AskPluginLoad2(Handle myself, bool late, char[] error, int err_max)
{
EngineVersion engine = GetEngineVersion();
if (engine != Engine_Left4Dead )
{
strcopy(error, err_max, "This plugin only runs in "Left 4 Dead" game");
return APLRes_SilentFailure;
}
return APLRes_Success;
}
/****************************************************************************************************/
public void OnPluginStart()
{
HookEvent("round_freeze_end", event_round_freeze_end, EventHookMode_PostNoCopy);
}
/****************************************************************************************************/
public void event_round_freeze_end(Event event, const char[] name, bool dontBroadcast)
{
PrintToChatAll("[SM] hooking");
HookUserMessage(GetUserMessageId("VGUIMenu"),Hookmvss,true);
HookUserMessage(GetUserMessageId("ShowStats"),Hookcs,true);
}
/****************************************************************************************************/
public Action Hookmvss(UserMsg msg_id, BfRead bf, const int[] players, int playersNum, bool reliable, bool init)
{
char title[100];
BfReadString(bf, title, sizeof(title));
if (StrEqual(title, "multimap_vs_scoreboard"))
{
PrintToServer("don't show multimap_vs_scoreboard_menu");
return Plugin_Handled;
// prevent the multimap_vs_scoreboard menu
}
else
{
return Plugin_Continue;
}
}
public Action Hookcs(UserMsg msg_id, BfRead bf, const int[] players, int playersNum, bool reliable, bool init)
{
PrintToServer("don't show campaign scores");
return Plugin_Handled;
// prevent scoreboard menu
}