Raised This Month: $ Target: $400
 0% 

The Best Way to Remove


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
PurposeLessx
Senior Member
Join Date: Jun 2017
Old 06-20-2018 , 13:41   Re: The Best Way to Remove
Reply With Quote #1

Otherwise I find another method to remove. Is it any problem about my method?

PHP Code:

new const szRemoveEntities[][] =  {
    
"func_bomb_target""func_escapezone""func_hostage_rescue""func_vip_safetyzone""info_vip_start",
    
"hostage_entity""info_bomb_target""func_buyzone","info_hostage_rescue""monster_scientist",
    
"player_weaponstrip""game_player_equip"
}

public 
plugin_cfg()
{
    
TrieDestroy(g_tRemoveEntities);
    
unregister_forward(FM_Spawng_iForwardSpawn0);
}

public 
plugin_precache()
{
    
g_tRemoveEntities TrieCreate();
    for(new 
0sizeof(szRemoveEntities); i++)
    {
        
TrieSetCell(g_tRemoveEntitiesszRemoveEntities[i], i);
    }
    
g_iForwardSpawn register_forward(FM_Spawn"FM_Spawn_Pre"false);
    
engfunc(EngFunc_CreateNamedEntityengfunc(EngFunc_AllocString"func_buyzone"));
}

public 
FM_Spawn_Pre(ent)
{
    if(!
pev_valid(ent))
    {
        return 
1;
    }

    new 
classname[32];
    
get_entvar(entvar_classnameclassnamecharsmax(classname));

    if(
TrieKeyExists(g_tRemoveEntitiesclassname))
    {
        
engfunc(EngFunc_RemoveEntityent);
        return 
4;
    }
    return 
1;


Last edited by PurposeLessx; 06-20-2018 at 13:41.
PurposeLessx 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 12:21.


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