-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart.ps1
More file actions
18 lines (16 loc) · 1.07 KB
/
Copy pathstart.ps1
File metadata and controls
18 lines (16 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# ─────────────────────────────────────────────────────────────
# Projet R — FiveM Enhanced server launcher (PowerShell)
# Start the database first (start-db.bat), then run this.
# Author: vyrriox
# ─────────────────────────────────────────────────────────────
$ErrorActionPreference = 'Stop'
Set-Location -Path $PSScriptRoot
# Prefer the FiveM Enhanced binary (cfx-server.exe); fall back to Legacy (FXServer.exe).
$fx = Join-Path $PSScriptRoot 'artifacts\cfx-server.exe'
if (-not (Test-Path $fx)) { $fx = Join-Path $PSScriptRoot 'artifacts\FXServer.exe' }
if (-not (Test-Path $fx)) {
Write-Host '[ERROR] No server binary in artifacts\ (cfx-server.exe or FXServer.exe). Download the artifacts first.' -ForegroundColor Red
exit 1
}
Write-Host "Starting server on port 30120 using $fx ..." -ForegroundColor Green
& $fx +exec server.cfg