Raised This Month: $51 Target: $400
 12% 

Solved L4D1 Hook scoreboard and surpress it completely


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
finishlast
Senior Member
Join Date: Nov 2018
Location: In Reno with the vitamin
Old 11-04-2023 , 05:24   L4D1 Hook scoreboard and surpress it completely
Reply With Quote #1

Hi,

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"

Code:
UM: : [multimap_vs_scoreboard] [1] [0]
VGUIMenu/3:3:17408UM: VGUIMenu/3:3:17408: [multimap_vs_scoreboard] [1] [0]
UM: VGUIMenu/3:3:17408: [multimap_vs_scoreboard] [1] [0]
UM: VGUIMenu/3:3:17408: [multimap_vs_scoreboard] [1] [0]
UM: VGUIMenu/3:3:17408: [specgui] [1] [0]
UM: VGUIMenu/3:3:17408UM: : [specgui] [1] [0]VGUIMenu/3:3:17408
: [specgui] [1] [0]
UM: VGUIMenu/3:3:17408: [specgui] [1] [0]
UM: VGUIMenu/3:3:17408: [info_window] [0] [0]
UM: VGUIMenu/3:3:17408: [info_window] [0] [0]
UM: VGUIMenu/3:3:17408: [info_window] [0] [0]
UM: VGUIMenu/3:3:17408: [info_window] [0] [0]
UM: VGUIMenu/3:3:17408: [multimap_vs_scoreboard] [0] [0]
UM: VGUIMenu/3:3:17408: [multimap_vs_scoreboard] [0] [0]
UM: VGUIMenu/3:3:17408: [multimap_vs_scoreboard] [0] [0]
UM: VGUIMenu/3:3:17408: [multimap_vs_scoreboard] [0] [0]

Or is [multimap_vs_scoreboard] [1] [0] the 1st one
and [multimap_vs_scoreboard] [0] [0] the 2nd one i.e. campaign score?!

Or is the 2nd one the usermessage for closing the multimap_vs_scoreboard?
__________________

Last edited by finishlast; 11-07-2023 at 15:00.
finishlast is offline
Fraggor
Junior Member
Join Date: Jun 2020
Old 11-05-2023 , 13:22   Re: L4D1 Hook scoreboard and surpress it completely
Reply With Quote #2

Quote:
Originally Posted by finishlast View Post
... Not hackish like loading next map immidiately after round end ...
Do you know any plugin that does this?
Fraggor is offline
finishlast
Senior Member
Join Date: Nov 2018
Location: In Reno with the vitamin
Old 11-06-2023 , 11:29   Re: L4D1 Hook scoreboard and surpress it completely
Reply With Quote #3

Quote:
Originally Posted by Fraggor View Post
Do you know any plugin that does this?
No sorry but I would think that would be easier to implement.


OK after further tests I can confirm that this is triggering the campaignscore overlay

Spoiler


And this would close (0) / open (1) the score windows prior to that

Spoiler



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
}
__________________

Last edited by finishlast; 11-11-2023 at 09:02.
finishlast is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 15:18.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode