Raised This Month: $ Target: $400
 0% 

Trouble using bits to register forwards.


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Y060N
BANNED
Join Date: Dec 2011
Location: www.equilibriumcs.com
Old 07-06-2012 , 12:08   Trouble using bits to register forwards.
Reply With Quote #1

I'm trying to register the forwards for main rifles and machine gun only, but it seems as though this isn't working out so well for me.

Can anyone help out? Thanks!

PHP Code:

const NOCLIP_WPN_BS = ((1<<CSW_ELITE)|(1<<CSW_FIVESEVEN)|(1<<CSW_UMP45)|(1<<CSW_USP)|(1<<CSW_GLOCK18)|(1<<CSW_AWP)|(1<<CSW_MP5NAVY)|(1<<CSW_M3)|(1<<CSW_TMP)|(1<<CSW_G3SG1)|(1<<CSW_SG552)|(1<<CSW_HEGRENADE)|(1<<CSW_SMOKEGRENADE)|(1<<CSW_FLASHBANG)|(1<<CSW_KNIFE)|(1<<CSW_C4))

public 
plugin_init()
{

    
register_plugin("blah""1.0""blah")

    for (new 
i=CSW_AUG;i<=CSW_AK47;i++) 
    {         
        if( 
get_weaponname(iszWeaponcharsmax(szWeapon)) )
        {
            if( 
& ~NOCLIP_WPN_BS 1<<)
            {
                
RegisterHamHam_Weapon_PrimaryAttackszWeapon"fw_primary_attack" 
                
RegisterHamHam_Weapon_PrimaryAttackszWeapon"fw_primary_attack_post")
                
RegisterHam(Ham_Weapon_ReloadszWeapon"ham_Reload_Post"1)
            }
        }
    }

Y060N is offline
 



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 15:20.


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