Raised This Month: $ Target: $400
 0% 

Damage Event with TS


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Fred Dawes
Junior Member
Join Date: May 2006
Old 12-31-2006 , 00:05   Damage Event with TS
Reply With Quote #1

I wish to multiply the damage given with Kung Fu by X amount. Here is my code.
Code:
#include <amxmodx> #include <amxmisc> #include <tsfun> #include <engine> #include <fun> #include <tsxaddon> register_event("Damage", "Damage", "b", "2!0") //..... new KungFuMultiplier = 1.4 //..... public Damage() {       new victim = read_data(0) // Victim ID     new damage = read_data(2) // Damage     new weapon, bodypart, attacker = get_user_attacker(victim, weapon, bodypart)     client_print(attacker,print_chat,"Damage Event Recognized")     if (weapon == TSW_KUNG_FU ) {         client_print(attacker,print_chat,"Kung Fu Damage Event Recognized")         // Do extra damage         new newDamage = floatround(damage * (g_fightskills[attacker] / 100) + damage)         if (get_user_health(victim) <= newDamage)         {             set_user_health(victim, 1)             client_print(attacker,print_chat,"Your opponent now has 1 HP!")             client_print(victim,print_chat,"You are at 1 HP!")         }else{             set_user_health(victim,(get_user_health(victim) - newDamage))             client_print(attacker, print_chat,"%i damage done",newDamage)         }     } }

My error: It compiles fine, but it doesn't work. The debug messages don't even show up. Does the Damage event not work with The Specialists?
__________________
SteamID STEAM_0:0458033
Fred Dawes is offline
 



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 22:23.


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