Raised This Month: $ Target: $400
 0% 

Isn't the killer/victim same


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
hleV
Veteran Member
Join Date: Mar 2007
Location: Lithuania
Old 09-23-2011 , 18:18   Re: Isn't the killer/victim same
Reply With Quote #2

PHP Code:
new Kills[33][33];
new 
MaxPlayers;

public 
plugin_init()
{
    
register_event("DeathMsg""OnDeathMsg""a""1>0");

    
MaxPlayers get_maxplayers();
}

public 
client_disconnect(client)
{
    
arrayset(Kills[client], 0sizeof Kills[]);

    for (new 
1<= MaxPlayersi++)
        
Kills[i][client] = 0;
}

public 
OnDeathMsg()
{
    new 
killer read_data(1);
    new 
victim read_data(2);

    if (
killer == victim)
        return;

    if (++
Kills[killer][victim] == 3)
    {
        
// killer killed victim 3 times in a row
    
}

    
Kills[victim][killer] = 0;

__________________
hleV 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 19:32.


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