Raised This Month: $ Target: $400
 0% 

Kill 6 players in 15 seconds


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
bboygrun
CHOMP
Join Date: May 2010
Location: France
Old 03-09-2013 , 07:57   Re: Kill 6 players in 15 seconds
Reply With Quote #2

It must be something like that :

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

#define MAX_PLAYERS    32

#define VERSION     "1.0.0"

new Floatg_fPlayerTimeMAX_PLAYERS ];
new 
g_iPlayerKillsMAX_PLAYERS ];

public 
plugin_init( ) 
{
    
register_plugin"Catch Kills"VERSION"Bboy" );
    
    
RegisterHamHam_Killed"player""CPlayer__Killed_P"true );
}

public 
client_disconnectiPlayer )
{
    
g_fPlayerTimeiPlayer ] = 0.0;
}

public 
CPlayer__Killed_P( const iVictim, const iAttacker )
{
    if( 
<= iAttacker <= MAX_PLAYERS )
    {
        new const 
FloatfCurrentTime get_gametime( );
        
        if( 
fCurrentTime g_fPlayerTimeiAttacker ] <= 15.0 )
        {
            if( ++ 
g_iPlayerKillsiAttacker ] == )
            {
                
CPlayer__KillsDoneiAttacker );
            }
        }
        else
        {
            
g_fPlayerTimeiAttacker ] = fCurrentTime;
            
g_iPlayerKillsiAttacker ] = 1;
        }
    }
}

CPlayer__KillsDone( const iPlayer )
{
    
// Code

__________________

Last edited by bboygrun; 03-09-2013 at 08:00. Reason: Forgot to check if iAttacker was player ._.
bboygrun 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 21:48.


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