I guess from the header that I had better help out on this.
You have 3 colons in state=0 (you can't have more than two), so the second one needs to be a comma.
Try this
;Search Object Script
; Script by: Silent Thunder
; Edited by Conjured Entertainment and Darimc
desc = Search object via TAB key
;Triggers
:state=0:hudreset,hudx=50,hudy=90,hudimagefine=gamecore/huds/ammo.dds,hudname=objectives,hudhide=1,hudmake=display,state=1
:state=1,plrwithinzone=1,scancodekeypressed=15:state=2
:state=1:hudunshow=objectives
:state=2:hudshow=objectives,state=1
;End of Script
As you can see, I just added your plrwithinzone=1 condition to the existing condition of the scancodekeypressed in state=1.
So, now they have to be in the zone and pressing the key for the HUD to show.