File writing
#6

Quote:
Originally Posted by [GF]Sasino97
Посмотреть сообщение
pawn Код:
public OnPlayerText(playerid, text[])
{
  new string[128];
  new name[24];
  GetPlayerName(playerid, name, 24);
  new File:log = fopen(string, io_append);
  new hour, minute, second, year, month, day;
  gettime(hour, minute, second);
  getdate(year, month, day);
  format(string,sizeof(string), "[%d/%d/%d][%d:%d:%d]%s\r\n", day, month, year, hour, minute, second, text);
  fwrite(log, string);
  fclose(log);
  return 1;
}
But where do you define the file direction? Like "/Logs/Chat/%s.txt"?
Reply


Messages In This Thread
File writing - by sim_sima - 31.05.2011, 14:40
Re: File writing - by 0x5A656578 - 31.05.2011, 15:33
Re: File writing - by sim_sima - 31.05.2011, 15:38
Re: File writing - by sim_sima - 31.05.2011, 16:36
Re: File writing - by Sasino97 - 31.05.2011, 16:42
Re: File writing - by sim_sima - 31.05.2011, 16:47
Re: File writing - by Sasino97 - 31.05.2011, 16:50
Re: File writing - by sim_sima - 31.05.2011, 16:51
Re: File writing - by sim_sima - 31.05.2011, 16:54
Re: File writing - by Sasino97 - 31.05.2011, 16:54

Forum Jump:


Users browsing this thread: 1 Guest(s)