Common Scripts

This is a list of the most common scripts, along with fully commented instructions on parts of the script. Feel free to use any of these scripts yourself.

Grenade Select/Throw Script


// Common Commands, just to make using long commands in the rest of the script.
alias w1 "wait"
alias w2 "w1; w1"
alias d1 "developer 1"
alias d0 "developer 0"
alias nothing " "
alias nomsg "d1; echo No Grenade Selected!; d0"
alias best_weapon "hud_fastswitch 1; slot3; slot2; slot1; hud_fastswitch 0" // Selects the best weapon in your inventory, which is your primary weapon e.g. MP5

alias +grenthrow "nomsg" // Hold down the key bound to 'grenthrow' to select the grenade, release to throw.
alias -grenthrow " "

// Throw Commands
alias throwflash "weapon_flashbang; flashmsg; w1; +attack"
alias throwhe "weapon_hegrenade; hemsg; w1; +attack"
alias throwsmoke "weapon_smokegrenade; smokemsg; w1; +attack"
alias finthrow "w1; -attack; w2; best_weapon"

// Grenade Throwing Messages
alias flashmsg "say_team Look Away! I am Throwing a Flashbang!" // Message that is said when a Flashbang Grenade is thrown using script. Change the bit after 'say_team' to your personalised message.
alias hemsg "say_team Stand Away! I am Throwing a HE Grenade!" // Message that is said when a HE Grenade is thrown using script. Change the bit after 'say_team' to your personalised message.
alias smokemsg "say_team Prepare for attack, I am Throwing a Smoke Grenade!" // Message that is said when a Smoke Grenade is thrown using script. Change the bit after 'say_team' to your personalised message.

// Grenade Cycler
alias gren_cycle "he_throw" // Means HE Grenade is selected first.

alias smoke_throw "d1; echo Grenade Selected: [Smoke] HE Flashbang Nothing; d0; alias +grenthrow throwsmoke; alias -grenthrow finthrow; alias gren_cycle he_throw" // Changes the 'grenthrow' alias to throw the Smoke grenade.
alias he_throw "d1; echo Grenade Selected: Smoke [HE] Flashbang Nothing; d0; alias +grenthrow throwhe; alias -grenthrow finthrow; alias gren_cycle flash_throw" // Changes the 'grenthrow' alias to throw the HE grenade.
alias flash_throw "d1; echo Grenade Selected: Smoke HE [Flashbang] Nothing; d0; alias +grenthrow throwflash; alias -grenthrow finthrow; alias gren_cycle no_throw" // Changes the 'grenthrow' alias to throw the Flashbang grenade.
alias no_throw "d1; echo Grenade Selected: Smoke HE Flashbang [Nothing] ; d0; alias +grenthrow nomsg; alias -grenthrow none; alias gren_cycle smoke_throw" // Changes the 'grenthrow' alias to throw no grenades.

bind "?" "+grenthrow" // Bind your key to throw the specified grenade.
bind "?" "gren_cycle" // Bind your key to cycle between the grenades.

I love this script and I personally use it and find it very useful. You need to hold the button bound to 'grenthrow' down, and release it to throw the grenade. Also, if you have none of that type of grenade, it will fire your primary weapon, so be careful!

Quick Knife Slash

alias +knife_slash "weapon_knife; wait; +attack" // Selects the knife and starts attacking.
alias -knife_slash "-attack; lastinv" // Upon key release, returns to previous weapon.

bind "?" "+knife_slash" // Bind your key to execute a quick knife slash.

This is a useful script for those Up-Close fights.

Quick Knife Stab

alias +knife_stab "weapon_knife; wait; +attack2" // Selects the knife and starts attacking.
alias -knife_stab "-attack2; lastinv" // Upon key release, returns to previous weapon.

bind "?" "+knife_stab" // Bind your key to execute a quick knife slash.

Useful script for those Up-Close fights ;)

Weapon Hand Switcher

alias weap_hand "hand_left"
alias hand_left "alias weap_hand hand_right; setinfo lefthand 1; wait; wait; weapon_knife; wait; wait; lastinv" // Changes to your left hand.
alias hand_right "alias weap_hand hand_left; setinfo lefthand 0; wait; wait; weapon_knife; wait; wait; lastinv" // Changes to your right hand.

