here's a quick example of what shana posted:
(I put in a battle because otherwise my characters would all have 0 tp, and I wanted to make sure it worked)
the variable I'm assigning the TP count to is variable 44, the party member I'm checking is party member 1. you don't need to set the TP variable to zero before running the two lines of script, I just did it to make it obvious which variable I was using.
I hope this helps? it's pretty straightforward, just copy the two lines shana posted into the 'script' event option (page 3, at the bottom), and replace the 'id's with actual numbers.