[Ajuda] Dialog
#1

To com um comando de admin, E queria adaptar ele para aparecer em Dialog, Nгo no chat, Tem como?

Код:
	if( !strcmp( cmd, "/admins", true ) || - // Continuar aqiu
	{
	    SendClientMessage( playerid, 0x96D742AA, "[Admin ] Membros staff online:" );
        new
			a_d_m, m_d_r
		;
        new
			g_r_t
		;
        foreach(Player, i )
        {
			if( aInfo[ i ][ Admin ] == 1 )
			{
				if( aInfo[ i ][ Oculto ] == false )
				{
				    a_d_m ++;
 					format( string, sizeof( string ), "{FF000D}Admin {FFFFFF}%s ( %d )", PlayerName( i ), i );
 					SendClientMessage( playerid, 0xFFFFFFAA, string );
				}
			}
			if( aInfo[ i ][ Gerente ] == 1 )
			{
				if( aInfo[ i ][ Oculto ] == false )
				{
				    g_r_t ++;
 					format( string, sizeof( string ), "{00FF00}Gerente {FFFFFF}%s ( %d )", PlayerName( i ), i );
 					SendClientMessage( playerid, 0xFFFFFFAA, string );
				}
			}
			if( aInfo[ i ][ Ajudante ] == 1 )
			{
				//if( aInfo[ i ][ Oculto ] == false )
				{
 					format( string, sizeof( string ), "{00FF8C}Ajudante {FFFFFF}%s ( %d )", PlayerName( i ), i );
 					SendClientMessage( playerid, 0xFFFFFFAA, string );
				}
			}
  			if( aInfo[ i ][ Moderador ] == 1 )
			{
				if( aInfo[ i ][ Oculto ] == false )
				{
				    m_d_r ++;
 					format( string, sizeof( string ), "{66CCFF}Moderador(a) {FFFFFF}%s ( %d )", PlayerName( i ), i );
 					SendClientMessage( playerid, 0xFFFFFFAA, string );
				}
			}
        }
        if( a_d_m == 0 ) return SendClientMessage( playerid, COLOR_ERRO, "[Admin ] Nenhum(a) admin online no momento." );
        if( m_d_r == 0 ) return SendClientMessage( playerid, COLOR_ERRO, "[Admin ] Nenhum(a) moderador(a) conectado no momento !" );
		return 1;
	}
Reply
#2

Use strcat e format e ShowPlayerDialog.

Exemplo:

pawn Код:
new str_t[5], str[50];

for(new i = 0; i < 5; i++)
{
    format(str_t, sizeof str_t, "%d\n", i+1);
    strcat(str, str_t, sizeof str);
}

print(str);

//Ou

ShowPlayerDialog(playerid, 0, DIALOG_STYLE_MSGBOX, "Exemplo", str, "OK", "");
Reply
#3

Nгo consegui... Pode me enviar o cуdigo? Feito? E me ensinar por MP, Oque vocк fez, Explicando tudo certinho?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)