Half-Life 2: Deathmatch

Half-Life 2: Deathmatch

Jepeto Oct 17, 2015 @ 3:55pm
How to change the player model and spray manually (without add-ons)
Chapter 1 - The fix

Since this bug exists for very long now, here is an easy way to patch it up without much of a hassle:

1) go to '..\steamapps\common\Half-Life 2 Deathmatch\hl2mp\cfg' or '..\steamapps\(username or hash)\Half-Life 2 Deathmatch\hl2mp\cfg' for older steam versions.

2) create a file named 'autoexec.cfg'. (if the file exists you can skip this step)

3) open the 'autoexec.cfg' with the notepad or any other text editor.

4) add the following lines to the file:

cl_playermodel "models/humans/group03/male_01.mdl"
cl_logofile "materials/vgui/logos/spray_lambda.vtf"

alias "rebels" "cl_playermodel models/humans/group03/male_01.mdl;jointeam 3"
alias "combine" "cl_playermodel models/combine_soldier.mdl;jointeam 2"

bind "F9" "rebels"
bind "F10" "combine"
bind "F11" "spectate"

5) save the changes.

6) (optional) make 'autoexec.cfg' read only.

7) start the game.

Now, you can use the F9 button to join the Rebel forces, the F10 to join the Combine forces or F11 to simply Spectate any match.

Chapter 2 - The code

Let's see now, line by line, how the 'autoexec.cfg' code works.

In the first 2 lines, we set the default player model and spray.

cl_playermodel "models/humans/group03/male_01.mdl"
cl_logofile "materials/vgui/logos/spray_lambda.vtf"

You can always set your preferred default model by editing the model names 'male_01.mdl' and 'spray_lambda.vtf'.

In the next 2, we set the model we want to use when we join the corresponding team.

alias "rebels" "cl_playermodel models/humans/group03/male_01.mdl;jointeam 3"
alias "combine" "cl_playermodel models/combine_soldier.mdl;jointeam 2"

Again, you can always set your preferred model by editing the model names BUT bare in mind that the model MUST correspond to the respective team (for example, don't use the 'police' model with the Rebel team).

Finally, in the last 3 lines, we bind the functions of the previous 2 lines to the corresponding buttons.

bind "F9" "rebels"
bind "F10" "combine"
bind "F11" "spectate"

Note that the 'spectate' function is game built in and we don't need to write code for this one.

Hope I helped things a little bit...

Have fun!
Last edited by Jepeto; Nov 8, 2015 @ 10:52am
< >
Showing 1-8 of 8 comments
Jepeto Oct 17, 2015 @ 4:05pm 
Decided to include the 'autoxec.cfg' file, as well, to make things easier for starters. Copy the file to '..\Half-Life 2 Deathmatch\hl2mp\cfg', do any changes you wish in the model names and remember to have fun!

https://www.dropbox.com/s/5q4jk204etz9qxh/autoexec.cfg?dl=1
Last edited by Jepeto; Oct 17, 2015 @ 4:08pm
Umbrella Man Oct 18, 2015 @ 7:31am 
Great guide, good job.
You can aslo post is as "Guide" in corresponding section.
Last edited by Umbrella Man; Oct 18, 2015 @ 7:33am
Jepeto Nov 7, 2015 @ 3:41am 
The guide:

http://steamcommunity.com/sharedfiles/filedetails/?id=537495316

Don't forget to give it a positive rating, if you found it useful. :)
Jepeto Nov 7, 2015 @ 7:56am 
Yes, I have seen this solution which utilizes the console, and seems a very pointless one. The method, doesn't clearly states on how to do it permanently with a single push of a button but rather offers a way to change the player model every single time through the command console, confusing inexperienced players and annoying older ones. Plus, suggests server admins to use addons rendering some servers capable of team change and others not.
Last edited by Jepeto; Nov 7, 2015 @ 8:11am
I added the pluging to my servers.. So players just type !model in chat to change models.. Valve sux!!!!!
Jepeto Nov 7, 2015 @ 11:39am 
True, valve should not have abandoned this classic game. There are a lot of bugs, some very old, that haven't been fixed for years and the updates seem to break even more stuff. Well, with my solution, at least, you can simple change team by pressing the F keys, or any other key you set, and you can apply it without much of a hassle. :)
Last edited by Jepeto; Nov 8, 2015 @ 10:35am
Jepeto Nov 8, 2015 @ 10:49am 
Small update, decided to change F bind keys from F10, F11, F12 to F9, F10, F11 to avoid conflict or accidental key press of PrintScreen (Screenshot button) on various PC keyboards. Also, decided to unmerge (revert back to original form) the first post with the guide post, since many people (especially starters) may ignore the guide section and head directly to the discussion section for help, hence the double change in the original post.
Last edited by Jepeto; Nov 8, 2015 @ 10:53am
< >
Showing 1-8 of 8 comments
Per page: 1530 50

Date Posted: Oct 17, 2015 @ 3:55pm
Posts: 8