try playing around with these functions:
from amxmodx.inc:
Code:
/* If player doesn't hit at anything function returns 0.0,
* in other case the distance between hit point and player is returned.
* If player is aiming at another player then the id and part of body are set. */
native Float:get_user_aiming(index,&id,&body,dist=9999);
/* Gets origin from player.
* Modes:
* 0 - current position.
* 1 - position from eyes (weapon aiming). **Look Here!**
* 2 - end position from player position.
* 3 - end position from eyes (hit point for weapon).
* 4 - position of last bullet hit (only CS). */
native get_user_origin(index, origin[3], mode = 0);
from engine.inc:
Code:
/* Will return the contents of a point (inside map? in sky? outside map? etc.). */
native PointContents(Float:fCheckAt[3]);
Hope that helps!