There's a few L4D(2)-specific approval requirements now for approving new plugins over at
http://forums.alliedmods.net/showthread.php?t=57142
To make life a little bit easier for everyone, I will be posting some code snippets that you can copy and paste into your plugin. Of course feel free to use your own code instead, this is just meant to make things easier.
Check game folder name for L4D1/L4D2, fail to load if it's not
PHP Code:
public OnPluginStart()
{
// Require Left 4 Dead (2)
decl String:game_name[64];
GetGameFolderName(game_name, sizeof(game_name));
if (!StrEqual(game_name, "left4dead", false)
&& !StrEqual(game_name, "left4dead2", false))
{
SetFailState("Plugin supports Left 4 Dead or Left 4 Dead 2 only.");
}
}
Save/restore CVARs to their old values
PHP Code:
new iInitialGhostTimeMin;
public OnPluginStart()
{
iInitialGhostTimeMin = GetConVarInt(FindConVar("z_ghost_delay_min"));
}
public OnPluginEnd()
{
SetConVarInt(FindConVar("z_ghost_delay_min"), iInitialGhostTimeMin);
}