A different way to select a spray?

A Forum Thread for Counter-Strike: Source

Yo, buddy. We are one of the oldest mod sites on the Interwebs. Sign up and maximize your browsing experience.

  • Subscribe: Get notified of new submissions like this.
  • Say Thanks: Show your appreciation by sending BliND123 points.
  • Post: Give BliND123 your thoughts on this Thread.
  • Flag: Alert moderators and warn members of a problem with this Thread.
  • Watch: Get notified when this Thread is updated.
Mascot

Resistance is futile...

Sign up

Already a Bananite? Login

I was just thinking while going through my sprays, I remember back in CS 1.6 there was a program to select sprays from like a little window, why isn't there something like that for CSS? I mean all it really needs is a window to view them all and have it edit a line in the CFG to select one. Is there something like this already available? Cause going through the list of sprays trying to find the right one just sucks going one by one. Edit: ES-Spray 2, thats the old program that was created for CS 1.6 to select sprays, looks like that website is closed. But anyways, yeah, why isn't there something like that for CSS?

Posts

  • 8y
    BliND123 avatar
    BliND123 Offline
    Member Joined 8y
    No replies but check this out, Skwire on the Autohotkey website (was nice enough and had the patience to do this) wrote this script up to switch sprays for CSS:

    [code]
    ; Set up environment.
    #NoEnv
    #SingleInstance, Ignore
    SetWorkingDir, %A_ScriptDir%

    myVtfFile = %1%
    StringReplace, myVtfFileStripped, myVtfFile, C:\Program Files\Steam\steamapps\EMAILADDRESSHERE\counter-strike source\cstrike\, ,

    myCfgFile := "C:\Program Files\Steam\steamapps\EMAILADDRESSHERE\counter-strike source\cstrike\cfg\spray.cfg"
    FileRead, myCfgData, % myCfgFile

    Loop, Parse, myCfgData, `n, `r
    {
    If ( A_LoopField != "" )
    {
    If InStr( A_LoopField, "cl_logofile" )
    {
    Block .= "cl_logofile """ . myVtfFileStripped . """`n"
    }
    Else
    {
    Block .= A_LoopField . "`n"
    }
    }
    }

    FileDelete, % myCfgFile
    FileAppend, % Block, % myCfgFile
    [/code]

    If anyone wants to take this code further and maybe make a window to browse the spray folder and be able to pick from it go right ahead. Right now all this allows me to do is drag my spray .vtf files onto this script (which I converted into an .exe with Autohotkey) and it gets loaded with spray.cfg which I just have running from autoexec.cfg. So right now with VTF Shell Extension + this script I can see all my sprays and switch between all of them.
    Bananite
  • 8y
    gameripper avatar
    gameripper avatar Offline
    Member Joined 9y
    55,052 points Ranked 67th
    Interesting code. I'll admit I know little about this maybe you could clarify how to install and use it?

    Does it create a UI for browsing skins that you have added?
    Team ARIA avatar
    Mantra
    Team ARIA
  • 8y
    BliND123 avatar
    BliND123 Offline
    Member Joined 8y
    No, not right now. Right now once you compile this code with Autohotkey (ofcourse you have to edit the settings to your CSS directory stuff) it just allows you to drag a spray .vtf onto the .exe and it automatically edits the .cfg file to that spray. But the sprays still have to be somewhere within the \cstrike\materials\ folder where the game can see them. I'm using this with the VTF Shell Extension (http://www.wunderboy.org/sourceapps.php#vtf_shell) so I can see my sprays in the normal Windows Explorer.

    I only know simple Autohotkey stuff, I know it is possible to have a nice GUI and everything and probably have a .ini to keep settings in so it could ask you once where your CSS is located and where your .cfg is located. But I will try to see if I can figure out how to make it better and more user friendly.

    If you want to use this like it is you will have to install Autohotkey and paste this code in a text file and edit the \EMAILADDRESSHERE\ parts and where your spray.cfg is and then change the .txt to .ahk, then you should be able to just right click it and compile it into an .exe file. Now, the way the code in this is used I think it erases the .cfg file each time you change sprays with this script so I would create a separate spray.cfg file and just add "exec spray.cfg" to autoexec.cfg so it won't erase your other settings.
    Bananite
  • 8y
    gameripper avatar
    gameripper avatar Offline
    Member Joined 9y
    55,052 points Ranked 67th
    I still am a bit unsure tbh. Why don't you just use the built-in spray selecter?
    Team ARIA avatar
    Mantra
    Team ARIA
  • 8y
    BliND123 avatar
    BliND123 Offline
    Member Joined 8y
    The whole reason I was wanting this to be made is so that it would be simpler to pick a spray, instead of looking at 200 sprays one by one (this isn't for someone that only has like 10 sprays) we can just browse the spray folder and drag it onto the script and its set to use. Like I said, if someone knows how to use Autohotkey better they can make it easier to use, make a window to browse the sprays and stuff, probably even make a spray converter too with this and other tools on FPSBanana.
    Bananite

Share

Shareable Image:
Share banner
HTML embed code:
BB embed code:
Markdown embed code:

More embeddable images

Bookmark and Share

Submitter

BliND123 avatar
BliND123 Offline
Member Joined 8y

BliND123
Sign up to access this!
Sign up to access this!
Sign up to access this!
Sign up to access this!

Category

Stats

Posts
5
Views
1,109
Date Added
8y
Date Modified
8y
bcp.crwdcntrl.net tracking pixel