SA-MP Forums Archive
[Help]Client/Server anti cheat - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: [Help]Client/Server anti cheat (/showthread.php?tid=400331)



[Help]Client/Server anti cheat - ExABot - 18.12.2012

I have a modest knowledge of programming languages, especially the C + + I want to make a client / server anti cheat does not allow the client to connect to the server without the client part of the anti cheat If anyone knows how to, write in this topic or PM I would be grateful to everyone who has helped me.


Re: [Help]Client/Server anti cheat - PlayLSX_Founder - 18.12.2012

You could probably do this with a plug-in. Have a look in the plug-in section for an anti-cheat plug-in and see how they do it. You won't be able to stop them connecting if they do not have the client-side package, however, you could maybe add a callback in, something like "AC_OnPlayerMissingClientFiles(playerid);" that you could code under and kick the player or ban them, etc. whatever you wanted to do to them, send them a link to download the client files before kicking them, whatever ..


Re: [Help]Client/Server anti cheat - ExABot - 18.12.2012

Its very easy to prevent cheat with client side anti cheat because most cheats inject .dll to gta process i have code that prevent that injection.


Re: [Help]Client/Server anti cheat - PlayLSX_Founder - 18.12.2012

Yeah, I figure it would be. The problem is, what cheater willingly wants to download something that would stop them cheating? lol.


Re: [Help]Client/Server anti cheat - SuperViper - 18.12.2012

Include an object modification with your client anticheat and then once the player connects, check if they fall through the modified part of the object.


Re: [Help]Client/Server anti cheat - ExABot - 18.12.2012

Hmm i try to make something with sockets but not work I think it would be better to just block hex string of all cheats that are public soo bb cleo and ******.


Re: [Help]Client/Server anti cheat - ExABot - 18.12.2012

PlayLSX_Founder the idea of client anti cheat is - player can't connect to server without the client side anti cheat part there are many anti cheat like that for cs 1.6 that using sockets to make the connection.
--------------------------------------------------------------------------------------------------------------
Anti .dll injection from cs 1.6 client anti cheat i think it will work for samp too if any1 can make anti cheat like that use this code:
And sry for my english i know its terrible :P
void AntiInject ()
{
HANDLE hProc = FindWindow(0,"Gunz");
while (TRUE) {
BlockAPI(hProc, "NTDLL.DLL", "LdrLoadDll");
Sleep (100);
}
}

BOOLEAN BlockAPI (HANDLE hProcess, CHAR *libName, CHAR *apiName)
{
CHAR pRet[]={0xC3};
HINSTANCE hLib = NULL;
VOID *pAddr = NULL;
BOOL bRet = FALSE;
DWORD dwRet = 0;

hLib = LoadLibrary (libName);
if (hLib) {
pAddr = (VOID*)GetProcAddress (hLib, apiName);
if (pAddr) {
if (WriteProcessMemory (hProcess,
(LPVOID)pAddr,
(LPVOID)pRet,
sizeof (pRet),
&dwRet )) {
if (dwRet) {
bRet = TRUE;
}
}
}
FreeLibrary (hLib);
}
return bRet;
}