Stock does'nt work correct...
#9

pawn Код:
new printx_array[256]; //that is suppost to be above the first function
#define PrintX(%1) (format(printx_array, sizeof(printx_array), %1), print(printx_array), Log(printx_array))
pawn Код:
public OnPlayerSpawn(playerid)
{
    PrintX("Lol? (ID %d)", playerid);
}
pawn Код:
stock Log(text[])
{
    new
        Hour,
        Minute,
        Second,
        Year,
        Month,
        Day,
        temp[256],
        File:Log;
    getdate(Year, Month, Day), gettime(Hour, Minute, Second);
    format(temp, sizeof(temp), "Server/Log/%02d-%02d-%04d.txt", Day, Month, Year);
    if(!fexist(temp)) Log = fopen(temp, io_write); else Log = fopen(temp, io_append);
    format(temp, sizeof(temp), "[%02d:%02d:%02d] %s\r\n", Hour, Minute, Second, text);
    fwrite(Log, temp), fclose(Log);
    return true;
}
Reply


Messages In This Thread
Stock does'nt work correct... - by Remi-X - 19.06.2009, 13:32
Re: Stock does'nt work correct... - by Correlli - 19.06.2009, 13:58
Re: Stock does'nt work correct... - by Remi-X - 19.06.2009, 14:04
Re: Stock does'nt work correct... - by Remcconen - 19.06.2009, 14:38
Re: Stock does'nt work correct... - by Remi-X - 19.06.2009, 14:54
Re: Stock does'nt work correct... - by yezizhu - 19.06.2009, 15:16
Re: Stock does'nt work correct... - by Remi-X - 19.06.2009, 15:28
Re: Stock does'nt work correct... - by yezizhu - 19.06.2009, 16:04
Re: Stock does'nt work correct... - by Nero_3D - 19.06.2009, 16:26
Re: Stock does'nt work correct... - by Remi-X - 19.06.2009, 16:50

Forum Jump:


Users browsing this thread: 2 Guest(s)