C# or C++
#1

----------------------
Reply
#2

Both. (8 character)
Reply
#3

----------------------
Reply
#4

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.
Reply
#5

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
Reply
#6

----------------------
Reply
#7

same here
Reply
#8

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)
Reply
#9

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.
Reply
#10

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)