Raised This Month: $ Target: $400
 0% 

Hooking the self damage event?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
xeroblood
BANNED
Join Date: Mar 2004
Location: Toronto, Canada
Old 06-30-2005 , 20:40  
Reply With Quote #8

Oooops.. ya, it should only be printing 0.. that would make sense!!

I messed up, did it too fast.. try this tho, it may be what you're looking for: (but again, I didnt test this)

Code:
#include <amxmodx> public plugin_init() {     register_event( "Damage", "Event_Damage", "b", "2!0" ) } public Event_Damage( id ) {     new iDamage = read_data( 2 )     new iAttackerID = get_user_attacker( id )     if( (iAttackerID == 0) || (iAttackerID == id) )     {         new szUsername[32]         get_user_name( id, szUsername, 31 )         client_print( 0, print_chat, "%s hurt self for %d HP!", szUsername, iDamage )     }     return PLUGIN_CONTINUE }

NOTE: Notice the change in the register_event()
xeroblood is offline
Send a message via MSN to xeroblood
 



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 14:09.


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