AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Damage event (https://forums.alliedmods.net/showthread.php?t=9681)

Votorx 01-27-2005 07:21

Damage event
 
How can I get the id of the person who's being damaged?

Twilight Suzuka 01-27-2005 10:27

read_data(1)

Votorx 01-27-2005 13:01

Is that the first arg of every event?

XxAvalanchexX 01-27-2005 15:29

No.

Votorx 01-27-2005 20:19

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?

Twilight Suzuka 01-27-2005 20:24

read_data(1) for attacker in the event which gets the damage event.
read_data(2) is victim.

BlueRaja 01-28-2005 00:13

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 01-28-2005 00:18

As for the list of events...
http://forums.alliedmods.net/showthread.php?t=9260
http://forums.alliedmods.net/showthread.php?t=9239

Votorx 01-28-2005 07:17

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.

Votorx 02-02-2005 13:08

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?


All times are GMT -4. The time now is 19:18.

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