Multiplayer Commands
Useful commands for multiplayer, using console:
Voting
The following commands can be voted on.
restart
nextmap
kickplayer
Voting consists of
“vote” + “command” + “parameters”, for example:
vote respawntime 10
After this has been typed
“respawntime 10 – voting initialised”
will be displayed on all machines and players have 15 seconds
to type
“voteyes” if they agree. If more than half of the players
vote YES the changes will be made on the server.
Only one voting session can take place at any one time, so
until the 15 seconds have elapsed for voting on
“respawntime 10”
and new vote cannot be started.
(Advanced Users)
Hidden & Dangerous 2 can be run from the DOS command line and
as a dedicated server, examples of command line execution are
(Note, do not included the “ “ symbols when entering commands):
“hd2.exe –c”
Activates the H&D 2 command console window.
“hd2.exe –cmd –exec runserver.txt”
Activates the H&D 2 command console and executes commands from
the file runserver.txt (or any text file containing H&D 2 commands).
“hd2.exe -cmd -sessionname testgame -style deathmatch -mapname normandy3 -dedicated 1 –server”
Activates the application and executes the typed commands from
the DOS command line, like the example below.
NOTE: The syntax the game uses is
"hd2.exe -cmd [-command parameter] [-command parameter]”
NOTE: After running
“hd2.exe –c” to open the dedicated
multiplayer console, use the
“listmaps” command to
display the name of the multiplayer maps in the form that must
be typed when entering commands or creating a file containing
a list of commands (like we will see below).
-exec COMMAND
The -exec command can be used for executing batches of
commands to make starting dedicated servers quicker from
the DOS command line.
Assume that you have created two text files:
Name:
server-occupation.txt
With the content:
sessionname testserver
style occupation
mapname normandy3
mapname africa2
domain internet
dedicated 1
server
Name:
server-objectives.txt
With the content:
sessionname testserver
style objectives
mapname africa3
mapname normandy1
domain internet
dedicated 1
server
NOTE: When entering the list of commands there has to be
an empty line below last command. In this case that means
pressing enter after typing
“server”.
There are then two ways to create the server using either file.
1. Open the multiplayer dedicated multiplayer console
window by typing
“hd2.exe –c” in the DOS command line.Then
type
“exec server-objectives.txt" or
"exec server-occupation.txt”
to start the preferred game server.
2. Alternatively execute the batch file without opening the
dedicated multiplayer console window by typing
"hd2.exe –cmd -exec server-objectives.txt" on command.
-cmd COMMAND
When used, for example:
“hd2.exe -cmd -sessionname testgame -style occupation –mapname normandy3 -dedicated 1 –server”
-cmd will not create the dedicated multiplayer console leaving
the option to enter further commands via the syntax:
"hd2.exe -cmd [-command parameter] [-command parameter]”
Note: don't include the
“ ”(double quotes) when typing the commands above.