18.06.2017, 18:52
Hey guys i have a dynamic faction and after i add a new faction i want to add it on /factions command but is just a problem i have something like
so i can see on /factions only 5 factions
the thing is i want to see only factions that exist i mean like i have 1 faction not 5 that should give me just 1 in /factions command but with that cmd it give's me something like
see? the problem is that i have only 1 faction and the rest of 4 are giving me bad info i just want to see only the factions are in my DB from structure 'factions' any idea how ?
HTML Code:
FactionInfo[6][fInfo]
HTML Code:
CMD:factions(playerid)
{
if(gLogged[playerid] == 0) return SendClientMessage(playerid,COLOR_ERROR, "Tu nu esti logat si nu poti sa folosesti aceasta comanda!");
new var[1024];
new coordsstring[64] = "ID\tNume\tMembrii/Sloturi\tAplicatii\n";
for(new i = 1; i < sizeof(FactionInfo); i++)
{
format(gString, sizeof(gString), "%d.\t%s\t[%d/%d]\t%s\n", i, FactionInfo[i][fName], GetFactionMembers(i), FactionInfo[i][fSlots], GetFactionStatus(i));
strcat(var, gString);
}
strins(var, coordsstring, 0);
ShowPlayerDialog(playerid, DIALOG_FACTIONS, DIALOG_STYLE_TABLIST_HEADERS, "Factiuni", var, "Inchide", "");
return 1;
}
HTML Code:
1. Grove Street [0/10] Open 2. [0/0] Closed 3. [0/0] Closed 4. [0/0] Closed 5. [0/0] Closed


