Reading EVERYTHING from a file
#9

pawn Code:
public OnPlayerConnect(playerid)
{
    static string[MAX_PLAYER_NAME + 5];
    new File:archive = fopen("Kicked.txt", io_read);

    while(fread(archive, string)) {
        string[strlen(string)-2] = EOS; //remove \r\n form file

        if(!strfind(string, GetPlayerNick(playerid), true)) {
            Kick(playerid);
        }
    }
    fclose(archive);
    return 1;
}


GetPlayerNick(i)
{
    static nick[24];
    return GetPlayerName(i, nick, 24), nick;
}
Reply


Messages In This Thread
Reading EVERYTHING from a file - by Wesley221 - 10.09.2011, 13:59
Re: Reading EVERYTHING from a file - by Darnell - 10.09.2011, 14:12
Re: Reading EVERYTHING from a file - by Wesley221 - 10.09.2011, 14:16
Re: Reading EVERYTHING from a file - by Basicz - 10.09.2011, 14:18
Re: Reading EVERYTHING from a file - by Wesley221 - 10.09.2011, 14:21
Re: Reading EVERYTHING from a file - by Wesley221 - 10.09.2011, 16:36
Respuesta: Re: Reading EVERYTHING from a file - by OPremium - 10.09.2011, 17:39
Re: Reading EVERYTHING from a file - by Wesley221 - 10.09.2011, 17:44
Re: Reading EVERYTHING from a file - by [M]onsieur - 10.09.2011, 18:00
Re: Reading EVERYTHING from a file - by Sasino97 - 10.09.2011, 19:28

Forum Jump:


Users browsing this thread: 3 Guest(s)