Raised This Month: $ Target: $400
 0% 

Damage event


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Votorx
Senior Member
Join Date: Jun 2004
Old 01-27-2005 , 07:21   Damage event
Reply With Quote #1

How can I get the id of the person who's being damaged?
__________________
Currently Looking for a mod team.
Votorx is offline
Send a message via AIM to Votorx Send a message via MSN to Votorx Send a message via Yahoo to Votorx
Twilight Suzuka
bad
Join Date: Jul 2004
Location: CS lab
Old 01-27-2005 , 10:27  
Reply With Quote #2

read_data(1)
__________________
Twilight Suzuka is offline
Send a message via AIM to Twilight Suzuka Send a message via MSN to Twilight Suzuka
Votorx
Senior Member
Join Date: Jun 2004
Old 01-27-2005 , 13:01  
Reply With Quote #3

Is that the first arg of every event?
__________________
Currently Looking for a mod team.
Votorx is offline
Send a message via AIM to Votorx Send a message via MSN to Votorx Send a message via Yahoo to Votorx
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 01-27-2005 , 15:29  
Reply With Quote #4

No.
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
Votorx
Senior Member
Join Date: Jun 2004
Old 01-27-2005 , 20:19  
Reply With Quote #5

Lol as much as that helped avalanche I just need a little more information. Actually to make it better, do you know where I can get a list of the arguments for most of the the events?
__________________
Currently Looking for a mod team.
Votorx is offline
Send a message via AIM to Votorx Send a message via MSN to Votorx Send a message via Yahoo to Votorx
Twilight Suzuka
bad
Join Date: Jul 2004
Location: CS lab
Old 01-27-2005 , 20:24  
Reply With Quote #6

read_data(1) for attacker in the event which gets the damage event.
read_data(2) is victim.
__________________
Twilight Suzuka is offline
Send a message via AIM to Twilight Suzuka Send a message via MSN to Twilight Suzuka
BlueRaja
Senior Member
Join Date: Nov 2004
Old 01-28-2005 , 00:13  
Reply With Quote #7

Arguments of the Damage event:
arg1: BYTE : dmg save ?
arg2: BYTE : dmg take ?
arg3: LONG : dmg types-bits
arg4: COORD : dmg origin x
arg5: COORD : dmg origin y
arg6: COORD : dmg origin z

Use get_user_attacker() to get the attacker's id (or use client_damage() instead).

[edit] Oh, to get the victim?
Code:
    register_event("Damage", "Damage_event", "b", "2!0") public Damage_event(id) {     //blah blah blah }
BlueRaja is offline
Send a message via AIM to BlueRaja Send a message via MSN to BlueRaja
BlueRaja
Senior Member
Join Date: Nov 2004
Old 01-28-2005 , 00:18  
Reply With Quote #8

As for the list of events...
http://forums.alliedmods.net/showthread.php?t=9260
http://forums.alliedmods.net/showthread.php?t=9239
BlueRaja is offline
Send a message via AIM to BlueRaja Send a message via MSN to BlueRaja
Votorx
Senior Member
Join Date: Jun 2004
Old 01-28-2005 , 07:17  
Reply With Quote #9

Twilight that doesn't make much sense. Lookin at the events and their arguments I don't see anything about gettin the id of the victim and attacker but I'll give it a try netherless. Thanks for everyone elses help.
__________________
Currently Looking for a mod team.
Votorx is offline
Send a message via AIM to Votorx Send a message via MSN to Votorx Send a message via Yahoo to Votorx
Votorx
Senior Member
Join Date: Jun 2004
Old 02-02-2005 , 13:08  
Reply With Quote #10

Still haven't been able to test it but can anyone give me a better way of hooking the damage without using that event so I can get a reliable way to get the victim and attacker?
__________________
Currently Looking for a mod team.
Votorx is offline
Send a message via AIM to Votorx Send a message via MSN to Votorx Send a message via Yahoo to Votorx
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 19:18.


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