bind "?" "weap_hand" // Bind your key to change the hand you hold your weapon in.

Really only for personal preference as which hand your weapon is in doesn't affect accuracy and where you can shoot.

C4 Defuser

alias +defuse_c4 "+use; say_team Cover me I'm defusing the bomb; radio1; menuselect 1; slot10"
alias -defuse "-use; slot10"

bind "?" "+defuse"

A simple script that will defuse the bomb, as long as you are looking at it, and inform your team.

C4 Planter

alias +plant_c4 "weapon_c4; wait; +duck; +attack; say_team Cover Me, I'm Planting The Bomb!; radio1; menuselect 1" // Selects the C4, ducks, starts planting and warns your team with a team message and radio message.
alias -plant_c4 "-attack; -duck" // Stops attacking and stands up.

bind "?" "+plant_c4" // Bind your key to plant the C4, you have to have the C4 first though ;)

A very useful script, but obviously only on Bomb Plant/Defuse maps.

Name Enterer

alias change_name "developer 1; echo Enter your name.......; developer 0; messagemode name" // Prompts you to enter your name by using the 'messagemode' command.

bind "?" "change_name" // Bind your key to enter your name.

A good script if you like to change your name often and don't want to keep opening console. It uses the 'messagemode' command to enable you to enter your name on-screen.

Name Changer

alias name1 "name [-MD-MuDgE-]; alias name_switch name2" // Changes name to [-MD-MuDgE-]
alias name2 "name DAVE!; alias name_switch name3" // Changes name to DAVE!
alias name3 "name Your_Name; alias name_switch name1" // Changes name to Your_Name
alias name_switch "name1"

bind "?" "name_switch" // Bind your key to change to the first name on the list.

A good script if you regularly switch between names. Just change the names in there with the one's you want to use.

Demo Recorder

alias record_demo "developer 1; echo Choose Name of Demo....; developer 0; messagemode record; alias democommands stop_demo" // Prompts you to enter the name of your demo and begins to record it, again using the 'messagemode' command.
alias stop_demo "developer 1; echo Demo Ended!; developer 0; stop; alias democommands record_demo" // Stop's the demo
alias democommands "record_demo"

bind "?" "democommands" // Bind your key to start recording the demo, press this again to stop it.

With this script you can enter the name of your demo and it will record it for you. Pressing the button again will stop the demo.

Taunt Cycler

alias taunt "taunt1"
alias taunt1 "say WOW! You really are poor!; alias taunt taunt2" // Edit the section after the 'say' command for your personal taunts.
alias taunt2 "say HaHa That was toooo easy!; alias taunt taunt3" // Edit the section after the 'say' command for your personal taunts.
alias taunt3 "say We win again, pfft this is getting boring ;D; alias taunt taunt4" // Edit the section after the 'say' command for your personal taunts.
alias taunt4 "say Come on, start trying now!; alias taunt taunt5" // Edit the section after the 'say' command for your personal taunts.
alias taunt5 "say Dum de dum dum dum de dum; alias taunt taunt1" // Edit the section after the 'say' command for your personal taunts.

bind "?" "taunt" // Bind your key to say the first taunt, again for the second, again for the third etc....

A simple script when you can't be bothered to type in all those taunts! By reading the 'Cycling' tutorial, you should be able to add more taunts.

Show FPS Switcher

alias fpson "developer 1; echo FPS Is Currently ON; developer 0; cl_showfps 1; alias fpsshow fpsoff" // Switch showing of FPS on.
alias fpsoff "developer 1; echo FPS Is Currently OFF; developer 0; cl_showfps 0; alias fpsshow fpson" // Switch showing of FPS off.
alias fpsshow "fpson"

bind "?" "fpsshow" // Bind your key to switch showing of FPS on, press again to switch off.

If you look closely, this is the script from my 'Toggling' tutorial ;D Very simple.

Radar On/Off Toggler

