Help with tablist style dialog
#1

Hello all,
My problem is with tablist style dialog i have a command request for my organization system in my server i want to convert it from style_list to tablist this is the command but it having some issue when i use this command it always showing me last organization not all which is created in game please tell me the solution for show all organizations in list here is the code

pawn Код:
CMD:request(playerid, params[])
{
    new tmp[256];
    if (orgReq[playerid] > 0)
    {
        SendClientMessage2(playerid, COLOR_ORANGE, "You are already requesting to join an organization.");
        SendClientMessage2(playerid, COLOR_YELLOW, "Your request will not be withdrawn until you are accepted, declined or reconnect.");
        return 1;
    }
    new moneys1 = dini_Int(AddDirFile(dir_orgfiles, FILE_OSTATS), "max_org");
    if (moneys1 == 0) return SendClientMessage2(playerid, COLOR_SILVER, "There are currently no existing organizations.");
    if (DoesPlayerHaveMenuOpen(playerid) || GetPlayerDialog(playerid) != -1) return SendClientMessage2(playerid, COLOR_WHITE, "SERVER: Please exit your current menu first.");
    new tmp3[2048];
    for (new orgg = 1; orgg <= moneys1; orgg++)
    {
        format(tmp, 10, "ORG%d", orgg);
        if (!dini_Exists(AddDirFile(dir_orgfiles, tmp))) continue;
        if(dini_Int(AddDirFile(dir_orgfiles, tmp),"Disabled") == 0)
        {

            format(tmp3, sizeof(tmp3), "Name\n");
            if (adlvl[playerid] >= 3) format(tmp3, sizeof(tmp3), "%s\n{%s}%s (%d)\n", tmp3, dini_Get(AddDirFile(dir_orgfiles, tmp), "color"), dini_Get(AddDirFile(dir_orgfiles, tmp), "name"), orgg);
            else format(tmp3, sizeof(tmp3), "%s\n{%s}%s\n", tmp3, dini_Get(AddDirFile(dir_orgfiles, tmp), "color"), dini_Get(AddDirFile(dir_orgfiles, tmp), "name"), orgg);
        }
    }
    ShowPlayerDialog(playerid,DIALOG_ORG_REQUEST,DIALOG_STYLE_TABLIST_HEADERS,"Select an organization to join",tmp3,"Select","Cancel");
    return 1;
}
Reply
#2

nvm i fixed it myself
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)