Quote:
Originally Posted by SuperViper
OnPlayerSpawn:
pawn Код:
new Float: frontCameraVectors[3]; GetPlayerCameraFrontVector(playerid, frontCameraVectors[0], frontCameraVectors[1], frontCameraVectors[2]);
if(frontCameraVectors[2] < -0.8) { // Hacks installed }
This is a piece of code I took from my new anticheat which will be released soon. I saw the code in a filterscript before it was deleted and I know a friend who used it on a popular roleplay server and it seems to work fine.
|
I actually saw something like this on Mini-missions server. I was testing popular servers AC's, joined Mini-missions with n0beit, spawned, then my camera moved down and I got banned with the message "Cheat program detected". Pretty neat, lol.
Here you go. I just tested it out to make sure if wasn't an accident:
http://imageshack.us/a/img824/3666/lxy.png
I wonder how they do that?
I found this:
pawn Код:
#include <a_samp>
#include <zcmd>
#pragma tabsize 0
#define PUB:%1(%2) forward %1(%2); public %1(%2)
#define FREEZE_SECONDS 4
#define red 0xE60000FF
enum pinfo {
firstspawn,
pname[MAX_PLAYER_NAME],
hacker
};
new gpInfo[MAX_PLAYERS][pinfo];
public OnPlayerConnect(playerid) {
gpInfo[playerid][hacker] = 0;
gpInfo[playerid][firstspawn] = 1;
GetPlayerName(playerid, gpInfo[playerid][pname], MAX_PLAYER_NAME);
return 1;
}
public OnPlayerSpawn(playerid) {
if(gpInfo[playerid][firstspawn] == 1) {
gpInfo[playerid][firstspawn] = 0;
SetCameraBehindPlayer(playerid);
TogglePlayerControllable(playerid, 0);
SetTimerEx("HackCheck", FREEZE_SECONDS * 1000, 0, "i", playerid);
}
return 1;
}
PUB:HackCheck(playerid) {
new Float:x, Float:y, Float:z;
GetPlayerCameraFrontVector(playerid, x, y, z);
#pragma unused x
#pragma unused y
if(z < -0.8) {
TogglePlayerControllable(playerid, 1);
gpInfo[playerid][hacker] = 1;
new string[128];
format(string, sizeof string, "[ANTICHEAT]: %s has connected with ****.", gpInfo[playerid][pname]);
format(string, sizeof(string), "{ffffff}%s adlı oyuncu hileli olduğu iзin banlandı.", gpInfo[playerid][pname]);
SendClientMessageToAll(0x00FFFFFFAA, string);
format(string, sizeof(string), "{F5FF00}-[Sebep]: {FFFFFF}Hile tespit edildi.");
SendClientMessage(playerid, red, string);
Ban(playerid);
for(new i=0; i<MAX_PLAYERS; ++i) if(IsPlayerAdmin(i)) SendClientMessage(i, 0xFF0000FF, string);
}
else {
TogglePlayerControllable(playerid, 1);
}
return 1;
}
CMD:hackers(playerid, params[]) {
if(!IsPlayerAdmin(playerid)) return 0;
SendClientMessage(playerid, -1, "Hileli Oyuncular:");
new string[128];
for(new i=0; i<MAX_PLAYERS;++i) {
if(gpInfo[i][hacker] == 1) {
format(string, sizeof string, "%s[%d]", gpInfo[i][pname], i);
SendClientMessage(playerid, -1, string);
}
}
return 1;
}
Will check it and report results.