求教:如何修改SMA使T用刀无法攻击CT
如题我下面传2个插件
hnsdm.sma和hns.sma
前者本来让T没有刀。修改SMA后我把刀弄出来了,但是T能攻击CT
后者也是修改的,不过是别人修改的.有刀,但是T不能攻击CT. 不懂,反正觉得是个好东西 #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;
}
页:
[1]