I wanted to do this recently, too. After some searching, I found that there's a script that's part of the SDK/MACL.
You can get it over at SephirothSpawn's website, this topic:
http://owai.ipbfree.com/index.php?showtopic=87
The necessary script is: Systems.SDK Methods
Though you'll need to put in the other SDK/MACL scripts that are required.
After putting in the scripts, to toggle movement:
$game_player.disable_player_movement = !$game_player.disable_player_movement
Alternatively, you could set it to true or false.
(For non-SDK solution, probably find the player movement code wherever that is and don't call it if a certain variable is true (essentially what the above script does)).