Raised This Month: $ Target: $400
 0% 

Ent Thinking


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Mini_Midget
Veteran Member
Join Date: Jan 2006
Location: It's a mystery.
Old 01-07-2008 , 06:43   Re: Ent Thinking
Reply With Quote #3

Okay

I did what you said and got this now

PHP Code:

public lightning_effects(iEnt
{
    if(!
get_pcvar_num(zomb_switch))
        return 
set_pev(iEntpev_nextthink10.0)

    if (
get_pcvar_num(zomb_lightning) == 0)
    {    
        
engfunc(EngFunc_LightStyle0"m")
        
remove_task(12175)
        
//set_pev(iEnt, pev_nextthink, 10.0)
    
}
    else if (
get_pcvar_num(zomb_lightning) == 1)
    {
        static 
classname[33]
        
pev(iEntpev_classnameclassname,32)
        
        if (
equal classnameg_entlight ) )
        {
            
engfunc(EngFunc_LightStyle0"a")
            
set_task(random_float(10.0,17.0),"thunder_clap",12175)
        }
    }
    else if (
get_pcvar_num(zomb_lightning) == 2)
    {    
        
engfunc(EngFunc_LightStyle0"b")
        
remove_task(12175)
        
//set_pev(iEnt, pev_nextthink, 10.0)
    
}
    return 
FMRES_IGNORED
}

public 
thunder_clap() 
{
    if(!
get_pcvar_num(zomb_switch))
        return
    
    
engfunc(EngFunc_LightStyle0"p")
    
client_cmd(0,"speak %s"ZOMBIE_THUNDER)
    
    
//set_task(1.25, "lightning_effects", 12175)

I also made the classname a global just in case if I ever to typos.

This time it doesn't do anything if I set the cvar to 1.
The lighting stays the same as the cvar before it.
But one thing I accomplished with this is that it changes the lighting instantly which was one of my goals...
I change the cvar to 0 and it goes to normal lightning.
Then I try to change it to 1 but it stays the same as normal lighting and I wait for 20 seconds but nothing changed.
Then I changed to cvar 2 and it went to lighting b.
Tried to change it to cvar 1 again but stayed on lighting b.
__________________
It's a mystery.
Mini_Midget is offline
 



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 11:09.


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