SA-MP Forums Archive
Listing e-mails - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Listing e-mails (/showthread.php?tid=171643)



Listing e-mails - armyoftwo - 27.08.2010

I use this code:
Код:
format(string, sizeof(string), "SELECT `Sender`,`EmailSubject`, `EmailBody` FROM email WHERE `SendingTo` = '%s'", GetUserName(playerid));
mysql_query(string);
mysql_store_result();
new Body[128] , Sender[24], EmailSubject2[64], line[256];
while(mysql_fetch_row_format(line,"|"))
{
    sscanf(line, "p<|>s[24]s[64]s[128]", Sender, EmailSubject2, Body);
    format(string, sizeof(string), "Subject: %s, Sender: %s, Body: %s", EmailSubject2, Sender, Body);
    SendClientMessage(playerid, COLOR_SYSTEM, string);
}
mysql_free_result();
Everything is alright , it sends the message correct but i want to make this to a dialog version
what shows all my emails.
How can i do that? I need to store all e-mails into one string and then show? if yes how?