AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   New Plugin Submissions (https://forums.alliedmods.net/forumdisplay.php?f=26)
-   -   Rate of Fire Fix (https://forums.alliedmods.net/showthread.php?t=188182)

MPNumB 06-23-2012 11:43

Rate of Fire Fix
 
1 Attachment(s)
Description:
Some automatic weapons in the game have somewhat wrong rates of fire. This plugin fixes the RPM values for those weapons.


Requires:
FakeMeta
HamSandWich


Additional info:
Tested in Counter-Strike 1.6 with amxmodx 1.8.2 (dev build hg21). Automatic weapons what I found of having wrong rate of fire are MAC-10, FAMAS, AK-47, M4A1, SG552, AUG, M249.


Notes:
RPM changes are (in rate of fire):
* MAC-10: from 0.07 to 0.0524
* FAMAS: from 0.0825 to 0.0666
* AK-47: from 0.0955 to 0.1
* M4A1: from 0.0875 to 0.0857
* SG552: from 0.0825 (0.135 zoomed) to 0.0857
* AUG: from 0.0825 (0.135 zoomed) to 0.0825
* M249: from 0.1 to 0.075
It is recommended to also install Burst Rate of Fire Fix plugin with this one.


Warnings:
I found weapon RPMs using wikipedia, and I do not take responsibility if that information is wrong. However if you found a mistake, please feel free to notify me. I will fix the values, but don't forget to provide evidence for accurate RPMs if you do so.


Change-Log:

* 1.5
- Added: Brought back clicking sound when weapon is empty.
- Changed: Plugin requires less CPU power.

* 1.4
- Fixed: Delay between last bullet and reload.

* 1.3
- Fixed: MAC-10 RPM from 1090 (9mm) to 1145 (.45ACP).
- Fixed: M249 RPM from 850 to 800.

* 1.2
- Fixed: Improved stability.

* 1.1
- Fixed: Rate of clicking sound when cannot fire.

* 1.0
- First release.

<VeCo> 06-23-2012 11:52

Re: Rate of Fire Fix
 
What exactly means they are wrong?

Liverwiz 06-23-2012 12:24

Re: Rate of Fire Fix
 
useless mod IMHO. I don't need THAT much realism in counter strike. Especially considering it takes 2 shots to the head from a .223 to kill someone. You shoot me once in the face....my ass is dead. regardless.

SUGGESTION: make all rates of fire editable. not just ones that are "wrong." that way admins can do what they want with RPM and even build off the plugin.

MPNumB 06-23-2012 12:36

Re: Rate of Fire Fix
 
Quote:

Originally Posted by <VeCo> (Post 1734504)
What exactly means they are wrong?

They are unrealistic. However the ones who know me, do know that things what I do aren't meant for realism. Read on - will explain. :)

Quote:

Originally Posted by Liverwiz (Post 1734520)
useless mod IMHO. I don't need THAT much realism in counter strike. Especially considering it takes 2 shots to the head from a .223 to kill someone. You shoot me once in the face....my ass is dead. regardless.

SUGGESTION: make all rates of fire editable. not just ones that are "wrong." that way admins can do what they want with RPM and even build off the plugin.

Well, I think there already is a plugin what does that.

And now about realism. Yep, this plugin makes CS more realistic, but well... One of the thing it does is balances this weapons a little bit.

And without speaking more of bla-bla-bla stuff... Main purpose of this plugin is to be a sub-plugin for my upcoming major "weapon balance" plugin (I will submit soon - still think there should be some more tests done). And by major I mean, that I really like the beta so far, and it's already complicated enough to be unreadable (like my other big projects), so it will be a good one...

ConnorMcLeod 06-23-2012 12:44

Re: Rate of Fire Fix
 
Hardcoded values, and there is another plugin able to do the same thing, but not hardcoded, i don't see how this can be approved, let's see what other approver(s?) gonna say.
Also the other plugin uses CurWeapon event, which makes it consuming less cpu because code is executed on targetted times.

MPNumB 06-23-2012 12:54

Re: Rate of Fire Fix
 
Quote:

Originally Posted by ConnorMcLeod (Post 1734534)
Hardcoded values, and there is another plugin able to do the same thing, but not hardcoded, i don't see how this can be approved, let's see what other approver(s?) gonna say.
Also the other plugin uses CurWeapon event, which makes it consuming less cpu because code is executed on targetted times.

Well, yes, I presume there already exists a plugin where values can be changed. But it doesn't allow you to know what is the default rate of fire, and what is the real-life rate of fire. So that plugin was designed so admins can control the rate of fire as they wish, while this one hardcodes them to be realistic.

About using less CPU... Shouldn't that plugin also provide an extra check of when bullet was fired or was that some other weapon event (holster, deploy, zoom, unzoom, switch, or whatever)? Meaning that that plugin would do more checks and therefor consume more resources by doing so? :)

// EDIT:

Oh, almost forgot the
PHP Code:

//Frome Fakemeta utility
stock fm_find_ent_by_owner(index, const classname[], ownerjghgtype 0)
{
    new 
strtype[11] = "classname"ent index
    
switch (jghgtype
    {
        case 
1strtype "target"
        
case 2strtype "targetname"
    
}
    
    while ((
ent engfunc(EngFunc_FindEntityByStringentstrtypeclassname)) && pev(entpev_owner) != owner) {}
    
    return 
ent


what that other plugin is using in it's code... I really don't see how that can use less resources than my does. In fact I'm even amazed that no-one didn't have trouble with that function returning false entity-id. I mean I can easily create a plugin what will be designed to remove weapons on certain events in order to restrict the weapons, and as result this function will return false entity-id, and as result will change someones else next attack time in the plugin you'r talking about.

ConnorMcLeod 06-23-2012 13:24

Re: Rate of Fire Fix
 
After a bit more research, it appears that hooking PrimaryAttack is ok for weapons you use in your plugin, may be for all riffle/smg/machinegun/snipers, problem would be with pistols, nades, and c4 i think.
So it's ok for this.

Plugin should still allow custom settings and all weapons, IMO, let's see what other approvers gonna say.

MPNumB 06-23-2012 13:48

Re: Rate of Fire Fix
 
Updated to 1.1
Fixed: Rate of clicking sound when cannot fire.

---

Earlier thought that clicking sound is as often as rate of fire (technically it should be), but to stick closer to other weapons, fixed rate of clicking sound to what it originally was.

About custom settings and all weapons. Goal of this plugin as a stand-alone plugin to make rate of fire more realistic. If I'd add admin ability to change rate of fire, and support for other weapons - now that would be just copying that other plugin (though if I might, I do think that other plugin is somewhat unstable). But I don't think admins should be in charge of changing rate of fire as they wish whenever they wish to what they wish. Like I said, my idea for this one is only to make it more realistic (and believe it or no - it does balances stuff a little bit). Primary idea is for balance, but if realism can be a part of that, than why not? :)

Arkshine 06-23-2012 13:49

Re: Rate of Fire Fix
 
The plugin as it is, is ok. I understand the original purpose is different for both and why the values are hardcoded. There would be not a problem to be approved.

That's said, I second Connor about the suggestion, which it would be welcomed you replace the other plugin by allowing custom values and for all weapons.

MPNumB 06-23-2012 14:06

Re: Rate of Fire Fix
 
Thanks arkshine. :)

About Connor's suggestion... I understand where it's coming from, but I don't think admins should be allowed to have control over rates of fire to such an extent (may and most probably will be abused). Plus I'm not the kind of person who likes replacing plugins of others. :)


All times are GMT -4. The time now is 08:32.

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