First off, when you define your huds, you should
always define them in the beginning states (":state=0:"). There have been many that try to define a hud in the middle of the script and it just does not work. So the beginning should be like this:
;Artificial Intelligence Script
;Header
desc = Display Hud
;Triggers
:state=0:hudreset,hudx=50,hudy=90,hudimagefine=gamecore\text\pressentertouse.tga,hudname=book,hudhide=1,hudmake=display
:state=0:hudreset,hudx=50,hudy=50,hudimagefine=gamecore\huds\Note.png,hudname=message,hudhide=1,hudmake=display
Then (if it were me), I would have this next:
:state=0:state=1
:plrdistwithin=50:hudshow=book,hudfadeout=book
:state=1,scancodekeypressed=28:hudshow=message,plrfreeze=30000,etimerstart,state=2
:state=2,etimergreater=250,scancodekeypressed=28:hudunshow=message,plrfreeze=0,state=3
:state=3,plrdistfurther=60:state=0
;End of Script
Now, the first thing I did was define your huds in the state=0 lines. Also when the player is 50 units within the entity, it shows the book hud. I also changed the "plrusingaction=1" to "scancodekeypressed=28" (I like using this method myself). The player presses Enter, the message shows and they freeze. When Enter is pressed again, the message disappears and they unfreeze. When the player moves 60 units away from the entity, the script goes back to the beginning and starts again.
I am not too sure if this is for certain, but the reason the player did not freeze is possible because you were in close proximity to the entity and the script did not know what to do. That's why I myself like using the "plrdistfurther" command to tell the script when the player moves away then do this.
Another way to write the script is this:
;Artificial Intelligence Script
;Header
desc = Display Hud
;Triggers
:state=0:hudreset,hudx=50,hudy=90,hudimagefine=gamecore\text\pressentertouse.tga,hudname=book,hudhide=1,hudmake=display
:state=0:hudreset,hudx=50,hudy=50,hudimagefine=gamecore\huds\Note.png,hudname=message,hudhide=1,hudmake=display
:state=0:state=1
:state=1,plrdistwithin=50:hudshow=book,hudfadeout=book,state=2
:state=2,scancodekeypressed=28:hudshow=message,plrfreeze=30000,etimerstart,state=3
:state=3,etimergreater=250,scancodekeypressed=28:hudunshow=message,plrfreeze=0,state=4
:state=4,plrdistfurther=60:state=1
;End of Script
Hope that gets you on the right path.
Twitter: @NFoxMedia