Ban log
#1

Hello,I don't understand,why when players gets banned it nots addits to ban log.
My script:
Код:
forward BanLog(string[]);

public BanLog(string[])
{
    new entry[128];
    new banString[128];
    format(entry, sizeof(entry), "%s\n",banString);
    new File:hFile;
    hFile = fopen("/LOGS/bans.log", io_append);
    fwrite(hFile, entry);
    fclose(hFile);
}
// My anti armour
public ArmourCheck( )
{
    new Float:pArmour;
    new banString[128];
    for(new i=0; i<MAX_PLAYERS; i++)
    {
        if(!IsPlayerConnected(i)) continue;
        GetPlayerArmour(i, pArmour);
        if(pArmour > playerarmour[i])
        {
          new pname[200];
          new string[200];
          GetPlayerName(i, pname, sizeof(pname));
          format(banString, sizeof(banString),"-Server- %s has been banned from this server(Reason: Armour Hack)", pname);
          SendClientMessageToAll(COLOR_RED,banString);
          BanLog(banString);
          Ban(i);
        }
    }
}
Any help?

Also how to make that when system bans it addit to samp.ban file ?It only shows BANNED BY SYSTEM but not shows reason.
Reply
#2

no reply
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)