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

About Reload speed


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
smoothjazz
Senior Member
Join Date: Jul 2008
Old 03-09-2009 , 00:37   About Reload speed
Reply With Quote #1

Is there any function can increase reload speed?
ex. increase reload speed 30% or something else
Thx!
smoothjazz is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 03-09-2009 , 01:22   Re: About Reload speed
Reply With Quote #2

Do you care if the reload animation is shown?
__________________
Bugsy is offline
smoothjazz
Senior Member
Join Date: Jul 2008
Old 03-09-2009 , 05:08   Re: About Reload speed
Reply With Quote #3

No.......
smoothjazz is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 03-09-2009 , 07:32   Re: About Reload speed
Reply With Quote #4

You want this for all weapons ?
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
smoothjazz
Senior Member
Join Date: Jul 2008
Old 03-09-2009 , 07:47   Re: About Reload speed
Reply With Quote #5

Yes~~
smoothjazz is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 03-09-2009 , 07:49   Re: About Reload speed
Reply With Quote #6

Try this :

#define RELOAD_RATIO 0.7
This is 30% quicker, feel free to change it.

PHP Code:
#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>

#define PLUGIN "Reload Speed"
#define AUTHOR "ConnorMcLeod"
#define VERSION "0.2.0"

#define RELOAD_RATIO 0.7

const NOCLIP_WPN_BS    = ((1<<2)|(1<<CSW_HEGRENADE)|(1<<CSW_SMOKEGRENADE)|(1<<CSW_FLASHBANG)|(1<<CSW_KNIFE)|(1<<CSW_C4))
const 
SHOTGUNS_BS    = ((1<<CSW_M3)|(1<<CSW_XM1014))

// weapons offsets
const m_pPlayer            41
const m_iId                43
const m_flNextPrimaryAttack    46
const m_flNextSecondaryAttack    47
const m_flTimeWeaponIdle        48
const m_fInReload            54

const m_flNextAttack 83

stock 
const Float:g_fDelay[CSW_P90+1] = {
    
0.002.700.002.000.000.55,   0.003.153.300.004.50
         
2.703.503.352.453.30,   2.702.202.502.634.70
         
0.553.052.123.500.00,   2.203.002.450.003.40
}

public 
plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)

    new 
szWeapon[17]
    for(new 
i=1i<=CSW_P90i++)
    {
        if( !(
NOCLIP_WPN_BS & (1<<i)) && get_weaponname(iszWeaponcharsmax(szWeapon)) )
        {
            if( !(
SHOTGUNS_BS & (1<<i)) )
            {
                
RegisterHam(Ham_Item_PostFrameszWeapon"Item_PostFrame_Post"1)
            }
        }
    }
}

public 
Item_PostFrame_Post(iEnt)
{    
    if( 
get_pdata_int(iEntm_fInReload4) )
    {
        new 
Float:fDelay g_fDelay[get_pdata_int(iEntm_iId4)] * RELOAD_RATIO
        set_pdata_float
(get_pdata_cbase(iEntm_pPlayer4), m_flNextAttackfDelay5)
        
set_pdata_float(iEntm_flTimeWeaponIdlefDelay 0.54)
    }

__________________
- tired and retired -

- my plugins -

Last edited by ConnorMcLeod; 03-09-2009 at 08:38.
ConnorMcLeod is offline
smoothjazz
Senior Member
Join Date: Jul 2008
Old 03-09-2009 , 08:30   Re: About Reload speed
Reply With Quote #7

thx so much~~
smoothjazz is offline
smoothjazz
Senior Member
Join Date: Jul 2008
Old 03-09-2009 , 08:36   Re: About Reload speed
Reply With Quote #8

reloadspeed.sma<49--50>:error 008 : must be a constant expression assumed zero
reloadspeed.sma<50>error 017: unfined symbol "m_flNextAttack"
smoothjazz is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 03-09-2009 , 08:38   Re: About Reload speed
Reply With Quote #9

Updated.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
smoothjazz
Senior Member
Join Date: Jul 2008
Old 03-09-2009 , 09:09   Re: About Reload speed
Reply With Quote #10

Can also increases reload speed for M3 and XM1104 ?

And how to set only for someone like ADM、VIP etc. can be affected?

Thx Again

Last edited by smoothjazz; 03-09-2009 at 10:21.
smoothjazz 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 03:34.


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