afaik you can't partly disable user input such as prevent him from walking, but you can simulate it with a script
hold.sqs
; prevent script to run on anything else than players machine
?! (local player): exit
; get players actual position
_pos = getpos player
;now loop for holding player on position
#loop
player setpos _pos
; check if walking is still disabled
? enablewalking: goto "end"
goto "loop"
;exit script
#end
exit
just call this script as soon you want to have the player nailed down. For some reason it won't let the player to turn around so he can't see what happens behind him. Maybe someone else could solve this.
Just make sure you set the variable "enablewalking" to true to give back movement control.