20.01.2017, 17:52
Hi,
So, I made an application moderating system in-game for administrators to check roleplay applications. The code to get all unchecked applications is:
The problem is whenever I do that and sometimes there is more than one application - it only shows half of the applications. Lets say there are 10 applications unchecked, it shows less than half, and I need to do the command again and only then the dialog will show me all the unchecked applications. What's wrong?
So, I made an application moderating system in-game for administrators to check roleplay applications. The code to get all unchecked applications is:
pawn Код:
new temp[128], count, pid, id,totalString[512];
for(new r=0; r < cache_get_row_count(); ++r)
{
cache_get_field_content(r, "id", temp), id = strval(temp);
cache_get_field_content(r, "playerid", temp), pid = strval(temp);
format(totalString, 2400, "%s\n(APP ID: %d) Applicant ID: %d %s", totalString, id, pid, get_name_from_sqlid(pid));
appList[playerid][count] = id;
count++;
}
if(!count) return SCM(playerid, COLOR_RED, "No applications.");
ShowPlayerDialog(playerid, DIALOG_APPCHECK, DIALOG_STYLE_LIST, "Applications Moderating", totalString, "Check", "Close");