SA-MP Forums Archive
samp.exe question - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP (https://sampforum.blast.hk/forumdisplay.php?fid=3)
+--- Forum: General (https://sampforum.blast.hk/forumdisplay.php?fid=13)
+--- Thread: samp.exe question (/showthread.php?tid=548569)



samp.exe question - varrojames - 30.11.2014

Hey all
I would like to know if the samp.exe have the any console params to run on.
For example, start sa-mp and automatically connect to server ip 127.0.0.1 and port 7777
Thanks!


Re: samp.exe question - Diabloa - 30.11.2014

This would be possible, but you need a programer.


Re: samp.exe question - Abagail - 01.12.2014

Yes it does. If you look at a custom client such as GTATurk you can see exactly how they do it. Here's the code from the GTATurk client;
Code:
Shell(lokasyon & "\samp.exe ip")
Example:
Code:
Shell("C://Administrator/Program Files(x86)/Rockstar Games/GTA San Andreas", "\samp.exe server.ls-rp.com");
Basically, the params are the server address, and the IP. It is very important that you recognize SA:MP will load the username from the regkey. You need to set it, or make sure it's set before launching SA-MP.

I believe using a port it would be:
Code:
Shell("C://Administrator/Program Files(x86)/Rockstar Games/GTA San Andreas", "\samp.exe server.ls-rp.com:7777");
Correct me if I am wrong.