View Single Post
Sn!ff3r
Veteran Member
Join Date: Aug 2007
Location: Poland
Old 02-20-2009 , 22:53   Re: [Request] Remove weapon entity/Block weapon pickup
Reply With Quote #2

It would have be good ;)

PHP Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <fakemeta>

#define PLUGIN "Nowy Plugin"
#define VERSION "1.0"
#define AUTHOR "Sn!ff3r"

public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_forward(FM_SetModel,"fw_setmodel",1)
    
// Add your code here...
}

public 
fw_setmodel(ent,model[])
{
    if(!
pev_valid(ent))
        return 
FMRES_IGNORED
        
    
if(contain(model,"_c4") != -|| contain(model,"_scout") != -|| contain(model,"_weaponbox") != -|| contain(model,"_back") != -1)
        return 
FMRES_IGNORED
    
    
static classname[33]; pev(ent,pev_classname,classname,32)
    
    if(
equal(classname,"weaponbox") || equal(classname,"armoury_entity") || contain(classname,"weapon_") != -1)
    {        
        
engfunc(EngFunc_RemoveEntity,ent)
        return 
FMRES_SUPERCEDE
        
    
}
    return 
FMRES_IGNORED    

__________________
Join US - custom Zombie Server - Custom Addons:



Sn!ff3r is offline
Send a message via Skype™ to Sn!ff3r