"Get Player Character" like blueprint?

Ok, after googling half of the WWW i found out how to get the character

for (TActorIterator<AActor> ActorItr(GetWorld()); ActorItr; ++ActorItr)
{
       MyCharacter = Cast<ASurvivalCharacter>(*ActorItr);
}

MyCharacter is the one i created in the header.

It also works with ->Role to check if its the server or the client. Took me some time to test, but changing a variable on both depending on server or client showed me that it is working (i hope x))