Jump to content
  • 0

Problema /leaders


aWm99

Question

Problema intalnita (descriere):Cand dau /leaders apar doar 3 leaderi din cei 7 pe care ii am.
Ero(area / rile) / warning-(ul / urile):-
Liniile de cod / sursa / script-ul(obligatoriu):

CMD:leaders(playerid)
{
    new string[256],strdiag[512],dialog[2048];
    format(string, sizeof(string),"SELECT * FROM players order by id ASC");
    new Cache:Result = mysql_query( handle, string), Get[2];
    cache_get_data(Get[0],Get[1],handle); 

    strcat(dialog,"Nume\tLeader la\tStatus\n");

    for(new i = 0; i < Get[0]; i++)
    {
        new namel[16],lideru,tmp2[64];
        cache_get_field_content(i, "Name", tmp2),  format(namel, 64, tmp2);
        lideru = cache_get_field_content_int(i,"Leader",handle);
        if(lideru > 0)
        {
            new statusul = EsteOriNu(namel);
            switch(statusul)
            {
                case 1:
                {
                    format(strdiag,sizeof(strdiag),"\n%s \t%s \tON",namel,FactionName[lideru]);
                }
                case 2:
                {
                    format(strdiag,sizeof(strdiag),"\n%s \t%s \tOFF",namel,FactionName[lideru]);
                }

            }
            strcat(dialog,strdiag);
        }
    }

    ShowPlayerDialog(playerid, 1999, DIALOG_STYLE_TABLIST_HEADERS,"Leaderii serverului",dialog, "Alege", "Exit");

    cache_delete( Result );
    return 1;

}


Imagini / Video (optional):http://imgur.com/a/SZww5
Ati incercat sa rezolvati singur?: Nu.

Edited by aWm99
Link to comment
Share on other sites

2 answers to this question

Recommended Posts

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.