[HELP] Time save with dini
#2

You don't need to use dini for that.

You can make it like this. (This is the simplest I could make)
pawn Код:
dcmd_savetime(playerid, params[])
{
    new hour, mins, secs;
    new string[12];
    gettime(hour, mins, secs);
    format(string, sizeof(string), "%d:%d:%d",hour, mins, secs);
    SaveTime(string);
    SendClientMessage(playerid, COLOR_RED, "Time saved!");
    return 1;
}
pawn Код:
stock SaveTime(string[])
{
    new entry[ 255 ];
    format( entry, sizeof( entry ), "%s\r\n", string );
    new File:hFile;
    hFile = fopen( "/SavedTimes.log", io_append );
    fwrite( hFile, entry );
    fclose( hFile );
}
Reply


Messages In This Thread
[HELP] Time save with dini - by buzifej - 20.01.2011, 18:48
Re: [HELP] Time save with dini - by Alex_Valde - 20.01.2011, 19:19
Re: [HELP] Time save with dini - by buzifej - 20.01.2011, 19:31

Forum Jump:


Users browsing this thread: 1 Guest(s)