Hello, after struggling and searching for some time,
I'm gonna ask you guys.
I wanna make some of the lights flicker, when I want it to.
This is the code I've found atm, setting 'light-style' to 1,
doesnt give the effect I'm looking for, and it seems a bit buggy.
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
#define PLUGIN "Nightcrawler Addon: Lamp"
#define VERSION "1.0"
#define AUTHOR "Xalus"
const m_iStyle = 34
new const g_strLampname[] = "nc_lights"
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
}
public plugin_precache()
{
register_forward(FM_Spawn, "Forward_Spawn");
}
public Forward_Spawn( iEnt )
{
if(!pev_valid(iEnt))
return
static strClassname[ 32 ];
pev(iEnt, pev_classname, strClassname, charsmax(strClassname));
if(strClassname[0] == 'l'
&& strClassname[4] == 't'
&& !strClassname[5])
{
log_amx("Found class: %s", strClassname)
set_pev(iEnt, pev_targetname, g_strLampname)
log_amx("Found LAMP: %i (Style: %i) (Effect: %i), (Brightness: %i)", iEnt, get_pdata_int(iEnt, m_iStyle), pev(iEnt, pev_effects), pev(iEnt, pev_renderamt))
//set_pdata_int(iEnt, m_iStyle, 10)
//set_pev(iEnt, pev_light_level, 180)
}
//g_iLamp
//DispatchKeyValue( iEnt, "style", "1" );
//set_pdata_int(iEnt, m_iStyle, 1)
}
__________________