-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathHalfLife2_default.ps1
More file actions
58 lines (56 loc) · 2.58 KB
/
HalfLife2_default.ps1
File metadata and controls
58 lines (56 loc) · 2.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
Function New-LaunchScriptHL2DMserverPS {
# * * Add to Read-AppID in fn_Actions.ps1 * *
# Half-Life 2: Deathmatch Dedicated Server
# 232370
# https://kb.firedaemon.com/support/solutions/articles/4000086964-half-life-2-deathmatch
################## Change Default Variables #################
#--->Default Vars
# Server IP
$global:ip = "${ip}"
# Server Port
$global:port = "27015"
# Client Port
$global:clientport = "27005"
# Source TV Port
$global:sourcetvport = "27020"
# Map
$global:defaultmap = "dm_lockdown"
# Maxplayers
$global:maxplayers = "16"
# Server Name
$global:hostname = "SERVERNAME"
# Rcon Password
$global:rconpassword = "$RANDOMPASSWORD"
###########################/\#################################
###################### Do not change below #####################
# System Directory
$global:systemdir = "$serverdir\hl2mp"
# Server Config Directory
$global:servercfgdir = "$serverdir\hl2mp\cfg"
# Server Executable
$global:executable = "HL2DM"
# Server Executable Directory
$global:executabledir = "$serverdir"
# Gamedig Query
$global:querytype = "hl2dm"
# Game Process
$global:process = "hl2dm"
# Log Directory
$global:logdirectory = "$serverdir\hl2mp"
# Server Log
$global:consolelog = "console.log"
# Game-Server-Config Directory
$global:gamedirname = "HalfLife2Deathmatch"
# Game-Server-Config
$global:servercfg = "server.cfg"
# Server Launch Command
$global:launchParams = '@("${executable} -console -game hl2mp -strictportbind -ip ${ip} -port ${port} +hostname `"${hostname}`" +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +servercfgfile {server.cfg} -maxplayers ${maxplayers} -condebug")'
# Advanced must be set to "0"
Get-UserInput
# Download Game-Server-Config
Get-Servercfg
# Edit Server Game-Server-Config
Select-EditSourceCFG
# Rename Source $executable.exe
Select-RenameSource
}