x
ETF2L is looking for new Staff to recruit! Are you interested in supporting the league? Then click here for more details on what we can offer and how to apply! 

Forum

Need Help - TF2 Script

Created 17th April 2009 @ 15:08

Add A Reply Pages: 1

m00n

Helluu..
I’m in need of some help.. Im terrible at scripting, so I am turning to you guys :D

I want to have r_drawviewmodel 0 as a scout, aswell as custom crosshair nr7.
And r_drawviewmodel 1, and standard crosshair as a sniper.

Is there anyone capable of making a script for this?

Big thanks in advance

m00n

klu

-[MG]-
MG//

I have this scripted, ill post it later

Rele

X:/Steam/Steamapps/Username/Team Fortress 2/tf/cfg

X is the hdd where you installed Steam.

Open the scout.cfg with notepad and type:

cl_crosshair_file crosshair7
r_drawviewmodel 0

Open every other class.cfg with notepad and type:

cl_crosshair_file “”
r_drawviewmodel 1

You can add additional commands if you want (eg cl_crosshair_scale, cl_crosshair_blue/red/green etc.).

Thats not really a script btw :P

kolox

obs.

Would suggest making a cfg called “defaultclass.cfg” and putting basic commands for each class like “r_drawviewmodel 1” etc in it, and then put “exec defaultclass.cfg” at the top of the class cfgs.

Then you can put custom settings for each class underneath – for example as scout if you wish to set mouse2 to +reload, put “bind mouse2 +reload” into scout cfg, then put “bind mouse2 +attack2” into defaultclass.cfg to save you having to go into every class cfg each time you make a change to the default keys.

Saves a lot of time if you cba setting it up at the start – just have to remember that commands coming after the exec will overwrite it, so you can have bind “mouse2” “+attack2” in defaultclass, but then in scout.cfg you can change it and the later command will be the one that is used :x

Sorry for my poor explainin’ skills, im Scottish (that’s apparently an excuse now)

m00n

Thanks a bunch guys, works perfectly <3 <3

Psyche

From my own experience, cl_crosshair_file “” doesn’t quite work, only worked when I made a separate .cfg file with “cl_crosshair_file “” then on the class cfg I simply added exec defaultcross and it worked wonders after that :>

AnAkkk

It should work with my method, without the need of an other cfg.

http://etf2l.org/forum/general/topic-1888/page-1/?recent=22409#post-21983

Jan

k0

I change it manually when i want to see or to not see the viewmodel with only a key, it’s really usefull.
Here’s the script:

//Drawviewmodel

alias drawviewmodeloff “r_drawviewmodel 0;bind key drawviewmodelon”
alias drawviewmodelon “r_drawviewmodel 1;bind key drawviewmodeloff”

bind “key” “drawviewmodeloff”

Rele

Psyche, it only doesnt work if you have cl_crosshair_file “” in an alias (because the “” from the command interfere with the “” from the alias).
So it works just fine.

Bones

[SAS]
[SAS]

How do you have it so when you get your melee weapon out it changes to viewmodel 1?

kolox

obs.

Uh, I think you’d need to set Q to only cycle between weapons 1 + 2, and set F or something as melee or just use 3 for individual weapon settings to work, but im not sure :D

Add A Reply Pages: 1