Raised This Month: $ Target: $400
 0% 

Catching the damage event before it deals the damage?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Geesu
Veteran Member
Join Date: Mar 2004
Location: Cincinnati, OH
Old 03-12-2004 , 09:25   Catching the damage event before it deals the damage?
Reply With Quote #1

Is this a possiblity? The reason I ask is bc if you could catch them damage, then modify it, then send it to the engine stats wouldn't be so screwed up on most mods. Since most mods just add the extra damage and use set_user_health, at some point they will have to set this health to -1, and they die by worldspawn.

Or could you guys make it possible for us to edit the log files created by the server? (that are used for like psychostats, sorry if this already exists, I didn't think it did)
__________________
Need war3ft help? DO NOT PM ME... Check the forums
Geesu is offline
Send a message via AIM to Geesu Send a message via MSN to Geesu
DopeFish
Senior Member
Join Date: Feb 2004
Old 03-12-2004 , 10:34  
Reply With Quote #2

hmm, a module for this would be nice.
DopeFish is offline
Send a message via ICQ to DopeFish
MagicShot
Senior Member
Join Date: Mar 2004
Location: MN
Old 03-12-2004 , 12:23   hmm
Reply With Quote #3

I don't know if this one is possible because I think this is controlled by the hl engine, but someone correct me if I am wrong...

This would be a nice feature though..

*Magic thinks of all the things he could do with that..
__________________
|v|agic$hot
.
Without a Sound
MagicShot is offline
Send a message via MSN to MagicShot Send a message via Yahoo to MagicShot
BAILOPAN
Join Date: Jan 2004
Old 03-12-2004 , 12:24  
Reply With Quote #4

Yeah, it's called the "engine" module in amx mod x ;]
Read the includes about register_message.
__________________
egg
BAILOPAN is offline
Geesu
Veteran Member
Join Date: Mar 2004
Location: Cincinnati, OH
Old 03-12-2004 , 12:38  
Reply With Quote #5

Could you show me an example.. like would it be this:

register_message("Damage_event",asdf)

I'm sure thats totally wrong, some constant that I don't know about?
__________________
Need war3ft help? DO NOT PM ME... Check the forums
Geesu is offline
Send a message via AIM to Geesu Send a message via MSN to Geesu
BAILOPAN
Join Date: Jan 2004
Old 03-12-2004 , 12:48   /\//\
Reply With Quote #6

Here is some example code that will block deathmsg on suicide.
It also uses blocks suiciding from console.
Code:
public plugin_init() {     register_event(get_user_msgid("Deathmsg"), "hookDeath") } public hookDeath(msgid) {     new killer = get_msg_arg_int(1)     new victim = get_msg_arg_int(2)     if (killer == victim) {         return PLUGIN_HANDLED     }     return PLUGIN_CONTINUE } //this is called on suicide public client_kill(id) {      return PLUGIN_HANDLED }
__________________
egg
BAILOPAN is offline
Geesu
Veteran Member
Join Date: Mar 2004
Location: Cincinnati, OH
Old 03-12-2004 , 12:52  
Reply With Quote #7

Holy shit that could be awesome
__________________
Need war3ft help? DO NOT PM ME... Check the forums
Geesu is offline
Send a message via AIM to Geesu Send a message via MSN to Geesu
SniperBeamer
AMX Mod X Founder
Join Date: Jun 2003
Location: Good Old Europe
Old 03-12-2004 , 13:58  
Reply With Quote #8

note: it only blocks the deathmessage not the death
__________________
SniperBeamer is offline
Geesu
Veteran Member
Join Date: Mar 2004
Location: Cincinnati, OH
Old 03-31-2004 , 17:27  
Reply With Quote #9

OK I've played and played with this and I am uable to change the amount of damage before it is dealt to the person. Is this going to be possible at all with amxx? Could it be possible?
__________________
Need war3ft help? DO NOT PM ME... Check the forums
Geesu is offline
Send a message via AIM to Geesu Send a message via MSN to Geesu
BAILOPAN
Join Date: Jan 2004
Old 03-31-2004 , 17:33  
Reply With Quote #10

What, have you tried registering the message and then RETURNing PLUGIN_HANDLED ?
__________________
egg
BAILOPAN 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 14:01.


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