Aliases.

For PC Tutorials, game Tutorials, and general technical questions to be answered. if you think you know something useful then write it here!

Aliases.

Postby Fcrate » Mon Dec 12, 2011 12:41 am

Aliases are command shortcuts, you can assign shortcuts to commands; so that you don't have to type the whole command every time.
It goes like this:
Code: Select all
alias a "say You suck, n00bs"
alias gr "Say Greeks are the best"
alias max "cl_maxpackets 15"
alias als "teamsay Attack the left side"

Now:
  • When you open your console in game, and type a, then press enter, it makes you say: "You suck, n00bs"
  • When you open your console in game, and type gr, then press enter, it makes you say: "Greeks are the best"
  • When you open your console in game, and type als, then press enter, it makes you say to your team only: "attack left side"
  • When you open your console in game, and type max, then press enter, it executes the command: cl_maxpackets 15.
Aliases are an alternative way to binding messages and commands to keys, as one wrong keystroke might make you say the wrong message, while the chance of making mistakes with aliases are way less.
There are two methods to assign aliases:
  • Through in game console, you write the code, e.g: alias max "cl_maxpackets 15"
  • In unnamedsoldier.cfg, open it with wordpad, and add the alias lines to its end e.g alias max "cl_maxpackets 15"


What to make on an alias?
There are a list of useful, yet long commands that you can assign aliases to, basically you can assign an alias to any command, but I'm suggesting that you should have these, as I've been using them for years, and they proved to be very useful:
----Allied skin. The command should look like:
Code: Select all
alias uk "dm_playermodel allied_british_6th_airborne_paratrooper
alias us "dm_playermodel american_army"

Now when you type us in console, the allies skin becomes american soldier, when you type uk, it becomes uk paratrooper.
----Axis skin. The command should look like:
Code: Select all
alias kra "dm_playergermanmodel german_kradshutzen"
alias wehr "dm_playergermanmodel german_wehrmacht_soldier

Now when you type kra in console, the axis skin becomes kradshutzen, when you type wehr, it becomes Wehrmacht soldier.
----Brightness change ( for different maps ). The command should look like:
Code: Select all
alias g1 "r_gamma 1.5
alias g2 "r_gamma 1.7"
alias g3 "r_gamma 2.0"
alias g4 "r_gamma 2.2"

Now whenever you type g2 in console, the brightness changes to 1.7 value.
That's it.
NOTES:
  • The shortcuts I used are just for example, you can set it to any shortcut you want!!
  • You have to know the exact command, and in case of changing skins, the exact name of the skin for the alias to work.
Have fun.
هل إتخذت الغاب مثلي منزلاً دون القصور
فتتبعت السواقي وتسلقت الصخور
هل تحممت بعطره وتنشفت بنور
وشربت الفجر خمراً من كؤوس من أثير
User avatar
Fcrate
Server Admin
 
Posts: 2967
Joined: Wed Nov 02, 2011 6:26 am
Location: Alexandria, Egypt

Re: Aliases.

Postby TheOldSoldier » Mon Dec 12, 2011 11:41 am

Great stuff Fcrate. I wanted to put some Russian ones in. I trying to put rus with the command alias rus "dm_playermodel allied_crazy_boris" or dm_playermodel allied_crazyboris" & rus 1 alias rus1 "dm_playermodel allied junior_lieutenant". But seems to revert back to American. The brightness changes works great.
User avatar
TheOldSoldier
No shit, Sherlock.
 
Posts: 2729
Joined: Fri Nov 04, 2011 11:17 am
Location: England

Re: Aliases.

Postby Fcrate » Mon Dec 12, 2011 4:19 pm

Well, as I said, you need the exact skin name for this to work
Code: Select all
dm_playermodel allied_russian_crazy_boris // That's the command for Crazy Boris.
dm_playermodel allied_russian_recon_scout //That's the command for Junior lieutenant.

