Wow, works perfect. Can you show me an example with that please? So that I can check also other entities easily.
PHP Code:
stock bool:is_aiming_at_player(index)
{
new target, temp, classname[32];
get_user_aiming(index, target, temp);
pev(target, pev_classname, classname, 31);
if ( equal(classname, "player") )
return true;
return false;
}