AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   help editing code, show damage (https://forums.alliedmods.net/showthread.php?t=40698)

spunko 07-02-2006 00:52

help editing code, show damage
 
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!

jtp10181 07-02-2006 01:19

Re: help editing code, show damage
 
1 Attachment(s)
this plugin I have already does what you want

spunko 07-02-2006 17:50

Re: help editing code, show damage
 
cool.. thanx..
im going to test it..


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

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