Alias Script Examples

Alias Scripts

Scripts allow admins to let one key execute multiple functions or tasks. Each press of a bound key executes a line of code, eventually returning to the first. Scripts can change players names, display screen messages, trigger amx commands, and even turn on/off amx plugins. So useful!

To use, just copy and paste into your userconfig file. You can change the binds, add lines of your own!

First Command to setup

bind "key" "amxmodmenu"

Here is a simple name changer:

bind "\" "pq"alias "do1" "amx_nick Player Slater; alias pq do2"alias "do2" "amx_nick Player Hayes; alias pq do3"alias "do3" "amx_nick Player Ready; alias pq do4"alias "do4" "amx_nick Player Keller; alias pq do5"alias "do5" "amx_nick Player Mirren; alias pq do6"alias "do6" "amx_nick Player Hunt; alias pq do7"alias "do7" "amx_nick Player Marnie; alias pq do1"alias "pq" "do1"

Note: "Player" name won't change if another player enters as "(1)Player". 

(1)Player must be changed manually using amx_nick before alias can then change "Player."

Screen-say warnings:

bind "KP_DEL" "warn"alias "warn4" "say @@o Do not fire/nade into spawns; alias warn warn5"alias "warn5" "say @@y Don't shoot from spawn walls!; alias warn warn4"alias "warn" "warn4"

Voice Disabler/Enabler

bind "P" "vs"alias "vdb" "voice_enable 0; alias vs vdb1"alias "vdb1" "voice_enable 1; alias vs vdb"alias "vs" "vdb"

Flamethrower plugin pauser/unpauser:  [reserved admin flag]

bind "o" "foff" alias "brn" "amx_chat alert: flamethrower about to be paused; alias foff brn1"alias "brn1" "amx_pausecfg pause dod_flamethrowe; alias foff brn2"alias "brn2" "say @@y Flamethrower is now off!; alias foff brn3"alias "brn3" "amx_pausecfg enable dod_flamethrowe; alias foff brn4"alias "brn4" "say @@c Flamethrower is back on; alias foff brn"alias "foff" "brn"

Nade Disabler: 

bind "p" "nonds"  // no nades plugin, 'nades_on' means offalias "crm" "amx_chat turning off nades!; alias nonds crm1"alias "crm1" "dod_nonades_on;;alias nonds crm2"alias "crm2" "amx_say nades re-enabled; alias nonds crm3"alias "crm3" "dod_nonades_off;alias nonds crm"alias "nonds" "crm"

Amx Menus Displayer: 

(1st press shows a menu, 2nd press cancels, and so on)

bind "k" "men"alias "m0a" "amxmodmenu; alias men m0b"alias "m0b" "slot10; alias men m0"alias "m0" "amx_mapmenu; alias men m1"alias "m1" "slot10; alias men m2"alias "m2" "amx_banmenu; alias men m3"alias "m3" "slot10; alias men m7"alias "m7" "amx_kickmenu; alias men m8"alias "m8" "slot10; alias men m9c"alias "m9c" "amx_votemapmenu; alias men m9d"alias "m9d" "slot10; alias men m0a"alias "men" "m0a"

Pistols only:  [reserved admin flag] *

bind "KP_HOME" "setonewpn"alias "pon1" "say @@c Get ready for lugers only!; alias setonewpn pon2"alias "pon2" "amx_setoneweapon 4; alias setonewpn pon3"alias "pon3" "amx_oneweapon 1; alias setonewpn pon4"alias "pon4" "amx_oneweapon 0; alias setonewpn pon2"alias "setonewpn" "pon2"

Map Nominations:

bind "KP_DOWNARROW" "nommps"alias "wmp" "say nominations; alias nommps wmp1"alias "wmp1" "say hobofire2; alias nommps wmp2"alias "wmp2" "say heutau_b1; say nominations; alias nommps wmp3"alias "wmp3" "say devastation_b10; say nominations; alias nommps wmp4"alias "wmp4" "say dod_kraftstoff; say nominations; alias nommps wmp"alias "nommps" "wmp"

Bot Pauser:

bind "PGUP" "bt1"alias "rmv" "amx_chat warning! bot vacation ahead; alias bt1 rmvb"alias "rmvb" "amx_sc_remove_bots; alias bt1 rmvb2"alias "rmvb2" "amx_sc_bring_bots_back; alias bt1 rmv"alias "bt1" "rmv"

Net-Graph Displayer

