Dialog Listitem
#4

in main point i whant that from this dialog:

i get player name by listitems, the listitems is changing everytime
this dialog code is:
pawn Code:
case 1://Љiuo metu prisijungę darbuotojai
                {
                    new
                        Index,
                        query[ 300 ],
                        query2[ 300 ],
                        str  [ 1200 ];
                    format( query, 90, "UPDATE `zaidejai` SET `online` = '1' WHERE `vardas` = '%s'", GetPlayerNameEx( playerid ) );
                    mysql_query( query );

                    format( query, 200, "SELECT `vardas`,`darbas`,`online` FROM `zaidejai` WHERE `darbas` =  '%d'",zInfo[ playerid ][ dyrikz ] );
                    mysql_query( query );
                    mysql_store_result();
                    if ( mysql_num_rows( ))
                    {
                        while( mysql_fetch_row( query2 ))
                        {
                            new
                                name[ MAX_PLAYER_NAME  ],
                                factionid,
                                OnlineEx;

                            sscanf( query2, "p<|>s[24]ii", name, factionid, OnlineEx );
                            if ( !OnlineEx )
                            {
                                format( str, 1200, "%s%s - {FF0000}Atsijungęs\n{FFFFFF}", str, name );
                                Index++;
                            }
                            else
                            {
                                format( str, 1200, "%s%s - {00FF00}Prisijungęs\n{FFFFFF}", str, name );
                                Index++;
                            }
                        }
                    }
                    mysql_free_result();
                    if ( !Index )
                    {
                        ShowPlayerDialog( playerid, 312, DIALOG_STYLE_LIST, "{FF0000}» Jūsų darbuotojai", "{FF0000}Nėra nei vieno darbuotojo", "Gerai", "" );
                    }
                    else
                    {
                        ShowPlayerDialog( playerid, 312, DIALOG_STYLE_LIST, "{00FF00}» Jūsų darbuotojai", str, "Gerai", "" );
                    }
                    return 1;
                }
Reply


Messages In This Thread
Dialog Listitem - by ancezas - 04.03.2014, 10:54
Re: Dialog Listitem - by ]Rafaellos[ - 04.03.2014, 11:25
Re: Dialog Listitem - by Ryan_Undering - 04.03.2014, 11:26
Re: Dialog Listitem - by ancezas - 04.03.2014, 11:40
Re: Dialog Listitem - by Necro[ABK] - 04.03.2014, 11:44
Re: Dialog Listitem - by ancezas - 04.03.2014, 12:16
AW: Dialog Listitem - by Nero_3D - 04.03.2014, 12:35
Re: Dialog Listitem - by ancezas - 04.03.2014, 12:38
Re: Dialog Listitem - by ancezas - 04.03.2014, 14:14

Forum Jump:


Users browsing this thread: 1 Guest(s)