SA-MP Forums Archive
[Ajuda] Como carregar arquivos txt - 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: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] Como carregar arquivos txt (/showthread.php?tid=532020)



Como carregar arquivos txt - Spectral - 16.08.2014

Como faзo para meu gamemode carregar as propriedades .txt que vem na pasta scriptfiles do server samp?


Re: Como carregar arquivos txt - Schocc - 16.08.2014

Use a funзгo fread.

pawn Код:
public OnGameModeInit()
{
    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 it opened successfully
    {
        fread(example, string); // Read a line from the file and store it in 'string'
        fclose(example); // Close the file
        print(string); // Print what was read
    }
    return 1;
}
Mas o que vocк exatamente quer ler ?


Re: Como carregar arquivos txt - zSuYaNw - 16.08.2014

filterscripts/gl_property.amx

й o FS para Rodar esses arquivos.