Banned logs
#1

Hi,How to make a banned logs? like dis


IngameName:
Banned By:
Banned On:
Reason:
Reply
#2

pawn Код:
forward BanLog(string[]);
public BanLog(string[])
{
    new entry[256];
    format(entry, sizeof(entry), "%s\r\n",string);
    new File:hFile;
    hFile = fopen("Ban.log", io_append);
    if (hFile)
    {
    fwrite(hFile, entry);
    fclose(hFile);
    }
}
use the BanLog(string) when you ban a player, and the info will be written in Ban.log file
Reply
#3

Do it say ?

IngameName:
Banned By:
Banned On:
Reason:


+ i don't see my ban logs
Reply
#4

use this lol,
pawn Код:
...//your cmd
format(string,sizeof(string),"IngameName:%s\n,Banned By:%s\nBanned ON:%s"...
BanLog(string)
Reply
#5

Quote:
Originally Posted by mineralo
Посмотреть сообщение
pawn Код:
forward BanLog(string[]);
public BanLog(string[])
{
    new entry[256];
    format(entry, sizeof(entry), "%s\r\n",string);
    new File:hFile;
    hFile = fopen("Ban.log", io_append);
    if (hFile)
    {
    fwrite(hFile, entry);
    fclose(hFile);
    }
}
use the BanLog(string) when you ban a player, and the info will be written in Ban.log file
you do know there are good ini file systems that makes this job easier right?
Reply
#6

just gave an exemple, now he could choose in what system to work its not my problem
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)