Put this at the top of the script:
PHP код:
forward BanLog(string[]);
Put this in your ban command:
PHP код:
new year, month,day;
getdate(year, month, day);
format(string, sizeof(string), "[ADMIN]: %s was banned by %s, Reason: %s (%d-%d-%d)", giveplayer, sendername, (result),month,day,year);
BanLog(string);
Put this at the end of the script:
PHP код:
public BanLog(string[])
{
new entry[256];
format(entry, sizeof(entry), "%s\n",string);
new File:hFile;
hFile = fopen("Logs/ban.txt", io_append);
fwrite(hFile, entry);
fclose(hFile);
}
You must create new folder in your scriptfiles called Logs and in that folder create Text Document.txt and rename it to ban.txt ..thats it