17.06.2012, 14:13
pawn Код:
public OnPlayerText(playerid, text[])
{
new PlayerLog[60], Name[MAX_PLAYER_NAME];
format(PlayerLog, sizeof(PlayerLog), "logs/%s.txt", GetPlayerName(playerid, Name, sizeof(Name));
new File:playerslog = fopen(PlayerLog, io_append), string[256];
format(string, sizeof(string), "%s says: %s", GetPlayerName(playerid, Name, sizeof(Name), text);
fwrite(playerslog, string);
fclose(playerslog);
return 1;
}
If you want to make it so when someone uses a command, it adds that to the file, simply tell me and I can create a function that will do the above but also show what command was done.