ShowPlayerDialog Bug
#1

This command:

Код:
CMD:checkhelpers(playerid, params[])
{
	if(playerVariables[playerid][pAdminLevel] >= 5)
	{
        new aim[1500];
        format(aim, 256,"Level - Name\tHelped Players\tLast Login\tDays\n");
        new memid;
        new stringg[256];
        mysql_format(handle, stringg, sizeof(stringg), "SELECT * FROM `playeraccounts` WHERE `playerHelperLevel` >= 1 ORDER BY playerHelperLevel DESC");
        new test[256], query[256], test3[256], days[256], helps[256];
        new Cache: result12 = mysql_query (handle, stringg);
        for ( new i, j = cache_get_row_count ( ); i != j; ++i )
        {
            cache_get_field_content(i, "playerName", query);
            format(Selected[memid][snume],24, query);
            cache_get_field_content(i, "playerHelperLevel", test);
            cache_get_field_content(i, "playerLastLogin", test3);
            cache_get_field_content(i, "playerHelperDays", days);
			cache_get_field_content(i, "playerHelpedPlayers", helps);
            new id = GetPlayerID(Selected[memid][snume]);
            if(id != INVALID_PLAYER_ID)
            {
                format(aim, sizeof(aim), "%s(%s)  %s\t%s\t{08EB00}online right now{FFFFFF}\t%s\n",aim,test, query, helps, days);
            }
            else
            {
                format(aim, sizeof(aim), "%s(%s)  %s\t%s\t{FF0000}%s{FFFFFF}\t%s\n",aim,test,query, helps, test3, days);
            }
            memid ++;
        }
        cache_delete(result12);
        ShowPlayerDialog(playerid, DIALOG_HELPERS, DIALOG_STYLE_TABLIST_HEADERS,"Helpers:",aim,"Select","Cancel");
	}
	else return SendClientMessage(playerid, -1, AdminOnly);
	return 1;
}
Should show me a dialog with all the helpers from the database.
It does. Now when I select a helper from the list, it should send me to a different dialog.
That doesn't work.

This is my OnDialogResponse

Код:
case DIALOG_HELPERS:
		{
			if(response)
			{
				if(listitem >= 1)
				{
					new item = listitem;
					format(playerVariables[playerid][pSelected], MAX_PLAYER_NAME, "%s",Selected[item][snume]);
					ShowPlayerDialog(playerid, DIALOG_HELPERS2, DIALOG_STYLE_LIST, "Select an action", "Uninvite\nChangerank\nFwarn", "Go", "Cancel");
				}
				else
				{
					SendClientMessage(playerid, COLOR_GREY, "You can't click on this item.");
				}
			}
		}
These are my defines.

Код:
#define DIALOG_HELPERS	84176
#define DIALOG_HELPERS2 81848
Reply
#2

Check if the dialog s have the same defines.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)