AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   knife weird behavier (https://forums.alliedmods.net/showthread.php?t=95971)

Owyn 06-29-2009 07:13

knife weird behavier
 
some lines from my log:
Quote:

L 06/29/2009 - 14:55:33: [war3ft.amxx] iWep: 29, HitZone = 1, TL hitZone: 1, dmg: 65.000000 - knife hit, not hs, statsx says it was generic hitzone
L 06/29/2009 - 14:55:36: [war3ft.amxx] iWep: 29, HitZone = 5, TL hitZone: 5, dmg: 65.000000 - knife hit, not hs, statsx says it was generic hitzone
L 06/29/2009 - 14:59:37: [war3ft.amxx] iWep: 29, HitZone = 5, TL hitZone: 5, dmg: 65.000000 - knife hit, in the chest, but statsx says it was a headshot
L 06/29/2009 - 15:00:46: [war3ft.amxx] iWep: 29, HitZone = 6, TL hitZone: 6, dmg: 65.000000 - knife hit, in the chest, but statsx says it was a headshot

>>and the most troublesome:
L 06/29/2009 - 15:04:40: [war3ft.amxx] iWep: 29, HitZone = 2, TL hitZone: 2, dmg: 195.000000 - knife hit, in the chest (not hs) with 195 dmg, wtf? *statsx says generic hitzone

*and sometimes hit in the chest makes blood but no damage and event not logged like above =\

code for testing:
PHP Code:

public plugin_init()
{
register_forwardFM_TraceLine        "TRIGGER_TraceLine"    );
RegisterHam(Ham_TakeDamage"player""EVENT_TakeDamage");
}

new 
UserHit[33];
public 
TRIGGER_TraceLineFloat:v1[3], Float:v2[3], noMonsterspentToSkip )
{
    new 
iAttacker pentToSkip;
    new 
iVictim get_tr(TR_pHit);
    new 
iHitZone get_tr(TR_iHitgroup);
    
UserHit[iVictim] = iHitZone
}
public 
EVENT_TakeDamageiVictiminflictoriAttackerFloat:iDamageedamagetype )
{
    static 
iHitPlaceiWeapon
    get_user_attacker
iVictim iWeapon iHitPlace )
    
log_amx"iWep: %d, HitZone = %d, TL hitZone: %d, dmg: %f" ,iWeaponiHitPlaceUserHit[iVictim],iDamagee 


and yes i checked that no other plugins modifies damage or hitzones..

xPaw 06-29-2009 08:07

Re: knife weird behavier
 
Yes knife can make 195 damage if you attack player to his back

SchlumPF* 06-29-2009 08:52

Re: knife weird behavier
 
your log is that wrong because you dont know how knife attacks work :D take a look at my knife distance plugin to see the hlsdk code and get some information about knife attacks.
anyway the engine does a traceline, if this hits something everything is ok and iHitgroup will be 1-7, else it will do a tracehull (same v1 and v2), if it hits a ent everything is fine + hitgroup will be 0 (generic) which means you do the default dmg which is the dmg you would have done on attacking the body. if the tracehull hits worldspawn severall new tracelines are done to retriebe the correct origin for emitting the knifesound.

Owyn 06-29-2009 09:33

Re: knife weird behavier
 
so such high damage not to head is just normal all the problem is that statsx plugin just wasn't made to work properly with knifes?

SchlumPF* 06-29-2009 10:16

Re: knife weird behavier
 
Quote:

Originally Posted by .Owyn. (Post 860042)
so such high damage not to head is just normal all the problem is that statsx plugin just wasn't made to work properly with knifes?

yes

Owyn 06-29-2009 13:17

Re: knife weird behavier
 
i only managed to get 65 dmg right mouse hit to chest, 260 dmg to head right mouse hit and 11, 15 dmg hit to legs & arms left mouse and 60 dmg left mouse head hit, nothing more =\
really can you tell me about knife attacks more?

here is some log file i got:

Quote:

