AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Detect attacer hit victim to shoulder. (https://forums.alliedmods.net/showthread.php?t=88615)

xbatista 03-27-2009 09:53

Detect attacer hit victim to shoulder.
 
I need to detect players shoulder // or killed victim in back.

SnoW 03-27-2009 12:22

Re: Detect attacer hit victim to shoulder.
 
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 


Arkshine 03-27-2009 12:30

Re: Detect attacer hit victim to shoulder.
 
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.

SonicSonedit 03-27-2009 13:38

Re: Detect attacer hit victim to shoulder.
 
xbatista
maybe this will help you http://forums.alliedmods.net/showthread.php?t=52392

Arkshine 03-27-2009 13:55

Re: Detect attacer hit victim to shoulder.
 
No this plugin will not help him.

SonicSonedit 03-27-2009 14:27

Re: Detect attacer hit victim to shoulder.
 
arkshine
I thought he was talking about arm, but if he really asks about shoulder, you are right)

xbatista 03-27-2009 15:16

Re: Detect attacer hit victim to shoulder.
 
I need if attacker hitted/killed victim in shoulder he dies,and don't do 60 damage.

xbatista 03-27-2009 15:18

Re: Detect attacer hit victim to shoulder.
 
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.

Arkshine 03-27-2009 15:26

Re: Detect attacer hit victim to shoulder.
 
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.

xbatista 03-27-2009 15:44

Re: Detect attacer hit victim to shoulder.
 
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?


All times are GMT -4. The time now is 09:00.

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