[Pedido] Salvar tudo oque os players digitarem
#10

Consegui usando assim:

Код:
        //OnPlayerText
	format(string, sizeof(string), "%s: %s.", getPName(playerid), text);
	WriteLog("chat", string);

        //OnPlayerCommandPerformed
	format(string, sizeof(string), "%s: %s.", getPName(playerid), cmdtext);
	WriteLog("cmds", string);
//
stock WriteLog(filename[],text[])
{
	printf(text);
	new File:file;
	new filepath[256], string[128], year,day,month, hour,minute,second;
	getdate(year,day,month); gettime(hour,minute,second);
	format(filepath,sizeof(filepath),"FV/logs/%s.log",filename);
	file = fopen(filepath,io_append);
	format(string,sizeof(string),"[%02d/%02d/%d|%02d:%02d:%02d] %s\r\n",day,month,year,hour,minute,second,text);
	fwrite(file,string);
	fclose(file);
	return 1;
}
Reply


Messages In This Thread
Salvar tudo oque os players digitarem - by _Play_ - 20.03.2015, 17:41
Re: Salvar tudo oque os players digitarem - by #Luca[S]. - 20.03.2015, 17:41
Re: Salvar tudo oque os players digitarem - by _Play_ - 20.03.2015, 17:49
Re: Salvar tudo oque os players digitarem - by #Luca[S]. - 20.03.2015, 17:50
Re: Salvar tudo oque os players digitarem - by _Play_ - 20.03.2015, 18:26
Re: Salvar tudo oque os players digitarem - by Lуs - 20.03.2015, 18:30
Re: Salvar tudo oque os players digitarem - by Dayvison_ - 20.03.2015, 19:05
Re: Salvar tudo oque os players digitarem - by #Luca[S]. - 20.03.2015, 19:12
Re: Salvar tudo oque os players digitarem - by Dayvison_ - 20.03.2015, 19:14
Re: Salvar tudo oque os players digitarem - by _Play_ - 20.03.2015, 19:16

Forum Jump:


Users browsing this thread: 2 Guest(s)