Dialog not showing
#1

I have this command /notifications which shows you all of your emails.
The command /notifications works, it shows your emails, but if you click one of you emails, nothing happens.
This is the command.
Код:
CMD:notifications(playerid,params[])
{
	if(IsPlayerConnected(playerid))
	{
		new string[10000],stringg[1000];
		new text[75], seen, ids;
		mysql_format(handle, stringg, sizeof(stringg), "SELECT * FROM email WHERE playerid = %d ORDER BY id DESC",playerVariables[playerid][pInternalID]);
		new Cache: result12 = mysql_query (handle, stringg);
		for ( new i, j = cache_get_row_count ( ); i != j; ++i )
		{
			cache_get_field_content_int(i, "id", ids);
			cache_get_field_content(i, "text", text);
			cache_get_field_content_int(i, "seen", seen);
			playerVariables[playerid][pSelectedMail] = ids;
			if(seen == 0)
			{
				format(string, sizeof(string), "%s\n[NECITIT] %s", string,text);
			}
			else
			{
				format(string, sizeof(string), "%s\n%s", string,text);
			}
		}
		cache_delete(result12);
		ShowPlayerDialog(playerid, 5000, DIALOG_STYLE_LIST, "Emails", string, "OK", "Close");
	}
	return 1;
}
And this is the OnDialogResponse.
Код:
case 5000:
		{
			if(response)
			{
				if(listitem >= 0)
				{
					new query[512], query2[512];
					new string[512];
					mysql_format(handle, query, sizeof(query), "SELECT * FROM email WHERE id = '%d'", playerVariables[playerid][pSelectedMail]);
					new Cache: result14 = mysql_query(handle, query);
					new ids, text[256], time[256];
					for ( new i, j = cache_get_row_count ( ); i != j; ++i )
					{
						cache_get_field_content_int(i, "id", ids);
						cache_get_field_content(i, "text", text);
						cache_get_field_content(i, "time", time);
						playerVariables[playerid][pSelectedMail] = ids;
						format(string, sizeof(string), "%s\n[%s]\n%s", string, time, text);
					}
					cache_delete(result14);
					ShowPlayerDialog(playerid, DIALOG_EMAIL2, DIALOG_STYLE_MSGBOX, "Emails", string, "Close", "");
					mysql_format(handle, query2, sizeof(query2), "UPDATE email SET seen = '1' WHERE id = '%d'", playerVariables[playerid][pSelectedMail]);
					mysql_tquery(handle, query2);
					playerVariables[playerid][pSelectedMail] = -1;
				}
			}
		}
I have everything defined, but it doesn't show up in game.
Reply


Messages In This Thread
Dialog not showing - by danielpalade - 26.03.2016, 22:21
Re: Dialog not showing - by czerwony03 - 26.03.2016, 23:11
Re: Dialog not showing - by danielpalade - 26.03.2016, 23:26
Re: Dialog not showing - by czerwony03 - 26.03.2016, 23:32
Re: Dialog not showing - by danielpalade - 27.03.2016, 01:36
Re: Dialog not showing - by AndySedeyn - 27.03.2016, 03:01

Forum Jump:


Users browsing this thread: 3 Guest(s)