Anti Air Brake Problem -
ThePrograme - 26.05.2013
Ok i m using the Balkan Security anti cheat -
https://sampforum.blast.hk/showthread.php?tid=335007 and the anti air brake doesn't work.
Here is the code of the anti air brake:
pawn Код:
//=====================[ANTI AIR BRAKE]=====================
if(PAB == 1)
{
if(GetPVarInt(i, "AdminProtect") == 0)
{
if(GetDistanceToPoint(i,Position[i][0],Position[i][1],Position[i][2]) > 220 && Protection[i] == 0 && GetPlayerInterior(i) == 0 && kicked[i] == 0 && GetPVarInt(i, "SafeTeleport") == 1)
{
new ankategorija[320]; new anname[320];
GetAnimationName(GetPlayerAnimationIndex(i),ankategorija,320,anname,320);
GetPlayerName(i, Plname, sizeof(Plname));
GetPlayerIp(i, ipadress, sizeof(ipadress));
if(strcmp(anname,"RUN_PLAYER", false ) == 0 && strcmp(ankategorija,"PED", false) == 0)
{
format(string, sizeof(string), "*** AntiCheat: Has Kicked %s (%d) - Reason: Air Brake!",Plname, playerid);
SendClientMessageToAll(COLOR_RED, string); kicked[i] = 1;
format(stR, sizeof(stR),"{CD0000}Kicked!\n{FFF8DC}Name:{CD0000} %s\n{FFF8DC}Reason:{CD0000} Air Brake\n{FFF8DC}IP:{CD0000} %s\n\n{CD0000}If You Think That You Are Kicked For No Reason Or The AntiCheat Has made A Mistake,\nPress F8 And Report Mistake On Forums With Proof!\nWeb Site: %s",Plname,ipadress,forum);
ShowPlayerDialog(i, 20000, DIALOG_STYLE_MSGBOX, "{FFF8DC}AntiCheat",stR, "Ok", "");
getdate(yr,m,d);
gettime(h,mi,s);
format(string,sizeof(string), "[%d/%d/%d]-[%d:%d:%d]=> AntiCheat: Has Kicked %s - Reason: Air Brake!",d,m,yr,h,mi,s,Plname);
log(string);
SetTimerEx("kick",10, false, "i", i);
}
if(strcmp(anname,"WALK_PLAYER", false ) == 0 && strcmp(ankategorija,"PED", false ) == 0)
{
format(string, sizeof(string), "*** AntiCheat: Has Kicked %s (%d) - Reason: Air Brake!",Plname, playerid);
SendClientMessageToAll(COLOR_RED, string); kicked[i] = 1;
format(stR, sizeof(stR),"{CD0000}Kicked!\n{FFF8DC}Name:{CD0000} %s\n{FFF8DC}Reason:{CD0000} Air Brake\n{FFF8DC}IP:{CD0000} %s\n\n{CD0000}If You Think That You Are Kicked For No Reason Or The AntiCheat Has made A Mistake,\nPress F8 And Report Mistake On Forums With Proof!\nWeb Site: %s",Plname,ipadress,forum);
ShowPlayerDialog(i, 20000, DIALOG_STYLE_MSGBOX, "{FFF8DC}AntiCheat",stR, "Ok", "");
getdate(yr,m,d);
gettime(h,mi,s);
format(string,sizeof(string), "[%d/%d/%d]-[%d:%d:%d]=> AntiCheat: Has Kicked %s - Reason: Air Brake!",d,m,yr,h,mi,s,Plname);
log(string);
SetTimerEx("kick",10, false, "i", i);
}
}
}
}
This is just the anti air brake code. There are no errors or warnings!!!
Really need this fast - Thanks In Advance.
Re: Anti Air Brake Problem -
ThePrograme - 26.05.2013
Anyone

?
Re: Anti Air Brake Problem -
ThePrograme - 27.05.2013
Sorry but BUMP.
Re: Anti Air Brake Problem -
ThePrograme - 28.05.2013
Bump again. If the code isn't right just say so. So that i leave it alone and find something else
Re: Anti Air Brake Problem -
Alternative112 - 28.05.2013
I had the same problem. ACBS is a nice anticheat but yeah AB doesn't seem to work. What you will want to do is, on each AntiCheat call, check Position[i][0], [1] and [2] to see if the distance between points is greater than whatever you want it to be (I use 50.0 for on foot). So it would look something like this:
pawn Код:
new Float:currPosX, Float:currPosY, Float:currPosZ;
GetPlayerPos(i, currPosX, currPosY, currPosZ);
if(GetPVarInt(i, "AdminProtect") == 0 && GetPVarInt(i, "SafeAirbrake") == 0) {
new Float:distance = GetDistanceBetweenPoints(Position[i][0], Position[i][1], Position[i][2], currPosX, currPosY, currPosZ);
new Float:point = 50.0;
if (distance > point) {
format(string, sizeof(string), "*** AntiCheat: Has Kicked %s (%d) - Reason: Air Brake!",Plname, playerid);
SendClientMessageToAll(COLOR_RED, string); kicked[i] = 1;
format(stR, sizeof(stR),"{CD0000}Kicked!\n{FFF8DC}Name:{CD0000} %s\n{FFF8DC}Reason:{CD0000} Air Brake\n{FFF8DC}IP:{CD0000} %s\n\n{CD0000}If You Think That You Are Kicked For No Reason Or The AntiCheat Has made A Mistake,\nPress F8 And Report Mistake On Forums With Proof!\nWeb Site: %s",Plname,ipadress,forum);
ShowPlayerDialog(i, 20000, DIALOG_STYLE_MSGBOX, "{FFF8DC}AntiCheat",stR, "Ok", "");
getdate(yr,m,d);
gettime(h,mi,s);
format(string,sizeof(string), "[%d/%d/%d]-[%d:%d:%d]=> AntiCheat: Has Kicked %s - Reason: Air Brake!",d,m,yr,h,mi,s,Plname);
log(string);
SetTimerEx("kick",10, false, "i", i);
}
}
The animation check is unreliable, so I do not recommend using it to check. Remember to check if a player is surfing a car or actually in a car / plane, and change the point float accordingly (I will let you figure that out

)
AW: Anti Air Brake Problem -
Blackazur - 28.05.2013
https://sampforum.blast.hk/showthread.php?tid=121444