integer llSameGroup(key id);
Returns TRUE if the agent/object associated with id has the same active group (and is currently in the same simulator) as the object the script is in. If not, this function returns FALSE.
Note: “group” does not refer to links but, rather, collaborative groups of users.
Passing NULL_KEY as id will return TRUE if the object’s active group is set to “none”, FALSE otherwise.
llSameGroup will return TRUE if passed the key of the group itself. This allows a script to determine if it’s in an object over group-owned land, or if an object is group-deeded.
A: Maybe the avatar sitting has a different active group than the object checking with the script