[BUG] samp.ban not creating new line.
#2

pawn Код:
/r/n
Atleast I thought. and make sure your using IO_APPEND not IO_WRITE in the FILE native unless your using another system ( likely ) in which case use the proper one. ( search the include for it. )


Here is an example of how I log things on my personal gamemode, don't even care how slow you guys claim it is compared to X method.

pawn Код:
public OnRconLoginAttempt(ip[], password[], success)
{
    for(new i=0; i<MAX_PLAYERS; i++)
        {
        new PlayerIP[16];
        GetPlayerIp(i,PlayerIP,16);

        if(!strcmp(ip,PlayerIP,false))
            {
                new ban[100],Player[24];
               
                GetPlayerName(i,Player,24);
                format(ban,sizeof(ban),"{FF0000}[BAN]{FFFFFF}: %s tried to fuck with teh RCONz, They got banned!",Player);
                SendClientMessageToAll(0xffffff,ban);
                Ban(i);
               
                format(ban,sizeof(ban),"%s - %s has been Automatically banned for: RCON Attempt\r\n",Player,ip);
                new File:banlog = fopen("bans.txt", io_append);
                fwrite(banlog,ban);
                fclose(banlog);
                return 1;
            }
        }
    return 1;
}
I actually presume your problem is the fact your using a forward slash not a backslash
Reply


Messages In This Thread
[BUG] samp.ban not creating new line. - by Camacorn - 20.12.2011, 04:47
Re: [BUG] samp.ban not creating new line. - by Hoborific - 20.12.2011, 04:55
Re: [BUG] samp.ban not creating new line. - by Camacorn - 20.12.2011, 05:05
Re: [BUG] samp.ban not creating new line. - by Hoborific - 20.12.2011, 05:06
Re: [BUG] samp.ban not creating new line. - by Camacorn - 20.12.2011, 05:08
Re: [BUG] samp.ban not creating new line. - by [ABK]Antonio - 20.12.2011, 05:10
Re: [BUG] samp.ban not creating new line. - by cessil - 20.12.2011, 05:10
Re: [BUG] samp.ban not creating new line. - by Hoborific - 20.12.2011, 05:10
Re: [BUG] samp.ban not creating new line. - by Thresholdold - 20.12.2011, 11:37
Re: [BUG] samp.ban not creating new line. - by Thresholdold - 20.12.2011, 11:42
Re: [BUG] samp.ban not creating new line. - by Scenario - 20.12.2011, 12:12

Forum Jump:


Users browsing this thread: 2 Guest(s)