There's one prefix for german skins, that is: "german_", meanwhile, the prefix for allied skins is a compound one, always start with: "allied_", followed by the nationality. e.g:
"allied_russian_recon_soldier"
"allied_american_ranger"
"allied_british_6th_airborne_paratrooper"
هل إتخذت الغاب مثلي منزلاً دون القصور
فتتبعت السواقي وتسلقت الصخور
هل تحممت بعطره وتنشفت بنور
وشربت الفجر خمراً من كؤوس من أثير
User avatar
Fcrate
Server Admin
 
Posts: 2967
Joined: Wed Nov 02, 2011 6:26 am
Location: Alexandria, Egypt

Re: Aliases.

Postby Fcrate » Mon Dec 12, 2011 4:33 pm

Forgot to add: the default allied skin is american_soldier, it reverts back to it if you typed in a wrong skin name.
Default axis skin is german_wehrmacht_solider, also reverts back to it in case you typed in a wrong command.
I wrote a new post in case you already read the old one :P
هل إتخذت الغاب مثلي منزلاً دون القصور
فتتبعت السواقي وتسلقت الصخور
هل تحممت بعطره وتنشفت بنور
وشربت الفجر خمراً من كؤوس من أثير
User avatar
Fcrate
Server Admin
 
Posts: 2967
Joined: Wed Nov 02, 2011 6:26 am
Location: Alexandria, Egypt

Re: Aliases.

Postby GurToRri » Wed Jan 18, 2012 8:44 pm

I was founding those commands :) . ThankYou Fcrateee :D
My haters were the first who wanted to look like me.
User avatar
GurToRri
One more thing...
 
Posts: 2200
Joined: Sun Dec 18, 2011 8:21 pm
Location: Cruces, Barakaldo, Basque Country, Spain

Re: Aliases.

Postby TheOldSoldier » Thu Jan 19, 2012 10:36 am

Basically you can make your own, in game spam (C)
User avatar
TheOldSoldier
No shit, Sherlock.
 
Posts: 2729
Joined: Fri Nov 04, 2011 11:17 am
Location: England

Re: Aliases.

Postby GurToRri » Fri Apr 06, 2012 12:26 am

I made a alias time ago...., but now I want to change the phrase of that alias. How to change the phrase? or How to delete it? :)
My haters were the first who wanted to look like me.
User avatar
GurToRri
One more thing...
 
Posts: 2200
Joined: Sun Dec 18, 2011 8:21 pm
Location: Cruces, Barakaldo, Basque Country, Spain

Re: Aliases.

Postby TheOldSoldier » Fri Apr 06, 2012 8:06 am

Hi Torri. If you go to Mohaa/ maintt for BT or maint for SH.Open your configs folder. In there should be a file called unnamdedsoldier.cfg. You might need to move it desktop whilst you edit it. Then move it back again, once your done. But all your binds & aliases are in that file.
User avatar
TheOldSoldier
No shit, Sherlock.
 
Posts: 2729
Joined: Fri Nov 04, 2011 11:17 am
Location: England

Re: Aliases.

Postby GurToRri » Fri Apr 06, 2012 8:29 am

I don´t have that file :s Can be possible?
I I have searched on that Folder, and also with the " Search Button" of the Pc and nothing :|
My haters were the first who wanted to look like me.
User avatar
GurToRri
One more thing...
 
Posts: 2200
Joined: Sun Dec 18, 2011 8:21 pm
Location: Cruces, Barakaldo, Basque Country, Spain

Re: Aliases.

Postby TheOldSoldier » Fri Apr 06, 2012 8:33 am

You must have that file. Cos it's the same one where your name, and all your controls are strored.
User avatar
TheOldSoldier
No shit, Sherlock.
 
Posts: 2729
Joined: Fri Nov 04, 2011 11:17 am
Location: England

Next

Return to Tutorials

Who is online

Users browsing this forum: No registered users and 1 guest

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Style by Webdesign www, książki księgarnia internetowa podręczniki