AntiCheat problem
#1

Hi all,i maked this small AC:

Код:
public AntiCheat()
{
    new weap, ammo;
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
            GetPlayerWeaponData(i, 7, weap, ammo);
            if(weap == 38)
            {
                new string [128];
                new pName[MAX_PLAYER_NAME];
                GetPlayerName(i, pName, sizeof(pName));
                format(string, sizeof(string), "%s has been auto-banned. - Reason: Minigun with %d ammo.", pName,ammo);
                SendClientMessageToAll(COLOR_RED, string);
                BanLog(string);
                new str[100];
   	            format(str,sizeof str,"0,4%s has been auto-banned. - Reason: Minigun with %d ammo.", pName,ammo);
   	   	        IRC_GroupSay(gGroupID, IRC_CHANNEL, str);
                BanEx(i, "AntiCheat - Minigun");
                break;
            }
            GetPlayerWeaponData(i, 7, weap, ammo);
            if(weap == 35)
            {
                new string [128];
                new pName[MAX_PLAYER_NAME];
                GetPlayerName(i, pName, sizeof(pName));
                format(string, sizeof(string), "%s has been auto-banned. - Reason: Rocket Launcher with %d ammo. -", pName,ammo);
                SendClientMessageToAll(0xFF0000FF, string);
                BanLog(string);
                new str[100];
                format(str,sizeof str,"0,4%s banned for having a rocket launcher (RPG) with %d ammo.",pName,ammo);
                IRC_GroupSay(gGroupID, IRC_CHANNEL, str);
                BanEx(i, "AntiCheat - Rocket Launcher");
                break;
            }
        }
    }
    return 1;
}
The code working good,i need to add only message like:

"You have been banned by Anticheat"

How?
Reply
#2

Before the ban.

pawn Код:
SendClientMessage(i, color, "You have been banned by the Anti-Cheat!");
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)