打开官网,点击 下载服务端(非商业),如图所示
网页跳转到官方说明文档
该说明文档提供了安装在 Windows 和 Linux 上的方法,下面逐一介绍。
Windows
前提条件:
1.Visual C++ Redistributable 2019
2.Git
3.高配置服务器一台
安装步骤
1.创建新文件夹为 D:\FxServer
2.下载最新 Windows 端服务器文件:artifacts server
3.解压下载的服务器文件到 FxServer
文件夹中
4.克隆cfx-server-data到 D:\FxServer
中,并重名名为 server-data
,且与服务器文件夹 server
同级.命令:git clone https://github.com/citizenfx/cfx-server-data.git server-data
5.在 server-data
文件夹下创建 server.cfg
配置文件,文件内容来自example server.cfg ,内容如下:
# Only change the IP if you're using a server with multiple network interfaces, otherwise change the port only.
endpoint_add_tcp "0.0.0.0:30120"
endpoint_add_udp "0.0.0.0:30120"
# These resources will start by default.
ensure mapmanager
ensure chat
ensure spawnmanager
ensure sessionmanager
ensure fivem
ensure hardcap
ensure rconlog
ensure scoreboard
# This allows players to use scripthook-based plugins such as the legacy Lambda Menu.
# Set this to 1 to allow scripthook. Do note that this does _not_ guarantee players won't be able to use external plugins.
sv_scriptHookAllowed 0
# Uncomment this and set a password to enable RCON. Make sure to change the password - it should look like rcon_password "YOURPASSWORD"
#rcon_password ""
# A comma-separated list of tags for your server.
# For example:
# - sets tags "drifting, cars, racing"
# Or:
# - sets tags "roleplay, military, tanks"
sets tags "default"
# A valid locale identifier for your server's primary language.
# For example "en-US", "fr-CA", "nl-NL", "de-DE", "en-GB", "pt-BR"
sets locale "root-AQ"
# please DO replace root-AQ on the line ABOVE with a real language! :)
# Set an optional server info and connecting banner image url.
# Size doesn't matter, any banner sized image will be fine.
#sets banner_detail "https://url.to/image.png"
#sets banner_connecting "https://url.to/image.png"
# Set your server's hostname
sv_hostname "FXServer, but unconfigured"
# Nested configs!
#exec s