It wouldn't be difficult to make, depending on how you would like to do it. Just think about it logically.
Here is the basic IsPlayerAimingAtPlayer function.
Код:
stock IsPlayerAimingAtPlayer(playerid, targetid)
{
new Float:x, Float:y, Float:z;
GetPlayerPos(targetid, x, y, z);
if (IsPlayerAimingAt(playerid, x, y, z-0.75, 0.25)) return true;
if (IsPlayerAimingAt(playerid, x, y, z-0.25, 0.25)) return true;
if (IsPlayerAimingAt(playerid, x, y, z+0.25, 0.25)) return true;
if (IsPlayerAimingAt(playerid, x, y, z+0.75, 0.25)) return true;
return false;
}
As you can see, all you would need to change is the position (the GetPlayerPos). You would need some kind of dynamic object system if you wanted to detect if a player is aiming at any object or multiple different objects of the same ID, but if it's just one scenario just set the x, y, and z to the appropriate coordinates.
Of course you would need to do some more editing then JUST that, but for the most part it's as simple as that. It really depends on the scenario you are talking about.