Raised This Month: $ Target: $400
 0% 

Lamp (Flickering | Brightness)


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Xalus
Veteran Member
Join Date: Dec 2009
Location: Belgium
Old 11-21-2014 , 17:48   Lamp (Flickering | Brightness)
Reply With Quote #1

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(PLUGINVERSIONAUTHOR)
}
public 
plugin_precache()
{
    
register_forward(FM_Spawn"Forward_Spawn");
}

public 
Forward_SpawniEnt )
{   
    if(!
pev_valid(iEnt))
        return
    
    static 
strClassname32 ];
    
    
pev(iEntpev_classnamestrClassnamecharsmax(strClassname));
    if(
strClassname[0] == 'l'
    
&& strClassname[4] == 't'
    
&& !strClassname[5])
    {
        
log_amx("Found class: %s"strClassname)
        
set_pev(iEntpev_targetnameg_strLampname)
    
        
log_amx("Found LAMP: %i (Style: %i) (Effect: %i), (Brightness: %i)"iEntget_pdata_int(iEntm_iStyle), pev(iEntpev_effects), pev(iEntpev_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)

__________________
Retired.

Last edited by Xalus; 11-21-2014 at 17:49.
Xalus is offline
 


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 17:38.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode