Raised This Month: $ Target: $400
 0% 

Isn't the killer/victim same


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Hunter-Digital
Veteran Member
Join Date: Aug 2006
Location: In the Game [ro]
Old 09-23-2011 , 18:19   Re: Isn't the killer/victim same
Reply With Quote #3

Killing the same player without killing anyone else in between or killing a player more than once without you beeing killed by him ?

Example with the 2nd, like the when you dominate someone in TF2:
Code:
new g_iKilled[33][33]
new g_iMaxPlayers

public plugin_init()
{
    register_event("DeathMsg", "player_killed", "a")

    g_iMaxPlayers = get_maxplayers()
}

public player_killed()
{
    new victim = read_data(2)
    new killer = read_data(1)

    if(id != killer && 1 <= killer <= g_iMaxPlayers)
    {
        g_iKilled[victim][killer] = 0

        if(++g_iKilled[killer][victim] == 3)
        {
            new szKiller[32]
            new szVictim[32]

            get_user_name(killer, szKiller, charsmax(szKiller))
            get_user_name(victim, szVictim, charsmax(szVictim))

            client_print(0, print_chat, "**** %s is dominating %s ****", szKiller, szVictim)
        }
    }
}

public client_putinserver(id)
{
    for(new i = 1; i <= g_iMaxPlayers; i++)
    {
        g_iKilled[id][i] = 0
        g_iKilled[i][id] = 0
    }
}
untested :}


EDIT: pff, I forgot this forum doesn't notify me if someone posted while I was writing xD
__________________
Hunter-Digital 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