PDA

View Full Version : Simple (very) CoD2 Startup Script


OldDog
04-28-2007, 09:48 AM
While attempting some troubleshooting this morning on a member's server, I found that there was no easy way to "connect" immediately (maybe there is, but I don't know it). Being lazy, I guess, I didn't want to wait, then hit "~", the type in "connect", so, I put together a little VBScript that will prompt you for the server IP address, then start CoD2 using it. Here it is:
Option Explicit
Dim Input
Dim objShell
Set objShell = CreateObject("WScript.Shell")

Input = InputBox("Enter CoD2 Server IP Address")
If Input <> "" Then objShell.Run "CoD2MP_s.exe +connect " & Input

Just save this into a file called "something.vbs", and make sure its in the same directory as CoD2MP_s.exe. Then create a shortcut on your desktop, or wherever.

When you run it, a box will come up asking for the IP address. Once entered, CoD2 will start immediately connecting to that server. Note that you can create one of these for each game that uses the "+connect" merely by changing the .exe name. You can also add any number of startup parameters to this, as long as you leave the "+connect" last in the string.

As it turned out, I spent more time screwing around with this than I would have hitting "~" and typing in connect, but, what the heck , it was fun.

-OD over and out:salute:

Flea
04-28-2007, 12:41 PM
What I've always done when I wanted to connect directly to a game server ( this works on all q3 engine games )

Is to create a shortcut of the game's *.exe , and goto the properties of the shortcut, and add to the command line +connect 127.0.0.1 of course put the ip of the server you wish to connect to..

Hope I didn't step on your toes..

Flea

OldDog
04-29-2007, 06:07 AM
No, you didn't. I've been doing that, too, but, after awhile, I'm endning up with a large number of shortcuts...was trying to avoid that, as well.