thanks for replay and here is my code
sync on
sync rate 60
backdrop on
color backdrop 0
set display mode 1024,768,32
cls
player=1
load object "media/hero/roomdemo.x",player
set object specular player,0
xrotate object player,270
fix object pivot 1
rotate object player,0,180,0
position object player,0,0,0
set object speed player,12000
make object collision box player,-40,0,-40,40,150,40,0
heroframe#=total object frames(player)/200.0
ground=2
load image "media/ground/24.bmp",1
make object plain ground,100000,100000
texture object ground,1
position object ground,0,0,0
scale object texture ground,32,32
xrotate object ground,-90
if gravity = 1
timer()=2
move object down player,2
endif
do
x#=object position x(player)
y#=object position y(player)
z#=object position z(player)
a#=object angle y(player)
d#=250.0
h#=185.0
s#=50.0
if move=0 then loop object player,0*heroframe#,39*heroframe#
if move=1 then loop object player,40*heroframe#,59*heroframe#
move=0
if spacekey () = 1 then move object up player,3:
if rightkey () = 1 then : yrotate object player,wrapvalue (object angle y(player)+4): move=1
if leftkey () = 1 then yrotate object player,wrapvalue (object angle y(player)-4) : move=1
if controlkey () = 1 and upkey () = 1 then move object player,10 : move=1
if controlkey () = 1 and downkey () = 1 then move object player,-10 : move=1
if upkey () = 1 then move object player,4 : move=1
if downkey () = 1 then move object player,-4 : move=1
set camera to follow x#,y#,z#,a#,d#,h#,s#,1
sync
loop