You could use
UnitInRaid, however oUF can handle this for you.
here's an example of party
Lua Code:
local party = self:SpawnHeader(
nil, nil, 'party,solo',
'showParty', true,
'showPlayer', true,
'showSolo', false,
'xOffset', 0,
'yoffset', 0,
'oUF-initialConfigFunction', [[
self:SetHeight(19)
self:SetWidth(70)
]],
'maxColumns', 5,
'unitsperColumn', 1,
'columnSpacing', 5,
'columnAnchorPoint', "TOP"
)
party:SetPoint("BOTTOM", UIParent, 0, 140)
where this is an example for a raidgroup
Lua Code:
local raid = self:SpawnHeader(
nil, nil, 'raid,party,solo',
'showPlayer', true,
'showSolo', false,
'showParty', false,
'showRaid', true,
'xoffset', 7,
'yOffset', -5,
'oUF-initialConfigFunction', [[
self:SetHeight(19)
self:SetWidth(50)
]],
'groupFilter', '1,2,3,4,5,6,7,8',
'groupingOrder', '8,7,6,5,4,3,2,1',
'sortMethod', 'NAME',
'groupBy', 'GROUP',
'maxColumns', 8,
'unitsPerColumn', 5,
'columnSpacing', 7,
'columnAnchorPoint', "RIGHT"
)
raid:SetPoint("LEFT", UIParent, 20, 0)
notice 'showRaid' in particular.
I'd suggest to look into other people's layouts to see how they handle party/raid. oUF is VERY flexible.