How can I pause/resume animation playing in State Machine

Inside the character class, I used
GetMesh()->bPauseAnims = true;

which is the same as you can see in the editor, when you open the character, under Animation there is a “Pause Anims” flag.