04.01.2014, 05:30
(
Последний раз редактировалось nmader; 04.01.2014 в 09:17.
)
Hello there once again,
I am rather new to messing around with MySQL. I am currently trying to make a members dialog, including players who are both online and offline; however I am confusing myself with trying. This is what I have, it only reads my information when I am online.
I am rather new to messing around with MySQL. I am currently trying to make a members dialog, including players who are both online and offline; however I am confusing myself with trying. This is what I have, it only reads my information when I am online.
pawn Код:
case 7:
{
new shown, x;
for(new i=0; i < MAX_PLAYERS; i++)
{
if(pInfo[i][pFaction] == 1)
{
mysql_query("SELECT `playerInternalID` WHERE `playerFaction` = '1'");
mysql_store_result();
while(mysql_retrieve_row())
{
mysql_get_field("playerInternalID", result);
x = strval(result);
}
switch(pInfo[x][pFactionRank])
{
case 0: format(memberstring, sizeof(memberstring), "%s\nSuspended (%s) %s", memberstring, pInfo[x][pCustomRank], RPName(x));
case 1: format(memberstring, sizeof(memberstring), "%s\n%s (%s) %s", memberstring, fInfo[pInfo[x][pFaction]][fRankName1], pInfo[x][pCustomRank], RPName(x));
case 2: format(memberstring, sizeof(memberstring), "%s\n%s (%s) %s", memberstring, fInfo[pInfo[x][pFaction]][fRankName2], pInfo[x][pCustomRank], RPName(x));
case 3: format(memberstring, sizeof(memberstring), "%s\n%s (%s) %s", memberstring, fInfo[pInfo[x][pFaction]][fRankName3], pInfo[x][pCustomRank], RPName(x));
case 4: format(memberstring, sizeof(memberstring), "%s\n%s (%s) %s", memberstring, fInfo[pInfo[x][pFaction]][fRankName4], pInfo[x][pCustomRank], RPName(x));
case 5: format(memberstring, sizeof(memberstring), "%s\n%s (%s) %s", memberstring, fInfo[pInfo[x][pFaction]][fRankName5], pInfo[x][pCustomRank], RPName(x));
case 6: format(memberstring, sizeof(memberstring), "%s\n%s (%s) %s", memberstring, fInfo[pInfo[x][pFaction]][fRankName6], pInfo[x][pCustomRank], RPName(x));
case 7: format(memberstring, sizeof(memberstring), "%s\n%s (%s) %s", memberstring, fInfo[pInfo[x][pFaction]][fRankName7], pInfo[x][pCustomRank], RPName(x));
case 8: format(memberstring, sizeof(memberstring), "%s\n%s (%s) %s", memberstring, fInfo[pInfo[x][pFaction]][fRankName8], pInfo[x][pCustomRank], RPName(x));
case 9: format(memberstring, sizeof(memberstring), "%s\n%s (%s) %s", memberstring, fInfo[pInfo[x][pFaction]][fRankName9], pInfo[x][pCustomRank], RPName(x));
case 10: format(memberstring, sizeof(memberstring), "%s\n%s (%s) %s", memberstring, fInfo[pInfo[x][pFaction]][fRankName10], pInfo[x][pCustomRank], RPName(pID));
}
shown++;
if(shown == 12)
{
format(memberstring, sizeof(memberstring), "%s\nNext Page", memberstring);
break;
}
ShowPlayerDialog(playerid, DIALOG_MDC_SUPERVISORS, DIALOG_STYLE_LIST, "Deputy Database", memberstring, "Back", "");
mysql_free_result();
}
}
}