This will remove weapons right after they are dropped:
Code:
public pfn_touch(ptr, ptd) {
if(is_valid_ent(ptr) && is_valid_ent(ptd)) {
new classname[32]
entity_get_string(ptr,EV_SZ_classname,classname,31)
if(equali(classname,"weaponbox")) {
new ents = entity_count();
for(new inum=0;inum<=ents;inum++) {
if(!is_valid_ent(inum)) continue
new class[51]
entity_get_string(inum,EV_SZ_classname,class,50)
if(containi(class,"weapon_") == -1) continue
new owner = entity_get_edict(inum,EV_ENT_owner)
if(ptr == owner)
remove_entity(inum)
}
remove_entity(ptr)
}
else if(containi(classname,"weapon_") != -1)
remove_entity(ptr)
}
return PLUGIN_CONTINUE
}
Requires Engine.
BJ.
__________________