Raised This Month: $ Target: $400
 0% 

find out when ppl are hit


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Bubby
Junior Member
Join Date: Feb 2005
Old 03-09-2005 , 18:29   find out when ppl are hit
Reply With Quote #1

how do i find out when people are hit by another person?


like person A gets hit by person B then it tells me when person b hit person A and then run a command on person A automatticly


plz help me

thx

Bubby is offline
xeroblood
BANNED
Join Date: Mar 2004
Location: Toronto, Canada
Old 03-09-2005 , 19:09  
Reply With Quote #2

You should be able to get lots of info from this example:
Code:
#include <amxmodx> new szBodyParts[7][] = {"Head","Chest","Stomach","Right-Arm","Left-Arm","Right-Leg","Left-Leg"} public plugin_init() {     register_event( "Damage", "Event_Damage", "b", "2!0" ) } public Event_Damage( id ) {     new iWeapon, iBody, aID = get_user_attacker( id, iWeapon, iBody )     // Check for Invalid Attacker, or If Attacker is Self/World     if( !aID || id == aID ) return PLUGIN_CONTINUE     new iDamage = read_data( 2 ) // The amount of Damage Inflicted..     new szVictim[32], szAttacker[32], szWeaponName[32]     get_user_name( id, szVictim, 31 )     get_user_name( aID, szAttacker, 31 )     get_weaponname( iWeapon, szWeaponName, 31 )     // Tell Victim What Happened     client_print( id, print_chat, "%s Hit You With %s in %s For %d HP!", szAttacker, szWeaponName, szBodyParts[iBody], iDamage )     // Tell Attacker What Happened     client_print( aID, print_chat, "You Hit %s With %s in %s For %d HP!", szVictim, szWeaponName, szBodyParts[iBody], iDamage )     // To perform other commands/actions on the Victim, use     id     // To perform other commands/actions on the Attacker, use   aID     return PLUGIN_CONTINUE }
xeroblood is offline
Send a message via MSN to xeroblood
Bubby
Junior Member
Join Date: Feb 2005
Old 03-09-2005 , 20:42  
Reply With Quote #3

holyshit man thx thx thx
Bubby 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 13:59.


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