Jump to content
  • 0

Problema comanda


marius11

Question

Problema intalnita (descriere):Am o problema si nu o pot rezolva la comanda .factions vreau sa arate ceva gen [0/10]lspd[appdeschise] si nu pot ori cum as pune %s%s [%d/%d] {00FF00}[applications online]{FFFFFF}
Ero(area / rile) / warning-(ul / urile):
Liniile de cod / sursa / script-ul(obligatoriu):

CMD:factions(playerid, params[])
{
    new members;
    new stringz2[1024];
    for(new xf = 0; xf < MAX_GROUPS; xf++)
    {
        if(strlen(groupVariables[xf][gGroupName]) >= 1 && strcmp(groupVariables[xf][gGroupName], "None", true))
        {
            new stringy2[256], app;
            mysql_format(handle, stringy2, 256, "SELECT * FROM `playeraccounts` WHERE  `playerGroup` = '%d'", xf);
            new Cache: resultx = mysql_query (handle, stringy2);
            members = cache_get_row_count();
            cache_delete(resultx);

            mysql_format(handle, stringy2, 256, "SELECT * FROM `groups` WHERE `groupID` = '%d'", xf);
            new Cache: resultd = mysql_query(handle, stringy2);
            if(cache_get_row_count() != 0)
            {
                cache_get_field_content(0, "groupApplication", result); app = strval(result);
            }
            cache_delete(resultd);

            if(app == 1)
            {
                format(stringz2, sizeof(stringz2),"%s%s [%d/%d] {00FF00}[applications online]{FFFFFF}\n", stringz2, groupVariables[xf][gGroupName], members, groupVariables[xf][gMaxMembers]);
            }
            else if(app == 0)
            {
                format(stringz2, sizeof(stringz2),"%s%s [%d/%d] {FF0000}[applications offline]{FFFFFF}\n", stringz2, groupVariables[xf][gGroupName], members, groupVariables[xf][gMaxMembers]);
            }
        }
        ShowPlayerDialog(playerid, DIALOG_FACTIONS, DIALOG_STYLE_LIST,"Server: Factions", stringz2, "Select", "Cancel");
    }
    return 1;
}


Imagini / Video (optional):
Ati incercat sa rezolvati singur?:Da am incercat cred ca toate variantele %s%s [%d/%d] {00FF00}[applications online]{FFFFFF} si nu stiu sigur daca este de aici

Daca cineva a mai avut problema asta si imi spune si mie unde trebuie sa modific

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

Deci, nu înțeleg, ce nu se afișează corect?

pai daca schimb ordinea aici %s%s [%d/%d] {00FF00}[applications online]{FFFFFF} nu se mai afiseaza factiunile , apare doar una, singura,(exemplu pun asa %s\n[%d/%d] %s) in prezent mie imi arata asa lspd[0/34] [aplicatii deschise] eu vreau sa apara asa [0/34]lspd [aplicatii deschise]

Edited by marius11
Link to comment
Share on other sites

  • 0
CMD:factions(playerid, params[])
{
    new members;
    new stringz2[1024];
    for(new xf = 0; xf < MAX_GROUPS; xf++)
    {
        if(strlen(groupVariables[xf][gGroupName]) >= 1 && strcmp(groupVariables[xf][gGroupName], "None", true))
        {
            new stringy2[256], app;
            mysql_format(handle, stringy2, 256, "SELECT * FROM `playeraccounts` WHERE  `playerGroup` = '%d'", xf);
            new Cache: resultx = mysql_query (handle, stringy2);
            members = cache_get_row_count();
            cache_delete(resultx);

            mysql_format(handle, stringy2, 256, "SELECT * FROM `groups` WHERE `groupID` = '%d'", xf);
            new Cache: resultd = mysql_query(handle, stringy2);
            if(cache_get_row_count() != 0)
            {
                cache_get_field_content(0, "groupApplication", result); app = strval(result);
            }
            cache_delete(resultd);

            if(app == 1)
            {
                format(stringz2, sizeof(stringz2),"%s [%d/%d]%s {00FF00}[applications online]{FFFFFF}\n", stringz2, members, groupVariables[xf][gMaxMembers], groupVariables[xf][gGroupName]);
            }
            else if(app == 0)
            {
                format(stringz2, sizeof(stringz2),"%s [%d/%d]%s {FF0000}[applications offline]{FFFFFF}\n", stringz2, members, groupVariables[xf][gMaxMembers], groupVariables[xf][gGroupName]);
            }
        }
        ShowPlayerDialog(playerid, DIALOG_FACTIONS, DIALOG_STYLE_LIST,"Server: Factions", stringz2, "Select", "Cancel");
    }
    return 1;
}

