Raised This Month: $51 Target: $400
 12% 

Lamp (Flickering | Brightness)


Post New Thread Reply   
 
Thread Tools Display Modes
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
.Dare Devil.
Veteran Member
Join Date: Sep 2010
Old 11-22-2014 , 01:01   Re: Lamp (Flickering | Brightness)
Reply With Quote #2

There was a string what holds data about lighting.
( a - dark, z- bright and something between is something between hehe )
Anyways, changing the light style to unused from engine and then editing that string thing you can make your own light fade/flickering what ever thingy.
.Dare Devil. is offline
Reply



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 15:04.


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