20.01.2011, 19:19
You don't need to use dini for that.
You can make it like this. (This is the simplest I could make)
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 );
}