SA-MP Forums Archive
Please help with feed back - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Please help with feed back (/showthread.php?tid=284666)



Please help with feed back - MA_proking - 20.09.2011

ShowPlayerDialog(playerid,1,DIALOG_STYLE_INPUT,"Fe ed back","Please write your feed back:","Send","Cancel");

How to save feed backs ?


Re: Please help with feed back - Wesley221 - 20.09.2011

pawn Код:
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)