I don't know the game nor have I ever reversed it but this is usually the way it goes.
Find your player structure, and of course you need be able to iterate through all the players. Now, let's assume you have a TeamID in your own structure and in the entity structures you're iterating through (for all the players in the current server). You could easily do something like:
if ( PlayerEntity->TeamID == EntityIterator->TeamID )
// Draw ESP for team here...
// Draw ESP for enemy here...