+showres Toggle

BreakthroughBreakthrough Texture Artist (ns_prometheus) Join Date: 2005-03-27 Member: 46620Members, Constellation
edited March 2005 in Scripting Discussion
<div class="IPBDescription">Simple Script...</div> This is a simple script, for servers with the <b>/res plugin</b>. Instead of binding
a key to +showres and holding it, you can simply toggle it.
Thanks to <b>ReK</b> for the one that uses aliases.
<!--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 showres1 "+showres; alias showresS showres2; alias refreshresS refreshres2"
alias showres2 "-showres; alias showresS showres1; alias refreshresS refreshres1"
alias refreshres1 ""
alias refreshres2 "-showres; wait; +showres"
alias showresS "showres1"
alias refreshresS "refreshres1"

bind "DEL" "showresS"
bind "INS" "refreshresS"<!--c2--></td></tr></table><div class='postcolor'><!--ec2-->

Bind a key to <u>showresS</u> to toggle showing the resource list, and bind
a key to <u>refreshresS</u> to update the list whenever you want.

The defaults are:
Delete - Resource List Toggle
Insert - Refresh Resource List
<b>Just add this code to your config.cfg!</b>

Comments

  • MrRadicalEdMrRadicalEd Turrent Master Join Date: 2004-08-13 Member: 30601Members
    edited March 2005
    Breakthrough, to make it easier for other people to change the bound key it's better to use aliases instead of binds themselves. That way you only have to bind one key once and only once.

    <span style='color:orange'><span style='font-size:12pt;line-height:100%'>cough<i>cough</i>cough</span></span>
  • c4tc4t Join Date: 2003-09-06 Member: 20619Members
    hey thats a pretty good idea there nice one.
  • ReKReK Join Date: 2004-08-30 Member: 31058Members, Constellation, Reinforced - Shadow, WC 2013 - Silver
    <!--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 showres1 "+showres; alias showresS showres2; alias refreshresS refreshres2"
    alias showres2 "-showres; alias showresS showres1; alias refreshresS refreshres1"
    alias refreshres1 ""
    alias refreshres2 "-showres; wait; +showres"
    alias showresS "showres1"
    alias refreshresS "refreshres1"

    bind "DEL" "showresS"
    bind "INS" "refreshresS"<!--c2--></td></tr></table><div class='postcolor'><!--ec2-->

    Easier to change the binds now.
    Good idea breakthrough.
  • BreakthroughBreakthrough Texture Artist (ns_prometheus) Join Date: 2005-03-27 Member: 46620Members, Constellation
    Thanks, <b>ReK</b>. I hope you don't mind that I've changed the code at the top, but I gave credit to you <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html/emoticons/smile-fix.gif' border='0' style='vertical-align:middle' alt='smile-fix.gif' /><!--endemo-->
Sign In or Register to comment.