SA-MP Forums Archive
[FIXED]AntiCheat bug. - 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: [FIXED]AntiCheat bug. (/showthread.php?tid=149983)



[FIXED]AntiCheat bug. - [MWR]Blood - 24.05.2010

Fixed.


Re: AntiCheat bug. - Farsek - 24.05.2010

trying so
pawn Код:
forward anticheat(playerid);
public anticheat(playerid)
{
if(GetPlayerWeapon(playerid) == 38)
{
if(InDM[playerid]==1)
{
SendClientMessage(playerid,red,"");
}
else
{
Ban(playerid);
new string[256];
format(string,sizeof(string),"%s has been banned by Anticheat.(REASON: Using Minigun Hacks.)");
SendClientMessageToAll(red,string);
SendClientMessage(playerid,red,"You have been banned for cheating.Bye bye!");
}
}
return 1;
}
//And under OnGameModeInit:
SetTimer("anticheat",1000,1);



Re: AntiCheat bug. - [MWR]Blood - 24.05.2010

Quote:
Originally Posted by Seif_
pawn Код:
forward anticheat();
public anticheat()
{
    for(new i; i < MAX_PLAYERS; i++)
    {
        if (!IsPlayerConnected(i)) continue;
        if(InDM[playerid] != 1 && GetPlayerWeapon(playerid) == 38)
        {
            new string[128];
            GetPlayerName(playerid, string, MAX_PLAYER_NAME);
            format(string, sizeof string,"%s has been banned by Anticheat.(REASON: Using Minigun Hacks.)", string);
            SendClientMessageToAll(red,string);
            SendClientMessage(playerid,red,"You have been banned for cheating.Bye bye!");
            Ban(playerid);
            continue;
        }
    }
}
//And under OnGameModeInit:
SetTimer("anticheat",1000,1);
Thanks, it works perfectly now.