Raised This Month: $ Target: $400
 0% 

Quick scope ONLY !


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 08-29-2010 , 11:13   Re: Quick scope ONLY !
Reply With Quote #2

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

new const Version[] = "0.3";

const 
Task_Unscope 24680;
const 
Float:ScopeTime 5.5;

new 
g_iPrevWeapon33 ];
new 
bool:g_bIsScoped33 ];

public 
plugin_init() 
{
    
register_plugin"Quick AWP Scope" Version "bugsy" );
    
    
RegisterHamHam_Weapon_SecondaryAttack "weapon_awp" "fw_AWPSecondaryAttack_Post"  );

    
register_event"CurWeapon" "fw_EvCurWeapon" "be" "1=1" );
}

public 
client_disconnectid )
{
    
g_bIsScopedid ] = false;
}

public 
fw_AWPSecondaryAttack_PostiEnt )
{
    static 
idid peviEnt pev_owner );
    
    switch ( 
cs_get_user_zoomid ) )
    {
        case 
CS_SET_FIRST_ZOOM:
        {    
            
g_bIsScopedid ] = true;
            
set_taskScopeTime "Unscope" Task_Unscope id );
        }
        case 
CS_SET_NO_ZOOM
        {
            
g_bIsScopedid ] = false;
            
remove_taskTask_Unscope id );
        }
    }
}

public 
UnscopeTaskID )
{
    static 
idid TaskID Task_Unscope;
    
    if ( 
is_user_connectedid ) )
    {
        
g_bIsScopedid ] = false;
        
cs_set_user_zoomid CS_SET_NO_ZOOM );
    }
}

public 
fw_EvCurWeaponid )
{    
    static 
iWeaponiWeapon read_data);
    
    if ( 
g_bIsScopedid ] && ( g_iPrevWeaponid ] == CSW_AWP ) && ( iWeapon != g_iPrevWeaponid ] ) )
    {
        
g_bIsScopedid ] = false;
        
remove_taskTask_Unscope id );
    }
    
    
g_iPrevWeaponid ] = iWeapon;
    
    return 
PLUGIN_CONTINUE;

__________________

Last edited by Bugsy; 08-31-2010 at 14:05.
Bugsy 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 05:17.


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