[AYUDA]Como gaurdo numeros
#1

EL caso es que estoy guardando los numeros de telefono de los users en un .txt pero nose como hacer para guardaros uno detras de otro en fila para poder leerlos uno a uno

pawn Код:
stock CrearTelefono(playerid)
{
    new telefono = 100000 + random(899999);
    new string[64];
    new File:example = fopen("Telefonos.txt", io_read);
    if(example)
    {
        while(fread(example, string))
        {
            if(string[0] != telefono)
            {
                new INI:File = INI_Open(UserPath(playerid));
                INI_WriteInt(File, "Telefono", telefono);
                INI_Close(File);
                new string2[128];
                format(string2, sizeof(string2), "\r\n%d", telefono);
                new File:log = fopen("/Telefonos.txt", io_append);
                fwrite(log, string2);
                fclose(log);
            }
            else
            {
                CrearTelefono(playerid);
            }
        }
        fclose(example);
    }
    return 1;
}
Reply


Messages In This Thread
[AYUDA]Como gaurdo numeros - by chusothe41 - 02.09.2014, 22:05
Re: [AYUDA]Como gaurdo numeros - by Alvaro89 - 03.09.2014, 00:02
Re: [AYUDA]Como gaurdo numeros - by Alvaro89 - 03.09.2014, 00:06

Forum Jump:


Users browsing this thread: 1 Guest(s)