armour hack anti cheat ain't working.
#1

Ok so i havn't scripted in a while and encountered a new problem in my server when coding.

Here is my code.
pawn Код:
forward ahack1(playerid);
public ahack1(playerid)
{
    new Float:armour;
    armour = GetPlayerArmour(playerid, armour);
    if(armour > 1 && PlayerInfo[playerid][pAllowedArmour] < 1)
    {
        new string[200];
        format(string,sizeof(string),"You appear to be armour hacking reseting armour");
        new string1[200];
        new pname[MAX_PLAYER_NAME]; //the name of player two (the reported)
        GetPlayerName(playerid,pname,sizeof(pname)); //get (receive) the player's name for the first
        format(string1,sizeof(string1),"%s appear's to be armour hacking [Dosn't have armour rights]",pname);
        GameTextForPlayer(playerid, string, 1000, 0);
        SendMessageToAdmins(COLOR_WHITE,string1); //we'll talk about that later
        SetPlayerArmour(playerid, 0);
    }
    return 1;
}
Ok so if a player has more than 1 armour and if not allowed is less than 1 its ment to do that script but it isn't. If i chane the line from this if(armour > 1 && PlayerInfo[playerid][pAllowedArmour] < 1) //and his level gotta be at least 1 (or higher) to this if(armour > 0 && PlayerInfo[playerid][pAllowedArmour] < 1) //and his level gotta be at least 1 (or higher) it spams the server. But if its the first one it dosn't do what its ment to.
Reply
#2

When are you modifying PlayerInfo[playerid][pAllowedArmour] ?

Also,
Try this
if(armour > PlayerInfo[playerid][pAllowedArmour] +5) //+5 is optional for lag compensation
Reply
#3

Check this out... https://sampforum.blast.hk/showthread.php?tid=220089
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)