« Previous12Next »
RSS Feed

Help me with this Script

#  Jun 18, 2009 at 8:51 PM
Join Date:
Jun 13, 2009
Post Count:
325
 
M_24 90984
Loading...
Steam ID: Hardboiled_24
 
I found this script that will disable the corsshair for sniper when scoped in, but i can't seem to get it to work if I use the default crosshairs, could someone help me out.

heres the script:
// Binds
bind mouse1 +sniper // Keep this bound to +attack if you enabled rezoom after shooting
bind mouse2 +zoom
bind q _lastinv
bind 1 slot1
bind 2 _slot2
bind 3 _slot3

// Scripts
alias crosshair0 "exec nocrosshair.cfg"
alias crosshair1 "cl_crosshair_file crosshair "" // Or which crosshair you use, I use crosshair3, but replace it with which one you use eg cl_crosshair_file crosshair 5
alias +zoomin "+attack2; crosshair0"
alias -zoomin "-attack2; alias +zoom +zoomout; alias -zoom -zoomout"
alias +zoomout "+attack2"
alias -zoomout "-attack2; alias +zoom +zoomin; alias -zoom -zoomin; crosshair1"
alias +zoom +zoomin
alias -zoom -zoomin

alias +sniper "+attack"
alias -sniper "-attack; -zoomout"

alias _lastinv "lastinv; -zoomout"
alias _slot2 "slot2; -zoomout"
alias _slot3 "slot3; -zoomout"

and i put this in a seperate file called nocrosshair.cfg
cl_crosshair_file ""
crosshair 0

and this in everyother class config:
cl_crosshair_file crosshair ""
bind mouse1 +attack
bind mouse2 +attack2
-reload
bind q lastinv
bind 1 slot1
bind 2 slot2
bind 3 slot3

when I put this in my crosshair is a large pink and blakc checkered square.

thanks so much.
#  Jun 18, 2009 at 9:28 PM
Join Date:
Oct 21, 2007
Post Count:
2689
 
teamchuckles 78952
Loading...
Specialty: Scout
Steam ID: teamchuckles!
Clan: { }
King ScoutSquigMemberStaff
 
Your nocrosshair.cfg file has the command "crosshair 0", but the alias you set is for "crosshair0" without the space. Not sure if that will actually fix anything, but whatever. You probably don't even need the "crosshair0" command in your nocrosshair.cfg file.
#  Jun 18, 2009 at 9:30 PM
Join Date:
Oct 21, 2007
Post Count:
2689
 
teamchuckles 78952
Loading...
Specialty: Scout
Steam ID: teamchuckles!
Clan: { }
King ScoutSquigMemberStaff
 
Also, in every other class, you put cl_crosshair_file crosshair "", but you should probably replace those with "crosshair0" so it execs the crosshair file since that command is kinda broken usually.
#  Jun 18, 2009 at 9:32 PM
Join Date:
Oct 21, 2007
Post Count:
2689
 
teamchuckles 78952
Loading...
Specialty: Scout
Steam ID: teamchuckles!
Clan: { }
King ScoutSquigMemberStaff
 
Triple post because I'm the coolest.

That script you sent, is that copied and pasted from your cfg file? If so, then the reason you are getting the pink and black checkered is because of this line...

alias crosshair1 "cl_crosshair_file crosshair "" // Or which crosshair you use, I use crosshair3, but replace it with which one you use eg cl_crosshair_file crosshair 5

You need to change that line with

alias crosshair1 "cl_crosshair_file crosshair 5"

Or change the last number of the line with whatever number crosshair you want to use.
#  Jun 18, 2009 at 9:44 PM
Join Date:
Jun 13, 2009
Post Count:
325
 
M_24 90984
Loading...
Steam ID: Hardboiled_24
 
sorry chuckles, even your triple posting couldn't help. I've still got the same problem.

could it be that i'm trying to use default crosshairs instead of a custom one?

major scripting noob here, so any help again would be apreciated.
#  Jun 18, 2009 at 9:48 PM
Join Date:
Oct 21, 2007
Post Count:
2689
 
teamchuckles 78952
Loading...
Specialty: Scout
Steam ID: teamchuckles!
Clan: { }
King ScoutSquigMemberStaff
 
Copy and paste your script files with the changes I've outlined. I really think the third change should fix your problem...
#  Jun 18, 2009 at 9:51 PM
Join Date:
Jun 13, 2009
Post Count:
325
 
M_24 90984
Loading...
Steam ID: Hardboiled_24
 

Sniper.cfg (the whole thing)

// Binds
bind mouse1 +sniper // Keep this bound to +attack if you enabled rezoom after shooting
bind mouse2 +zoom
bind q _lastinv
bind 1 slot1
bind 2 _slot2
bind 3 _slot3

// Scripts
alias crosshair0 "exec nocrosshair.cfg"
alias crosshair1 "cl_crosshair_file crosshair 0"
alias +zoomin "+attack2; crosshair 0"
alias -zoomin "-attack2; alias +zoom +zoomout; alias -zoom -zoomout"
alias +zoomout "+attack2"
alias -zoomout "-attack2; alias +zoom +zoomin; alias -zoom -zoomin; crosshair1"
alias +zoom +zoomin
alias -zoom -zoomin

alias +sniper "+attack"
alias -sniper "-attack; -zoomout"

alias _lastinv "lastinv; -zoomout"
alias _slot2 "slot2; -zoomout"
alias _slot3 "slot3; -zoomout"
viewmodel_fov 54
-reload

bind mouse3 "say_team ===ENEMY MEDIC DEAD==="
bind mouse5 "voicemenu 0 3"

