[HELP] Problems with a log
#8

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);
}
What you do is that you simply replace the "playerid" parameter in the code by "i" when calling the function
Reply


Messages In This Thread
[HELP] Problems with a log - by Larsey123IsMe - 29.12.2010, 06:03
Re: [HELP] Problems with a log - by Joe Staff - 29.12.2010, 06:05
Re: [HELP] Problems with a log - by Larsey123IsMe - 29.12.2010, 06:25
AW: [HELP] Problems with a log - by Extremo - 29.12.2010, 06:54
Re: [HELP] Problems with a log - by Larsey123IsMe - 29.12.2010, 07:17
Re: [HELP] Problems with a log - by Mean - 29.12.2010, 08:17
Re: [HELP] Problems with a log - by Larsey123IsMe - 29.12.2010, 08:54
Re: [HELP] Problems with a log - by [03]Garsino - 29.12.2010, 09:02
Re: [HELP] Problems with a log - by Larsey123IsMe - 29.12.2010, 09:18

Forum Jump:


Users browsing this thread: 1 Guest(s)