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

Removing entities


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
vitorrossi
Senior Member
Join Date: Apr 2012
Location: NY, USA
Old 09-05-2012 , 14:29   Removing entities
Reply With Quote #1

Is this the proper way?

Code:
new const cMyEntities[ ] =
{
    "func_bomb_target",
    "info_bomb_target",
    "hostage_entity",
    "monster_scientist",
    "func_hostage_rescue",
    "info_hostage_rescue",
    "info_vip_start",
    "func_vip_safetyzone",
    "func_escapezone",
    "armoury_entity",
    "game_player_equip",
    "player_weaponstrip"
}; new g_iSpawn;

public plugin_precache( )
  g_iSpawn = register_forward( FM_Spawn, "Spawn" );

public plugin_init( )
  unregister_forward( FM_Spawn, g_iSpawn );

public Spawn( E )
{
    if( pev_valid( E ) )
    {
        static C[ 32 ], I;
        pev( E, pev_classname, C, 32 );

        for( I = 0; I < sizeof( cMyEntities ); I++ ) {
          if( equal( cMyEntities[ I ], C ) ) {
              engfunc( EngFunc_RemoveEntity, E ); break; }
        }
    }
}  
vitorrossi is offline
claudiuhks
Yam Inside®™℠
Join Date: Jan 2010
Location: Living Randomly
Old 09-06-2012 , 05:09   Re: Removing entities
Reply With Quote #2

No!

PHP Code:
new const cMyEntities[ ] = 
Should be

PHP Code:
new const cMyEntities[ ][ ] = 
__________________
claudiuhks is offline
Send a message via MSN to claudiuhks Send a message via Yahoo to claudiuhks Send a message via Skype™ to claudiuhks
Reply


Thread Tools
Display Modes

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


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