Raised This Month: $ Target: $400
 0% 

Show all victims in .dmg report?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
DIGI-
New Member
Join Date: Mar 2009
Old 03-27-2009 , 00:40   Show all victims in .dmg report?
Reply With Quote #1

Code:
#include <amxmodx>
#include <amxmisc>
#include <csx>

public plugin_init()
{
    register_plugin("Blah","1.0","johnnn")
    register_clcmd("say","hook_say")
    register_clcmd("say_team","hook_say")
    register_event("SendAudio","newround","a","2=%!MRAD_terwin","2=%!MRAD_ctwin","2=%!MRAD_rounddraw")
}

//killer victim
new uh_dmg[33][33]
new uh_hits[33][33]
new uh_last[33]

public client_connect(id) 
{
    for(new i=0;i<33;i++)
    {
        uh_dmg[id][i] = 0
        uh_hits[id][i] = 0
        uh_last[i] = 0
        uh_dmg[i][id] = 0
        uh_hits[i][id] = 0
    }
}

public newround()
{
    for(new i=0;i<33;i++)

    {
        for(new j=0;j<33;j++)
        {
            uh_dmg[i][j] = 0
            uh_hits[i][j] = 0
        }
        uh_last[i] = 0
    }
}

public  client_damage(attacker,victim,amount,wpnindex,hitplace,TA)
{
    if(victim && attacker!=victim)
    {
        uh_dmg[attacker][victim] += amount
        uh_hits[attacker][victim]++
        uh_last[attacker] = victim
        uh_last[victim] = -1
        for(new i=0;i<33;i++)
        {
            uh_dmg[victim][i] = 0
            uh_hits[victim][i] = 0
        }
    }
}

public hook_say(id,level,cid)
{
    if(!is_user_admin(id))
    {
        return PLUGIN_CONTINUE
    }

    new arg1[32]
    read_argv(1,arg1,31)

    if(!equali(arg1,".admindmg"))
    {
        return PLUGIN_CONTINUE
    }

    if(!uh_last[id])
    {
        client_print(id,print_chat,"You have not dealt damage yet this round.")
    }
    else if(uh_last[id]>0)
    {
        new name[32]
        get_user_name(uh_last[id],name,31)
    
        client_print(id,print_chat,"You dealt %d damage to %s in %d shots this round.",uh_dmg[id][uh_last[id]],name,uh_hits[id][uh_last[id]])
    }
    else
    {
        client_print(id,print_chat,"You were hit and your damage got reset.")
    }

    return PLUGIN_HANDLED
}
DIGI- is offline
Old 03-27-2009, 00:40
DIGI-
This message has been deleted by Exolent[jNr]. Reason: Don't bump until 2 weeks have passed since last post.
Reply



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 08:53.


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