PHP Code:
stock bool:is_aiming_at_player(id)
{
new target, temp, classname[32]
get_user_aiming(id, target, temp)
pev(target, pev_classname, classname, 31)
if(equal(classname, "player"))
return true
return false
}
This would be to check if a player is aiming at another player. For all the other entities I would use an array where all the solid entities are in there.
__________________
Selling tons of my own private works.
Accepting paid work for clans and communities.
Don't hesitate to contact me.