L 06/29/2009 - 20:24:34: Log file started (file "cstrike\addons\amxmodx\logs\knife_weird_atta cks.txt") (game "cstrike") (amx "1.8.1.3746")

L 06/29/2009 - 20:24:34: iWep: 29, TrA() hitzone: 0, dmg: 195.000000

L 06/29/2009 - 20:25:04: iWep: 29, TrA() hitzone: 0, dmg: 195.000000

L 06/29/2009 - 20:25:49: iWep: 29, TrA() hitzone: 3, dmg: 81.250000

L 06/29/2009 - 20:25:58: iWep: 29, TrA() hitzone: 0, dmg: 195.000000

L 06/29/2009 - 20:27:41: iWep: 29, TrA() hitzone: 0, dmg: 195.000000

L 06/29/2009 - 20:33:56: iWep: 29, TrA() hitzone: 0, dmg: 195.000000

L 06/29/2009 - 20:34:07: iWep: 29, TrA() hitzone: 0, dmg: 195.000000

L 06/29/2009 - 20:39:40: iWep: 29, TrA() hitzone: 0, dmg: 195.000000

L 06/29/2009 - 20:39:57: iWep: 29, TrA() hitzone: 0, dmg: 195.000000

L 06/29/2009 - 20:40:00: iWep: 29, TrA() hitzone: 0, dmg: 195.000000

L 06/29/2009 - 20:41:02: iWep: 29, TrA() hitzone: 0, dmg: 195.000000

L 06/29/2009 - 20:43:59: iWep: 29, TrA() hitzone: 1, dmg: 440.000000

L 06/29/2009 - 20:44:01: iWep: 29, TrA() hitzone: 4, dmg: 111.000000

L 06/29/2009 - 20:44:05: iWep: 29, TrA() hitzone: 3, dmg: 137.500000

L 06/29/2009 - 20:44:09: iWep: 29, TrA() hitzone: 2, dmg: 113.000000

L 06/29/2009 - 20:44:16: iWep: 29, TrA() hitzone: 4, dmg: 113.000000

L 06/29/2009 - 20:44:23: iWep: 29, TrA() hitzone: 2, dmg: 113.000000

L 06/29/2009 - 20:45:55: iWep: 29, TrA() hitzone: 4, dmg: 110.000000

L 06/29/2009 - 20:47:06: iWep: 29, TrA() hitzone: 4, dmg: 110.000000

L 06/29/2009 - 20:48:06: iWep: 29, TrA() hitzone: 4, dmg: 110.000000

L 06/29/2009 - 20:49:42: iWep: 29, TrA() hitzone: 5, dmg: 108.000000

L 06/29/2009 - 20:50:00: iWep: 29, TrA() hitzone: 4, dmg: 109.000000

L 06/29/2009 - 20:57:46: iWep: 29, TrA() hitzone: 3, dmg: 137.500000

L 06/29/2009 - 20:58:11: iWep: 29, TrA() hitzone: 4, dmg: 109.000000

L 06/29/2009 - 20:59:24: iWep: 29, TrA() hitzone: 4, dmg: 109.000000

L 06/29/2009 - 20:59:27: iWep: 29, TrA() hitzone: 1, dmg: 440.000000

L 06/29/2009 - 20:59:38: iWep: 29, TrA() hitzone: 2, dmg: 112.000000

L 06/29/2009 - 21:00:02: iWep: 29, TrA() hitzone: 4, dmg: 110.000000

L 06/29/2009 - 21:00:12: iWep: 29, TrA() hitzone: 3, dmg: 136.250000

L 06/29/2009 - 21:00:18: iWep: 29, TrA() hitzone: 5, dmg: 110.000000

L 06/29/2009 - 21:04:55: iWep: 29, TrA() hitzone: 1, dmg: 112.000000

L 06/29/2009 - 21:12:27: iWep: 29, TrA() hitzone: 1, dmg: 140.000000




All times are GMT -4. The time now is 15:43.

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