Raised This Month: $ Target: $400
 0% 

Detect brokeable things


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Cheap_Suit
Veteran Member
Join Date: May 2004
Old 02-26-2007 , 20:53   Re: Detect brokeable things
Reply With Quote #6

Reference:http://forums.alliedmods.net/showthread.php?t=42159

Note: Untested
PHP Code:
#include <amxmodx>
#include <fakemeta>

static const PLUGIN_NAME[]     = "Remove Breakable Stuff & Hostages"
static const PLUGIN_AUTHOR[]     = "Cheap_Suit"
static const PLUGIN_VERSION[]    = "1.0"

public plugin_init()
{
    
register_plugin(PLUGIN_NAMEPLUGIN_VERSIONPLUGIN_AUTHOR)
    
register_cvar(PLUGIN_NAMEPLUGIN_VERSIONFCVAR_SPONLY|FCVAR_SERVER)
    
register_event("HLTV""event_hltv""a""1=0""2=0")
}

public 
event_hltv()
{
    
remove_entity_by_classname("func_breakable")
    
remove_entity_by_classname("hostage_entity")
    
remove_entity_by_classname("scientist_entity")
}

stock remove_entity_by_classname(const classname[]) 
{
    new 
ent = -1
    
while((ent engfunc(EngFunc_FindEntityByStringent"classname"classname)))
        
engfunc(EngFunc_RemoveEntityent)

__________________
HDD fried, failed to backup files. Sorry folks, just don't have free time anymore. This is goodbye.

Last edited by Cheap_Suit; 02-27-2007 at 06:20.
Cheap_Suit 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 00:37.


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