Well, I could not see ur coding all thanks to this forum being unable to use the snippet button in a non IX brower ( when will the guys fix it... ).
well, I wrote this for u... I dunno if works, I cannot test right now and I've not been coding for like 6 months in DB

the code may be crap and u will maybe need to set a flag later...but if even do not compiled u will get the idea. The idea of "Pause" a game is basicaly create a loop outside ur main loop. If the key P is pressed inside the main loop, will take you to another loop where nothing will happens... and will be ended when a condition is reached ( like P is pressed again u unpause ur game ). try this:
rem How to pause a game
rem by Rogue

rem make a matrix
make matrix 1,10000.0,10000.0,25,25
randomize matrix 1,50.0
rem position camera
position camera 5000,200,5000
rem main loop
do
rem Control camera with arrow keys
if leftkey()=1 then angley#=wrapvalue(angley#-2.0)
if rightkey()=1 then angley#=wrapvalue(angley#+2.0)
rem pause the game
if inkey$()="p" then gosub pause
rem Update camera
rotate camera 0,angley#,0
rem End loop
loop
pause:
do
center text 320,240,"Game Paused"
if inkey$()="p" then return
loop
I don't suffer from insanity, I enjoy every minute of it!"
-- Rogue
