|
~lick~
|
11-25-2012
, 14:28
Re: How to make this darkness effect?
|
#16
|
Quote:
Originally Posted by Mitch
seeing how ive had this code since halloween
Code:
#include <sourcemod>
#include <sdktools>
new FogIndex = -1;
new Float:mapFogStart = 0.0;
new Float:mapFogEnd = 175.0;
new Float:mapFogDensity = 1.0;
public OnPluginStart()
{
RegAdminCmd("sm_fogoff", fogoff, ADMFLAG_ROOT, "");
RegAdminCmd("sm_fogon", fogon, ADMFLAG_ROOT, "");
}
public OnMapStart()
{
new ent;
ent = FindEntityByClassname(-1, "env_fog_controller");
if (ent != -1)
{
FogIndex = ent;
}
else
{
FogIndex = CreateEntityByName("env_fog_controller");
DispatchSpawn(FogIndex);
}
DoFog();
AcceptEntityInput(FogIndex, "TurnOff");
}
public Action:fogoff(client, args)
{AcceptEntityInput(FogIndex, "TurnOff");}
public Action:fogon(client, args)
{AcceptEntityInput(FogIndex, "TurnOn");}
DoFog()
{
if(FogIndex != -1)
{
DispatchKeyValue(FogIndex, "fogblend", "0");
DispatchKeyValue(FogIndex, "fogcolor", "0 0 0");
DispatchKeyValue(FogIndex, "fogcolor2", "0 0 0");
DispatchKeyValueFloat(FogIndex, "fogstart", mapFogStart);
DispatchKeyValueFloat(FogIndex, "fogend", mapFogEnd);
DispatchKeyValueFloat(FogIndex, "fogmaxdensity", mapFogDensity);
}
}
This should do what you are trying to do, or atleast replicate what i saw in the video
|
Bit off topic, but you scared the hell out of me, i was like: "wait a second... i didnt post here...."
|
|
|
|