SA-MP Forums Archive
Dialog - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Dialog (/showthread.php?tid=584186)



Dialog - Ugaustin - 02.08.2015

it appears only One name!!!dosent appear all names only one row!one name!!


PHP код:
if (listitem == 0)
                                {
                                    new 
count 0;
                                    for(new 
i=0MAX_PLAYERSi++)
                                    {
                                        if(
IsPlayerConnected(i))
                                        {
                                            if(
PlayerInfo[i][pMember] == || PlayerInfo[i][pLeader] == 1)
                                            {
                                                new 
dia[1000];
                                                
GetPlayerName(igiveplayersizeof(giveplayer));
                                                
format(diasizeof(dia), " Name: %s | Rank %d | Ph: %d\n"giveplayer,PlayerInfo[i][pRank],PlayerInfo[i][pPtel]);
                                                
//SendClientMessage(playerid,COLOR_ORANGE,dia);
                                                
ShowPlayerDialog(playerid,1,DIALOG_STYLE_MSGBOX,"San Andreas Police Department",dia,"Close","");
                                                
count++;
                                            }
                                        }
                                    }
                                    if(
count == 0)
                                    {
                                        new 
ria[24];
                                        
strcat(ria," No Members Online!");
                                        
ShowPlayerDialog(playerid,1,DIALOG_STYLE_MSGBOX,"San Andreas Police Department",ria,"Close","");
                                    }
                                } 



Re: Dialog - Ugaustin - 02.08.2015

anyone please??


Re: Dialog - RowdyrideR - 03.08.2015

Can you tell me what you exactly want to do?


Re: Dialog - Variable™ - 03.08.2015

Removed.


AW: Dialog - Nero_3D - 03.08.2015

If you show the dialog inside the loop your result will be unavoidable
Simply replacing SendClientMessage with ShowPlayerDialog wont work...

PHP код:
if(listitem == 0) {
    new
        
dia[1024]
    ;
    for(new 
GetPlayerPoolSize(); >= 0; --i) {
        if(
GetPlayerName(igiveplayersizeof giveplayer) && (PlayerInfo[i][pMember] == || PlayerInfo[i][pLeader] == 1)) {
            
format(diasizeof dia"%s\n Name: %s | Rank %d | Ph: %d"diagiveplayerPlayerInfo[i][pRank], PlayerInfo[i][pPtel]);
        }
    }
    if(
dia[0] == EOS) {
        
dia "\n No Members Online!";
    }
    
ShowPlayerDialog(playerid1DIALOG_STYLE_MSGBOX"San Andreas Police Department"dia[1], "Close""");