[AYUDA]Como gaurdo numeros - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: Non-English (
https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (
https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Español/Spanish (
https://sampforum.blast.hk/forumdisplay.php?fid=29)
+---- Thread: [AYUDA]Como gaurdo numeros (
/showthread.php?tid=535288)
[AYUDA]Como gaurdo numeros -
chusothe41 - 02.09.2014
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;
}
Re: [AYUDA]Como gaurdo numeros -
Alvaro89 - 03.09.2014
"%s\r\n"
Re: [AYUDA]Como gaurdo numeros -
Alvaro89 - 03.09.2014
Asi
https://sampwiki.blast.hk/wiki/File_Functions