Raised This Month: $ Target: $400
 0% 

HELP with reload


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Bos93
Veteran Member
Join Date: Jul 2010
Old 04-16-2013 , 12:20   Re: HELP with reload
Reply With Quote #2

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

new const WEAPONENTNAMES[ ][ ] =
{
    
"""weapon_p228""""weapon_scout""weapon_hegrenade""weapon_xm1014""weapon_c4""weapon_mac10",
    
"weapon_aug""weapon_smokegrenade""weapon_elite""weapon_fiveseven""weapon_ump45""weapon_sg550",
    
"weapon_galil""weapon_famas""weapon_usp""weapon_glock18""weapon_awp""weapon_mp5navy""weapon_m249",
    
"weapon_m3""weapon_m4a1""weapon_tmp""weapon_g3sg1""weapon_flashbang""weapon_deagle""weapon_sg552",
    
"weapon_ak47""weapon_knife""weapon_p90"
}


#define IsValidPrivateData(%0) ( pev_valid( %0 ) == 2 )

const m_pPlayer 41;
const 
OFFSET_LINUX_WEAPONS 4;

public 
plugin_init(  )
{
    new 
iWeapon;

    for( 
iWeapon 1iWeapon sizeof WEAPONENTNAMESiWeapon++ )
    {
        if( 
WEAPONENTNAMESiWeapon ][ ] ) 
        {
            
RegisterHamHam_Weapon_ReloadWEAPONENTNAMESiWeapon ], "CBaseWeapon__Reload_Post", .Post true );
        }
    }
}

public 
CBaseWeapon__Reload_PostpEntity )
{
    if( !
IsValidPrivateDatapEntity ) )
    {
        return 
HAM_IGNORED;
    }

    new 
pPlayer get_pdata_cbasepEntity m_pPlayer OFFSET_LINUX_WEAPONS );

    switch( 
cs_get_weapon_idpEntity ) )
    {
        case 
CSW_DEAGLEcs_set_user_bpammopPlayer ,CSW_DEAGLE);
        case 
CSW_AK47cs_set_user_bpammopPlayer ,CSW_AK47);
        case 
CSW_M4A1cs_set_user_bpammopPlayer ,CSW_M4A1);
        case 
CSW_AWPcs_set_user_bpammopPlayer ,CSW_AWP);
        case 
CSW_M249cs_set_user_bpammopPlayer ,CSW_M249);
    }

    return 
HAM_IGNORED;

__________________

Last edited by Bos93; 04-16-2013 at 12:21.
Bos93 is offline
Send a message via ICQ to Bos93 Send a message via Skype™ to Bos93
 



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 10:50.


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