11.05.2013, 18:27
Everytime i go in-game and try to send any message, the message is not sent and my server crashes.
Here's the lines:
[/pawn]
Here's the lines:
pawn Код:
public OnPlayerText(playerid, text[])
{
new File:fi_log;
fi_log = fopen("scriptfiles/Admin/Logs/Chatlog.txt", io_append);
new string[256], day, year, month, hour, minute, second;
getdate(year, month, day); gettime(hour, minute, second);
format(string, sizeof(string), "|[%d/%d/%d - %d:%d:%d]|%s|\r\n", day, month, year, hour, minute, second, text);
fwrite(fi_log, string);
fclose(fi_log);
pawn Код:
public Chatlog(text[])
{
new File:fi_log;
fi_log = fopen("scriptfiles/Admin/Logs/Chatlog.txt", io_append);
new string[256], day, year, month, hour, minute, second;
getdate(year, month, day); gettime(hour, minute, second);
format(string, sizeof(string), "|[%d/%d/%d - %d:%d:%d]|%s|\r\n", day, month, year, hour, minute, second, text);
fwrite(fi_log, string);
fclose(fi_log);
return 1;
}