Retrieving one line from a player file.
#3

pawn Код:
new File:PlayerIP = fopen(LuckyGuy, io_read);
new string[MAX_PLAYER_NAME],len;
while((len = fread(PlayerIP, string)))
    if(strcmp(string, "IP = ", true)==0)
    {
        string[len-2] = 0;
        strdel(string,0,5);
        break; // stop searching
    }

fclose(PlayerIP);
format(LuckyGuy, sizeof(LuckyGuy), Ban_Path, string);
if(!fremove(LuckyGuy)) return SendClientMessage(playerid, COLOR_RED, "|-- Error: Account Deletion Failed!");
Reply


Messages In This Thread
Retrieving one line from a player file. - by Binx - 18.08.2013, 01:33
Re: Retrieving one line from a player file. - by Binx - 18.08.2013, 15:04
Re: Retrieving one line from a player file. - by Jefff - 18.08.2013, 18:02
Re: Retrieving one line from a player file. - by Binx - 18.08.2013, 18:17
Re: Retrieving one line from a player file. - by Jefff - 18.08.2013, 18:23
Re: Retrieving one line from a player file. - by Binx - 18.08.2013, 18:56
Re: Retrieving one line from a player file. - by avivelkayam - 18.08.2013, 19:04
Re: Retrieving one line from a player file. - by Ada32 - 18.08.2013, 19:19

Forum Jump:


Users browsing this thread: 1 Guest(s)