Quote:
Originally Posted by Thraka
Very awesome!
This little snippet will add the l4d game mode as a parameter. Just insert it into the DoReplacements method
Code:
new Handle:cvarHGameMode = FindConVar("mp_gamemode");
if (cvarHGameMode != INVALID_HANDLE)
{
decl String:gameMode[16];
GetConVarString(cvarHGameMode, gameMode, sizeof(gameMode));
ReplaceString(motdtitle, sizeof(motdtitle), "{L4D_GAMEMODE}", gameMode);
ReplaceString(motdurl, sizeof(motdurl), "{L4D_GAMEMODE}", gameMode);
}
Now you can easily determine for your web page if the game is versus, coop, etc..
|
Is this for L4D, L4D2, or both? I know that (at least at one point) setting game mode was different for each, but can mp_gamemode be read to get it on both?