20.09.2011, 09:07
ShowPlayerDialog(playerid,1,DIALOG_STYLE_INPUT,"Fe ed back","Please write your feed back:","Send","Cancel");
How to save feed backs ?
How to save feed backs ?
stock SendFeedback(playerid, text[])
{
new
File:lFile = fopen("Feedback.txt", io_append), /* change this to your folder where you want to save the feedback */
logData[150],
fyear, fmonth, fday,
fhour, fminute, fsecond;
getdate(fyear, fmonth, fday);
gettime(fhour, fminute, fsecond);
format(logData, sizeof(logData),"[%02d/%02d/%04d %02d:%02d:%02d] %s: %s \r\n", fday, fmonth, fyear, fhour, fminute, fsecond, GetName(playerid), text);
fwrite(lFile, logData);
fclose(lFile);
return 1;
}
stock GetName(playerid)
{
new Name[24];
GetPlayerName(playerid, Name, 24);
return Name;
}
// usage:
SendFeedback(playerid, inputtext)