28.10.2016, 19:29
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.
it is suppost to show for example
ThatFag - Tier(online) if he is online
ThatFag - tier - if he is not online there will be no online tag
codes.
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.
it is suppost to show for example
ThatFag - Tier(online) if he is online
ThatFag - tier - if he is not online there will be no online tag
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; }