Hi! I made a script that will replace the basic weapon.fpi to this
;Artificial Intelligence Script
;Header
desc = Buy weapon via health
;Triggers
:state=0:hudreset,hudx=50,hudy=90,hudimagefine=gamecore\text\pickedupaweapon.tga,hudname=weaponprompt,hudhide=1,hudmake=display
:state=1:fpgcrawtextsize=24,fpgcrawtextfont=verdana,fpgcrawtextr=150,fpgcrawtextg=150,fpgcrawtextb=150,fpgcrawtextx=50,fpgcrawtexty=60
:state=1:fpgcrawtext=Press Enter to buy M9 for 20 health.
:state=1,plrdistwithin=50,plrusingaction=1:state=10,plraddhealth=-20
:state=10,plrdistwithin=50:state=1,playertake,coloff,rundecal=-1,plrsound=audiobank\items\pickupweapon.wav,hudshow=weaponprompt,hudfadeout=weaponprompt
;state=2:state=3,playerdrop,colon,plrsound=audiobank\items\pickup.wav
:state=3,plrdistfurther=75:state=10
;End of Script
So when player will come close enough, text will appear and if Enter is pressed then -20 health and pick up that weapon. (So health is money)
But it does not work! Anyone who could help me with this?
[EDIT] I got it work better and properly, here's the code:
;Artificial Intelligence Script
;Header
desc = Buy weapon via health
;Triggers
:state=0:hudreset,hudx=50,hudy=90,hudimagefine=gamecore\text\pickedupaweapon.tga,hudname=weaponprompt,hudhide=1,hudmake=display,state=1
:state=1:fpgcrawtextsize=24,fpgcrawtextfont=verdana,fpgcrawtextr=150,fpgcrawtextg=150,fpgcrawtextb=150,fpgcrawtextx=50,fpgcrawtexty=60,state=2
:state=2,plrdistwithin=40:fpgcrawtext=Press <Enter> to buy M9 for 20 health.
:state=2,plrdistwithin=40,plrhealthgreater=20,plrusingaction=1:state=10,plraddhealth=-20
:state=10,plrdistwithin=40:state=2,playertake,coloff,rundecal=-1,plrsound=audiobank\items\pickupweapon.wav,hudshow=weaponprompt,hudfadeout=weaponprompt
:state=3,plrdistfurther=65:state=10
;End of Script
Thanks,
TP