Anticheat for speedhack and airbrake - 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: Anticheat for speedhack and airbrake (
/showthread.php?tid=308556)
Anticheat for speedhack and airbrake -
MR,Mr - 04.01.2012
Does one exist any more? I know junkbuster used to but
A) It conflicts with my server
B) It not longer exists.
Any help appreciated.
Re: Anticheat for speedhack and airbrake -
Ballu Miaa - 04.01.2012
pawn Код:
// ADD this anywhere in the GameMode!
// Anti Speed Hack by Ballu Miaa!!
forward AntiSpeed();
public AntiSpeed()
{
new Float:maxspeed = 175.0;
new plname[MAX_PLAYER_NAME];
new string[256];
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(GetPlayerState(i) == 2)
{
GetPlayerPos(i, TelePos[i][3], TelePos[i][4], TelePos[i][5]);
if(TelePos[i][5] > 550.0)
{
TelePos[i][0] = 0.0;
TelePos[i][1] = 0.0;
}
if(TelePos[i][0] != 0.0)
{
new Float:xdist = TelePos[i][3]-TelePos[i][0];
new Float:ydist = TelePos[i][4]-TelePos[i][1];
new Float:sqxdist = xdist*xdist;
new Float:sqydist = ydist*ydist;
new Float:distance = (sqxdist+sqydist)/31;
if(distance > maxspeed)
{
GetPlayerName(i, plname, sizeof(plname));
format(string, 256, "Speed Anticheat - %s[%d] speed is - %.0f mph",plname, i ,distance);
Adminmsg(string);
}
}
if(TelePos[i][5] < 550.0 && TelePos[i][3] != 0.0)
{
TelePos[i][0] = TelePos[i][3];
TelePos[i][1] = TelePos[i][4];
}
}
}
}
return 1;
}
NOTE:UNTESTED
Re: Anticheat for speedhack and airbrake -
Gamer_Z - 04.01.2012
My AC has Anti Speedhack but not Anti airbrake, just try it out.. See my releases.
Re: Anticheat for speedhack and airbrake -
Dan_Barocu - 21.06.2012
is this anti -speed good?