Skip to content

Instantly share code, notes, and snippets.

@shanapu
Created January 20, 2020 18:13
Show Gist options
  • Save shanapu/1f653a2c31e2037c3ba671e4f1f4671c to your computer and use it in GitHub Desktop.
Save shanapu/1f653a2c31e2037c3ba671e4f1f4671c to your computer and use it in GitHub Desktop.
#include <sourcemod>
#include <sdktools>
public void OnMapStart ( )
{
int ent;
static int FogIndex = -1;
ent = FindEntityByClassname(-1, "light_environment");
if (ent != -1)
{
FogIndex = ent;
}
else
{
FogIndex = CreateEntityByName("light_environment");
DispatchSpawn(FogIndex);
}
AcceptEntityInput(FogIndex, "TurnOff");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment