Raised This Month: $ Target: $400
 0% 

Damage Hud Death


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
skz
Senior Member
Join Date: Jul 2014
Location: Portugal
Old 05-05-2016 , 11:34   Damage Hud Death
Reply With Quote #1

Hi,

Im trying to make a hud message when a player is killed to show how many damage he did to others players.

I tryed this way, but nothing appears, but the way im catching the damage is correct because I already tested it.

How can I make it?

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

#define MAX_PLAYERS  32

new mDano[MAX_PLAYERS+1][MAX_PLAYERS+1]

public 
plugin_init() 
{
    
register_event("DeathMsg""Morte""a");
    
register_event("Damage""Dano""b""2!0""3=0""4!0")
}

public 
Morte(id)
{
    new 
morto read_data(2)
    new 
nome[34], hud[1102]
    new 
texto[1102]
    
    for(new 
i33i++)  
    {
        if(
mDano[morto][i] > 0)
        {
            
get_user_name(inome32);
            
format(texto1101": %i^n",mDano[morto][i])
            
add(nome33texto0);
            
add(hud1101nome0);
            
set_hudmessage(2550,01.01.000.01.0 0.10.00.0, -1);
            
show_hudmessage(mortohud);
        }
    }
}

public 
Dano(id)
{    
    static 
attackerattacker get_user_attacker(id)
    static 
damagedamage read_data(2)
    
    if( 
<= attacker <= 32)
    {  
        if(
is_user_alive(attacker) && is_user_connected(id) && cs_get_user_team(id) != cs_get_user_team(attacker))  
        {
            
mDano[attacker][id] += damage 
        
}
    } 

__________________

Last edited by skz; 05-05-2016 at 11:37.
skz is offline
 


Thread Tools
Display Modes

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 18:45.


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