15.10.2015, 09:26
Hi, i'am back to script and i'am trying to make a IC email system, when you type /email you got a list of your emails, so this is the script when email loading :
The problem is that i want to make the dialog when player choice one of the email (how to check which email have choose it's will show him the text "EmailText") on the dialog list, but i don't have idea to make this, i need a small help, Thx.
PHP код:
public OnEmailFind(playerid)
{
new emailtitle[50], emailsender[50], string[1024], emailstatus;
new rows = cache_num_rows();
if(rows)
{
new loaded;
for (loaded = 0; loaded != rows; ++loaded)
{
cache_get_field_content(loaded, "Sender", emailsender, 50);
cache_get_field_content(loaded, "Title", emailtitle, 255);
emailstatus = cache_get_field_content_int(loaded, "Status");
pInfo[playerid][pEmailChoice] = rows;
if(emailstatus == 1) format(string, sizeof(string), "%s "COL_RED" Title : %s - Sender : %s\n", string, emailtitle, emailsender);
else format(string, sizeof(string), "%s "COL_WHITE" Title : %s - Sender : %s\n", string, emailtitle, emailsender);
}
Dialog_Show(playerid, DialogEmail, DIALOG_STYLE_TABLIST, pInfo[playerid][pICEmail], string, "Select", "Close");
}
else return Server(playerid, "You don't have any email.");
return 1;
}