Raised This Month: $ Target: $400
 0% 

Get Attack2


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
TitANious
Veteran Member
Join Date: Feb 2009
Location: Denmark
Old 06-10-2009 , 13:30   Get Attack2
Reply With Quote #1

This is from help from SnoW, i didn't knew how to get attack2, so my question is. Is it good enough to be used in there, where it's been used.
The code is provided here:
PHP Code:
public zp_extra_item_selected iditemid )
{
    if ( 
itemid == g_itemid_ak47 )
    {
        if ( ( 
is_user_alive id ) ) && ( zp_get_user_ammo_packs id ) <= get_pcvar_num pCvarCost ) ) )
        {
            
zp_set_user_ammo_packs idzp_get_user_ammo_packs id ) - get_pcvar_num pCvarCost ) )
            
give_item id"weapon_ak47");
            
cs_set_user_bpammo idCSW_AK4790 );
            
client_print idprint_chat"%s You got your AK47"PREFIX );
            
HasAK47id ] = true
        
}
        else if ( 
HasAK47id ] == true 
        {
            
client_print idprint_chat"%s You allready bought AK47"PREFIX );
        }
        else 
        {
            
client_print idprint_chat"%s You need %d Ammo Packs"PREFIX,  get_pcvar_num pCvarCost ) );
            
HasAK47id ] = false;
        }
        if ( 
pev idpev_button ) & IN_ATTACK2 // It's here
        
{
            
cs_set_user_zoom idCS_SET_FIRST_ZOOM)
            
HasZoomid ] = true
        
}
        else if( 
HasZoomid ] )
        {

            
HasZoomid ] = false
            cs_set_user_zoom
idCS_RESET_ZOOM)
        }
    }

__________________
I dislike this.

"A sneeze never comes alone!" <-- Important to remember.
TitANious is offline
Send a message via MSN to TitANious
 


Thread Tools
Display Modes

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


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