nocrosshair.cfg
crosshair 0

Other configs.cfg (solly/demo)
crosshair 0
bind mouse1 +attack
bind mouse2 +attack2
-reload
bind q lastinv
bind 1 slot1
bind 2 slot2
bind 3 slot3
viewmodel_fov 70

#  Jun 18, 2009 at 9:53 PM
Join Date:
Oct 21, 2007
Post Count:
2689
 
teamchuckles 78952
Loading...
Specialty: Scout
Steam ID: teamchuckles!
Clan: { }
King ScoutSquigMemberStaff
 
alias crosshair1 "cl_crosshair_file crosshair 0"

crosshair 0 doesn't exist. You need to choose a crosshair between 1 - 7 I believe. Whichever one you choose will be the crosshair for when you're unscoped. Choosing crosshair 0 will tell the game to pick a crosshair file that doesn't exist which causes pink and black checkered textures.

I think this script will probably break if you try to scope before you finish reloading the sniper rifle, but that's a different story.
#  Jun 18, 2009 at 9:55 PM
Join Date:
Oct 21, 2007
Post Count:
2689
 
teamchuckles 78952
Loading...
Specialty: Scout
Steam ID: teamchuckles!
Clan: { }
King ScoutSquigMemberStaff
 
Also, you have this...


nocrosshair.cfg
crosshair 0

Other configs.cfg (solly/demo)
crosshair 0
bind mouse1 +attack
bind mouse2 +attack2
-reload
bind q lastinv
bind 1 slot1
bind 2 slot2
bind 3 slot3
viewmodel_fov 70

The two bolded lines don't exist, delete those or change them to "crosshair0" without the space.
#  Jun 18, 2009 at 10:08 PM
Join Date:
Jun 13, 2009
Post Count:
325
 
M_24 90984
Loading...
Steam ID: Hardboiled_24
 
thank you chuckles, it works!

I hate to be picky though, the scritp works when in both the sniper/other classes i have selected a crosshar from 1-7 (the custom ones), but i would really like to use the default corsshairs. is their a command for default corsshairs. it not thats fine, thanks for the help, but if there is that'd eb great.

unfortunatly I won't be able to reply right away though, i got a chem final tommorow and my mom's bitching at me to get off the computer
« Previous12Next »

Copyright 2007-2008 All Rights Reserved

Team Fortress 2


2 Guys 1 Kill: {TF2F} FlyingPenguin - (102 kill assists)
Captures Blocked: Nimbli Bimbli - (26 captures blocked)
Dominator: {TF2F} Bitch Nasty - (25 dominations)
Flags Captured: Corporal Clegg - (11 flags captured)
Flags Defended: MechaEdd - (12 flags defended)
Physician Assisted Homicide: {TF2F}SME®BUI©K - (271 medic kill assists)
Points Captured: {TF2F}SME®BUI©K - (30 points captured)
Revenger: Count_Flakula - (10 revenges)
Spy Power: Chro - (19 objects killed as spy)
Ubercharger: {TF2F}SME®BUI©K - (89 ubercharges)
Axe Man: {TF2F} Ninja Dude - (18 kills with fireaxe)
Axtinguished: {TF2F} BOOSH Rizzilio - (81 kills with axtinguisher)
Batter Up!: soup! - (16 kills with bat)
Biggest Prick: Sam - ClutchKill.com - (8 kills with syringegun)
Blood Sucker: {TF2F}SME®BUI©K - (30 kills with blutsauger)
Broke Backburner: {TF2F} FlyingPenguin - (223 kills with backburner)
Can You Dig It?: {TF2F}.TüRb!NE. - (3 kills with shovel)
Doctor's Certificate: Maero - (16 kills with bonesaw)
Drunken Brawler: [???] Deviruchi - (4 kills with bottle)
Epic Defender: {TF2F} Spy - (9 kills with wrench)
Fire Spitter: {TF2F}blistering - (100 kills with flamethrower)
Flare Gunner: {TF2F} FlyingPenguin - (12 kills with flare gun)
Grenade Spammer: GeneralSheep - (47 kills with pipe)
Grey Matter: STar - (168 snipings as sniper)
Hadouken Master: Xandier - (1 kills with pyro taunt)
Hot Potato: {TF2F} BOOSH Rizzilio - (4 kills with rocket deflection)
I <3 Sasha: {TF2F} Bitch Nasty - (181 kills with minigun)
Knife Maniac: {TF2F} Dartagnan - (109 knifings)
Last Resort: [Ba-El] BoC - (26 kills with smg)
Manslayer: [FRGT] Klare - (10 kills with machete)
Master Fister: Maero - (3 kills with fists)
Peashooter Marksman: Corporal Clegg - (48 kills with scout pistol)
Pickle Squad Award: [NH]Pitt - (18 pickles man handled)
Rocket Scientist: [TF2F]Lancer - (217 kills with rocket)
Scatter Shot: Corporal Clegg - (147 kills with scattergun)
Sentrygun Master: Numenor - (142 kills with sentrygun)
Spam Blocker: {TF2F} BOOSH Rizzilio - (1 kills with pipe deflection)
Spy Checker: {TF2F} Fanlaen - (5 kills with pistol)
Sticky Explosion: {TF2F}Album - (105 kills with pipe remote)
Ubersawer: Psycholord - (27 kills with ubersaw)
Stats Refreshed 6/24/2008 5:00:03 AM CST
AddThis Social Bookmark Button
Fortcast Podcast
Donate
Welcome, you are not logged in.
Login or Register
Team Fortress 2 Fort Team Fortress 2 Fort