29.12.2010, 09:02
pawn Код:
// Use stocks for functions, not callbacks (unless you're going to use a timer to call the callback)
stock BanLog(playerid, string[])
{
new Year, Month, Day;
getdate(Year, Month, Day);
new PlayerIP[16];
GetPlayerIp(playerid, PlayerIP, sizeof(PlayerIP));
new entry[256];
format(entry, sizeof(entry), "[%02d.%02d.%d] {%s} %s\r\n",Day, Month, Year, PlayerIP, string);
new File:hFile;
hFile = fopen(BAN_LOG, io_append);
fwrite(hFile, entry);
fclose(hFile);
}