Quote:
Originally Posted by Abreezy
I don't fully understand your problem/help request. What i think you said is, you want to see what a player types?
|
What don't you understand ? He's asking how to save what players typed as their answer and whatever they typed get saved to a notepad file (or some other editable text file).
Add this to the bottom of the script:
pawn Код:
forward SaveToFile(filename[],text[]);
public SaveToFile(filename[],text[])
{
#if defined SAVE_LOGS
new File:file, filepath[256], string[256], year,month,day, hour,minute,second;
getdate(year,month,day); gettime(hour,minute,second);
format(filepath,sizeof(filepath),"foldername/logs/%s.txt",filename);
file = fopen(filepath,io_append);
format(string,sizeof(string),"[%d.%d.%d %d:%d:%d] %s\r\n",day,month,year,hour,minute,second,text);
fwrite(file,string);
fclose(file);
#endif
return 1;
}
Change:
to where you want your logs/typed log to save to. You must create the custom file in scriptfiles, so it should be something like ...
ServerDirectory/scriptfiles/TypedLog.txt
When the notepad file (TypedLog) is created, the script will find this file when we use our custom SaveToFile function.
Under where the player types the questions, use SaveToFile("TypedLog",string); assuming string is what is being used to format your text when they type and TypedLog as the name of your notepad file.