Garry's Mod

Garry's Mod

Not enough ratings
Vanilla Thirdperson Command Toggle
By DoomQuake95
A simple solution for anyone who wants to use the Vanilla Thirdperson system.
   
Award
Favorite
Favorited
Unfavorite
This trick takes advantage of the "alias" commands provided in HL2's original thirdperson CFG
Looking to toggle the vanilla HL2/GMod thirdperson command with binding a single key? I looked into Half-Life 2's main CFG folder and found a good set of commands that create a toggle command utilizing the "alias" command.

This CFG was tweaked to only have the necessary alias commands to enable toggling so all you would need to do is configure the thirdperson settings themselves in the in-game console.

Just 'exec' the cfg file in the console, by typing "exec thirdperson_toggle" (if you scripted a cfg yourself of a different name, use that name instead of thirdperson_toggle) or simply put the code itself into "autoexec.cfg".

This is the code that does this.






alias tp_on "thirdperson; alias tp_toggle tp_off"
alias tp_off "firstperson; alias tp_toggle tp_on"
alias tp_toggle "tp_on"






Then enter in the console [ bind h "tp_toggle" ] You can also any other key of choice. the h key is just an example.







that, or simply type "tp_toggle" in the console.


You can also download the CFG I posted on Gamebanana if you want.
https://gamebanana.com/scripts/12583