17.06.2012, 13:15
Here, what about this?
I made this function to log all cmd's but with a modification it should work.
Just add at OnPlayerConnect:
I made this function to log all cmd's but with a modification it should work.
pawn Код:
forward writecmdlog(text[]);
stock writecmdlog(text[])
{
new File:cmdlog = fopen("realityrp/logs/commands.txt", io_append);
fwrite(cmdlog, text);
fwrite(cmdlog, "\r\n");
fclose(cmdlog);
return 1;
}
pawn Код:
new year2, month2,day2;
new hour2,minuite2,second2;
getdate(year2, month2, day2);
gettime(hour2,minuite2,second2);
new string[128];
format(string, sizeof(string), "[%d:%d:%d][%d/%d] %s joined", hour2 + 2, minuite2, second2, day2, month2, name);
writecmdlog(string);