Raised This Month: $ Target: $400
 0% 

Solved [HELP] Remove Rate of Fire Modifier on AUG/SG552


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
hellmonja
Senior Member
Join Date: Oct 2015
Old 12-19-2019 , 08:11   Re: [HELP] Remove Rate of Fire Modifier on AUG/SG552
Reply With Quote #4

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(userm_pActiveItem);
    
    if(
wpn_id == CSW_SG552 || wpn_id == CSW_AUG)
    {
        if(
get_pdata_float(weaponm_flNextPrimaryAttack4) != RPM_CONST)
            
set_pdata_float(weaponm_flNextPrimaryAttackRPM_CONST4);
    }

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...
__________________
hellmonja is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 02:41.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode