-
Notifications
You must be signed in to change notification settings - Fork 358
Command line
Before running the application from command line, you need to create configuration file in the same folder where the executable file is located. The configuration file should be named config.user.json
. This file should contain path to GTA installation. Here is an example of the file:
{
"game_dir": "/home/username/gtasa",
}
./SanAndreasUnity.x86_64 -batchmode -nographics -startServer: -scene:Main -portNum:7777 -maxNumPlayers:40 "-gameMode:Deathmatch Area 69"
scene
represents the scene to load. There are 2 scenes: Main and Demo. portNum
is the port number that server will use. maxNumPlayers
is the maximum number of players that can connect to the server. gameMode
specifies the name of game mode to use. It's optional and can be omitted.
./SanAndreasUnity.x86_64 -batchmode -nographics -startClient: -serverIp:127.0.0.1 -portNum:7777
serverIp
is IP address of the server. portNum
is port number of the server.
When running in command line, it can be useful to skip loading textures. Textures are not visible when running in command line and they do not affect game logic. This can be done by adding parameter in config.user.json
:
"dontLoadTextures": true,
This will result in lower memory usage and faster world loading.