Raised This Month: $ Target: $400
 0% 

Trigger Light


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
wrecked_
Veteran Member
Join Date: Jan 2010
Location: New York (GMT-5)
Old 05-30-2010 , 21:41   Re: Trigger Light
Reply With Quote #1

Are you looking to just disable the lights? Or do you want them to just be turned off by default at round start?

This plugin removes all lights (make sure the classname is right, wasn't too sure):
Code:
#include <amxmodx> #include <fakemeta> // not sure, correct me if i'm wrong new const LightClassname[] = "func_light" public plugin_precache() {     register_forward( FM_Spawn, "SpawnForward" ) } public SpawnForward( Ent ) {     if( pev_valid( Ent ) )     {         new cname[32]         pev( Ent, pev_classname, cname, 31 )             if( equal( cname, LightClassname ) )         {             engfunc( EngFunc_RemoveEntity, Ent )         }     } } public plugin_init() {     register_plugin( "Light Remover", "1.0", "Wrecked" ) }

BTW, HLTV isn't called on the map start, so you'll have to wait until a new round restart for that to be called. This might be your issue, and you just weren't waiting for another round and assumed it wasn't working right away.
__________________
[ Paid Requests ]
DO NOT PM ME ABOUT BLOCKMAKER
NO PRIVATE SUPPORT
wrecked_ is offline
Mr.ToeMayToe
Junior Member
Join Date: Feb 2010
Old 05-31-2010 , 00:25   Re: Trigger Light
Reply With Quote #2

Quote:
Originally Posted by wrecked_ View Post
Are you looking to just disable the lights? Or do you want them to just be turned off by default at round start?


This plugin removes all lights (make sure the classname is right, wasn't too sure): Code:
#include <amxmodx></p><p>#include <fakemeta></p><p>&nbsp;</p><p>// not sure, correct me if i'm wrong</p><p>new const LightClassname[] = "func_light"</p><p>&nbsp;</p><p>public plugin_precache()</p><p>{</p><p>&nbsp;&nbsp;&nbsp;&nbsp;register_forwar d( FM_Spawn, "SpawnForward" )</p><p>}</p><p>&nbsp;</p><p>public SpawnForward( Ent )</p><p>{</p><p>&nbsp;&nbsp;&nbsp;&nbsp;if( pev_valid( Ent ) )</p><p>&nbsp;&nbsp;&nbsp;&nbsp;{</p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs p;&nbsp;new cname[32]</p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs p;&nbsp;pev( Ent, pev_classname, cname, 31 )</p><p>&nbsp;</p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs p;&nbsp;if( equal( cname, LightClassname ) )</p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs p;&nbsp;{</p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;engfunc( EngFunc_RemoveEntity, Ent )</p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs p;&nbsp;}</p><p>&nbsp;&nbsp;&nbsp;&nbsp;}</p><p>}</p><p>&nbsp;</p><p>public plugin_init()</p><p>{</p><p>&nbsp;&nbsp;&nbsp;&nbsp;register_plugin( "Light Remover", "1.0", "Wrecked" )</p><p>}



BTW, HLTV isn't called on the map start, so you'll have to wait until a new round restart for that to be called. This might be your issue, and you just weren't waiting for another round and assumed it wasn't working right away.
Sorry, it did not work. I try to restart round still it is not working.
Mr.ToeMayToe 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 05:25.


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