Hi everyone! So I found a solution so that AUG & SG552 will shoot at the same rate, zoomed in or not. Here's what I came up with:
PHP Code:
#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>
#define RPM_CONST 0.066500;
const m_flNextPrimaryAttack = 46;
const m_pActiveItem = 373;
public plugin_init()
{
register_plugin("RPM", "1.0", "hellmonja");
register_event("CurWeapon", "Event_CurWeapon", "be", "1=1");
}
public Event_CurWeapon(user)
{
new wpn_id = get_user_weapon(user);
new weapon = get_pdata_cbase(user, m_pActiveItem);
if(wpn_id == CSW_SG552 || wpn_id == CSW_AUG)
{
if(get_pdata_float(weapon, m_flNextPrimaryAttack, 4) != RPM_CONST)
set_pdata_float(weapon, m_flNextPrimaryAttack, RPM_CONST, 4);
}
}
0.066500 was taken when I checked what was the value of m_flNextPrimaryAttack when shooting both weapons without zooming in. I didn't use CD_flNextAttack for reasons that would be tl:dr to put here. Let's just say I need it set to a certain value all the time so that the other systems work properly...
__________________