|
发表于 2009-11-2 20:15:58
|
显示全部楼层
来自 中国–广东–广州
楼主,我帮你试写了一个,但是好像盾牌是不能让它消失的!
我测试过!其它武器都可以!但是就是盾牌不可以!!我发我的代码给你看看!- #include <amxmodx>
- #include <amxmisc>
- #include <fakemeta_util>
- #include <fakemeta>
- #define PLUGIN_NAME "Remove Shield"
- #define PLUGIN_VERSION "1.0"
- #define PLUGIN_AUTHOR "Unknow"
- new g_max_players
- public plugin_init()
- {
- register_plugin(PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR)
-
- register_event("SendAudio", "event_EndRound", "a", "2&%!MRAD_terwin","2&%!MRAD_ctwin","2&%!MRAD_rounddraw")
- g_max_players = get_maxplayers()
- }
- public event_EndRound()
- {
- new id
- new param[1]
- for (id = 1; id < g_max_players; id++)
- {
- new iEnt = fm_find_ent_by_owner(-1, "weapon_shield", id)
- engclient_cmd(id, "drop", "weapon_shield")
- new iBox = pev(iEnt, pev_owner)
- if (!iBox || iBox == id)
- return PLUGIN_HANDLED
- param[0] = iBox
- set_task(1.0, "drop_weapon", 0, param, 1)
- }
- return PLUGIN_HANDLED
- }
- public drop_weapon(param[])
- {
- new iBox = param[0]
- engfunc(EngFunc_RemoveEntity, iBox)
- }
复制代码 |
|