This site is a testing version, but all data is shared with the live forum.


Raised This Month: $ Target: $400
 0% 

[Help] Entity Remover doesnt work


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
New.ZM.Life
Veteran Member
Join Date: Sep 2014
Location: Iran
Old 08-17-2015 , 02:37   [Help] Entity Remover doesnt work
Reply With Quote #1

hi,
i made this ( from just capture the flag plugin ) to remove some entities from maps like:


new const g_szRemoveEntities[][] =
{
"func_buyzone",
"func_bomb_target",
"info_bomb_target",
"player_weaponstrip",
"hostage_entity"

}



but doesnt work,
may somebody fix it? (i want to remove player_weaponstrip from maps)


PHP Code:
#include <amxmodx>
#include <fakemeta>
#include <engine>

new gHook_EntSpawn

new const g_szRemoveEntities[][] =
{
    
"func_buyzone",
    
"func_bomb_target",
    
"info_bomb_target",
    
"player_weaponstrip",
    
"hostage_entity"

}


public 
plugin_precache()
{
    
gHook_EntSpawn register_forward(FM_Spawn"ent_spawn")
}
    

public 
ent_spawn(ent)
{
    if(!
is_valid_ent(ent))
        return 
FMRES_IGNORED

    
static szClass[32]

    
entity_get_string(entEV_SZ_classnameszClasscharsmax(szClass))

    for(new 
0sizeof g_szRemoveEntitiesi++)
    {
        if(
equal(szClassg_szRemoveEntities[i]))
        {
            
remove_entity(ent)

            return 
FMRES_SUPERCEDE
        
}
    }

    return 
FMRES_IGNORED
}

public 
plugin_init()
{
    
unregister_forward(FM_SpawngHook_EntSpawn)

__________________
PLUGINS

Zombie Plague 5.0 + New Modes

Added NightCrawler Mode to ZP






Last edited by New.ZM.Life; 08-17-2015 at 05:53.
New.ZM.Life 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 08:29.


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