[Ajuda] Escrever linha em .cfg
#3

Use as funзхes padrхes de manipulaзгo de arquivos, como as funзхes fopen e fwrite .



Considerando playerid como o ID do jogador comprador, este cуdigo, por exemplo, geraria uma nova linha de informaзхes, contendo o nome do jogador, no arquivo de caminho scriptfiles\Configs\Carros.cfg :


pawn Код:
new NomeJogador[25];
GetPlayerName(playerid, NomeJogador, 25);
new Linha[128];
format(Linha, 128, "\n550,1594.955200,-1009.990722,23.611700,185.221496,0,1,%s,Concessionaria,238800,,1,0,8", NomeJogador);
new File:Arquivo;
Arquivo = fopen("Configs/Carros.cfg", io_append);
fwrite(Arquivo, Linha);
fclose(Arquivo);


Espero ter ajudado .
Reply


Messages In This Thread
Escrever linha em .cfg - by caroninguem123 - 23.04.2014, 17:06
Re: Escrever linha em .cfg - by caroninguem123 - 23.04.2014, 19:41
Re: Escrever linha em .cfg - by rjjj - 24.04.2014, 00:33
Re: Escrever linha em .cfg - by caroninguem123 - 24.04.2014, 11:27
Re: Escrever linha em .cfg - by yiakin - 24.04.2014, 14:28
Re: Escrever linha em .cfg - by caroninguem123 - 24.04.2014, 21:17
Re: Escrever linha em .cfg - by yiakin - 24.04.2014, 21:50
Re: Escrever linha em .cfg - by caroninguem123 - 25.04.2014, 09:04
Re: Escrever linha em .cfg - by gmstrikker - 25.04.2014, 21:27

Forum Jump:


Users browsing this thread: 1 Guest(s)