It appears round_start is still too early as L4D_GetVersusMaxCompletionScore() reveals the score at that point is still 0 before I try to change it, which means it hasn't been set yet. And so it undoes anything I do at that stage.
I tried to rig L4D_SetVersusMaxCompletionScore() to a command as shown below:
#define PLUGIN_VERSION "0.0.1"
public Plugin:myinfo =
name = "L4D2 Versus Scoring Fixer",
author = "DannBo",
description = "Fixes Broken Scoring on Select Custom Maps",
version = PLUGIN_VERSION,
url = "http://therocinante.clanservers.com/motd.html"
public void OnPluginStart()
CreateConVar("sm_vscore_fixer_version", PLUGIN_VERSION, "Get Plugin Version", FCVAR_SPONLY|FCVAR_REPLICATED|FCVAR_NOTIFY);
RegConsoleCmd("sm_vscore_set", cmdScoreSet, "Set Score Completion");
public Action:cmdScoreSet(client, args)
GetCmdArg(1, buffer, sizeof(buffer));
vinput = StringToInt(buffer);
vscore = L4D_GetVersusMaxCompletionScore();
PrintToChat(client, "Versus Completion Score is now %d", vscore);
And it sort of works. If I use the command once I am connected to the server, it sets the scores appropriately for both teams, however, the UI still shows the maximum as what it was set to before. So if the default is 400, and I set it to 500, at the end it shows 500 / 400 for full completion, rather than updating the UI to show 500 / 500.
While this works functionally, it would be nice to have an event to hook it too that's after round_start, rather than having to call the command each time I want to do it after I'm connected. Is there an event I could hook it too where it would also reflect fully in the UI?