Skip to content

Instantly share code, notes, and snippets.

@ProdigySim
Created November 20, 2013 17:52
Show Gist options
  • Select an option

  • Save ProdigySim/7567787 to your computer and use it in GitHub Desktop.

Select an option

Save ProdigySim/7567787 to your computer and use it in GitHub Desktop.
#include <left4downtown>
Handle:g_SurvSetCVar;
public OnPluginStart()
{
g_SurvSetCVar = CreateConVar("l4d_force_survivorset", "2",
"Forces specified survivor set (0 - do not force, 1 - force l4d1 set, 2 - force l4d2 set (allows to use l4d2 survivors voices in l4d1 campaigns))",
FCVAR_PLUGIN);
}
public Action:L4D_OnGetSurvivorSet(&retVal)
{
new val = GetConVarInt(g_SurvSetCVar);
if(val == 1 || val == 2)
{
retVal = val;
return Plugin_Handled;
}
return Plugin_Continue;
}
public Action:L4D_OnFastGetSurvivorSet(&retVal)
{
new val = GetConVarInt(g_SurvSetCVar);
if(val == 1 || val == 2)
{
retVal = val;
return Plugin_Handled;
}
return Plugin_Continue;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment