Anti-cheat help.
#1

Hello,

I have made a working Anti-Cheat system but only the money hack part is kinda bugging.

pawn Код:
new PMoney = GetPlayerMoney(i);
                if(PMoney > Player[i][Money]){
                    if(Player[i][JustBoughtNos] != 1) continue;
                    if(Player[i][JustBoughtVehicle] != 1) continue;
                    ServerBan(i, "Money Hack");
                    printf("SAMP money: %d", PMoney);
                    printf("Stats money: %d", Player[i][Money]);
                }
That is the part that checks for money in the anti-cheat.

Everytime someone buys a car or nos in the server it bans them for money hacks which is almost impossible due to this take money system:

pawn Код:
stock TakePlayerCash(playerid, value)
{
    if(playerid != INVALID_PLAYER_ID){
        GivePlayerMoney(playerid, -value);
        Player[playerid][Money] -= value;
    }
    return 1;
}
It first TAKES the money, THEN it updates the stats.

So it's impossible that it will be a ban :/

Can someone help?
Reply


Messages In This Thread
Anti-cheat help. - by Stefand - 24.08.2014, 08:29
Re: Anti-cheat help. - by AiRaLoKa - 24.08.2014, 09:24
Re: Anti-cheat help. - by Stefand - 24.08.2014, 09:25

Forum Jump:


Users browsing this thread: 1 Guest(s)