Command help

Need command for, if im holding my needle and running/picking up a smg/mp40 im switching to it automatic.

:D
Thanks for the help
Comments
5
cvarlist *autoswitch*
There's no cvar for that - cg_autoswitch 1 has somewhat similar functionality, but it's not limited to the needle, and it also affects equipment picked up automatically as you run over it (ie. guns lying on the ground that are of a type that give you ammunition). Thus, you'll soon notice rather unwanted behaviour as your pistol is switched for an MP40 mid-fight, and on top of that the gun you just picked up didn't even contain any ammunition.

One could make a script, but it would turn out kind of gimpy, I'm sure. My suggestion is to just learn to press that weaponbank 3.
oh i was supposed to mean that :D anyway thanks :)
Parent
lol easy..type this in your config and push F.


#!/bin/bash

# Call this script with at least 10 parameters, for example
# ./scriptname 1 2 3 4 5 6 7 8 9 10
MINPARAMS=10

echo

echo "The name of this script is \"$0\"."
# Adds ./ for current directory
echo "The name of this script is \"`basename $0`\"."
# Strips out path name info (see 'basename')

echo

if [ -n "$1" ] # Tested variable is quoted.
then
echo "Parameter #1 is $1" # Need quotes to escape #
fi

if [ -n "$2" ]
then
echo "Parameter #2 is $2"
fi

if [ -n "$3" ]
then
echo "Parameter #3 is $3"
fi

# ...


if [ -n "${10}" ] # Parameters > $9 must be enclosed in {brackets}.
then
echo "Parameter #10 is ${10}"
fi

echo "-----------------------------------"
echo "All the command-line parameters are: "$*""

if [ $# -lt "$MINPARAMS" ]
then
echo
echo "This script needs at least $MINPARAMS command-line arguments!"
fi

echo

exit 0
Back to top