One of those games eh? Can you run up to them and talk to them first, or does that have the opposite issue of running up to say hi and they shoot you dead?
The situation Lexx is describing is one of the chance encounters you witness while traveling. You usually have enough time to look at them and decide who to attack ( especially once you meet all the bandit groups and remember what they wear, and the friend is usually outnumbered , lawmen wear metal stars,... ). In other events you can usually distingiush very easily who the friendly people are.( Since they're not trying to rob or kill you :D). In main story missions you don't have problems either. You can't do friendly fire anyway and if you do let someone important die you fail and have to start again or from the checkpoint.
And Lexx you can rob the train too among many other things, just so you know.