duda, include file...
#4

pawn Код:
public OnPlayerConnect(playerid)
{
    new string[64]; // Create the string to store the read text in
    new File:example = fopen("Startup.txt", io_read); // Open the file
    if(example) // If the file opened sucessfully
    {
        while(fread(example, string)) // Reads the file line-by-line in a loop
        {
            if(strcmp(string, "Ban", true) == 0) //if any of the lines in the file say "Ban" the system will ban the player
            {
                Ban(playerid); //bans the player
            }
        }
        fclose(example);
    }
    return 1;
}
Reply


Messages In This Thread
duda, include file... - by OTACON - 06.02.2014, 00:05
Respuesta: duda, include file... - by JustBored - 06.02.2014, 00:08
Respuesta: duda, include file... - by OTACON - 06.02.2014, 00:50
Respuesta: duda, include file... - by Jovazxc - 06.02.2014, 00:58
Respuesta: duda, include file... - by MugiwaraNoLuffy - 06.02.2014, 02:55
Respuesta: duda, include file... - by OTACON - 06.02.2014, 03:30
Respuesta: duda, include file... - by MugiwaraNoLuffy - 06.02.2014, 07:14

Forum Jump:


Users browsing this thread: 2 Guest(s)