alias radar_show "drawradar; alias radar_switch radar_hide" // Shows the radar.
alias radar_hide "hideradar; alias radar_switch radar_show" // Hides the radar.
alias radar_switch "radar_show" // Switches between Showing and Hiding the radar.

bind "?" "radar_switch" // Bind your key to switching the radar on, press again to switch it off.

Volume Changer

alias change_volume "developer 1; echo Enter New game Volume, a Value between 0.0 and 1.0.......; developer 0; messagemode volume" // Prompts you to enter your volume by using the 'messagemode' command.

bind "?" "change_volume" // Bind your key to enter your volume.

Easily change your volume with the cool 'messagemode' command!

Comments

St_George
g30rg3h
UKTerrorist
12:13 31/12/2001
you've mixed up defusing and c4 planting [ Comment: Report | IP: Logged ]
MuDgE
21:04 4/1/2002
Ooops sorry ;)

Damned Copy & Paste... [ Comment: Report | IP: Logged ]
Berserker
21:54 28/1/2002
ok i'm lookin a voice communtion script that can ativite wav flies , for example play i am evil homer [ Comment: Report | IP: Logged ]
Bonkers
19:33 2/5/2002
Im looking for a script that will enable fast weapon switching with the mouse scroller.
thx very much in advance if u can help me [ Comment: Report | IP: Logged ]
Reevey
11:10 25/12/2002
For the Voice Comms guy:
http://www.squizzastuff.pwp.blueyonder.co.uk/Sounds.html To change the file type I had to download a program to convert it, try http://www.webattack.com.

