Raised This Month: $ Target: $400
 0% 

help editing code, show damage


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
spunko
Senior Member
Join Date: Jun 2005
Location: Ecuador
Old 07-02-2006 , 00:52   help editing code, show damage
Reply With Quote #1

hi.. can someone help me with this.. i want this pluging to show the damage someone is doing to me, cuz now it just shows me the damage i do..

i want it to show them both but i cant do it..

this is the original code:
Code:
#include <amxmodx> public damage_msg(vIndex) {     if ( get_cvar_float("bullet_damage") ) {         new aIndex = get_user_attacker(vIndex)         new damage = read_data(2)         client_print(aIndex, print_center,"%i", damage)     }     return PLUGIN_CONTINUE } public plugin_init() {      register_plugin("Bullet Damage","1.0","f117bomb")      register_event("Damage", "damage_msg", "b", "2!0", "3=0", "4!0")    register_cvar("bullet_damage","1")    return PLUGIN_CONTINUE   }

this is what i tryed with no results:

Code:
#include <amxmodx> public damage_msg(vIndex) {     if ( get_cvar_float("bullet_damage") ) {         new aIndex = get_user_attacker(vIndex)         new damage = read_data(2)         client_print(aIndex, print_center,"%i", damage)     }     else if ( get_cvar_float("bullet_damage") ) {         new aIndex = get_user_attacker(vIndex)         new damage = read_data(1)         client_print(aIndex, print_center,"%i", damage)     }     return PLUGIN_CONTINUE } public plugin_init() {      register_plugin("Bullet Damage","1.0","f117bomb")      register_event("Damage", "damage_msg", "b", "2!0", "3=0", "4!0")    register_cvar("bullet_damage","1")    return PLUGIN_CONTINUE
thanx a lot!
spunko is offline
Send a message via MSN to spunko
jtp10181
Veteran Member
Join Date: May 2004
Location: Madison, WI
Old 07-02-2006 , 01:19   Re: help editing code, show damage
Reply With Quote #2

this plugin I have already does what you want
Attached Files
File Type: sma Get Plugin or Get Source (bullet_damage.sma - 654 views - 659 Bytes)
__________________
jtp10181 is offline
Send a message via ICQ to jtp10181 Send a message via AIM to jtp10181 Send a message via MSN to jtp10181 Send a message via Yahoo to jtp10181
spunko
Senior Member
Join Date: Jun 2005
Location: Ecuador
Old 07-02-2006 , 17:50   Re: help editing code, show damage
Reply With Quote #3

cool.. thanx..
im going to test it..
spunko is offline
Send a message via MSN to spunko
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:04.


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