Raised This Month: $ Target: $400
 0% 

HELP PLEASE!


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Podarok
BANNED
Join Date: Jan 2011
Location: Narnia
Old 06-22-2011 , 12:31   HELP PLEASE!
Reply With Quote #1

I have seen on one server that damage that you have done isn't displayed in one current location but it's appearing in the circle, one after another, like you can see every bullets damage. Please HELP!

Plugins :
Code:
/* Plugin generated by AMXX-Studio */

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

#define PLUGIN "Advanced Bullet Damage"
#define VERSION "1.0"
#define AUTHOR "Sn!ff3r"

new g_type, g_enabled, g_recieved, bool:g_showrecieved, g_hudmsg1, g_hudmsg2

public plugin_init() 
{
	register_plugin(PLUGIN, VERSION, AUTHOR)
	
	register_event("Damage", "on_damage", "b", "2!0", "3=0", "4!0")	
	register_event("HLTV", "on_new_round", "a", "1=0", "2=0")
	
	g_type = register_cvar("amx_bulletdamage","1")
	g_recieved = register_cvar("amx_bulletdamage_recieved","1")	
	
	g_hudmsg1 = CreateHudSyncObj()	
	g_hudmsg2 = CreateHudSyncObj()
}

public on_new_round()
{
	g_enabled = get_pcvar_num(g_type)
	if(get_pcvar_num(g_recieved)) g_showrecieved = true	
}

public on_damage(id)
{
	if(g_enabled)
	{		
		static attacker; attacker = get_user_attacker(id)
		static damage; damage = read_data(2)		
		if(g_showrecieved)
		{			
			set_hudmessage(255, 0, 0, 0.45, 0.50, 2, 0.1, 4.0, 0.1, 0.1, -1)
			ShowSyncHudMsg(id, g_hudmsg2, "%i^n", damage)		
		}
		if(is_user_connected(attacker))
		{
			switch(g_enabled)
			{
				case 1: {
					set_hudmessage(0, 100, 200, -1.0, 0.55, 2, 0.1, 4.0, 0.02, 0.02, -1)
					ShowSyncHudMsg(attacker, g_hudmsg1, "%i^n", damage)				
				}
				case 2: {
					if(fm_is_ent_visible(attacker,id))
					{
						set_hudmessage(0, 100, 200, -1.0, 0.55, 2, 0.1, 4.0, 0.02, 0.02, -1)
						ShowSyncHudMsg(attacker, g_hudmsg1, "%i^n", damage)				
					}
				}
			}
		}
	}
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1045\\ f0\\ fs16 \n\\ par }
*/
Podarok is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 06-22-2011 , 14:08   Re: HELP PLEASE!
Reply With Quote #2

Code:
/* Plugin generated by AMXX-Studio */

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

#define PLUGIN "Advanced Bullet Damage"
#define VERSION "1.0"
#define AUTHOR "Sn!ff3r"

new const Float:g_locations[][] =
{
    {0.45, 0.5}, {-1.0, 0.55}, {0.55, -1.0},
    {-1.0, 0.62}, {0.4, 0.55}, {0.55, 0.6}
}

new g_location[33]

new g_type, g_enabled, g_recieved, bool:g_showrecieved

public plugin_init() 
{
	register_plugin(PLUGIN, VERSION, AUTHOR)
	
	register_event("Damage", "on_damage", "b", "2!0", "3=0", "4!0")	
	register_event("HLTV", "on_new_round", "a", "1=0", "2=0")
	
	g_type = register_cvar("amx_bulletdamage","1")
	g_recieved = register_cvar("amx_bulletdamage_recieved","1")
}

public on_new_round()
{
	g_enabled = get_pcvar_num(g_type)
	g_showrecieved = bool:get_pcvar_num(g_recieved)
}

public on_damage(id)
{
	if(g_enabled)
	{		
		static attacker; attacker = get_user_attacker(id)
		static damage; damage = read_data(2)		
		if(g_showrecieved)
		{			
			set_dhudmessage(255, 0, 0, g_locations[g_location[id]][0], g_locations[g_location[id]][1], 2, 0.1, 4.0, 0.1, 0.1, -1)
			show_dhudmessage(id, "%i^n", damage)
			g_location[id] = ++g_location[id] % sizeof(g_locations)
		}
		if(is_user_connected(attacker))
		{
			switch(g_enabled)
			{
				case 1: {
					set_dhudmessage(0, 100, 200, g_locations[g_location[attacker]][0], g_locations[g_location[attacker]][1], 2, 0.1, 4.0, 0.02, 0.02, -1)
					show_dhudmessage(attacker, "%i^n", damage)				
					g_location[attacker] = ++g_location[attacker] % sizeof(g_locations)
				}
				case 2: {
					if(fm_is_ent_visible(attacker,id))
					{
						set_dhudmessage(0, 100, 200, g_locations[g_location[attacker]][0], g_locations[g_location[attacker]][1], 2, 0.1, 4.0, 0.02, 0.02, -1)
						show_dhudmessage(attacker, "%i^n", damage)					
						g_location[attacker] = ++g_location[attacker] % sizeof(g_locations)
					}
				}
			}
		}
	}
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1045\\ f0\\ fs16 \n\\ par }
*/
You need to compile locally with dhudmessage.inc.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Podarok
BANNED
Join Date: Jan 2011
Location: Narnia
Old 06-22-2011 , 14:20   Re: HELP PLEASE!
Reply With Quote #3

Thank you very much, but while compiling I have these tag mismatches, can you fix it please?

Last edited by Podarok; 06-22-2011 at 14:28.
Podarok is offline
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 23:26.


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