Raised This Month: $ Target: $400
 0% 

Remove ent from location x


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
regalis
Veteran Member
Join Date: Jan 2007
Location: F*cking Germany
Old 05-07-2007 , 18:04   Re: Remove ent from location x
Reply With Quote #2

You can try this..
Maybe someone knows a better way..possibly only with fakemeta!?

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

static const PLUGIN_NAME[]       = "Remove_Ents";
static const PLUGIN_AUTHOR[]     = "regalis";
static const PLUGIN_VERSION[]    = "0.1";


public plugin_init()
{
    register_plugin(PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR);
    register_cvar(PLUGIN_NAME, PLUGIN_VERSION, FCVAR_SPONLY|FCVAR_SERVER);
}

public remove_ent()
{
    new Float:CertainOrigin[3];
    new ent;
    while((ent = find_ent_in_sphere(ent, CertainOrigin, 100.0)) != 0)
    {
        if(!pev_valid(ent)) return;
        static classname[32];
        pev(ent, pev_classname, classname, sizeof classname - 1);
        if(equal(classname, "func_door")) engfunc(EngFunc_RemoveEntity, ent);
        if(equal(classname, "trigger_hurt")) engfunc(EngFunc_RemoveEntity, ent);
    }
}
greetz regalis
__________________

Last edited by regalis; 05-07-2007 at 20:44. Reason: changed a little
regalis is offline
 



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 06:36.


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