Raised This Month: $ Target: $400
 0% 

Detect attacer hit victim to shoulder.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
xbatista
Veteran Member
Join Date: Mar 2008
Location: Lithuania
Old 03-27-2009 , 09:53   Detect attacer hit victim to shoulder.
Reply With Quote #1

I need to detect players shoulder // or killed victim in back.
xbatista is offline
Send a message via Skype™ to xbatista
SnoW
Veteran Member
Join Date: Oct 2008
Location: Finland WisdomNuggets: 8
Old 03-27-2009 , 12:22   Re: Detect attacer hit victim to shoulder.
Reply With Quote #2

You can't shoulder. With get_user_attacker you can:
PHP Code:
/* Parts of body for hits */
#define HIT_GENERIC  0 /* none */
#define HIT_HEAD  1
#define HIT_CHEST  2
#define HIT_STOMACH  3
#define HIT_LEFTARM  4
#define HIT_RIGHTARM  5
#define HIT_LEFTLEG  6
#define HIT_RIGHTLEG  7 
SnoW is offline
Send a message via MSN to SnoW
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 03-27-2009 , 12:30   Re: Detect attacer hit victim to shoulder.
Reply With Quote #3

You can but with more code. I don't have the time to test but my idea is : using Ham_TraceAttack, you get TR_vecEndpos, using EngFunc_GetBonePosition ( bone 24 -> left shoulder inside and bone 38 -> right shoulder inside ) ; Knowing their origin you can imagine a box with a specific size for both shoulder and finally checking if EndPos is contained in one of this box ; if so you hit a player's shoulder.
Arkshine is offline
SonicSonedit
Veteran Member
Join Date: Nov 2008
Location: Silent Hill
Old 03-27-2009 , 13:38   Re: Detect attacer hit victim to shoulder.
Reply With Quote #4

xbatista
maybe this will help you http://forums.alliedmods.net/showthread.php?t=52392
__________________

SonicSonedit is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 03-27-2009 , 13:55   Re: Detect attacer hit victim to shoulder.
Reply With Quote #5

No this plugin will not help him.
Arkshine is offline
SonicSonedit
Veteran Member
Join Date: Nov 2008
Location: Silent Hill
Old 03-27-2009 , 14:27   Re: Detect attacer hit victim to shoulder.
Reply With Quote #6

arkshine
I thought he was talking about arm, but if he really asks about shoulder, you are right)
__________________

SonicSonedit is offline
xbatista
Veteran Member
Join Date: Mar 2008
Location: Lithuania
Old 03-27-2009 , 15:16   Re: Detect attacer hit victim to shoulder.
Reply With Quote #7

I need if attacker hitted/killed victim in shoulder he dies,and don't do 60 damage.
xbatista is offline
Send a message via Skype™ to xbatista
xbatista
Veteran Member
Join Date: Mar 2008
Location: Lithuania
Old 03-27-2009 , 15:18   Re: Detect attacer hit victim to shoulder.
Reply With Quote #8

Quote:
You can but with more code. I don't have the time to test but my idea is : using Ham_TraceAttack, you get TR_vecEndpos, using EngFunc_GetBonePosition ( bone 24 -> left shoulder inside and bone 38 -> right shoulder inside ) ; Knowing their origin you can imagine a box with a specific size for both shoulder and finally checking if EndPos is contained in one of this box ; if so you hit a player's shoulder.
I understand you arksh.
How about other modles/?

Sorry for da bump Im just drinking,ive tryied BONExxx And it is bad with other modelss.

Last edited by xbatista; 03-27-2009 at 15:23.
xbatista is offline
Send a message via Skype™ to xbatista
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 03-27-2009 , 15:26   Re: Detect attacer hit victim to shoulder.
Reply With Quote #9

Theses bones are from a CS generic player model. Valid for all generic player models. If you are talking about zombie it should be the same. Well you can see yourself. Use Half-life Model Viewer and dump model info, you will see if the bone number is different.
Arkshine is offline
xbatista
Veteran Member
Join Date: Mar 2008
Location: Lithuania
Old 03-27-2009 , 15:44   Re: Detect attacer hit victim to shoulder.
Reply With Quote #10

OKEY will try :/
And how about a plugin I saw,but I don't remember it now,when I hitted enemy back/shoulder he die instantly?
xbatista is offline
Send a message via Skype™ to xbatista
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 09:00.


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