GTA開服教程(FiveM篇)

視頻教程
Windows 開服方法
第一步
下載服務(wù)端,下載地址:runtime.fivem.net/artifacts/fivem/build_server_windows/master/


第二步
下載服務(wù)端資源包
下載地址:github.com/citizenfx/cfx-server-data


第三步
建立一個文件夾,路徑不要有中文。
將下載好的??server.7z 與?cfx-server-data-master.zip 放進(jìn)去并解壓,如下圖所示。


第四步
右鍵文本文檔,創(chuàng)建一個
server.cfg 文件與 run.cmd 文件

分別添加內(nèi)容
run.cmd
FXServer.exe +exec server.cfg
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 basic-gamemode?
ensure hardcap?
ensure rconlog
# 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. This is not usually shown anywhere in listings.
sv_hostname "FXServer, but unconfigured"
# Set your server's Project Name
sets sv_projectName "My FXServer Project"
# Set your server's Project Description
sets sv_projectDesc "Default FXServer requiring configuration"
# Nested configs!
#exec server_internal.cfg?
# Loading a server icon (96x96 PNG file)?
#load_server_icon myLogo.png?
# convars which can be used in scripts set temp_convar "hey world!"?
# Remove the `#` from the below line if you want your server to be listed as 'private' in the server browser.?
# Do not edit it if you *do not* want your server listed as 'private'. # Check the following url for more detailed information about this:
?
# https://docs.fivem.net/docs/server-manual/server-commands/#sv_master1-newvalue?
#sv_master1 ""?
# Add system admins?
add_ace group.admin command allow # allow all commands?
add_ace group.admin command.quit deny # but don't allow quit?
add_principal identifier.fivem:1 group.admin #
add the admin to the group?
# enable OneSync (required for server-side state awareness)?
set onesync on?
# Server player slot limit (see https://fivem.net/server-hosting for limits)?
sv_maxclients 48?
# Steam Web API key, if you want to use Steam authentication (https://steamcommunity.com/dev/apikey) # -> replace "" with the key?
set steam_webApiKey ""?
# License key for your server (https://keymaster.fivem.net)?
sv_licenseKey changeme

第五步
申請 Key 并填寫到 server.cfg 的?sv_licenseKey 這一項
Key申請地址:https://keymaster.fivem.net/,登錄注冊并選擇



第六步
啟動 run.cmd ,沒提示錯誤就代表開服成功,本地啟動FiveM,在開始游戲下方會顯示你開的服務(wù)器。




PS:這個方法僅限于本地開服,只能你自己進(jìn)入,如果想讓其他玩家加入你所創(chuàng)建的服務(wù)器,則就需要網(wǎng)絡(luò)上的支持,例如內(nèi)網(wǎng)穿透,DMZ主機等操作,有機會再更新此內(nèi)容。
如需添加插件或模組,可以去FiveM論壇或FiveM中文社區(qū)查找,添加方法會在后面進(jìn)行更新。