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-31-2010 , 00:43   Re: Trigger Light
Reply With Quote #1

Quote:
Originally Posted by Mr.ToeMayToe View Post
Sorry, it did not work. I try to restart round still it is not working.
It'll work with any other entity classname. Check it with other classnames. Change the LightClassname[] to light and re-test it. If anyone else knows the classname for a light, feel free to correct me.
__________________
[ 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 , 01:30   Re: Trigger Light
Reply With Quote #2

Quote:
Originally Posted by wrecked_ View Post
It'll work with any other entity classname. Check it with other classnames. Change the LightClassname[] to light and re-test it. If anyone else knows the classname for a light, feel free to correct me.
What you mean ?

PHP Code:
#include <amxmodx>
#include <fakemeta>
 
// not sure, correct me if i'm wrong
new const light[] = "func_light" or new const LightClassname[][] = "light" Both doesn't work
 
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, light ) )
        {
            engfunc( EngFunc_RemoveEntity, Ent )
        }
    }
}
 
public plugin_init()
{
    register_plugin( "Light Remover", "1.0", "Wrecked" )

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