@[LnD]JustMe.77 hier ist mal ein Beispiel
new File:log = fopen("command_log.txt", io_append);
new playername[24], logstring[256], hour, minute, second, day, month, year;
GetPlayerName(playerid, playername, 24);
getdate(year, month, day);
gettime(hour, minute, second);
format(logstring, sizeof(logstring), "[%02d.%02d.%d, %d:%d:%d] [CMD LOG]: << %s used %s >>\n", day, month, year, hour, minute, second, playername, cmdtext);
fwrite(log, logstring);
fclose(log);