need to recirve player name from dialog list
#1

hi i have this code:
pawn Код:
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;
                }
there may be sometimes not one listitem but i need that whent i select any listitem that it give to another dialog that players name
how to do that?
Reply
#2

bump
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)