下面是引用 ak47klo 於 2014-04-06 22:33 發表的 :
我也知道
語法呢?
複製程式
#include amxmodx
#include fakemeta
public plugin_init()
{
register_forward(FM_CmdStart, "CmdStart_Post", 1);
}
public CmdStart_Post( player, uc_handle, random_seed )
{
new buttons = get_uc(uc_handle, UC_Buttons);
if( buttons & IN_ATTACK2 )
{
set_uc(uc_handle, UC_Buttons, buttons & ~IN_ATTACK2);
}
}
複製程式
#include amxmodx
#include fakemeta
public plugin_init()
{
register_forward(FM_PlayerPreThink, "PlayerPreThink");
}
public PlayerPreThink( entity )
{
new button = pev(entity, pev_button);
if( button & IN_ATTACK2 )
{
set_pev(entity, pev_button, button & ~IN_ATTACK2);
}
}