Raised This Month: $ Target: $400
 0% 

Hitzones bytes?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
BioHazardousWaste
Senior Member
Join Date: Apr 2005
Location: Ontario, Canada =)
Old 04-19-2005 , 23:13   Hitzones bytes?
Reply With Quote #1

Anyone know the hitzone bytes? I found this list:

Quote:
1 - generic
2 - head
4 - chest
8 - stomach
16 - left arm
32 - right arm
64 - left leg
128 - right leg
but it is incorrect, because I cought the damage event and did a point black deagle shot to the head for 182 dmg, and no msg saying congratz on the hs u got x bonus experience... but in a random firefight i got the message, so obviously there is somthing wrong with the hitzones.

Code:
   	//bonus exp for HITTING target
   	if (HitZone == 2)
   	{
	   	HitExp += 4
	   	
	   	//tell player
		client_print(Enemy,print_chat,"You are awarded 4 bonus exp for a headshot!")
	}
And, sorta off topic but how big is a "integer" in small? like if itype new myvar what's the max value myvar can hold before crashing? thanx.
__________________
"What then is truth? Truths are illusions which we have forgotten are illusions - they are metaphors that have become worn out... this (truth) is the duty to lie according to a fixed convention.

-Friedrich Nietzsche
BioHazardousWaste is offline
Send a message via MSN to BioHazardousWaste
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 04-19-2005 , 23:34  
Reply With Quote #2

The list you posted is for the bitmask, which I don't believe is used in this case. Try using these instead:

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

(already defined in amxconst.inc)
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 04-19-2005 , 23:47  
Reply With Quote #3

Just add em up now.. (Sorry, no time to explain, gotta hit the Zzz's!)
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
Freecode
Never Fall Asleep
Join Date: Jan 2004
Old 04-20-2005 , 00:23  
Reply With Quote #4

if( HitZone & 2)
Freecode is offline
n0obie4life
Veteran Member
Join Date: Dec 2004
Old 04-20-2005 , 03:23  
Reply With Quote #5

Quote:
Originally Posted by XxAvalanchexX
The list you posted is for the bitmask, which I don't believe is used in this case. Try using these instead:

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

(already defined in amxconst.inc)
how bout if i want left and right .
n0obie4life is offline
NiGHTFiRE
Senior Member
Join Date: Dec 2004
Location: Sweden
Old 04-20-2005 , 09:54  
Reply With Quote #6

I'm not sure but i think you add em up then.
NiGHTFiRE is offline
Send a message via AIM to NiGHTFiRE Send a message via MSN to NiGHTFiRE
BigWalnutZ
Junior Member
Join Date: Apr 2005
Old 04-20-2005 , 10:05  
Reply With Quote #7

I have zero knowledge on this but adding them makes no sense. If you put 3 it could be head and chest or stomach. This is not the standard 1, 2, 4, 8, 16, ...etc. I don't think it works like bitwise
__________________
I am 77% addicted to Counterstrike. What about you?
BigWalnutZ is offline
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 04-20-2005 , 13:49  
Reply With Quote #8

Quote:
Originally Posted by BigWalnutZ
I have zero knowledge on this but adding them makes no sense. If you put 3 it could be head and chest or stomach. This is not the standard 1, 2, 4, 8, 16, ...etc. I don't think it works like bitwise
I didn't post a bitmask, I posted simple number defines for different hitboxes, defines already defined by the AMXx team, thus proving they must be there for a reason.

I'm not sure what the point of a bitmask for hitboxes is, because I don't believe you can shoot someone in two different hitboxes at once.
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
BioHazardousWaste
Senior Member
Join Date: Apr 2005
Location: Ontario, Canada =)
Old 04-20-2005 , 15:09  
Reply With Quote #9

Shooting someone in two different hit boxes at once? Now that would be some nice skills! lol

Thanks for the help, I will try that. I know that the bits work fine, but if you look it said head was 2 and not 1. I think that's the problem. Oh, and sort of off topic, but a nub question here; how are cvars used? And don't they make for some ugly coding instead of using internal vars? Because I want all the exp and stuff to be a cvar...
__________________
"What then is truth? Truths are illusions which we have forgotten are illusions - they are metaphors that have become worn out... this (truth) is the duty to lie according to a fixed convention.

-Friedrich Nietzsche
BioHazardousWaste is offline
Send a message via MSN to BioHazardousWaste
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 04-20-2005 , 15:51  
Reply With Quote #10

Of course it said that the head was 2 and not 1, it's a different system! Maybe that's why yours wasn't working, perhaps? Hmm...
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
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:59.


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