[FilterScript] Anti-Cheat By Sunehildeep
#8

Why are you making an entire callback for SendToAdmin(color,Message[]); ?
Just create it as a function...

You dont need both
pawn Code:
if(IsPlayerConnected(i))
and
pawn Code:
i != INVALID_PLAYER_ID
Just use the != INVALID_PLAYER_ID


Also, since I see that you are using the basic method for GetPlayerHeath to detect if they have over 100 hp etc. Do something about this

pawn Code:
format(string,sizeof(string),"[ANTI-CHEAT]:  %s is health-hacking. (Server health limit: 99) (Player's health: %d)",name,health);
                        SendToAdmin(COLOR_RED,string);
Because if someone gets detected as a hacker, this will send like 4 messages a second since you dont have a check to see if he was already confirmed a hacker or not

You could just do something like
pawn Code:
new bool:isAHacker[MAX_PLAYERS];

public OnPlayerConnect(playerid) {
    isAHacker[playerid] = false;
}
And then when you want to check if he is a hacking or not, check if he was already marked as a hacker

pawn Code:
if(isAHacker[playerid] == false)
//now check
and when you want to set him as a hacker?
pawn Code:
isAHacker[playerid] = true;
Also regarding the vehicle speed, get a jet, and see how fast you can go, also try falling and also see whats the max speed you get I think that 1000.00 km/h is too much, try doing some tests and see what is natural & what un-natural

Also instead of using a timer for anti b-hop use timestamps

Example code for anti b-hop (untested & not compiled, just as an example)
pawn Code:
#define MAX_JUMPS       3 //maximum 3 jumps before we report him as a bunnyhopper
#define JUMPS_EXPIRE    5 //jumps will expire after 5 seconds

new timePassed[MAX_PLAYERS],
    playerJumps[MAX_PLAYERS];

if((newkeys & KEY_JUMP) && !(oldkeys & KEY_JUMP)) {
    if(!IsPlayerInAnyVehicle(playerid)) {
        if(gettime() > timePassed[playerid]) {
            playerJumps[playerid] = 0; //reseting their jumps if 5 seconds passed
            timePassed[playerid] = gettime()+JUMPS_EXPIRE;
            playerJumps[playerid] += 1;
        }
        else { //if 5 seconds didnt pass
            playerJumps[playerid] += 1;
            if(playerJumps[playerid] >= MAX_JUMPS) { //if they jumpped more than 3 times in less than 5 seconds
                Kick(playerid); //kick them or something
            }
        }
    }
}

All in all, considering its your 4th time making a release, please be more prepared when you make releases. Also I'd highly recommend switch to github so others can contribute to your code & make it better.


EDIT: Also for the bunnyhop, check player animation. When I was creating my own anti bunnyhop system I had a lot of problems by just simply checking how many times they pressed jump button. Make sure you check their animation when they press enter since imagine you just press space few times fast (you would actually just jump once) it will detect you as a bunnyhopper
Reply


Messages In This Thread
[Include] Anti-Cheat By Sunehildeep - by StrikerZ - 24.11.2016, 14:42
Re: Anti-Cheat By Sunehildeep - by Jelly23 - 24.11.2016, 15:21
Re: Anti-Cheat By Sunehildeep - by Logic_ - 24.11.2016, 15:53
Re: Anti-Cheat By Sunehildeep - by RyderX - 24.11.2016, 16:45
Re: Anti-Cheat By Sunehildeep - by maximthepain - 24.11.2016, 17:21
Re: Anti-Cheat By Sunehildeep - by Yashas - 24.11.2016, 18:04
Re: Anti-Cheat By Sunehildeep - by StrikerZ - 25.11.2016, 00:32
Re: Anti-Cheat By Sunehildeep - by TwinkiDaBoss - 25.11.2016, 01:54
Re: Anti-Cheat By Sunehildeep - by Yashas - 25.11.2016, 04:20
Re: Anti-Cheat By Sunehildeep - by TwinkiDaBoss - 25.11.2016, 16:04

Forum Jump:


Users browsing this thread: 2 Guest(s)