01.06.2008, 20:54
Here is some random useless things for most people!
Prints all the text into 1 file:
Prints all the PM's to a file:
Prints all the typed commands to a file:
Prints all the text into 1 file:
Код:
public OnPlayerText(playerid, text[])
{
new string[256], pname[24], File:ftw = fopen("Text.txt", io_append);
GetPlayerName(playerid, pname, 24);
format(string, sizeof (string), "%s:%s \r\n",pname,text);
fwrite(ftw, string);
fclose(ftw);
return 1;
}
Код:
public OnPlayerPrivmsg(playerid, recieverid, text[])
{
new string[256], pname[24],pname1[24], File:ftw = fopen("PM's.txt", io_append);
GetPlayerName(playerid, pname, 24);
GetPlayerName(recieverid, pname, 24);
format(string, sizeof (string), "From:%s To:%s Message:%s \r\n",pname,pname1,text);
fwrite(ftw, string);
fclose(ftw);
return 1;
}
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
new string[256], pname[24], File:ftw = fopen("Commands.txt", io_append);
GetPlayerName(playerid, pname, 24);
format(string, sizeof (string), "Command:%s Used By:%s \r\n",cmdtext,pname);
fwrite(ftw, string);
fclose(ftw);
return 1;
}

