Raised This Month: $ Target: $400
 0% 

Ham_TakeDamage hitplace check.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
P1raten
Senior Member
Join Date: Feb 2010
Old 02-08-2013 , 14:13   Ham_TakeDamage hitplace check.
Reply With Quote #1

Been looking around now for a while but I can't find any way to check where a player has gotten shot using hamsandwich.
__________________
No salvation. Only madness.
P1raten is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 02-08-2013 , 14:24   Re: Ham_TakeDamage hitplace check.
Reply With Quote #2

May be with m_LastHitGroup, don't remember.
Else you can use the trace pointer from TraceAttack, TraceAttack is called from there.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
P1raten
Senior Member
Join Date: Feb 2010
Old 02-08-2013 , 14:49   Re: Ham_TakeDamage hitplace check.
Reply With Quote #3

Quote:
Originally Posted by ConnorMcLeod View Post
May be with m_LastHitGroup, don't remember.
Else you can use the trace pointer from TraceAttack, TraceAttack is called from there.
Both options would require including fakemeta, correct?

Don't feel like including fakemeta just to call 1 function.

Quote:
Originally Posted by Torge View Post
What's about:

PHP Code:
public client_damage(..) 
from csx ?
I was thinking about that, but I was unsure if it was only used to fetch data post damage rather than acting as a modifier.
__________________
No salvation. Only madness.

Last edited by P1raten; 02-08-2013 at 14:51.
P1raten is offline
Torge
Veteran Member
Join Date: Oct 2011
Old 02-08-2013 , 14:48   Re: Ham_TakeDamage hitplace check.
Reply With Quote #4

What's about:

PHP Code:
public client_damage(..) 
from csx ?
Torge is offline
P1raten
Senior Member
Join Date: Feb 2010
Old 02-08-2013 , 18:48   Re: Ham_TakeDamage hitplace check.
Reply With Quote #5

Been searching ever since my last reply but can't find any indication that you are able to modify damage in client_damage, which - obviously - is what I want to do.

I haven't found any other functions either which doesn't require fakemeta. And like I mentioned before I don't feel like including fakemeta just for calling 1 or 2 functions.
__________________
No salvation. Only madness.

Last edited by P1raten; 02-08-2013 at 18:49.
P1raten is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 02-08-2013 , 18:57   Re: Ham_TakeDamage hitplace check.
Reply With Quote #6

Quote:
I don't feel like including fakemeta
Very wrong way of thinking. Just use the available tools whatever the modules, it completely doesn't matter, totally irrelevant to say such things.
__________________
Arkshine is offline
P1raten
Senior Member
Join Date: Feb 2010
Old 02-08-2013 , 18:59   Re: Ham_TakeDamage hitplace check.
Reply With Quote #7

Quote:
Originally Posted by Arkshine View Post
Very wrong way of thinking. Just use the available tools whatever the modules, it completely doesn't matter, totally irrelevant to say such things.
Oh, alright.

I thought I read somewhere that using fakemeta should be avoided if possible. Due to the long execution times and CPU usage.

EDIT: Thanks for nullifying any of my previous doubts, btw.
__________________
No salvation. Only madness.

Last edited by P1raten; 02-08-2013 at 19:02.
P1raten is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 02-08-2013 , 19:06   Re: Ham_TakeDamage hitplace check.
Reply With Quote #8

It's wrong. You just have to learn what does each functions, and using the appropriate one considering your needs, whatever the module. What you can keep in mind is to use as few natives as you can. For example, if you have one engine native which does something, and if you have several natives from fakemeta which do the same thing, you are going to use the engine native. A matter to code intelligently, to choose the best function in your situation, though it requires that you take a look at amxx source code to understand better what does really each natives. You see what I mean ?
__________________

Last edited by Arkshine; 02-08-2013 at 19:11.
Arkshine is offline
P1raten
Senior Member
Join Date: Feb 2010
Old 02-08-2013 , 19:12   Re: Ham_TakeDamage hitplace check.
Reply With Quote #9

Quote:
Originally Posted by Arkshine View Post
It's wrong. You just have to learn what does each functions, and using the appropriate one considering your needs, whatever the module. What you can keep in mind is to use as few natives as you can. For example, if you have one engine native which does something, and if you have several natives from fakemeta which do the same thing, you are going to use the engine native. A matter to code intelligently, to choose the best function in your situation, though it requires that you take a look at amxx source code to understand better what does really each natives.
Best reply I've ever gotten on this forum. +1

Greatly appreciated.
__________________
No salvation. Only madness.
P1raten is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 02-08-2013 , 19:16   Re: Ham_TakeDamage hitplace check.
Reply With Quote #10

fakemeta_util, that's something you can actually avoid, because it's a bunch of stocks converted from engine/fun module to fakemeta, and it uses more natives most of times for one thing. As result, slower code. It's not a module, but just wanted to give an example of what you should not do/use.
__________________
Arkshine 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 11:10.


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