bind "F10" "gr"alias "fuss" "say listmaps; alias gr fuss1"alias "fuss1" "net_graph 3; alias gr fuss2"alias "fuss2" "net_graph 2; alias gr fuss3"alias "fuss3" "net_graph 1; alias gr fuss4"alias "fuss4" "net_graph 0; alias gr fuss1"alias "gr" "fuss1"

Easy Demo Recorder

bind "END" "demo"

alias "easy0" "record WarDemo1; amx_chat recording Demo1; alias demo easy1"

alias "easy1" "stop; amx_chat Demo1 done; alias demo easy2"

alias "easy2" "record WarDemo2; amx_chat recording Demo2; alias demo easy3"

alias "easy3" "stop; amx_chat Demo2 done; alias demo easy4"

alias "easy4" "record WarDemo3; amx_chat recording Demo3; alias demo easy5"

alias "easy5" "stop; amx_chat Demo3 done; alias demo easy6"

alias "easy6" "record WarDemo4; amx_chat recording Demo4; alias demo easy7"

alias "easy7" "stop; amx_chat Demo4 done; alias demo easy8"

alias "easy8" "record WarDemo5; amx_chat recording Demo5; alias demo easy9"

alias "easy9" "stop; amx_chat Demo5 done; alias demo easy0"

alias "demo" "easy0"

One Weapon/SetOneWeapon combo

bind "=" "owo" // oneweapon on or off

//alias "arm" "amx_setoneweapon 1; alias owo arm1"

alias "arm1" "amx_oneweapon 1; alias owo arm2"

alias "arm2" "amx_oneweapon 0; alias owo arm1"

alias "owo" "arm1"

bind "-" "woe"

alias "wwn" "amx_setoneweapon 1; alias woe wwn1"

alias "wwn1" "amx_setoneweapon 2; alias woe wwn2"

alias "wwn2" "amx_setoneweapon 3; alias woe wwn3"

alias "wwn3" "amx_setoneweapon 4; alias woe wwn4"

alias "wwn4" "amx_setoneweapon 5; alias woe wwn5"

alias "wwn5" "amx_setoneweapon 6; alias woe wwn6"

alias "wwn6" "amx_setoneweapon 7; alias woe wwn7"

alias "wwn7" "amx_setoneweapon 8; alias woe wwn8"

alias "wwn8" "amx_setoneweapon 9; alias woe wwn9"

alias "wwn9" "amx_setoneweapon 10; alias woe wwn10"

alias "wwn10" "amx_setoneweapon 11; alias woe wwn11"

alias "wwn11" "amx_setoneweapon 12; alias woe wwn12"

alias "wwn12" "amx_setoneweapon 13; alias woe wwn13"

alias "wwn13" "amx_setoneweapon 14; alias woe wwn14"

alias "wwn14" "amx_setoneweapon 17; alias woe wwn17"

alias "wwn17" "amx_setoneweapon 18; alias woe wwn18"

alias "wwn18" "amx_setoneweapon 19; alias woe wwn19"

alias "wwn19" "amx_setoneweapon 20; alias woe wwn20"

alias "wwn20" "amx_setoneweapon 21; alias woe wwn21"

alias "wwn21" "amx_setoneweapon 22; alias woe wwn22"

alias "wwn22" "amx_setoneweapon 23; alias woe wwn23"

alias "wwn23" "amx_setoneweapon 24; alias woe wwn24"

alias "wwn24" "amx_setoneweapon 25; alias woe wwn25"

alias "wwn25" "amx_setoneweapon 26; alias woe wwn26"

alias "wwn26" "amx_setoneweapon 27; alias woe wwn27"

alias "wwn27" "amx_setoneweapon 28; alias woe wwn28"

alias "wwn28" "amx_setoneweapon 29; alias woe wwn29"

alias "wwn29" "amx_setoneweapon 30; alias woe wwn30"

alias "wwn30" "amx_setoneweapon 31; alias woe wwn"

alias "woe" "wwn"

Note: In this example, after Demo5 is reached, the next recording will overwrite "Demo1" in your dod folder.


1 amerknife

2 gerknife

3 colt

4 luger

5 garand

6 scopedkar

7 thompson

8 mp44

9 spring

10 kar

11 bar

12 mp40

13 handgrenade

14 stickgrenade

15 -

16 -

17 mg42

18 30cal

19 spade

20 m1carbine

21 mg34

22 greasegun

23 fg42

24 k43

25 enfield

26 sten

27 bren

28 webley

29 bazooka

30 pschreck

31 piat