Log system
#2

This should work

pawn Код:
format(string, sizeof(string), "%s has been kicked by Admin %s. Reason: %s", playername, adminname, reason);
AdminLog(string);
pawn Код:
stock AdminLog(string[])
{
    new LogString[150], YEAR_string[5], Year, Month, Day, Hour, Minute, Second;
    new File:AdminLog = fopen("admin_log.txt", io_append);
    getdate(Year, Month, Day);
    gettime(Hour, Minute, Second);
    format(YEAR_string, sizeof(YEAR_string), "%d", Year);
    strdel(YEAR_string, 0, 2);
    format(LogString, sizeof(LogString), "[%d/%d/%s | %d:%d] %s", Day, Month, YEAR_string, Hour, Minute, string);
    fwrite(AdminLog, LogString);
    fwrite(AdminLog, "\r\n");
    return fclose(AdminLog);
}
Reply


Messages In This Thread
Log system - by Kingunit - 02.08.2011, 02:11
Re: Log system - by Laronic - 02.08.2011, 02:19
Re: Log system - by =WoR=Varth - 02.08.2011, 02:20
Re: Log system - by Kingunit - 02.08.2011, 02:24
Re: Log system - by PGTips - 02.08.2011, 02:30
Re: Log system - by Kingunit - 02.08.2011, 02:30
Re: Log system - by Kingunit - 02.08.2011, 02:34
Re: Log system - by Famalamalam - 02.08.2011, 02:36
Re: Log system - by PGTips - 02.08.2011, 02:39
Re: Log system - by Famalamalam - 02.08.2011, 02:43
Re: Log system - by Kingunit - 02.08.2011, 02:50
Re: Log system - by Famalamalam - 02.08.2011, 02:52

Forum Jump:


Users browsing this thread: 2 Guest(s)