SA-MP Forums Archive
Anti cheat help - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Anti cheat help (/showthread.php?tid=209989)



Anti cheat help - darkknight123 - 12.01.2011

Im working on an anti cheat but it bans my admins -.- how do i make a whitelist? to where it wont ban them


Re: Anti cheat help - Infamous - 12.01.2011

Just check that the players you are banning are not admins using your releveant variable.


Re: Anti cheat help - blackwave - 12.01.2011

Ya. If it about weapons, add just the names you dont want:
pawn Код:
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
if(strcmp(name, "NAME_HERE", true)) return false; // 1 name example
// Other names
else... // Otherwise, will work normally
// Ban code.



Re: Anti cheat help - Tee - 12.01.2011

Best if you make your own admin system, (Some people think admin system is hard to make, i thought so but it is like making a gang team of a law team just admin team)

pawn Код:
public OnPlayerUpdate(playerid)
{
    new weps = GetPlayerWeapon(playerid);
    if(IsAdmin[playerid] != 1)//Substitute this for your variable you use to check if the player is admin.
    {
        if(weps == 35 || weps == 36 || weps == 37 || weps == 38 || weps == 39 || weps == 40 || weps == 44 || weps == 45)//All these are some of the weapons you will want to ban for.
        {
            GetPlayerName(playerid,Name,sizeof(Name));
            format(String,sizeof(String),"%s has been banned from the server. Reason: Weapon Hacks.",Name);
            SendClientMessageToAll(0xFF0000FF,String);
            Ban(playerid);
        }
        return 1;
    }
}