View Single Post
maqi
Senior Member
Join Date: Apr 2017
Location: Serbia
Old 07-22-2018 , 18:14   Re: Trying to find this plugin, rewarded with AWP with double damage (ultra AWPx2?)
Reply With Quote #9

Try it out ( untested )

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

#pragma semicolon 1

#define MAX_PLAYERS 32
#define KILLS_REQUIRED 12

#define PLUGIN "Ultra Awp"
#define VERSION "2.0a"

new     g_iKillsMAX_PLAYERS ];

new    
g_iMenu;

public 
plugin_init( ) {
    
register_pluginPLUGINVERSION"maqi" );
    
    
RegisterHamHam_TakeDamage"player""Event_PlayerTakeDamagePre");
    
RegisterHamHam_Killed"player""Event_PlayerKilledPost");
    
    
CreateAwpMenu( );
}

public 
Event_PlayerTakeDamagePreiVictimiInflictoriAttackerFloat:fDamageiDamageBits ) {    
    if( !
is_user_aliveiAttacker ) )
        return 
HAM_IGNORED;
        
    if( !
HasAwpiAttacker ) )
        return 
HAM_IGNORED;
        
    static 
iWeaponiWeapon get_user_weaponiAttacker );
        
    if( 
iWeapon != CSW_AWP )
        return 
HAM_IGNORED;
        
    
SetHamParamFloat4fDamage );
    
    return 
HAM_OVERRIDE;
}

public 
Event_PlayerKilledPostiVictimiKilleriShouldGib ) {
    if( !
is_user_aliveiKiller ) )
        return;
            
    
g_iKillsiVictim ] = 0;
    
    if( 
HasAwpiKiller ) )
        return;
    
    if( ++
g_iKillsiKiller ] >= KILLS_REQUIRED )
        
menu_displayiKillerg_iMenu );
}

GiveAwpiIndex ) {
    if( !
is_user_aliveiIndex ) )
        return;
        
    
give_itemiIndex"weapon_awp" );
    
cs_set_user_bpammoiIndexCSW_AWP30 );
}

CreateAwpMenu( ) {
    
g_iMenu menu_create"Would you like the ultra AWP ?""Handler_MenuAwp" );
    
menu_additemg_iMenu"YES" );
    
menu_additemg_iMenu"NO" );
}

public 
Handler_MenuAwpiIndexiMenuiItem ) {
    if( 
iItem == )
        
GiveAwpiIndex );
        
    return 
PLUGIN_HANDLED;
}

static 
bool:HasAwp( const iIndex ) {
    return ( 
g_iKillsiIndex ] >= KILLS_REQUIRED && user_has_weaponiIndexCSW_AWP ) );

__________________
stuff

Last edited by maqi; 07-23-2018 at 06:28.
maqi is offline