04.07.2009, 17:01
Hey, I was wondering if it is possible to log every command a player types and place it into a log file.
So far, I've done:
To show where I put it
So far, I've done:
Код:
public Commands(string[])
{
new entry[256];
format(entry, sizeof(entry), "%s\r\n",string);
new File:hFile;
hFile = fopen("CRP_Scriptfiles/Logs/cmds.log", io_append);
fwrite(hFile, entry);
fclose(hFile);
}
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
new string[256];
new cmd[256];
new idx;
cmd = strtok(cmdtext, idx);
new tmp[256];
new giveplayerid;
if(gPlayerLogged[playerid] == 1)
Commands(string);
{
Код:
forward Commands(string[]);
Код:
forward Commands(string[]);