Așa ar trebui să meargă.

  • Upvote 1
Link to comment
Share on other sites

  • 0
CMD:factions(playerid, params[])
{
    new members;
    new stringz2[1024];
    for(new xf = 0; xf < MAX_GROUPS; xf++)
    {
        if(strlen(groupVariables[xf][gGroupName]) >= 1 && strcmp(groupVariables[xf][gGroupName], "None", true))
        {
            new stringy2[256], app;
            mysql_format(handle, stringy2, 256, "SELECT * FROM `playeraccounts` WHERE  `playerGroup` = '%d'", xf);
            new Cache: resultx = mysql_query (handle, stringy2);
            members = cache_get_row_count();
            cache_delete(resultx);

            mysql_format(handle, stringy2, 256, "SELECT * FROM `groups` WHERE `groupID` = '%d'", xf);
            new Cache: resultd = mysql_query(handle, stringy2);
            if(cache_get_row_count() != 0)
            {
                cache_get_field_content(0, "groupApplication", result); app = strval(result);
            }
            cache_delete(resultd);

            if(app == 1)
            {
                format(stringz2, sizeof(stringz2),"%s [%d/%d]%s {00FF00}[applications online]{FFFFFF}\n", stringz2, members, groupVariables[xf][gMaxMembers], groupVariables[xf][gGroupName]);
            }
            else if(app == 0)
            {
                format(stringz2, sizeof(stringz2),"%s [%d/%d]%s {FF0000}[applications offline]{FFFFFF}\n", stringz2, members, groupVariables[xf][gMaxMembers], groupVariables[xf][gGroupName]);
            }
        }
        ShowPlayerDialog(playerid, DIALOG_FACTIONS, DIALOG_STYLE_LIST,"Server: Factions", stringz2, "Select", "Cancel");
    }
    return 1;
}

Așa ar trebui să meargă.

CMD:factions(playerid, params[])
{
    new members;
    new stringz2[1024];
    for(new xf = 0; xf < MAX_GROUPS; xf++)
    {
        if(strlen(groupVariables[xf][gGroupName]) >= 1 && strcmp(groupVariables[xf][gGroupName], "None", true))
        {
            new stringy2[256], app;
            mysql_format(handle, stringy2, 256, "SELECT * FROM `playeraccounts` WHERE  `playerGroup` = '%d'", xf);
            new Cache: resultx = mysql_query (handle, stringy2);
            members = cache_get_row_count();
            cache_delete(resultx);

            mysql_format(handle, stringy2, 256, "SELECT * FROM `groups` WHERE `groupID` = '%d'", xf);
            new Cache: resultd = mysql_query(handle, stringy2);
            if(cache_get_row_count() != 0)
            {
                cache_get_field_content(0, "groupApplication", result); app = strval(result);
            }
            cache_delete(resultd);

            if(app == 1)
            {
                format(stringz2, sizeof(stringz2),"%s [%d/%d]%s {00FF00}[applications online]{FFFFFF}\n", stringz2, members, groupVariables[xf][gMaxMembers], groupVariables[xf][gGroupName]);
            }
            else if(app == 0)
            {
                format(stringz2, sizeof(stringz2),"%s [%d/%d]%s {FF0000}[applications offline]{FFFFFF}\n", stringz2, members, groupVariables[xf][gMaxMembers], groupVariables[xf][gGroupName]);
            }
        }
        ShowPlayerDialog(playerid, DIALOG_FACTIONS, DIALOG_STYLE_LIST,"Server: Factions", stringz2, "Select", "Cancel");
    }
    return 1;
}

Așa ar trebui să meargă.

Multumesc a mers 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.