Skip to content

Commit

Permalink
Add localhost command for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
altair-sossai committed Jul 17, 2024
1 parent 72a22e0 commit 177edd6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
Binary file modified addons/sourcemod/plugins/optional/l4d2_playstats_sync.smx
Binary file not shown.
7 changes: 7 additions & 0 deletions addons/sourcemod/scripting/l4d2_playstats_sync.sp
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ public void OnPluginStart()
RegConsoleCmd("sm_ranking", ShowRankingCmd);
RegConsoleCmd("sm_lastmatch", LastMatchCmd);
RegConsoleCmd("sm_rmix", RankingMixCmd);
RegConsoleCmd("sm_localhost", LocalHostCmd);

HookEvent("round_start", Event_RoundStart, EventHookMode_PostNoCopy);

Expand Down Expand Up @@ -82,6 +83,12 @@ public Action RankingMixCmd(int client, int args)
return Plugin_Handled;
}

public Action LocalHostCmd(int client, int args)
{
ShowMOTDPanel(client, "localhost", "http://localhost:5000", MOTDPANEL_TYPE_URL);
return Plugin_Handled;
}

public Action DisplayStatsUrlTick(Handle timer)
{
if (!IsInReady() || GameInProgress())
Expand Down

0 comments on commit 177edd6

Please sign in to comment.