|
发表于 2009-7-13 19:01:18
|
显示全部楼层
来自 中国–四川–遂宁
- #include <amxmodx>
- #include <amxmisc>
- #include <fakemeta>
- #define PLUGIN_NAME "fakeknife"
- #define PLUGIN_VERSION "1.0"
- #define PLUGIN_AUTHOR "Jon"
- public plugin_init()
- {
- register_plugin(PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR)
- register_forward(FM_CmdStart, "fwdCmdStart");
- }
- public fwdCmdStart(id, handle)
- {
- if(!is_user_alive(id))
- return FMRES_IGNORED;
-
- static temp, weapon;
- weapon = get_user_weapon(id, temp, temp);
-
- if(weapon == CSW_KNIFE && get_user_team(id) == 1)
- {
- static button
- button = get_uc(handle, UC_Buttons);
-
- if((button & IN_ATTACK))
- button &= ~IN_ATTACK
-
- if((button & IN_ATTACK2))
- button &= ~IN_ATTACK2
-
- set_uc(handle, UC_Buttons, button);
-
- return FMRES_SUPERCEDE;
- }
- return FMRES_IGNORED;
- }
复制代码 |
|