Okay, this is just a rough setup, but from what I can tell without testing it, it should work.
:activated=1:activate=0,incstate=1
:scancodekeypressed=35,activated=0:activate=2,incstate=-1,plraddhealth=50,plrsound=audiobankitemshealthup.wav
:state=-1:state=0,plraddhealth=-50
:scancodekeypressed=0:activate=0
Put that into the MainAI of a hidden entity (Stick it someplace that the player will never see it), and make it so that it is "Always Active".
Now, for the Health Packs. Put the name of your hidden entity (the entity from above) into the Health Pack's "If Used" property. Now give it this code as it's MainAI.
:state=0:hudreset,hudx=50,hudy=90,hudimagefine=gamecoretextpickedupanitem.tga,hudname=itemprompt,hudhide=1,hudmake=display,state=10
:state=10,plrdistwithin=40:activateifused=1,state=1,playertake,coloff,plrsound=audiobankmiscping.wav,hudshow=itemprompt,hudfadeout=itemprompt
:state=1:rundecal=5
I'm in kind of a rush right now so I didn't take the time to put in the HUD popups and sounds and whatnot, so maybe one of the other forum dwellers here can do that for ya.
Good Luck, and let me know how it goes!
[EDIT]
Just realised that I didn't mention that to USE the healthpack, you gotta push the "H" key.
Also, this will "rapid-fire" health packs, so someone is gonna need to put in some code that will prevent it from constantly triggering the healthpack when the user holds down the key.
Have fun!
[/EDIT]
[EDIT2]
Okay, the health pack shouldn't rapid-fire anymore. I also put in a sound when the player uses a healthpack.
Enjoy!
[/EDIT2]
The one and only,
~PlystirE~
Urlforce:
Dude, I'd rather be declared a dbpro noob than an fpsc legend any day!