PDA

View Full Version : Scout Scripting


Blind
11-07-2009, 02:14 PM
Hello, I've been having a small problem recently with some scout scripts, I know it's probably pretty basic stuff but I'm pretty bad at creating my own scrips so I always rely on others. :\ I currently have different crosshairs set up on all of the classes, and some weapons showing viewmodels while others are off. Right now I have my scattergun with the viewmodel turned off, and a white cross (crosshair 7). Pistol and melee are both showing with a small circle crosshair (crosshair 3). If possible, I'd like to change my scattergun crosshair to the default, while keeping the viewmodel off and leaving the pistol/melee how they are. I'd greatly appreciate any help with this. I'll post up my scout config in case that will help.

alias scattergun "slot1;cl_crosshair_file crosshair7;cl_crosshair_scale 20;cl_crosshair_red 255;cl_crosshair_green 255;cl_crosshair_blue 255;r_drawviewmodel 0;viewmodel_fov 75;MW1"
alias pistole "slot2;cl_crosshair_file crosshair3;cl_crosshair_scale 26;cl_crosshair_red 255;cl_crosshair_green 255;cl_crosshair_blue 255;r_drawviewmodel 1;viewmodel_fov 75;MW2"
alias bat "slot3;cl_crosshair_file crosshair4;cl_crosshair_scale 26;cl_crosshair_red 255;cl_crosshair_green 255;cl_crosshair_blue 255;r_drawviewmodel 1;viewmodel_fov 75;MW3"

alias Q1 "pistole"
alias Q2 "scattergun"
alias MW1 "bind mwheelup bat;bind mwheeldown pistole;bind q Q1"
alias MW2 "bind mwheelup scattergun;bind mwheeldown bat;bind q Q2"
alias MW3 "bind mwheelup pistole;bind mwheeldown scattergun"

bind 1 scattergun
bind 2 pistole
bind 3 bat
bind 4 slot4
bind 5 slot5

scattergun


Also, if anybody is interested feel free to use this.

daniel
11-07-2009, 06:59 PM
i'm pretty sure that's not possible without executing separate cfgs inside the aliases which would cause delay when switching weapons. i could be wrong though

apz
11-07-2009, 09:46 PM
easy..

replace this line, currently in in your cfg..

alias scattergun "slot1;cl_crosshair_file crosshair7;cl_crosshair_scale 20;cl_crosshair_red 255;cl_crosshair_green 255;cl_crosshair_blue 255;r_drawviewmodel 0;viewmodel_fov 75;MW1"

with this line..

alias scattergun "slot1; r_drawviewmodel 0; viewmodel_fov 75; cl_crosshair_file ""; cl_crosshair_scale ""; MW1"

**Havent tested this yet. Pretty sure it will work, though keep a backup of your current cfg in case it doesnt.

Blind
11-07-2009, 10:24 PM
It just uses the same crosshair I have for my pistol, but with the viewmodels off.

Blind
11-07-2009, 10:34 PM
I figured it out!
alias scattergun "slot1;exec default_crosshair;r_drawviewmodel 0;MW1"

apz
11-07-2009, 10:46 PM
well "cl_crosshair_file ""; cl_crosshair_scale" should have made it the default crosshair. O well

Glad u figured it out :]

Blind
11-08-2009, 12:06 AM
Yeah I'm not sure why it didn't work. Looking at it makes sense.

bahbahbah
11-08-2009, 06:20 AM
This is what I use, it's a pretty neat program. The download is in the sidebar of this YouTube video: http://www.youtube.com/watch?v=TP6BqMirUFM

Blind
11-08-2009, 05:40 PM
Yeah I used that too, but it doesn't have the option of creating the default with changes (viewmodels).

daniel
11-08-2009, 08:44 PM
apz: the reason your method didn't work is because the "" in 'cl_crosshair_file "" ' closed the alias (can't have quotes inside of other quotes). that's why he needed to put cl_crosshair_file "" in a separate cfg and execute that cfg inside the alias. it works, but from when i tried to set up a similar thing with medic crosshairs, it adds a fairly noticeable delay in switching which isn't really worth it.

apz
11-09-2009, 04:43 AM
alright thanks for clearing that up

Grimm
11-11-2009, 12:44 PM
Do you really need to exec a different config? Wouldn't making a new alias with only the one command cl_crosshair_file "" in it work? Like this, for example:

alias "defaultcross" cl_crosshair_file ""

and then

alias "pistol" "defaultcross; r_drawviewmodel 1"

(Just for example)

Must test this later.