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

script help

Created 28th June 2009 @ 17:50

Add A Reply Pages: 1 2 Next »

Rubber Johnny

Hi guys,

is it possible to write a script which can meet the following demands?

I need a script where I can switch between my rocketlauncher and shotgun.I’d use another crosshair for the rocketlauncher than the shotgun and another size for the ch, aswell plus no weaponmodel. I heard there could be a problem with such a script in case you die with the shotgun out and getting the shotgun crosshair when you respawn at your rocketlauncher. Is there any possibilty to avoid this?

If this script is impossible to write w/e, you can close this thread. If any1 could help me, would be nice.

thx in advance

im sure it possible but no idea how D:

Mikey

Interested in such a script aswell :P

Mrf

[LtdCo]

Don’t think you can solve the crosshair problem, but if you end up with the shotty crosshair with the rocket launcher, all you have to do is press your switch button once. The crosshair will change, but you will keep your rocket launcher out.

Rubber Johnny

Well mrf, that sounds fine for me, if I only have to press the same button once in order to change it back.

Waebi

‹Con›

bind 1 “slot1;+reload;viewmodel_fov XX;cl_crosshair_file crosshairX;cl_crosshair_red XXX;cl_crosshair_green XXX;cl_crosshair_blue XXX;cl_crosshair_scale XX”

bind 2 “slot2;+reload;viewmodel_fov XX;cl_crosshair_file crosshairX;cl_crosshair_red XXX;cl_crosshair_green XXX;cl_crosshair_blue XXX;cl_crosshair_scale XX”

bind 3 “slot3;-reload;viewmodel_fov XX;cl_crosshair_file crosshairX;cl_crosshair_red XXX;cl_crosshair_green XXX;cl_crosshair_blue XXX;cl_crosshair_scale XX”

just edit it a bit.
in all other class.cfg, put
bind 1 slot1
bind 2 slot2
bind 3 slot3
viewmodel_fov XX (the ones you want there)

edit: if you want the same color for shotty + rocket, remove the “crosshair_COLOR” thingies.

Mrf

[LtdCo]

alias secondary “slot2; exec shottycross.cfg; bind “BUTTON” primary”
alias primary “slot1; exec rlcross.cfg; bind “BUTTON” secondary”
bind “BUTTON” “secondary”

+ 2 cfgs, in this case called “shottycross” and “rlcross”. In those 2 you add the crosshair options for each weapon, and r_drawviewmodel if you want 1 to be hidden and the other shown.

Assuming you just copy the text, you will have to replace the “”, as they differ from the ones in notepad

im sure a mate has the set up so that it changes between the to, ill bug him and try and give it later :D

Psyche

alias “crosshair1” “cl_crosshair_file xxx;cl_crosshair_scale xxx;cl_crosshair_green xxx;cl_crosshair_blue xxx; cl_crosshair_red xxx”
alias “crosshair2” “cl_crosshair_file xxx;cl_crosshair_scale xxx;cl_crosshair_green xxx;cl_crosshair_blue xxx; cl_crosshair_red xxx”

alias “soldierq” “soldiertoggle2”
alias “soldiertoggle” “slot1;alias soldierq soldiertoggle2;crosshair1;viewmodel_fov xxx”
alias “soldiertoggle2” “slot2;alias soldierq soldiertoggle1;crosshair2;viewmodel_fov xxx”

bind “q” “soldierq”
bind “1” “slot1;crosshair1;viewmodel_fov xxx”
bind “2” “slot2;crosshair2;viewmodel_fov xxx”
bind “3” “slot3;crosshair(?);viewmodel_fov xxx”

Binds both the quick switch option or the normal switch option to a crosshair on x weapon with x viewmodel_fov, replace “xxx” with numbers and the pick a crosshair number for the meele weapon.

Note: If your crosshairs get mixed up just reset the script (e.g: change to another weapon and change back to the one you had either using 1,2 our 3 or the “q”)

eoN^

Use m0res class configs.

http://more.pp.fi/tf2/configs/class_cfg/

You will also need the Alias’ file

http://more.pp.fi/tf2/configs/alias.cfg

klu

-[MG]-
MG//

Heres some of my config, which should be what you’re looking for:

In Autoexec.cfg:
// - Soldier
alias "soldier_weap1" "slot1; reload_off; r_drawviewmodel 1; default_xhair; bind mouse1 +autoload; bind mouse2 +attack2"
alias "soldier_weap2" "slot2; reload_off; r_drawviewmodel 1; default_xhair; bind mouse1 +autoload; bind mouse2 +attack2"
alias "soldier_weap3" "slot3; reload_off; r_drawviewmodel 1; default_xhair; bind mouse1 +attack; bind mouse2 +attack2"

Here you put different settings for each weapon.

Then in soldier.cfg:
bind "mwheelup" "soldier_weap1"
bind "mwheeldown" "soldier_weap2"
bind "mouse4" "soldier_weap3"
bind "1" "soldier_weap1"
bind "2" "soldier_weap2"
bind "3" "soldier_weap3"

:)

Mendietaaaa

TBNC

agrons cfg works fine with different crosshairs for different weapons

Iller

tGa

Hmm, something is wrong.
I’m trying Waebi’s script.
I have tried to put it both in the Soldier.cfg and the autoexec.cfg, but it’s like it is completely ignored.
I tried viewmodel 0 for the RL and viewmodel 70 for the shotty. When I press 1 and 2, nothing at all happens..

Anyone knows what the reason could be ?
I’m using the morehud (if this is relevant to know).

klu

-[MG]-
MG//

Hmm, something is wrong.
I’m trying Waebi’s script.
I have tried to put it both in the Soldier.cfg and the autoexec.cfg, but it’s like it is completely ignored.
I tried viewmodel 0 for the RL and viewmodel 70 for the shotty. When I press 1 and 2, nothing at all happens..

Anyone knows what the reason could be ?
I’m using the morehud (if this is relevant to know).

You need to replaces the

with

"

they mess up on this forum for some reason.

Iller

tGa

Ah, thank you for that Klu !
Now it works fine !

Add A Reply Pages: 1 2 Next »