06.12.2015, 15:02
Alright the problem is simple, it wont insert every message sent, it tends to save 1 message once and then no response
Destination, opening OnGameModeInit
Closing the log OnGameModeExit
PHP код:
public IC_ChatLog(LogString[]) {
new entry[128],Year, Month, Day, Hour, Minute, Second;
getdate(Year, Month, Day);
gettime(Hour, Minute, Second);
format(entry, sizeof(entry), "\r\n[%02d/%02d/%d][%02d:%02d:%02d]%s",Day,Month,Year, Hour, Minute, Second,LogString);
fwrite(ICChatLogFile,entry);
return true;
}
OnPlayerText
format(message, sizeof(message), "%s says: %s", GetRoleplayName(playerid), text);
IC_ChatLog(message);
pawn Код:
ICChatLogFile = fopen("Logs/Chat/InCharacter.log",io_append);
Closing the log OnGameModeExit
pawn Код:
fclose(ICChatLogFile);