C# Help
#1

Im trying to launch samp from client that I've build but im facing a problem,
Its connecting to the ip that im typing, but port is always 7777, code:

Код:
ProcessStartInfo startInfo = new ProcessStartInfo("C://Program Files/Rockstar Games/GTA San Andreas/samp.exe");
            startInfo.Arguments = "-c -h127.0.0.1 -n 5665";
            Process.Start(startInfo);
So basiclly its launching samp with the following ip:
127.0.0.1:7777
Reply
#2

-n is name not port.

Quote:

-c rcon_password
-n player name
-h server ip (host)
-p server port
-z server password

example:" -c -n Mohsen -h 91.184.76.104 -p 1223"

Not sure if -c is required?
Reply
#3

Код:
startInfo.Arguments = "-h 127.0.0.1 -p 5665";
Remove -c if you dont use it.

Try this
Reply
#4

Quote:
Originally Posted by MP2
Посмотреть сообщение
-n is name not port.


Not sure if -c is required?
i tried the example and it didnt worked
:7777
Reply
#5

Quote:
Originally Posted by ReVo_
Посмотреть сообщение
Код:
startInfo.Arguments = "-h 127.0.0.1 -p 5665";
Remove -c if you dont use it.

Try this
sorry for double but its not working
Reply
#6

The code is correct.

Maybe you need something like this:
https://github.com/Zeex/samp-server-cli

and maybe sa-mp server dont have any command-line feature (just read server.cfg)

@MP2: Where you taked commands?
Reply
#7

Quote:
Originally Posted by ReVo_
Посмотреть сообщение
@MP2: Where you taked commands?
Where did I find the list? I ******d 'samp.exe params' lol

Weird what Kye says though..

Quote:
Originally Posted by Kalcor
Посмотреть сообщение
There are no command line params you can send to samp.exe at the moment. The only command line params that exist are those sent to gta_sa.exe from samp.exe, which are 'read only'.
Is that not true?
Reply
#8

Fixed, how simple:
Код:
ProcessStartInfo startInfo = new ProcessStartInfo("C://Program Files/Rockstar Games/GTA San Andreas/samp.exe");
            startInfo.Arguments = "127.0.0.1:5665";
            Process.Start(startInfo);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)