Dialog STRING help!!! I give reputation for who gets me out of this problem
#1

Ok so i made the next command:
pawn Код:
CMD:factions(playerid, params[])
{
    new string[128];
    for(new xf = 0; xf < MAX_GROUPS; xf++)
    {
    format(string, sizeof(string),"Los Santos Police Department [%d/10]\nFederal Bureau Of Investigation[%d/10]\nNational Guard [%d/10]\nParamedic Department[%d/10]\nLas Venturas Police Department [%d/10]\nThe Russian Mafia [%d/10]\nGrove Street[%d/10]\nLos Aztecas[%d/10]\nThe Riffa [%d/10]\nBallas [%d/10]\nLos Vagos [%d/10]\nHitman Agency [%d/10]\nSchool Instructors [%d/10]\nTaxi Company [%d/10]\nNews Reporters [%d/10]", groupVariables[xf][gMembers]);
    ShowPlayerDialog(playerid, TCOLOR, DIALOG_STYLE_LIST, "Server: Factions", string,  "Select", "Cancel");
    }
    return 1;
}
to show the number of members that are in the factions. But when i tested it i got 2 problems,
1. It's not showing all the factions.
2. If i am in faction number 1 which is Los Santos Police Department it's not counting , it's still 0/10 ..
I started from the old command:
pawn Код:
CMD:factions(playerid, params[])
{
    for(new xf = 0; xf < MAX_GROUPS; xf++)
    {
        if(strlen(groupVariables[xf][gGroupName]) >= 1 && strcmp(groupVariables[xf][gGroupName], "None", true))
        {
            format(szMessage, sizeof(szMessage), "ID: %d | Name: %s | Members: %d/10 | Leader: %s", xf, groupVariables[xf][gGroupName], groupVariables[xf][gMembers], groupVariables[xf][gGroupLeader]);
            SendClientMessage(playerid, COLOR_WHITE, szMessage);
        }
    }
    return 1;
}
I hope you can help me.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)