Came across this old post and it was interesting to see how baffling something like this was: to be able to switch the player to another ped (or multiple peds) and back to the player. This was like the greatest challenge for me, and a huge source of frustration due to my inability to script it - in fact I wasn't even sure it was possible.
I remember searching all over and found nothing. Asking for help didn't work either - this posting remained unanswered too.
And I did have the right function identified (see above), just didn't know how to implement it at that time.
Today, although I'm far from being a scripting expert, I can do something like this pretty quickly. In the video below, there are 2 cars chasing each other. With a keypress, the player goes from one ped and on the next keypress back to the original player. This can be done with more than 2 peds (I did 3 for fun, but it does get tricky).
Footage is raw output from OBS - no R* editor, no editing period.