Some handy spraybind

Discussion in 'TTT Discussion' started by Qaaap, Mar 11, 2017.

Tags:
  1. Qaaap

    Qaaap 404 User not found. VIP

    Hi folks,
    Swapping sprays all the time in F1 can be a bit frustrating and putting all your images in 1 post may make the spray you want to show unreadable/low res. That is why I decided to come up with a simple script to make your sprays cycle.

    How does it work?
    In game: Everytime I press G my spray will be cycled and sprayed at the same time meaning I can have multiple sprays ready without using a menu. It makes use of an .cfg file to set binds for me

    Out of game: If you want this too follow these steps:

    1. Open Steam library;
    2. Right mouse button on "Garry's Mod";
    3. Click on "Properties";
    4. Click "Local Files" and there on "Browse local files...";
    5. Open folder: "garrysmod";
    6. Open folder: "cfg";
    7. Right mouse button, to create a new textfile named: spray.cfg
    8. Open it with a text editor;
    9. Paste this code:

    Code:
    alias spray1 "spraymesh_url <spraylink>;impulse 201; bind <key> spray2"
    alias spray2 "spraymesh_url <spraylink>;impulse 201; bind <key> spray3"
    alias spray3 "spraymesh_url <spraylink>;impulse 201; bind <key> spray1"
    bind <key> spray1
    
    NOTE:
    Fill in the <spraylink> with the spraylinks and the <key> with the keyboard button you want to assign to use sprays.

    EXAMPLE:

    Code:
    alias spray1 "spraymesh_url i.imgur.com/EKBqyst.png;impulse 201; bind g spray2"
    alias spray2 "spraymesh_url i.imgur.com/HxqBGcp.jpg;impulse 201; bind g spray3"
    alias spray3 "spraymesh_url i.imgur.com/v3Aqgrq.jpg;impulse 201; bind g spray1"
    bind g spray1
    
    10. Save the file;
    11. Open Garry's Mod;
    12. Open console;
    13. Type: "exec spray";

    Now if you press your spraybutton ingame you will use your spray and cycle to the next spray.
    If you want to update your sprays just edit the links, save, then use exec spray.
    Expanding the script is easy, just add some lines and change some numbers.

    Please don't ask questions ;)

    Quickversion for those who have no time to read:
    1. Open "autoexec.cfg";
    2. Paste and modify my code and save;
    3. Use: "exec autoexec" in console;

    I'm sorry if this was suppose to be in: "Developement" tab.
    Count of the word: "spray" in this post: 42
     
    • Winner Winner x 6
    • Useful Useful x 3
    • Like Like x 2
    • Informative Informative x 2
  2. Pups

    Pups VIP

    Im bumping this up for newer people to see, i feel it should be pinned .3.
     
    • Winner Winner x 1
    • Friendly Friendly x 1
  3. Xerp

    Xerp VIP

    good bump
     
  4. Bubonic

    Bubonic Burning heretics since M31 VIP

    Thought of this earlier and was too lazy to create the bind and didn't know the commands, thanks to whoever bumped this it's super useful
     
    • Like Like x 1