Results 1 to 4 of 4

Thread: Hiding specific viewmodels

  1. Cool Hiding specific viewmodels

    Basically what I'm looking for is a way to script each class, so that certain weapons are hidden and others aren't.

    Examples:

    Scout - Scattergun: no viewmodel | Pistol/Bat: viewmodel

    Soldier - Rocket Launcher/Shotgun: no viewmodel | Equalizer: viewmodel

    Medic - Medigun: no viewmodel | Needlegun/Saw: viewmodel

    Is there an easy way to do this? I've tried a couple different things myself and looked around but I can't seem to find one that works properly.

    Thanks

  2. Default

    Yes, there's a couple ways to do this. I like jaeger's config for this.

    autoexec
    Code:
    alias do_show_weapon "r_drawviewmodel 1"
    alias do_hide_weapon "r_drawviewmodel 0"
    alias +force_show_weapon do_show_weapon
    alias -force_show_weapon do_hide_weapon
    
    alias hide_weapon "do_hide_weapon; alias -force_show_weapon do_hide_weapon"
    alias show_weapon "do_show_weapon; alias -force_show_weapon do_show_weapon"
    
    alias weapon1 "slot1; hide_weapon"
    alias weapon2 "slot2; hide_weapon"
    alias weapon3 "slot3; show_weapon"
    alias weapon4 "slot4; show_weapon"
    alias weapon5 "slot5; show_weapon"
    config
    Code:
    bind "1" "weapon1"
    bind "2" "weapon2"
    bind "3" "weapon3"
    bind "4" "weapon4"
    bind "5" "weapon5"
    default_class.cfg (create) << This sets the default setup of view models.
    Code:
    bind mouse1 +attack
    bind mouse2 +attack2
    
    alias weapon1 "slot1; hide_weapon"
    alias weapon2 "slot2; hide_weapon"
    alias weapon3 "slot3; show_weapon"
    alias weapon4 "slot4; show_weapon"
    alias weapon5 "slot5; show_weapon"


    For your examples

    scout.cfg
    Code:
    exec "default_class.cfg"
    
    alias weapon2 "slot2; hide_weapon"
    soldier.cfg
    Code:
    exec "default_class.cfg"
    medic.cfg
    Code:
    exec "default_class.cfg"
    
    alias weapon1 "slot1; hide_weapon"

    Add
    Code:
    exec "default_class.cfg"
    To all the class configs.

  3. #3
    Join Date
    May 2010
    Location
    Behind my screen.
    Posts
    26

    Default

    bind q "slot2;r_drawviewmodel 1;
    bind e "slot1;r_drawviewmodel 0;
    bind 3 "slot3;r_drawviewmodel 1;
    Currently using that, works just fine. In the class config. But there are my current binds also, so dont pay attention to those.

  4. Default

    Got it figured out, thanks to both of you

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •