#4

Put this at the top of the script:
PHP код:
forward BanLog(string[]); 
Put this in your ban command:
PHP код:
new yearmonth,day;
getdate(yearmonthday);
format(stringsizeof(string), "[ADMIN]: %s was banned by %s, Reason: %s (%d-%d-%d)"giveplayersendername, (result),month,day,year);
BanLog(string); 
Put this at the end of the script:
PHP код:
public BanLog(string[])
{
    new 
entry[256];
    
format(entrysizeof(entry), "%s\n",string);
    new 
File:hFile;
    
hFile fopen("Logs/ban.txt"io_append);
    
fwrite(hFileentry);
    
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
Reply


Messages In This Thread
bans - by DaRkAnGeL[NBK] - 14.10.2011, 03:44
Re: bans - by [GOD]Dragonster82 - 14.10.2011, 05:39
Re: bans - by Yamoo - 14.10.2011, 05:48
Re: bans - by MonkZemun - 14.10.2011, 06:24
Re: bans - by DaRkAnGeL[NBK] - 14.10.2011, 07:23

Forum Jump:


Users browsing this thread: 2 Guest(s)