TraceHull's TR_pHit returns only world (-1) and non player entities' ID.
Code:
static trace; trace = create_tr2();
engfunc(EngFunc_TraceHull, origin, end_new, IGNORE_MONSTERS, HULL_HEAD, id, trace);
static hit; hit = get_tr2(trace, TR_pHit);
client_print(0, print_chat, "HIT BY TRACE: %i", hit);
This one should every entities. Isn't it? As I know the game also usning this method to determinate knife attack.
My goal is to detect player's and their body part.
Any useful information?
Edit: Solved. You have to use DONT_IGNORE_MONSTERS instead of IGNORE_MONSTERS. Players are monsters.