C# - Launch SAMP from an external launcher

0x_

Wtf I'm not new....
Administrator
Joined
Feb 18, 2013
Messages
1,118
Reaction score
166
"However, it starts the process but not the game."
What? Do you mean SAMP doesn't get loaded?
 

Bossnigguh

Member
Joined
Mar 6, 2014
Messages
19
Reaction score
0
0x688 said:
"However, it starts the process but not the game."
What? Do you mean SAMP doesn't get loaded?

The process gta_sa is launched. Windows 7 Basic is activated aswell due to the launch of the process, but the game does not start. 
The gta_sa.exe process is visible on the task manager, windows 7 basic is activated, just like it normally does when I launch the game, but the game itself is not visible. I still see the desktop, nothing else happens.
And the injection is successful because the form closes. Can you provide me with a working injector that I can use in order to launch the game? (in C#) please, and thank you!
 

Bossnigguh

Member
Joined
Mar 6, 2014
Messages
19
Reaction score
0
0x688 said:
"However, it starts the process but not the game."
What? Do you mean SAMP doesn't get loaded?


When I launch the process by using the following code-line, it starts as I described - Windows changes it's theme, the process is launched but the game is not visible at all.
Code:
           Process pp = Process.Start(installdirectory, "-h " + SERVER_IP + " -p 7777 -n" + playerinfo[0]);

BUT
When I use the following line, it shuts down the process -> Windows is changing it's theme and the process is launched for a short period of time(game is not visible though), eventually it closes and the theme is reverted to the normal one.
Code:
           Process pp = Process.Start(installdirectory, "-c -h " + SERVER_IP + " -p 7777 -n" + playerinfo[0]);


The difference is the -c parameter(rcon-pw)

Is it possible to inject samp.dll into gta_sa.exe ?


NVM, managed to find a solution by my own.
 

WaTTi

Well-known member
Joined
Jan 4, 2015
Messages
260
Reaction score
8
Code:
Process jesusisalive = new Process();
jesusisalive.StartInfo.FileName = gamedirectory + "\\samp.exe";
jesusisalive.StartInfo.Arguments = " " + serverip + ":" + port;
jesusisalive.Start();

try with samp.exe
 
Top