AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   How to fast reload & shoot ? (https://forums.alliedmods.net/showthread.php?t=156700)

dFF 05-10-2011 15:09

How to fast reload & shoot ?
 
Title ?

I tried with:
PHP Code:

#include < amxmodx >
#include < hamsandwich >
#include < fakemeta >

#define m_fInReload 54
#define m_fAttack 83
#define m_Linux 4
//#define m_fInSpecialReload 55

#define MAX_PLAYERS 32

const NO_RELOAD = ( << ) | ( << CSW_KNIFE ) | ( << CSW_C4 ) | ( << CSW_M3 ) | ( << CSW_XM1014 ) | ( << CSW_HEGRENADE ) | ( << CSW_FLASHBANG ) | ( << CSW_SMOKEGRENADE )

new 
g_iHasMAX_PLAYERS+]

public 
plugin_init() 
{
    new 
szWeaponName20 ]
    for( new 
CSW_P228<= CSW_P90i++ ) 
    {
        if( 
NO_RELOAD & (1<<i) )
            continue
            
        
get_weaponnameiszWeaponNamecharsmaxszWeaponName ) )
        
RegisterHamHam_Weapon_ReloadszWeaponName"FwdHamWeaponReload" )
    }
    
    
register_clcmd"get""get" )
}

public 
getid )
{
    
g_iHasid ] = !g_iHasid ]
}

public 
FwdHamWeaponReload( const iWeapon 
{
    static 
id
    id 
peviWeaponpev_owner )
    
    if( 
id && g_iHasid ] && is_user_aliveid ) && get_pdata_intiWeaponm_fInReloadm_Linux ) ) 
    {
        
set_pdata_floatiWeaponm_fInReload0.0m_Linux )
        
set_pdata_floatiWeaponm_fAttack0.0m_Linux )
    }


Doesn't work on linux server.

SonicSonedit 05-10-2011 15:41

Re: How to fast reload & shoot ?
 
Set weapon entity offset 48 to 0.0
Also offset 54 is not float.

ConnorMcLeod 05-11-2011 03:12

Re: How to fast reload & shoot ?
 
Hook Reload POST, check if m_fInReload is 1, if so, set delays to the value you want.

http://forums.alliedmods.net/showpos...02&postcount=5

dFF 05-11-2011 06:01

Re: How to fast reload & shoot ?
 
Thanks guys!

KleirPlays 12-28-2013 19:01

Re: How to fast reload & shoot ?
 
Its possible to change this plugin for vips only?

Like only vip players reload faster then no vip players.

VIP FLAG:
ADMIN_RESERVATION

fysiks 12-28-2013 20:03

Re: How to fast reload & shoot ?
 
That is an unfair advantage.

KleirPlays 12-29-2013 06:12

Re: How to fast reload & shoot ?
 
Its not unfair, if u pay to be vip, u have some advantages.

I need to give them some advantagens if they pay..

Can someone help me?


All times are GMT -4. The time now is 04:31.

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