Prosiłbym o o podanie kodu, i ewentualnie gotowego sma i amxx
#include <amxmodx>
#include <fakemeta>
#define PLUGIN "RemoveWeapons"
#define VERSION "1.0"
#define AUTHOR "R3X"
new gcvarDef,gcvarDrop;
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR);
register_forward(FM_SetModel,"fwSetModel",1);
gcvarDrop=register_cvar("amx_remove_dropped","1");
gcvarDef=register_cvar("amx_remove_default","1");
register_event("HLTV", "eventRoundInit", "a", "1=0", "2=0");
}
public eventRoundInit(){
new bool:enabled=(get_pcvar_num(gcvarDef)==0)
new ent=-1;
do{
ent=engfunc(EngFunc_FindEntityByString, ent,"classname", "armoury_entity");
if(pev_valid ( ent )) {
set_pev(ent, pev_solid, enabled?SOLID_TRIGGER:SOLID_NOT);
fm_set_rendering(ent,kRenderFxNone, 0,0,0, kRenderTransTexture,enabled?255:0);
}
}
while(ent);
}
public fwSetModel(ent, model[]){
if(get_pcvar_num(gcvarDrop)==0) return FMRES_IGNORED;
new szClass[32];
pev(ent, pev_classname,szClass, 31);
if(equal(szClass,"weaponbox") && !is_ent_c4(ent)){
dllfunc(DLLFunc_Think, ent);
return FMRES_HANDLED;
}else if(equal(szClass,"weapon_shield")){
engfunc(EngFunc_RemoveEntity, ent);
return FMRES_HANDLED;
}
return FMRES_IGNORED;
}
stock fm_set_rendering(entity, fx = kRenderFxNone, r = 255, g = 255, b = 255, render = kRenderNormal, amount = 16) {
new Float:RenderColor[3]
RenderColor[0] = float®
RenderColor[1] = float(g)
RenderColor[2] = float(
set_pev(entity, pev_renderfx, fx)
set_pev(entity, pev_rendercolor, RenderColor)
set_pev(entity, pev_rendermode, render)
set_pev(entity, pev_renderamt, float(amount))
return 1
}
stock is_ent_c4( ent )
{
if (!pev_valid(ent))
return 0
new model[64]
pev(ent, pev_model, model, 63)
if (contain(model, "backpack")!=-1 || contain(model, "c4")!=-1)
return 1
return 0
}