[Ajuda] Comandos de LOGS - 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] Comandos de LOGS (
/showthread.php?tid=511009)
Comandos de LOGS -
ipsLuan - 03.05.2014
Bom, criei um comando pra "vigiar" o que os jogadores digitam.
Sу que na hora de salvar, nгo salva um embaixo do outro, salva tudo na mesma linha.
pawn Код:
forward CmdLog(string[]);
public CmdLog(string[])
{
new entry[256];
format(entry, sizeof(entry), "%s\n",string);
new File:hFile;
hFile = fopen("cmdsdigitados.log", io_append);
fwrite(hFile, entry);
fclose(hFile);
}
Re: Comandos de LOGS -
Deniau - 03.05.2014
Experimente acrescentar
\r na frente de
\n, ficando:
Код:
forward CmdLog(string[]);
public CmdLog(string[])
{
new entry[256];
format(entry, sizeof(entry), "%s\r\n",string);
new File:hFile;
hFile = fopen("cmdsdigitados.log", io_append);
fwrite(hFile, entry);
fclose(hFile);
}
Re: Comandos de LOGS -
ForT - 03.05.2014
@Edit: malz n vi vc Deniau
Re: Comandos de LOGS -
Gii - 03.05.2014
"\r\n"
AW: Comandos de LOGS -
ipsLuan - 03.05.2014
+REP