Detection of SAMP/GTA installation folder [C#]
#1

Testing
Reply
#2

You can read this registry key that is created by SA-MP.

Код:
string gamePath = Registry.LocalMachine.OpenSubKey("Software\\SAMP").GetValue("gta_sa_exe").ToString();
Reply
#3

Testing
Reply
#4

Код:
System.Diagnostics.Process.Start(installdirectory, "-c -n " + playerinfo[0] + " -h SERVER_IP -p 7777");
Have you read this topic?
Reply
#5

Quote:
Originally Posted by Typhome
Посмотреть сообщение
Код:
System.Diagnostics.Process.Start(installdirectory, "-c -n " + playerinfo[0] + " -h SERVER_IP -p 7777");
Have you read this topic?
Yeah, that was my main guideline, yet it failed.
Reply
#6

Quote:
Originally Posted by Amit1998
Посмотреть сообщение
I'm using this, it launches the game, however, it doesnt use the credentials(playerinfo[0] is the username, SERVER_IP is the IP)
It connects me to :7777 with a blank username instead.. And yes, I checked and the variables are legit.
How did you check if variables are correct?
Just to make sure...
Код:
string parameters = "-c -n " + playerinfo[0] + " -h 127.0.0.1 -p 7777";
Console.WriteLine(parameters); or something...
Reply
#7

Testing
Reply
#8

Quote:
Originally Posted by Amit1998
Посмотреть сообщение
Printed them. Anywho, I realised that I should inject samp.dll into the gta_sa.exe process.
My knowledge in C# is very slim, and going through online tutorials, I realised it's hard, are you experienced enough to gimme a hand in that too? Please :P
Check this.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)