just check if the player is playing and then if not you pick all units owned by player and remove picked unit
Event
Map Initialization
Conditions
Actions
pick all players in player group (All players)
loop do
if (picked player) is playing == false
pick all units owned by (Picked player)
loop do
remove (picked unit) from the game
if (picked player) is playing