hello.
i was trying to convert from message to the dialog now the problem is that the dialog shows only 1 name and no what is meant to show the whole list of members.
codes.
Код:
function:ShowAllMembers(playerid)
{
new rows, fields;
cache_get_data(rows, fields, MySQLPipeline);
if(rows)
{
for(new row = 0; row < rows; row++) //magic is happening!
{
new iMessage[MAX_STRING], iFormat[45], iGet[75], pName[MAX_PLAYER_NAME],wazzap[30];
if(IsPlayerConnected(GetPlayerId(pName)))
{
myStrcpy(wazzap,"(Online)");
}
cache_get_field_content(row, "PlayerName", pName, MySQLPipeline); // player is connected, skip it!
format(iFormat, sizeof(iFormat), " - %s", pName); strcat(iMessage, iFormat);
cache_get_field_content(row, "Tier", iGet, MySQLPipeline);
format(iFormat, sizeof(iFormat), "{6D81E5}(Tier: %d){17A501}%s\n%s",strval(iGet),wazzap,iFormat); strcat(iMessage, iFormat);
SendClientMessage(playerid, COLOR_GREY, iMessage);
ShowPlayerDialog(playerid,800,DIALOG_STYLE_LIST,"Members",iMessage,"Okay","");
}
}
return 1;
}