码迷,mamicode.com
首页 > 其他好文 > 详细

去除地图任务

时间:2015-05-08 21:48:52      阅读:151      评论:0      收藏:0      [点我收藏+]

标签:

 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 }

 

去除地图任务

标签:

原文地址:http://www.cnblogs.com/crsky/p/4488796.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!