Some initial considerations:
The server uses the 8888 UDP port for all server functions and 8889 UDP for the master list only.
The 8888 port can be changed to another one at config.cfg.
Essential server files
ivmpServer.dll, ivmpServerMasterCon.dll, lua5.3.0.dll, libmysql.dll, playerModels.dat, vehicleModels.dat, config.cfg.
The point of entry for all Lua scripts is the file "main.lua", we pack examples of how to include more files into the Lua Virtual Machine.
name: The name of your server
port: UDP port for the game server
masterlist: 0 off, 1 on. (Remember keep it off for test servers since the masterlist may consider your server as spam)
refreshrate: How often the game server will process in MS (milliseconds). The lower the better, we recommend 100-150.
location: Add the location of your server or the nationality target of it.
website: Your server’s website
EFLC: 1 yes, 0 no.
auto_blip_tags: 1 (all players will have nametags and blips), 0 (tags/blips are added manually)
gen_crash_dump: 1 (creates a server crash memory dump used by IV:MP developers), 0 doesn’t
Configuring your server
- Download the latest server files.
- Extract the RAR folder into a folder you will create for the server. Below is an image of the extraction process.
- Open your config.cfg file to set it up. You can open it in any text editor. Below is an example, accompanied with explanations. Do not copy the explanations in your configuration file.
name=Liberty City - Liberty City is the name of your server
port=7070 - Your server’s port is 7070
masterlist=1 - Your server will appear on the masterlist
refreshrate=100 - The server gets refreshed at every 100 milliseconds
location= - A nation, fictional place or any location you feel is representative for the server. You can choose to insert a blank space with the space bar, since the location is optional.
website= - A blank space is left, at the hit of the space bar, which will leave the website thing blank
EFLC=0 - Indicator that this is a GTA IV server
auto_blip_tags=1 - Players will get automatic blip colours and will inherit the nickname they had set in the client settings
gen_crash_dump=1 - Your server will generate .dmp files, should it crash. Example: 2020-7-29-11-34-28.dmp. The times are set in UTC.
After saving the configuration file, look up your machine’s IP address and default gateway. You can do it by typing ipconfig after opening the Command Prompt. Keep in mind the IPv4 address (e.g. 172.16.254.102) and the default gateway (e.g. 172.16.254.1).
Type the default gateway in a new browser tab. You may encounter a login prompt. For that, refer to your router and/or your Internet service provider (ISP). From here, you will have to find the settings on port forwarding. They differ from ISP to ISP and from router to router, so you may want to do an Internet search if you are stuck. In order to successfully forward your server, though, you will have to open the UDP port of your server (7070, in our example) for the machine where the server will be hosted on (in our case, 172.16.254.102).
Write all the necessary Lua scripts that should spruce up your server, and make it stand out. Use the Lua 5.3 reference manual and the IV:MP T4 server documentation from this Wiki in order to succeed. If they are outside the "main.lua" file, don’t forget to add them in the end, like in the image below.
- It is recommended to keep the server hidden from the master list (masterlist=0 in the config.cfg file) until you are happy enough with your server. Every time you need to test the server, open the IVMP Lua.exe file and join your server in "Direct" section.
- Once your server is nice and shiny, you can set its master list visibility to 1 (masterlist=1). Now, launch the IVMP Lua.exe file one last time. Now, your server is ready for others to play, and is available on the masterlist.