10.10.2015, 12:32
It's not showing the last character of the command, is this known or...?
For example when I use the command /a -> admin chat, it will log it as '/'
Is there a way around this, or?
PHP код:
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
if(!success) return SendClientMessage(playerid, COLOR_WHITE, INVALID_CMD);
new commandFile[128], d, m, y;
getdate(y, m, d);
format(commandFile, sizeof(commandFile), "Command-logs/Command-logs-%02d-%02d-%d.log", d, m, y);
new File:cmdlog = fopen(commandFile, io_readwrite);
if(cmdlog)
{
new str[156];
format(str, sizeof(str), "%s - %s, %s\n",TimeDate(), PlayerName(playerid), cmdtext);
printf("%s", str);
fwrite(cmdlog, str);
fclose(cmdlog);
}
return 1;
}
Is there a way around this, or?