Raised This Month: $51 Target: $400
 12% 

Fire Rate Control


Post New Thread Reply   
 
Thread Tools Display Modes
hebusletroll
Senior Member
Join Date: Apr 2006
Old 06-20-2012 , 15:32   Re: Fire Rate Control
Reply With Quote #51

Hello.

I've check that the plugin does not apply to PodBot. There is any way to force podbot to use same firerate ?

Best regards )
__________________
Boring about playing same weapons ? PowerWeapons is available !
PowerWeapon v1.0 released !
Play up to 70 new weapons and create your own weapons !
Tested on Windows Server 2003, 2008/R2, 2012 and Linux Ubuntu 10.x and CentOs 6.x
hebusletroll is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 06-23-2012 , 12:28   Re: Fire Rate Control
Reply With Quote #52

Quote:
Originally Posted by cs1.7 View Post
what is this code for?

do you have an optimized version of this plugin?
Try this :
PHP Code:
#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>

const MAX_PLAYERS 32

#define        m_pActiveItem                                    373

#define XO_CBASEPLAYERWEAPON    4
#define    m_flNextPrimaryAttack        46

const NOFIRE_WEAPS_BITSUM = (1<<CSW_KNIFE) | (1<<CSW_HEGRENADE) | (1<<CSW_FLASHBANG) | (<< CSW_SMOKEGRENADE) | (1<<CSW_C4)

new 
P_Cvars[CSW_P90 1], amx_speed_modeamx_speed_all

new g_iCurWeaponMAX_PLAYERS 1 char ]
new 
g_iCurAmmoMAX_PLAYERS 1 char ]

// This is not used is this plugin
stock Float:g_flDefaultDelaysCSW_P90 ] = 
{
    -
1.0,
    
0.2// CSW_P228
    
-1.0,
    
1.25// CSW_SCOUT
    
-1.0// CSW_HEGRENADE
    
0.25// CSW_XM1014
    
-1.0// CSW_C4
    
0.07// CSW_MAC10
    
0.135// CSW_AUG
    
-1.0// CSW_SMOKEGRENADE
    
0.2// CSW_ELITE
    
0.2// CSW_FIVESEVEN
    
0.1// CSW_UMP45
    
0.25// CSW_SG550
    
0.0875// CSW_GALIL
    
0.0825// CSW_FAMAS
    
0.225// CSW_USP
    
0.2// CSW_GLOCK18
    
1.45// CSW_AWP
    
0.075// CSW_MP5NAVY
    
0.1// CSW_M249
    
0.875// CSW_M3
    
0.0875// CSW_M4A1
    
0.07// CSW_TMP
    
0.25,  // CSW_G3SG1
    
-1.0// CSW_FLASHBANG
    
0.3// CSW_DEAGLE
    
0.135// CSW_SG552
    
0.0955// CSW_AK47
    
-1.0// CSW_KNIFE
    
0.066// CSW_P90
}

public 
plugin_init()
{
    
register_plugin("Fire Rate Control""1.10""Fxfighter"// version 1.10 by ConnorMcLeod, find version 1.08 here : http://forums.alliedmods.net/showthread.php?t=68382

    
register_event("CurWeapon","Event_CurWeapon""be""1=1""3!-1")
    
    
amx_speed_mode register_cvar("amx_speed_mode""1")
    
amx_speed_all register_cvar("amx_speed_all""1.0")

    new 
szCvarName[32] = "amx_speed_"szWeaponName[32]
    for(new 
iId CSW_P90iId <= CSW_P90iId++)
    {
        if( ~
NOFIRE_WEAPS_BITSUM & (1<<iId) && get_weaponname(iIdszWeaponNamecharsmax(szWeaponName)) )
        {
            
copy(szCvarName[10], charsmax(szCvarName)-10szWeaponName[7])
            
P_CvarsiId ] = register_cvar(szCvarName"1.0")
        }
    }
}

public 
Event_CurWeapon(id
{
    new 
iSpeedMode get_pcvar_num(amx_speed_mode)
    if( ! 
iSpeedMode )
    {
        return
    }

    new 
Gun read_data(2)
    if( 
NOFIRE_WEAPS_BITSUM 1<<Gun )
    {
        return
    }

    if(
g_iCurWeapon{id} != Gun)
    {
        
g_iCurWeapon{id} = Gun
        
return
    }

    new 
Ammo read_data(3)
    if( 
g_iCurAmmo{id} == Ammo )
    {
        return
    }

    
g_iCurAmmo{id} = Ammo 
    
    
static Float:N_Speed
    
if(iSpeedMode == 1)
    {
        
N_Speed get_pcvar_floatamx_speed_all )
    }
    else
    {
        
N_Speed get_pcvar_float(P_Cvars[Gun])
    }
        
    if(
N_Speed != 1.0 && N_Speed 0.0)
    {
        new 
Ent get_pdata_cbase(idm_pActiveItem)
        if(
Ent 0)
        {
            
set_pdata_floatEntm_flNextPrimaryAttackget_pdata_floatEntm_flNextPrimaryAttackXO_CBASEPLAYERWEAPON) * N_SpeedXO_CBASEPLAYERWEAPON)
        }
    }


@hebusletroll
Tell me if this version works or not, maybe bots don't receive messages
__________________
- tired and retired -

- my plugins -

Last edited by ConnorMcLeod; 06-23-2012 at 12:32.
ConnorMcLeod is offline
fxfighter
Veteran Member
Join Date: Feb 2007
Location: Trollhättan
Old 06-26-2012 , 12:02   Re: Fire Rate Control
Reply With Quote #53

ConnorMcLeod, i saw your mail and i am currently without a internet connection at home.
There was some issues moving my connection along with me, i am posting from a lan cafe atm.
So far it´s been over week , i will update this plugin when in get my connection back.

So people will get a better version without having to dig, thanks for you help and notice
__________________
If one of my plugins become broken, contact me by mail. [email protected]

Last edited by fxfighter; 06-26-2012 at 12:05.
fxfighter is offline
Send a message via MSN to fxfighter
Alphadios
Junior Member
Join Date: Jan 2010
Old 08-25-2022 , 13:29   Re: Fire Rate Control
Reply With Quote #54

I am using this with Zombie Plague 5.0.8 and i have the following bug: When i turn a player into survivor, that player won't have the effects of this plugin. So if i set the M249 at 0.9, the survivor will use the default firerate. This is annoying. Does anyone have any clue on how could i fix this?
Alphadios is offline
Reply



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 08:33.


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