Making custom SAMP launcher
#1

Hello!

I'm interesting about making custom SAMP launcher with C# Form. This line will make player to connect to the server:

Код:
System.Diagnostics.Process.Start("samp://[IP]:[PORT]");
But I have two questions:

1) There is a default directory that user's PC finds samp.exe and with the given IP and port connects to the server. But how to access this directory to check for some folders like CLEO and etc and how to change this default directory?

2) If I want to prevent the player to connect with the original SAMP client, I need to put a password to my server so only my custom launcher will know the password. But how to write a code that use this password to connect to the server?
Reply
#2

Quote:
Originally Posted by ******
Посмотреть сообщение
The install directory is stored in the registry.

You can't. I mean it is possible to put a password in your client, but since players need to download your client they also must download the password, thus anyone who has your client has the password and can extract, view, and share it.
But if put the password inside the code and compile the code to EXE file, they can't access the password I think?
Reply
#3

Quote:
Originally Posted by ******
Посмотреть сообщение
They absolutely can. SA-MP is a whole mod based on reading data from an exe, and a significantly more complex one than yours.
Alright thank you for the answers. So I guess this idea is not a good practice. Can I ask you what is the best choice to disable the players to use the original SAMP client to connect to the server?
Reply
#4

Quote:
Originally Posted by ******
Посмотреть сообщение
Can I ask why you want to? That's just limiting your playerbase to anyone willing to download an run an unknown executable before trying your server out.
I'm doing this, because I being tired ot these CLEO hacks. Earlier I found one of your posts:

http://forum.sa-mp.com/showpost.php?...0&postcount=10

As you said there, when the server owners makes to detect a cheat the cheats were modified to avoid the checks. Every day someone releases new CLEO script, who spoil the players game. I made so much anti-cheats example for the troll hacks, but there are keeping to release a new ones. I want to notice that there is some CLEOs, that can't be detected. I'm absolutely sure that the most of server owners are having the same problems as mine. I have read so many topics in the forum about disabling the CLEO mod, but there is no way to detect the CLEO and the SAMP developer doesn't want to disable it as I read. So I came to the decision that the only way to deal with this CLEO is making a custom SAMP launcher. I'm fimiliar that with this I'm limiting the players for my server, but it's not problem for me. And that's why I'm searching for a little help, someone to give me ideas how to block the original SAMP client from connecting to the server.
Reply
#5

Quote:
Originally Posted by ******
Посмотреть сообщение
Yes, I did say that. I said that every time you detect one they make a new way to bypass the detection. So your proposed solution is to make a new detection method, why do you think this method will be any more effective or any less bypassed than the others?
The most of players, who playing in my server, are around 15 years old. They only know how to type the words "samp cleo hacks" on internet and finds a new hacks. They will not know how to prevent a security like this. My server isn't big enough to have a smart players to do something like this. The only way to prevent this is searching really good programmer to do this for money and no one will do this in my server. Even if someone do this, according to me this is the better protection for my server. For the players in my server it will be very hard to prevent protection from a custom launcher instead of preventing anti-cheat system in the server.
Reply
#6

@******: From a non-programmer/non-scripter perspective I'd say that:
"Well if the detection method involves actually checking the directory for any .cs .fxt or even the .asi files, then any kind of cleo, malicious or non-malicious can be prevented from entering the server. This is quite possible and I hate to say this but MTA already (kinda does this). And samp can also easily do this. @Brooks1 you can look at MTA's code and figure out how it does that, because its opensource

@Brooks1: To know the install directory of the gta sa you can simply ask the user to input it while they are installing your client. Or if your client is an exe that doesn't need any installation you can make them enter the directory before they can click play/connect. You can confirm that directory by checking for filenames like gta_sa.exe or samp.exe or and also check if the provided directory contains a subdirectory named models and if the models directory has gta3.img in it. This is one way, but it is kinda of easy to trick, as anyone can copy gta_sa.exe, samp.exe and models/gta3.img to a new folder and tell your client that it is your gta sa directory. But it is worthwile to try out because not everyone will want to trick the system, except the more hardcore hackers, if someone is good enough to write a .cs file for a hack, he's good enough to trick your client into thinking that he doesn't have any hacks.

Conclusion:
*You can add watchdog ranks, give this to the trusted players who can /kick(but not /ban) players and also their /report has high priority, and admins must check a report by a watchdog ASAP.
*Encourage players to /report by setting rewards, such as "You get $10000 for /report'ing someone" but have a condition that the player who was reported was punished.
You can't fool an actual human so make sure to have an active and mature admin team, and if you have to increase your administrators/moderators. No piece of code can fool an actual human, like it can fool another piece of code.
Reply
#7

Quote:
Originally Posted by ******
Посмотреть сообщение
Well if you believe no-one will try bypass your method then you can try it, I was just warning you of the issues. And you can of course make it harder, but no game ever released has managed to avoid cracking (though some did take a few weeks).
Alright, thanks for the information once again. I posted this topic if someone has ideas to help me.
Reply
#8

You can always integrate your gamemode with http://samp-ac.com/ and require players to use that launcher if they want to paly.
Reply
#9

Quote:
Originally Posted by Splodyf23
View Post
@Y_Less: From a non-programmer/non-scripter perspective I'd say that:
"Well if the detection method involves actually checking the directory for any .cs .fxt or even the .asi files, then any kind of cleo, malicious or non-malicious can be prevented from entering the server. This is quite possible and I hate to say this but MTA already (kinda does this). And samp can also easily do this. @Brooks1 you can look at MTA's code and figure out how it does that, because its opensource
I didn't say it wasn't possible, I said it was trivially easy to bypass.
Reply
#10

@Splodyf23: First of all thank you for the suggestions. As of the install directory I already understood how to take it thanks to ******, but still my question is how to block the original SAMP client to connecting to my server?

@git: I know SAMP AC, but the client has a viruses and the players will not want to download it.

By the way I found solution how to send parameters to samp.exe and that's it with options -c -h -p -n and etc. But the problem is if I send something like this "-c -h 127.0.0.1 -p 6767 -n Nickname -z password" only the first two parameters is sent (-c and -h). The other parameters (the port, nickname and password) doesn't send to samp.exe. Anyone has ideas how to fix this?
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)