Raised This Month: $ Target: $400
 0% 

Kills per round


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
muh
New Member
Join Date: Oct 2014
Old 10-12-2014 , 19:49   Re: Kills per round
Reply With Quote #6

Quote:
Originally Posted by HENNESSY View Post
Here you go (not tested)

PHP Code:
#include < amxmodx >

new g_iKills33 ];
new 
g_iMaxPlayers;

public 
plugin_init( )
{
    
register_logevent"LogEvent_RoundEnd"2"1=Round_End" );
    
register_logevent"LogEvent_RoundStart"2"1=Round_Start" );
    
    
register_event"DeathMsg""Event_DeathMsg""a" );
    
    
g_iMaxPlayers get_maxplayers( );
}

public 
LogEvent_RoundEnd( )
{
    new 
iBest 0;
    
    for( new 
1<= g_iMaxPlayers; ++)
    {
        if( !
is_user_connected) )
            continue;
            
        if( 
g_iKills] > g_iKillsiBest ] )
        {
            
iBest i;
        }
    }
    
    new 
szName32 ];
    
get_user_nameiBestszNamecharsmaxszName ) );
    
    
client_print0print_chat"%s did the most kills this round."szName );
}

public 
LogEvent_RoundStart( )
{
    
arraysetg_iKills032 );
}

public 
Event_DeathMsg( )
{
    new 
iKiller read_data);
    new 
iVictim read_data);
    
    if( 
iKiller == iVictim || get_user_teamiKiller ) == get_user_teamiVictim ) )
        return;
    
    ++
g_iKillsiKiller ];

Well, that's not exactly what I wanted to do, but nevertheless it was very useful. Thanks!

Last edited by muh; 10-12-2014 at 19:51.
muh 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 17:44.


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