How do I use TR_GetEntityIndex(Handle:hndl=INVALID_HANDLE) ; ?
I assume this can be used in some very interesting and creative ways. I'm trying to use it in a hooked weapon_fire event to find out what the player is looking at. I've tried testing it using the following code but it just prints out 0.
Code:
new Handle:target;
TR_GetEntityIndex(target);
PrintToChatAll("%i",target);
Am I correct in assuming TR_GetEntityIndex will return another players index if the person shooting is looking directly at them? Also, why isn't this working as intended?