SA-MP Forums Archive
[Ajuda] Problema com Dialog - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] Problema com Dialog (/showthread.php?tid=294596)



[Ajuda] Problema com Dialog - cotonete - 02.11.2011

Код:
	{
		if(IsPlayerConnected(id))
 		{
	    	if(arrayPlayer[id][PLevel] >= 1 && arrayPlayer[id][PLevel] <= 4)
	    	{
				switch(arrayPlayer[id][PLevel])
				{
				    case 1:
				        admins = "Moderador";
					case 2:
					    admins = "Sub-Admin";
					case 3:
					    admins = "Admin";
					case 4:
					    admins = "Master";
				}
				GetPlayerName(id, nome, sizeof(nome));
	    	    format(string, sizeof(string), "\"%s\" (%d) = %s", nome, id, admins);
	    	    SendClientMessage(playerid, 0x86ff00ff, string);
        	    AON++;
			}
		}
	}
	ShowPlayerDialog(playerid, 3, DIALOG_STYLE_MSGBOX, " Admins:", string,"Ok","");
porque esse Dialog aparece apenas o ъltimo admin conectado, e nгo todos?


Re: [Ajuda] Problema com Dialog - whiXґ - 02.11.2011

pawn Код:
{
        if(IsPlayerConnected(id))
        {
            if(arrayPlayer[id][PLevel] >= 1 && arrayPlayer[id][PLevel] <= 4)
            {
                switch(arrayPlayer[id][PLevel])
                {
                    case 0:
                        admins = "Moderador";
                    case 1:
                        admins = "Sub-Admin";
                    case 2:
                        admins = "Admin";
                    case 3:
                        admins = "Master";
                }
                GetPlayerName(id, nome, sizeof(nome));
                format(string, sizeof(string), "\"%s\" (%d) = %s", nome, id, admins);
                SendClientMessage(playerid, 0x86ff00ff, string);
                AON++;
            }
        }
    }
    ShowPlayerDialog(playerid, 3, DIALOG_STYLE_MSGBOX, " Admins:", string,"Ok","");



Re: [Ajuda] Problema com Dialog - cotonete - 02.11.2011

oque vocк mudou?

Код:
	for(new id = 0; id < MAX_PLAYERS; ++id)
	{
		if(IsPlayerConnected(id))
 		{
	    	if(arrayPlayer[id][PLevel] >= 1 && arrayPlayer[id][PLevel] <= 4)
	    	{
				switch(arrayPlayer[id][PLevel])
				{
				    case 1:
				        admins = "Moderador";
					case 2:
					    admins = "Sub-Admin";
					case 3:
					    admins = "Admin";
					case 4:
					    admins = "Master";
				}
				GetPlayerName(id, nome, sizeof(nome));
	    	    format(string, sizeof(string), "\"%s\" (%d) = %s", nome, id, admins);
	    	    SendClientMessage(playerid, 0x86ff00ff, string);
        	    AON++;
			}
		}
	}
	ShowPlayerDialog(playerid, 3, DIALOG_STYLE_MSGBOX, " Admins:", string,"Ok","");



Re: [Ajuda] Problema com Dialog - whiXґ - 02.11.2011

pawn Код:
case:0



Re: [Ajuda] Problema com Dialog - cotonete - 02.11.2011

aff, case 0 vai pegar players level 0, case tem que comeзar com 1 porque level 1 pra cima que sгo administradores, isso nгo vai influenciar o Dialog @_@


Re: [Ajuda] Problema com Dialog - whiXґ - 02.11.2011

pawn Код:
for(new id = 0; id < MAX_PLAYERS; ++id)
    {
        if(IsPlayerConnected(id))
        {
            if(arrayPlayer[id][PLevel] >= 1 && arrayPlayer[id][PLevel] <= 4)
            {
                switch(arrayPlayer[id][PLevel])
                {
                    case 1:
                        admins = "Moderador";
                    case 2:
                        admins = "Sub-Admin";
                    case 3:
                        admins = "Admin";
                    case 4:
                        admins = "Master";
                }
                GetPlayerName(id, nome, sizeof(nome));
                    format(string, sizeof(string),"%s%s",string, "\"%s\" (%d) = %s", nome,id,admins);
                AON++;
            }
        }
    }
    ShowPlayerDialog(playerid, 3, DIALOG_STYLE_MSGBOX, " Admins:", string,"Ok","");



Re: [Ajuda] Problema com Dialog - [O.z]Caroline - 02.11.2011

se matem:
pawn Код:
new Aremaz[200];
    for(new id = 0; id < MAX_PLAYERS; ++id)
    {
        if(IsPlayerConnected(id))
        {
            if(arrayPlayer[id][PLevel] >= 1 && arrayPlayer[id][PLevel] <= 4)
            {
                switch(arrayPlayer[id][PLevel])
                {
                    case 1:admins = "Moderador";
                    case 2:admins = "Sub-Admin";
                    case 3:admins = "Admin";
                    case 4:admins = "Master";
                }
                GetPlayerName(id, nome, sizeof(nome));
                format(string, sizeof(string), "\"%s\" (%d) = %s\n", nome, id, admins);
                strcat(Aremaz, string);
                AON++;
            }
        }
    }
    ShowPlayerDialog(playerid, 3, DIALOG_STYLE_MSGBOX, " Admins:", Aremaz,"Ok","");