I've tested this :
Code:
#include <amxmodx>
#include <fakemeta>
new const T_SPAWN_CLASSNAME[] = "info_player_deathmatch"
//new const CT_SPAWN_CLASSNAME[] = "info_player_start"
public plugin_init() {
register_plugin("No Terro Knives","0.1","connor")
register_forward(FM_SetModel, "fwd_SetModel")
}
public fwd_SetModel(ent, const model[]) {
if(!pev_valid(ent))
return FMRES_IGNORED
if( !equal(model, "models/w_knife.mdl") )
return FMRES_IGNORED
static Float:origin[3]
pev(ent, pev_origin, origin)
if( check_terrorist(origin) )
{
engfunc(EngFunc_RemoveEntity, ent)
return FMRES_SUPERCEDE
}
return FMRES_IGNORED
}
check_terrorist(Float:origin[]){
new ent
while((ent = engfunc(EngFunc_FindEntityInSphere, ent, origin, 50.0)) != 0 ) {
static classname[33]
pev(ent, pev_classname, classname, charsmax(classname))
if(equal(classname,T_SPAWN_CLASSNAME))
return 1
}
return 0
}
Tested on my listenserver and worked, but as soon as i've added a bot, server crashed.