AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Show damage (https://forums.alliedmods.net/showthread.php?t=120803)

Min2liz 03-08-2010 06:14

Show damage
 
Hi,

I trying to do that script show how much damage I done for another player.

Here is a code:

PHP Code:

#include <amxmodx>
#include <amxmisc>
#include <fakemeta_util>

public plugin_init() {
      
        
register_event("Damage""eDamage""b""2!0""3=0""4!0")

        
// Damage stuff
    
g_hudmsg1 CreateHudSyncObj()    
    
g_hudmsg2 CreateHudSyncObj()
}
public 
eDamage(id) {
       if (
PlayerDamage[id]) {
        static 
attackerattacker get_user_attacker(id)
        static 
damagedamage read_data(2)          
        
set_hudmessage(255000.450.5020.14.00.10.1, -1)
        
ShowSyncHudMsg(idg_hudmsg2"%i^n"damage)      
        
set_hudmessage(0100200, -1.00.5520.14.00.020.02, -1)
        
ShowSyncHudMsg(attackerg_hudmsg1"%i^n"damage)            
       }


PlayerDamage[id] == 1

but this show for me only if someone did damage to me and display, but not what I did for another player. If I throw HE to my self, it's show how much I done damage to my self (victim), and how much done (attacker).

That's wrong with this one? Anyone maybe can help?

NiQu 03-08-2010 06:16

Re: Show damage
 
why? there's already something like this built into amxmodx or in the stat module.. i dont remember.

Min2liz 03-08-2010 06:18

Re: Show damage
 
I need that if I shoot to anyone and done damage (50hp) it will show for me this how much I done. If there is already anything similar to this, can tell?

Thanks

NiQu 03-08-2010 07:04

Re: Show damage
 
Its built right into amxmodx i think.

SpILL 03-08-2010 07:08

Re: Show damage
 
Search Keyword "Bullet Damage".


All times are GMT -4. The time now is 08:48.

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