Script Error
Real_PUA
Join Date: 2005-03-23 Member: 46255Members
<div class="IPBDescription">Calling for meds when i dont want it</div> I use this medpack script:
alias +med "say_team I need a medpack!"
alias -med "impulse 10"
bind "z" "+med"
Sometime when I open console and then close it I call for a medpack (But I dont say "I need a medpack"). Its confusing, and im sure annoying for comms. Any ideas?
alias +med "say_team I need a medpack!"
alias -med "impulse 10"
bind "z" "+med"
Sometime when I open console and then close it I call for a medpack (But I dont say "I need a medpack"). Its confusing, and im sure annoying for comms. Any ideas?
Comments
bind "z" "med"<!--c2--></td></tr></table><div class='postcolor'><!--ec2-->
That should fix it. It's because when you leave the console, the "-" part of the script is executed if you have a "+" something bound.
You can prevent this by having your console key unbind your attack key as well as close the console, and then creating an alias that rebinds it on the unpress and binding that alias to some unused key like joy1.
Like so:<!--c1--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>CODE</b> </td></tr><tr><td id='CODE'><!--ec1-->alias unbindm1 "unbind mouse1"
bind "`" "toggleconsole;unbindm1"
alias +rebindm1
alias -rebindm1 "bind mouse1 +pshot"
bind joy1 +rebindm1<!--c2--></td></tr></table><div class='postcolor'><!--ec2-->
(Change +pshot to whatever your pistol script alias is named.)
The same problem occurs with the escape key, but this fix cannot be applied there because Half-Life/Steam does not allow the escape key to be rebound.