#10

If you want it on connect:
pawn Код:
forward KickLog(string[]);
public IpLog(string[])
{
     new entry[256];
    format(entry, sizeof(entry), "%s\r\n",string);
    new File:hFile;
    hFile = fopen("ip.log", io_append);
    if (hFile){
        fwrite(hFile, entry);
        fclose(hFile);
    }
}

public OnPlayerConnect(playerid)
{
    new string[100], pName[24], pIp[20];
    GetPlayerName(playerid, pName, sizeof(pName));
    GetPlayerIp(playerid, pIp, sizeof(pIp));
    format(string, sizeof(string), "%s - %s \n", pIp, pName);
    IpLog(string);
    return 1;
}
Reply


Messages In This Thread
IP - by [TouchX]Ash - 16.06.2009, 17:12
Re: IP - by Karlip - 16.06.2009, 17:15
Re: IP - by kaisersouse - 16.06.2009, 17:16
Re: IP - by [TouchX]Ash - 16.06.2009, 17:37
Re: IP - by Karlip - 16.06.2009, 17:39
Re: IP - by kaisersouse - 16.06.2009, 17:46
Re: IP - by [TouchX]Ash - 16.06.2009, 18:02
Re: IP - by SpiderPork - 16.06.2009, 18:06
Re: IP - by [TouchX]Ash - 16.06.2009, 18:10
Re: IP - by Karlip - 16.06.2009, 18:20

Forum Jump:


Users browsing this thread: 3 Guest(s)