SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 02/05/2018, 01:22 PM   #1
Brooks1
Big Clucker
 
Join Date: Mar 2014
Posts: 81
Reputation: 0
Default Making custom SAMP launcher

Hello!

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

Code:
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?
Brooks1 is offline   Reply With Quote
Old 02/05/2018, 01:30 PM   #2
Brooks1
Big Clucker
 
Join Date: Mar 2014
Posts: 81
Reputation: 0
Default Re: Making custom SAMP launcher

Quote:
Originally Posted by ****** View Post
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?
Brooks1 is offline   Reply With Quote
Old 02/05/2018, 01:47 PM   #3
Brooks1
Big Clucker
 
Join Date: Mar 2014
Posts: 81
Reputation: 0
Default Re: Making custom SAMP launcher

Quote:
Originally Posted by ****** View Post
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?
Brooks1 is offline   Reply With Quote
Old 02/05/2018, 02:31 PM   #4
Brooks1
Big Clucker
 
Join Date: Mar 2014
Posts: 81
Reputation: 0
Default Re: Making custom SAMP launcher

Quote:
Originally Posted by ****** View Post
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.
Brooks1 is offline   Reply With Quote
Old 02/05/2018, 04:13 PM   #5
Brooks1
Big Clucker
 
Join Date: Mar 2014
Posts: 81
Reputation: 0
Default Re: Making custom SAMP launcher

Quote:
Originally Posted by ****** View Post
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.
Brooks1 is offline   Reply With Quote
Old 02/05/2018, 04:50 PM   #6
Splodyf23
Big Clucker
 
Splodyf23's Avatar
 
Join Date: Oct 2014
Location: Pakistan
Posts: 78
Reputation: 42
Default Re: Making custom SAMP launcher

@******: 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.
__________________
And yet people will still start new threads for the "dying" subject.-Almost everyone on my samp's "dying" thread.
Splodyf23 is offline   Reply With Quote
Old 02/05/2018, 04:53 PM   #7
Brooks1
Big Clucker
 
Join Date: Mar 2014
Posts: 81
Reputation: 0
Default Re: Making custom SAMP launcher

Quote:
Originally Posted by ****** View Post
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.
Brooks1 is offline   Reply With Quote
Old 02/05/2018, 05:22 PM   #8
git
Banned
 
Join Date: Apr 2018
Posts: 12
Reputation: 0
Default Re: Making custom SAMP launcher

You can always integrate your gamemode with http://samp-ac.com/ and require players to use that launcher if they want to paly.
git is offline   Reply With Quote
Old 02/05/2018, 06:37 PM   #9
Brooks1
Big Clucker
 
Join Date: Mar 2014
Posts: 81
Reputation: 0
Default Re: Making custom SAMP launcher

@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?
Brooks1 is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[HELP] About sa-mp custom launcher C# chikov Scripting Help 4 13/12/2018 11:14 AM
[Tutorial] Making a custom launcher for your server(SUPER EASY) Excelize Tutorials 22 09/03/2018 12:43 PM
Need help making custom samp ip dUPRE Server Support 1 23/06/2017 03:24 PM


All times are GMT. The time now is 03:20 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.