12.10.2016, 20:32
So. Recently. I decided to make a basic command log, and for some reason it keeps outputting like this
Here's the code
Not sure if it has something to do with the way fwrite was made, or if I am just using it incorrectly.
Код:
UnholyBeast(0) has used the command /test.UnholyBeast(0) has used the command /test.
Код:
CMD:test(playerid, params[]) { new log_string[144]; format(log_string, sizeof(log_string), "%s(%d) has used the command /test.", PlayerName(playerid), playerid); SendCommandToLog(log_string); return 1; } stock SendCommandToLog(command_string[]) { new File:cmd_log = fopen("/server_files/command_log.txt", io_append); fwrite(cmd_log, command_string); fwrite(cmd_log, "\n"); fclose(cmd_log); return 1; }