(2019-07-13, 08:53 PM)Josh Wrote: You could always launch samp.exe and pass the following parameters:
-h <IP> -p <PORT> -n <NAME> -z <PASSWORD>
example:
samp.exe -h 127.0.0.1 -p 7777 -n Josh -z MyL33tP4ssw0rd
That is incorrect. If command line arguments are given, "samp.exe" treats the first command line argument (separated by white space) as an IPv4 address with port separated by ":", if specified. If it fails to parse the command line argument string, it will still launch San Andreas Multiplayer and attempts to connect to ":7777", which is an invalid server IP address.
Code:
samp.exe -c -h 1.2.3.4 -p 1234 -n WTF
results in
where
Code:
sampcmd.exe -c -h 1.2.3.4 -p 1234 -n WTF
results in
Note that "-c" (empty RCON password) is required to make it work, because why wouldn't it just be optional instead?
"sampcmd" just copies the command line arguments to the GTA San Andreas process, so "samp.dll" can parse them.