@ncmako - Here is a revised version of the turret script which now manages the hud messages properly, replaces the turret if player killed whilst using it and stops the player from being able to weapon switch with the mouse. I also changed the turret weapon slot to 9 as its a special weapon and didn't want it to replace any primary weapons the player has picked up already.
If you press the numbers 1-8 on the keyboard it will bring up the weapon in that slot which is still a problem but a step in the right direction.
;Artificial Intelligence Script
;Header
desc = plrwithin display mini gun hud
;Triggers
:state=0:hudreset,hudx=50,hudy=90,hudimagefine=languagebank\english\gamecore\text\holster.dds,hudname=holster,hudhide=1,hudmake=display
:state=0:hudreset,hudx=50,hudy=90,hudimagefine=languagebank\english\gamecore\text\use_F.dds,hudname=use,hudhide=1,hudmake=display
:state=0:hudreset,hudx=50,hudy=55,hudimagefine=gamecore/huds/gatlingun1.dds,hudname=gatlin,hudhide=1,hudmake=display,state=1
;PLAYER HAS A WEAPON
:state=1,plrdistwithin=40:hudshow=holster,state=7
:state=7,plrdistfurther=45:hudunshow=holster,state=0
:state=7,scancodekeypressed=11:hudunshow=holster,hudshow=use,,state=3
:state=3,plrdistfurther=45:hudunshow=use,state=0
:state=3,scancodekeypressed=33:hudunshow=use,weapontoslot=9,coloff,hide,hudshow=gatlin,giveplrweapon=modernday\minigun_NoTexture,preventplrselectinggun=1,plrfreeze=99999,state=4
:state=4,plralive=0:hudunshow=gatlin,removeplrweapon=modernday\minigun_NoTexture,show
:state=4,keypressed=31 1:plrfreeze=0,hudunshow=gatlin,show,removeplrweapon=modernday\minigun_NoTexture,preventplrselectinggun=0,state=0
;End of Script
