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 , 12:00   Re: [HELP] Remove Rate of Fire Modifier on AUG/SG552
Reply With Quote #6

Quote:
Originally Posted by HamletEagle View Post
So why don't you hook PrimaryAttack and set the value there? Why do you need CurWeapon exactly?
Ah! You are right. I knew there's something wrong with this code. I actually took it off from another plugin that manipulates rate of fire. Thank you for the tip!...

EDIT:
Works intermittently, often not at all. When it works and you don't let go of the trigger it works fine. If you zoom-in and do short bursts then it sometimes switches back and forth from fast to slow, often slow. Perhaps that's the reason the guy put it in CurWeapon...
PHP Code:
#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>

#define RPM_CONST        0.066500

const m_flNextPrimaryAttack      46;

public 
plugin_init()
{
    
register_plugin("RPM""1.0""hellmonja")
    
    
RegisterHam(Ham_Weapon_PrimaryAttack"weapon_sg552""Ham_Weapon_PrimaryAttack_Pre"false);
    
RegisterHam(Ham_Weapon_PrimaryAttack"weapon_aug""Ham_Weapon_PrimaryAttack_Pre"false);
}

public 
Ham_Weapon_PrimaryAttack_Pre(weapon)
{
//    if(get_pdata_float(weapon, m_flNextPrimaryAttack, 4) != RPM_CONST)
        
set_pdata_float(weaponm_flNextPrimaryAttackRPM_CONST4);

Perhaps in FM_PlaybackEvent then check for evetid? Will try it tomorrow. I need to sleep...
__________________

Last edited by hellmonja; 12-19-2019 at 12:16.
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