AlliedModders

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

mysticssjgoku4 06-13-2006 23:43

Damage Question.
 
A quick question. How can I return the amount of damage a player does to another player shot by shot?

So the player PLR1 shoots the other player PLR2, now I want to get the amount of damage PLR1 did to PLR2 just then.

How is this possible?

Thanks.

Xanimos 06-14-2006 00:38

Code:
register_event("Damage" , "myCallBack" , "b",  "2!0" );

Code:
//id = victim //iAttackerID = attacker //iWeapon = weapon id //iDamage = amount of damage public myCallBack( id ) {     new iDamage = read_data( 2 );     new iWeapon, iAttackerID = get_user_attacker( id, iWeapon ); }

mysticssjgoku4 06-14-2006 05:56

That didn't work because TS doesn't call the damage event.
I didn't want to, but it looks as if I have to use the tsx modules, client_damage forward.

Anyhow, thanks. Lol.

Xanimos 06-14-2006 08:50

Next time specify mod in your question. And yes that is the way to do it.


All times are GMT -4. The time now is 07:56.

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