1 #include <amxmodx> 2 #include <fakemeta> 3 4 new const g_szMapConditions[][] = 5 { 6 "func_bomb_target", 7 "info_bomb_target", 8 "func_hostage_rescue", 9 "func_escapezone", 10 "func_vip_safetyzone" 11 } 12 13 new g_fwBlockEntity; 14 15 public plugin_precache() 16 { 17 g_fwBlockEntity = register_forward(FM_Spawn, "fw_Spawn"); 18 } 19 20 public plugin_init() 21 { 22 register_plugin("RemoveMapConditions", "1.0", "Akatsuki"); 23 unregister_forward(FM_Spawn, g_fwBlockEntity); 24 } 25 26 public fw_Spawn(iEntity) 27 { 28 static szClassName[32]; 29 pev(iEntity, pev_classname, szClassName, charsmax(szClassName)); 30 31 for(new i = 0; i < sizeof(g_szMapConditions); ++i) 32 { 33 if(equal(szClassName, g_szMapConditions[i])) 34 { 35 engfunc(EngFunc_RemoveEntity, iEntity); 36 return FMRES_SUPERCEDE; 37 } 38 } 39 40 return FMRES_IGNORED; 41 }
时间: 2024-10-05 17:30:04