Raised This Month: $ Target: $400
 0% 

Trigger Light


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Mr.ToeMayToe
Junior Member
Join Date: Feb 2010
Old 05-29-2010 , 08:38   Trigger Light
Reply With Quote #1

I wanted to trigger all the lights in cs_mansion to be off. However, It didn't work.

PHP Code:
#include < amxmodx >
#include < fakemeta >
 
new cvar_triggered
 
public plugin_init ( )
{
    
register_plugin"Trigger Light""0.1""ToeMayToe" )
 
    
register_event"HLTV""event_round_start""a""1=0""2=0" )
 
    
cvar_triggered register_cvar"zp_trigger_light""1" )
}
 
public 
event_round_start( )
{
    
set_task0.1"remove_stuff" )
    
set_task0.1"remove_lights" )
}
 
public 
remove_stuff( )
{
    static 
ent
    
if ( !get_pcvar_numcvar_triggered ) )
    {
        
ent = -1
        
while ( ( ent engfuncEngFunc_FindEntityByStringent"classname""light" ) ) != )
        {
            
dllfuncDLLFunc_Useent); 
            
set_peventpev_targetname
        }
    }
}

public 
remove_lights( )
{
    static 
ent
    ent 
= -1
    
while ( ( ent engfuncEngFunc_FindEntityByStringent"classname""light" ) ) != )
    {
        
dllfuncDLLFunc_Useent);
        
set_peventpev_targetname
    }


Last edited by Mr.ToeMayToe; 05-29-2010 at 08:46.
Mr.ToeMayToe 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 05:25.


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