The idea is to only need to click the mouse button once for your gun to shoot for more than a second to get a burst effect. I would like it to only function for rifles except for the famas as this has a burst funtion already. Any thoughts?
PHP Code:
#include <amxmodx>
#include <cstrike>
#include <hamsandwich>
#include <fakemeta>
#include <fun>
#define XO_PLAYER 5
#define m_afButtonPressed 246
public plugin_init()
{
register_plugin("inattack", "1.0", "LB")
}
public client_PostThink(id)
{
if( is_user_alive(id) && get_pdata_int(id, m_afButtonPressed, XO_PLAYER) & IN_ATTACK )
{
client_cmd(id, "+attack") && set_task(0.2, "-attack", id);
}
}