Help pls
#1

Hello! How i can sort my territories in dialog like this:

Grove Street Families: 13 territories
Rollin Hights Ballas: 5 territories
Los Santos Vagos: 3 territories
?
Reply
#2

Hello!

Can you show us the code, please?
Maybe tell us more information.
Reply
#3

Yes! I want to sort territories!
Quote:

if(strcmp(cmd, "/territories", true) == 0)
{
for(new gangs=0; gangs < MAX_TEAMS; gangs++)
{
format(string, sizeof(string), "%s owns %d territories.",TeamInfo[gangs][TeamName],TeamInfo[gangs][TurfWarsWon]);
ShowPlayerDialog(playerid,384,DIALOG_STYLE_MSGBOX, "Territories:", string, "OK", "");
}
return 1;
}

And i want this ^ output to be like this:
Grove Street Families owns 35 territories
Ballas owns 28 territories
Vagos owns 3 territories
Rifa owns 2 territories
Reply
#4

PHP код:
if(strcmp(cmd"/territories"true) == 0)
{
    for(new 
gangs=0gangs MAX_TEAMSgangs++)
    {
        
format(stringsizeof(string), "%s%s owns %d territories.\n",string,TeamInfo[gangs][TeamName],TeamInfo[gangs][TurfWarsWon]);
    }
    
ShowPlayerDialog(playerid,384,DIALOG_STYLE_MSGBOX"Territories:"string"OK""");
    return 
1;

Reply
#5

I want to be sorted in ascending order like this:
Grove Street Families owns 35 territories
Ballas owns 28 territories
Vagos owns 3 territories
Rifa owns 2 territories
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)