Float: get_user_aiming ( index, &id, &body, [ distance ] )
This gets what the player is aiming at. If they are aiming at an entity or a player, it returns the id of the ent into "id".
so, for example:
Code:
new tid,body;
get_user_aiming(id,tid,body)
if( is_user_alive(tid)
{
code
}
return;
Sorry there are no indents. Anyway, you just have to check to see if the entity thats returned is a living player, and then you have the player inside id's crosshairs ^^
__________________