For the scroll guy:
bind "MWHEELDOWN" "invnext; +attack; -attack"
bind "MWHEELUP" "invprev; +attack; -attack"
I use that, though, you might need to put a wait command in, like +attack; wait; -attack. depends on your connection. [ Comment: Report | IP: Logged ]
What about these?
00:17 3/1/2003
Hey can you add this script its really useful!
// fire mode alias. use CTRL to switch modes.
alias single "+attack; wait; -attack"
alias burst "+attack; wait; wait; wait; wait; wait; -attack"
alias switch "bind mouse1 burst; bind CTRL switch2; developer 1; echo burst fire; developer 0"
alias switch2 "bind mouse1 single; bind CTRL switch3; developer 1; echo single fire; developer 0"
alias switch3 "bind mouse1 +attack; bind CTRL switch; developer 1; echo full auto; developer 0"
you can change ctrl to any key and when you press it, it toggles between single shot, burst fire, and full auto! Its awesome when you use it with an autosniper [ Comment: Report | IP: Logged ]
g0_2_hell
18:07 20/1/2003
Is there enyone who can tell me..
If you buy a weapon, it automaticly sas to your team, wich weapon you buyed? And if you reload (for exampel, Mp5) it also sas: Cover me! Im reloading my Mp5...
If you know it... can you please mail me at: g0_2_hell@hotmail.com !!! Thank you [ Comment: Report | IP: Logged ]
Dpshw
14:33 27/2/2003
i have tried the burst script and it does not work, i didnt touch anything but the CTRL that i use ALT...whats wrong? ;( [ Comment: Report | IP: Logged ]
:) :)
04:32 11/3/2003
can u send me a bind where i can play more than one wav over voice command in game? [ Comment: Report | IP: Logged ]
confused
05:00 26/3/2003
jesus this is confusing... wtf do I do with all that gibberish in there? the end results sound useful but... wtf do I do?? help plz... [ Comment: Report | IP: Logged ]
inept`
04:54 30/3/2003
Why does your weapon changer script have so much.. err.. rubbish in it, I tried to use it and it wouldn't even go!

Here is a little one that I made from looking in the config.cfg and using a toggle tutorial :)

alias ngon "developer 1; echo Left Hand; developer 0; cl_righthand 0; alias ng ngoff"
alias ngoff "developer 1; echo Right Hand; developer 0; cl_righthand 1; alias ng ngon"
alias ng "ngon"
bind "alt" "ng"
bind "mouse3" "ng"

Why not use the simple one above? [ Comment: Report | IP: Logged ]
xinez
22:10 25/4/2003
i want to use the +quickslash / +quickstab on my mouse scroller (ike mwheelup to quickslash and down for stab), but it doesnt work well...

it just works when I scroll up/down when im already with the knife

can any1 help me? [ Comment: Report | IP: Logged ]
c00nt
18:08 1/5/2003
If you want fun, bind your mouse up and down to +attack and get some dual eliets! - You can make a script that binds the weapon selector again - Eg: You can change your mouse between firing and selecting your guns, c4 etc..

Have fun masterbating :D [ Comment: Report | IP: Logged ]
***
19:42 2/6/2003
hud_fastswitch 1 [ Comment: Report | IP: Logged ]
***
19:42 2/6/2003
then u prob can think out the rest yourself [ Comment: Report | IP: Logged ]
***
19:44 2/6/2003
Im using mousewheel for selecting and firing grenades, r-d-f-g for moving, e for switching between sec/prim wpn, mouse3 for draw knife, and so on (to lazy to write all...) [ Comment: Report | IP: Logged ]
d@emon
18:59 14/7/2003
better go to
http://dynamic4.gamespy.com/~counter-script/
if you want to know anything really [ Comment: Report | IP: Logged ]
VaTo
21:56 23/7/2003
Any1 come up with a script to toggle between primary/secondary with 1 button ? [ Comment: Report | IP: Logged ]
Privilege
20:03 24/7/2003
Vato: It's called your q button, this button is bound to lastinv, and if you press it, it will go back to your secondary weapon once you have selected your primary from your pistol.

It's not that hard. [ Comment: Report | IP: Logged ]
VaTo
08:39 26/7/2003
Emm very nice of u to explain to me how lastinv works...
But what I want...Is a button to toggle ONLY between primary and secondary , and not knife for instance...

Not Every1's An Idiot [ Comment: Report | IP: Logged ]
VaTo
09:28 26/7/2003
I allready figured it out by myself anywayz...its :

alias "weapon1" "use weapon_m4a1; use weapon_ak47; use weapon_aug; use weapon_sg552; use weapon_awp; use weapon_g3sg1; use weapon_m249; use weapon_mac10; use weapon_mp5navy; use weapon_p90; use weapon_scout; use weapon_tmp; use weapon_xm1014; use weapon_m3"
alias "weapon2" "use weapon_deagle; use weapon_usp; use weapon_glock18; use weapon_elite; use weapon_p228"

alias "switch_toggle" "wep1"
alias "wep1" "weapon1; alias switch_toggle wep2"
alias "wep2" "weapon2; alias switch_toggle wep1"

and then bind "key" "switch_toggle" in console [ Comment: Report | IP: Logged ]
bah
20:04 22/11/2003
anyone know how to make a 3 round burst script? [ Comment: Report | IP: Logged ]
Cyfun
23:30 22/1/2004
how about something like

alias burst "+attack;-attack;+attack;-attack;+attack;-attack"

you might need to throw some waits in there. [ Comment: Report | IP: Logged ]
Cyfun
23:33 22/1/2004
btw, heres my simple script for toggling voice_loopback on and off, so you can quickly test your microphone while in a game. just bind a key (i use F1), to vlt

//Voice Loopback Toggle
alias vlt vlon
alias vlon "alias vlt vloff; voice_loopback 1"
alias vloff "alias vlt vlon; voice_loopback 0" [ Comment: Report | IP: Logged ]
pr0digy
04:16 21/4/2004
ill make one for you it's really simple. [ Comment: Report | IP: Logged ]
Add comment

Menu

News
Features
Events
Site
Search UKT:

User



Register here

Shoutbox

X
JESUS CHRIST ITS A LION
23:33 27/8/2008

`NWA
lol @ this shoutbox going stron 2 years after the last news item was posted.
02:22 27/8/2008

w1ckedz
I wrote that Culexus comment Myers hahahaha
21:32 25/8/2008

tiz
Stealing is terrible I know! Some ****er even had the cheek to put it on ebay... [ferrers
Who stole my mouse mat from ukt5 ?
08:16 22/8/2008

[ expand ]