Raised This Month: $ Target: $400
 0% 

Displaying bullet damage with HamSandwich


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
hleV
Veteran Member
Join Date: Mar 2007
Location: Lithuania
Old 01-12-2009 , 08:58   Displaying bullet damage with HamSandwich
Reply With Quote #1

Hi. I got some problems with damage display using HamSandwich.
Code:
#include <amxmodx> #include <hamsandwich>   new g_iHudSyncObj;   public plugin_init() {         RegisterHam(Ham_TakeDamage, "player", "hTakeDamage", 1);           g_iHudSyncObj = CreateHudSyncObj(); }   public hTakeDamagePost(iVictim, iInflictor, iAttacker, Float:fDmg) {         if (!is_user_connected(iVictim) || !is_user_connected(iAttacker))                 return;           if (iVictim != iAttacker && get_user_team(iVictim) != get_user_team(iAttacker))         {                 set_hudmessage(200, 200, 200, -1.0, 0.46, 0, 6.0, 2.0, 0.1, 0.1, -1);                 ShowSyncHudMsg(iAttacker, g_iHudSyncObj, "%i^n", floatround(fDmg));         } }
Sometimes it shows more or less damage than the victim loses. Like you hit for 16, but victim lost only 8. Or you hit for 96, but victim (which had 100 HP) died.

For example use Glock's Burst-Fire mode and shoot to other player's head. It will show 96 while the other player is dead.

Anyone can suggest how to fix this?
__________________
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 01:38.


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