|
Junior Member
Join Date: Jun 2016
Location: Veles
|
01-16-2017
, 11:23
Re: [REQ]Dark effect/lighting in assassin vs sniper mode
|
#3
|
i found this
Quote:
public lighting_effects()
{
// Cache some CVAR values at every 5 secs
cache_cvars()
// Get lighting style
static lighting[5]
get_pcvar_string(cvar_lighting, lighting, charsmax(lighting))
strtolower(lighting)
// Lighting disabled? ["1"]
if (lighting[1] == '1')
return;
// No light for assassin round
if (g_assassinround)
{
engfunc(EngFunc_LightStyle, 1,"a")
}
else
{
if (lighting[1] >= 'a' && lighting[1] <= 'd')
{
static thunderclap_in_progress, Float:thunder
thunderclap_in_progress = task_exists(TASK_THUNDER)
thunder = get_pcvar_float(cvar_thunder)
// Set thunderclap tasks if not existant
if (thunder > 0.0 && !task_exists(TASK_THUNDER_PRE) && !thunderclap_in_progress)
{
g_lights_i = 1
ArrayGetString(lights_thunder, random_num(0, ArraySize(lights_thunder) - 1), g_lights_cycle, charsmax(g_lights_cycle))
g_lights_cycle_len = strlen(g_lights_cycle)
set_task(thunder, "thunderclap", TASK_THUNDER_PRE)
}
// Set lighting only when no thunderclaps are going on
if (!thunderclap_in_progress) engfunc(EngFunc_LightStyle, 1, lighting)
}
else
{
// Remove thunderclap tasks
remove_task(TASK_THUNDER_PRE)
remove_task(TASK_THUNDER)
// Set lighting
engfunc(EngFunc_LightStyle, 0, lighting)
}
}
}
|
And this
Quote:
// Setting Dark Lightning For The Mode
get_cvar_string ( "zp_lighting", "g_LValue" , "a" )
if ( !equali( "g_LValue" , "a" ) )
{
set_cvar_string ( "zp_lighting" , "a" )
}
}
but in this one i have error
Line
get_cvar_string ( "zp_lighting", "g_LValue" , "a" )
Error:
prntscr.com/dwdc8t
|
|
|
|
|