28.05.2013, 19:18
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:
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 )
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);
}
}