View Single Post
Hey
Member
Join Date: Dec 2017
Old 01-13-2018 , 10:37   Re: [CS1.6] Bullet Travel Time
Reply With Quote #10

ok i got the weapons blocked from shooting.
now that i got a moment to think about it.. it's not going to work as i need it to cuz the code below blocks every weapons from shooting ofc not all(c4, he, flash, smoke, knife). so no animation of shooting will be played and no bullet will get shot out.

but i think what i need is make only the bullets decals to not be shown and the damage not get registered so it can be possible for me to make my idea, so get some help at it ?

PHP Code:
/* some of the code was taken from Juice special thanks to him */

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

new const NO_RELOAD = (1<<2)|(1<<CSW_KNIFE)|(1<<CSW_C4)|(1<<CSW_HEGRENADE)|(1<<CSW_FLASHBANG)|(1<<CSW_SMOKEGRENADE);

const 
m_flNextPrimaryAttack 46;
const 
m_flNextSecondaryAttack 47;
const 
EXTRAOFFSET_WEAPONS 4;

new 
WeaponName[24];

public 
plugin_init() 
{
    
register_plugin("Block Weapons Attack""1.0""Juice/Hey");
    
    for(new 
CSW_P228<= CSW_P90i++)
    {
        if(
NO_RELOAD & (1<<i))
            continue;
            
        
get_weaponname(iWeaponName23);
        
RegisterHam(Ham_Item_DeployWeaponName"HamWeaponDeploy_Post"1);
    }
}

public 
HamWeaponDeploy_PostiEnt 
{
    
set_pdata_floatiEntm_flNextPrimaryAttack9999.0EXTRAOFFSET_WEAPONS );
    
set_pdata_floatiEntm_flNextSecondaryAttack9999.0EXTRAOFFSET_WEAPONS );

Hey is offline