SA-MP Forums Archive
C# or C++ - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Other (https://sampforum.blast.hk/forumdisplay.php?fid=7)
+--- Forum: Everything and Nothing (https://sampforum.blast.hk/forumdisplay.php?fid=23)
+--- Thread: C# or C++ (/showthread.php?tid=178889)



C# or C++ - Typhome - 24.09.2010

----------------------


Re: C# or C++ - RyDeR` - 24.09.2010

Both. (8 character)


Re: C# or C++ - Typhome - 24.09.2010

----------------------


Re: C# or C++ - DeathOnaStick - 24.09.2010

Quote:
Originally Posted by Typhome
Посмотреть сообщение
Im coding.

But how do program opens samp.exe and connecting IP automically?
You cannot ask after a whole c++ code here. You should first learn how to use c++ and then ask on a forum, that actually is for cpp. I'm quite sure that nobody here will totally be able to help you out with your problem and i dont think it's a real sollution either, because i dont guess that you will understand the background behind this. That's what i've got to say about it.


Respuesta: C# or C++ - xenowort - 24.09.2010

Both, but in C# you can launch samp.exe with parameters -IP -PORT

Process.Start("samp.exe -IP -PORT");

or in C++.net

Using the clase System:iagnostics;

Process::Start("samp.exe -IP -PORT");

And in vb.net

The class is automaticaly included

process.start("samp.exe -IP -PORT")

Good look


Re: Respuesta: C# or C++ - Typhome - 29.09.2010

----------------------


Re: C# or C++ - Matthias_ - 29.09.2010

same here


Re: Respuesta: C# or C++ - JaTochNietDan - 29.09.2010

Quote:
Originally Posted by Typhome
Посмотреть сообщение
I tryed, but:

This works

Process.Start("samp.exe")

This doens't works:

Process.Start("samp.exe -(ip) -(port)") = Says this file couldnt found bla bla
Well, to pass parameters in that function you need to specify some added information for that process, like so.

Код:
Dim SA-MP As New ProcessStartInfo("samp.exe", "127.0.0.1:7777")
Process.Start(SA-MP)



Respuesta: Re: Respuesta: C# or C++ - xenowort - 29.09.2010

Quote:
Originally Posted by JaTochNietDan
Посмотреть сообщение
Well, to pass parameters in that function you need to specify some added information for that process, like so.

Код:
Dim SA-MP As New ProcessStartInfo("samp.exe", "-127.0.0.1 -7777")
Process.Start(SA-MP)
Ok, but is more simple using Shell.


Re: Respuesta: Re: Respuesta: C# or C++ - Donny_k - 30.09.2010

System.Diagnostics
Process Class
StartInfo Property

It's all .NET (4) so you can use it with any managed language VB, C++, C# etc, choose which one makes you more comfortable.