[Pedido] Dialog
#1

Eu queria se possivel esses 3 comandos em dialog , Grato


PHP код:
if (strcmp(cmd"/admins"true) == 0)
    {
        if(
IsPlayerConnected(playerid))
        {
            
SendClientMessage(playeridCOLOR_VERDE"Admins Online:");
            for(new 
0<= MAX_PLAYERSi++)
            {
                if(
IsPlayerConnected(i) == && JogadorInfo[i][pAdmin] > && JogadorInfo[i][pAdmin] < 1342)
                {
                    if(
admtrabalhando[i] == 1)
                    {
                         if(
JogadorInfo[i][pAdmin] >= && JogadorInfo[i][pAdmin] < 1337)
                        {
                            
GetPlayerName(isendernamesizeof(sendername));
                            
format(string256"%s | Nivel: [%d] (Trabalhando)"sendernameJogadorInfo[i][pAdmin]);
                            
SendClientMessage(playeridCOLOR_WHITEstring);
                        }
                        else if(
JogadorInfo[i][pAdmin] == 1337)
                        {
                            
GetPlayerName(isendernamesizeof(sendername));
                            
format(string256"%s | Nivel: [Master] (Trabalhando)"sendername);
                            
SendClientMessage(playeridCOLOR_WHITEstring);
                        }
                        else if(
JogadorInfo[i][pAdmin] == 1338)
                        {
                            
GetPlayerName(isendernamesizeof(sendername));
                            
format(string256"%s | Nivel: [Master+] (Trabalhando)"sendername);
                            
SendClientMessage(playeridCOLOR_WHITEstring);
                        }
                        else if(
JogadorInfo[i][pAdmin] == 1339)
                        {
                            
GetPlayerName(isendernamesizeof(sendername));
                            
format(string256"%s | Nivel: [Master++] (Trabalhando)"sendername);
                            
SendClientMessage(playeridCOLOR_GRAD1string);
                         }
                    }
                    if(
admtrabalhando[i] == 0)
                    {
                        if(
JogadorInfo[i][pAdmin] >= && JogadorInfo[i][pAdmin] < 1337)
                        {
                            
GetPlayerName(isendernamesizeof(sendername));
                            
format(string256"%s | Nivel: [%d] (Jogando)"sendernameJogadorInfo[i][pAdmin]);
                            
SendClientMessage(playeridCOLOR_WHITEstring);
                        }
                        else if(
JogadorInfo[i][pAdmin] == 1337)
                        {
                            
GetPlayerName(isendernamesizeof(sendername));
                            
format(string256"%s | Nivel: [Master] (Jogando)"sendername);
                            
SendClientMessage(playeridCOLOR_WHITEstring);
                        }
                        else if(
JogadorInfo[i][pAdmin] == 1338)
                        {
                            
GetPlayerName(isendernamesizeof(sendername));
                            
format(string256"%s | Nivel: [Master+] (Jogando)"sendername);
                            
SendClientMessage(playeridCOLOR_WHITEstring);
                        }
                        else if(
JogadorInfo[i][pAdmin] == 1339)
                        {
                            
GetPlayerName(isendernamesizeof(sendername));
                            
format(string256"%s | Nivel: [Master++] (Jogando)"sendername);
                            
SendClientMessage(playeridCOLOR_GRAD1string);
                        }
                    }
                }
            }
        }
        return 
1;
    } 



PHP код:
if(strcmp(cmd"/infolider"true) ==|| strcmp(cmd"/infolideres"true) ==0)
    {
        
SendClientMessage(playeridCOLOR_WHITE"|_______________| Inicio Info Lideres |_______________|");
        
SendClientMessage(playeridCOLOR_WHITE"|____________| Oficiais da Justiзa |____________|");
        
format(stringsizeof(string), "Governo: %s"InfoOrg[7][Lider]);
        
SendClientMessage(playeridCOR_GOVstring);
        
format(stringsizeof(string), "Mйdicos: %s"InfoOrg[4][Lider]);
        
SendClientMessage(playeridCOR_SAMUstring);
        
format(stringsizeof(string), "Policia Militar: %s"InfoOrg[1][Lider]);
        
SendClientMessage(playeridCOR_PMstring);
        
format(stringsizeof(string), "Policia Civil: %s"InfoOrg[17][Lider]);
        
SendClientMessage(playeridCOR_PCstring);
        
format(stringsizeof(string), "Policia Federal: %s"InfoOrg[25][Lider]);
        
SendClientMessage(playeridCOR_PFstring);
        
format(stringsizeof(string), "B.O.P.E: %s"InfoOrg[2][Lider]);
        
SendClientMessage(playeridCOR_BOPEstring);
        
format(stringsizeof(string), "G.A.T.E: %s"InfoOrg[13][Lider]);
        
SendClientMessage(playeridCOR_GATEstring);
        
format(stringsizeof(string), "Interpol: %s"InfoOrg[12][Lider]);
        
SendClientMessage(playeridCOR_INTERPOLstring);
        
format(stringsizeof(string), "Exйrcito: %s"InfoOrg[3][Lider]);
        
SendClientMessage(playeridCOR_EXEstring);
        
SendClientMessage(playeridCOLOR_WHITE"|____________| Gangsters |____________|");
        
format(stringsizeof(string), "Los Aztecas: %s"InfoOrg[5][Lider]);
        
SendClientMessage(playeridCOR_AZTECASstring);
        
format(stringsizeof(string), "Los Vagos: %s"InfoOrg[19][Lider]);
        
SendClientMessage(playeridCOR_VAGOSstring);
        
format(stringsizeof(string), "PCC: %s"InfoOrg[11][Lider]);
        
SendClientMessage(playeridCOR_PCCstring);
        
format(stringsizeof(string), "Ballas: %s"InfoOrg[18][Lider]);
        
SendClientMessage(playeridCOR_BALLASstring);
        
format(stringsizeof(string), "Groove Street: %s"InfoOrg[15][Lider]);
        
SendClientMessage(playeridCOR_GROstring);
        
format(stringsizeof(string), "Comando Vermelho: %s"InfoOrg[23][Lider]);
        
SendClientMessage(playeridCOR_CVstring);
        
format(stringsizeof(string), "Ada: %s"InfoOrg[27][Lider]);
        
SendClientMessage(playeridCOR_ADAstring);
        
SendClientMessage(playeridCOLOR_WHITE"|____________| Mafiosos |____________|");
        
format(stringsizeof(string), "Mбfia Yakuza: %s"InfoOrg[20][Lider]);
        
SendClientMessage(playeridCOR_YAKstring);
        
format(stringsizeof(string), "Mбfia CN: %s"InfoOrg[22][Lider]);
        
SendClientMessage(playeridCOR_COSAstring);
        
format(stringsizeof(string), "Mбfia Russa: %s"InfoOrg[28][Lider]);
        
SendClientMessage(playeridCOR_RUSSAstring);
        
format(stringsizeof(string), "Mбfia Mexicana: %s"InfoOrg[29][Lider]);
        
SendClientMessage(playeridCOR_MEXICANAstring);
        
SendClientMessage(playeridCOLOR_WHITE"|____________| Terroristas |____________|");
        
format(stringsizeof(string), "Taliban: %s"InfoOrg[6][Lider]);
        
SendClientMessage(playeridCOR_TALstring);
        
format(stringsizeof(string), "Al'qaeda: %s"InfoOrg[16][Lider]);
        
SendClientMessage(playeridCOR_ALstring);
        
format(stringsizeof(string), "Hamas: %s"InfoOrg[30][Lider]);
        
SendClientMessage(playeridCOR_HAMASstring);
        
SendClientMessage(playeridCOLOR_WHITE"|____________| Mercenбrios |____________|");
        
format(stringsizeof(string), "Sons of Anarchy: %s"InfoOrg[21][Lider]);
        
SendClientMessage(playeridCOR_SONSstring);
        
format(stringsizeof(string), "Devils Tribe: %s"InfoOrg[24][Lider]);
        
SendClientMessage(playeridCOR_DEVILSstring);
        
SendClientMessage(playeridCOLOR_WHITE"|____________| Outras ORG's |____________|");
        
format(stringsizeof(string), "Hitmans: %s"InfoOrg[8][Lider]);
        
SendClientMessage(playeridCOR_HITMANstring);
        
format(stringsizeof(string), "Assassins: %s"InfoOrg[26][Lider]);
        
SendClientMessage(playeridCOR_ASSASSINSstring);
        
format(stringsizeof(string), "Rede Globo: %s"InfoOrg[9][Lider]);
        
SendClientMessage(playeridCOR_REPstring);
        
format(stringsizeof(string), "Taxistas: %s"InfoOrg[10][Lider]);
        
SendClientMessage(playeridCOR_TAXIstring);
        
format(stringsizeof(string), "Mecвnicos: %s"InfoOrg[14][Lider]);
        
SendClientMessage(playeridCOR_MECANICOstring);
        
SendClientMessage(playeridCOLOR_WHITE"|_______________| Fim Info Lideres |_______________|");
        return 
1;
       } 
PHP код:
    if(strcmp(cmd"/aa"true) == 0)
    {
         if(
JogadorInfo[playerid][pAdmin] < 1)
         {
            return 
1;
         }
         if(
admtrabalhando[playerid] < && JogadorInfo[playerid][pAdmin] != 1340 && JogadorInfo[playerid][pAdmin] != 1342 && JogadorInfo[playerid][pAdmin] != 1341)
         {
              
SendClientMessage(playeridCOLOR_GRAD1"Vocк nгo estб trabalhando! (/trabalhar)");
              return 
1;
         }
         if(
IsPlayerConnected(playerid))
         {
          if(
IsPlayerConnected(playerid))
             {
                  
SendClientMessage(playeridCOLOR_VERDE"Ajuda Administrador:");
                  if (
JogadorInfo[playerid][pAdmin] >= 1)
                  {
                       
SendClientMessage(playeridCOLOR_WHITE"");
                       
SendClientMessage(playerid0x9acd32FF,"|1| Auxiliar *** | /kitadm /tvon /tvoff /par /kick /ir /trazer /voar /tapa /tapao /desbugar /teleportes");
                       
SendClientMessage(playerid0x9acd32FF,"|1| Auxiliar *** | /av(avisar) /testegod /statuscel /paredao /rparedao /avisados");
                       
SendClientMessage(playerid0x9acd32FF,"|1| Auxiliar *** | /numeroprofs /ls /lv /sf /monte /irin /irtunning /orgvips");
                       if(
JogadorInfo[playerid][pAdmin] == 1)
                       {
                            
SendClientMessage(playerid0x9acd32FF,"Auxiliar vocк foi colocado no modo admin em fase de testes, entгo trabalhe corretamente para ser promovido.");
                       }
                       
SendClientMessage(playeridCOLOR_WHITE"");
                  }
                  if (
JogadorInfo[playerid][pAdmin] >= 2)
                  {
                       
SendClientMessage(playerid0x7fff00FF,"|2| Moderador *** | /repararid /blindarid /abastecerid /respawnid /cadeia /carandiru /settime");
                       
SendClientMessage(playerid0x7fff00FF,"|2| Moderador *** | /ver /infoplayer /infoarmas /calar /congelar /descongelar /infovip");
                       
SendClientMessage(playeridCOLOR_WHITE"");
                  }
                  if (
JogadorInfo[playerid][pAdmin] >= 3)
                  {
                       
SendClientMessage(playerid0x39aa39FF,"|3| Moderador *** | /1 /2 /3 /go /banir /aviso /voaron /voaroff /orelhas /retiraraviso /respawnperto /tunning");
                       
SendClientMessage(playerid0x39aa39FF,"|3| Moderador *** | /retirarbq  /retirarbr /retirarpregos /retirarbloqueios /online /retirararmas /versms");
                       
SendClientMessage(playeridCOLOR_WHITE"");
                  }
                  if (
JogadorInfo[playerid][pAdmin] >= 4)
                  {
                       
SendClientMessage(playerid0x33ff00FF,"|4| Moderador *** | /tesouro /sethora /ip /rt /lt /dn /up /entrarcarro(Passageiro) /onveiculocomprar /offveiculocomprar /carroslivres");
                       
SendClientMessage(playerid0x33ff00FF,"|4| Moderador *** | /trazerx1 /fogo /eventos /destruirid /entrarcarro2(Motorista) /onvestacionar /offvestacionar /sethora");
                       
SendClientMessage(playeridCOLOR_WHITE"");
                  }
                  if (
JogadorInfo[playerid][pAdmin] >= 1337)
                  {
                       
SendClientMessage(playerid0x00ff00FF,"|1337| Master *** | /editar /explodir /votacao /encerrar /lider /limparlider /setskin /carroantigo /ircarro /desbanirnick /onmudarnick /offmudarnick");
                       
SendClientMessage(playerid0x00ff00FF,"|1337| Master *** | /abastecercarros /respawncarros /respawnorg /trazercarro /desbanirip /destruirguerra /onmudarsenha /offmudarsenha");
                        
SendClientMessage(playeridCOLOR_WHITE"");
                  }
                  if (
JogadorInfo[playerid][pAdmin] >= 1338)
                  {
                       
SendClientMessage(playerid0x39aa39FF,"|1338| Master + *** | /mark /irmak /setworld /darcolete /darvida /irsemp /darlicencas");
                       
SendClientMessage(playerid0x39aa39FF,"|1338| Master + *** | /biz /sbizz /casa /setgrana /dargrana /iremp /ircasa");
                        
SendClientMessage(playeridCOLOR_WHITE"");
                  }
                  if (
JogadorInfo[playerid][pAdmin] >= 1339)
                  {
                       
SendClientMessage(playerid0xb4b5b7FF,"|1339| Master ++ *** | /mark /irmak /setworld /darcolete /darvida /irsemp /darlicencas");
                       
SendClientMessage(playerid0xb4b5b7FF,"|1339| Master ++ *** | /biz /sbizz /casa /setgrana /dargrana /iremp /ircasa /pegarlider");
                       
SendClientMessage(playeridCOLOR_WHITE"");
                  }
                  if (
JogadorInfo[playerid][pAdmin] >= 1340)
                  {
                       
SendClientMessage(playerid0x9acd32FF,"|1340| Ajudante Sub-Dono *** | /reloadlogs /gmx /darsocio /darvip /retirarsocio /retirarvip");
                       
SendClientMessage(playerid0x9acd32FF,"|1340| Ajudante Sub-Dono *** | /setpos /admvcasaall /admvcasa /reloadbans");
                        
SendClientMessage(playeridCOLOR_WHITE"");
                  }
                  if (
JogadorInfo[playerid][pAdmin] >= 1341)
                  {
                       
SendClientMessage(playerid0x90ee90FF,"|1341| Sub-Dono *** | /savefiles /kitadm /veh /deslogartodos /ativarorgvip");
                       
SendClientMessage(playerid0x90ee90FF,"|1341| Sub-Dono *** | /descricao /carid /blindarid /darprocurado /retirarprocura");
                       
SendClientMessage(playeridCOLOR_WHITE"");
                  }
                  if (
JogadorInfo[playerid][pAdmin] >= 1342)
                  {
                       
SendClientMessage(playeridCOR_ROSAPINK,"|1342| Dono *** | /limparadmin /daradmin /rcarro /esconderijo /senha /crashar /deletarorgs");
                       
SendClientMessage(playeridCOR_ROSAPINK,"|1342| Dono *** | /deletarconta /atualizar3dtext /retiraradmin /iro /deletarconf");
                        
SendClientMessage(playeridCOLOR_WHITE"");
                  }
             }
         }
         return 
1;
    } 
Reply
#2

tambйm eu... e tambйm queria uma maquina de cafй
xD
Reply
#3

Sim й possнvel.

Veja: https://sampwiki.blast.hk/wiki/ShowPlayerDialog
https://sampwiki.blast.hk/wiki/Strcat
Reply
#4

Apaga e faz denovo, para de copiar outros GMs, cria um do 0, ta quase que insuportбvel corrigir aew, se for pra copiar, nem pede ajuda aqui, a chace de vocк encontrar mais erros й muito grande.

#OFF
Dentro de uns dias criarei um sistema para explicar como as coisas 'funcionam'.
Reply
#5



Jб nгo tai o comando?
Para mim jб estб pronto
Reply
#6

Essa board realmente a cada tempo que passa fica mais tуxica.. Se nгo for para ajudar nгo comentem.

Sobre o pedido, para criar uma janela onde imprima dados de uma variбvel pode usar as funзхes format, strcat e ShowPlayerDialog

Pode se basear neste script:
Код:
new PlayerAdminLevel[MAX_PLAYERS];

CMD:admins(playerid)
{
	new string[128]; // Variбvel para armazenar nosso texto.
	new dialog[128]; // Variбvel para armazenar nossa dialog.
	new sendername[MAX_PLAYER_NAME]; // Variбvel para armazenar o nome do jogador.
	for(new i; i < MAX_PLAYERS; i++) // Loop para verificar todos os jogadores.
	{
		if(PlayerAdminLevel[i] > 0) // Se o valor da variбvel administrativa for acima de 0
		{
		    GetPlayerName(i, sendername, sizeof sendername); // Armazenar o nome do jogador na variбvel.
		    format(string, sizeof string, "Admin: %s Nivel: [%d]\n", sendername, PlayerAdminLevel[i]); // Formatar texto.
		    strcat(dialog, string); // Armazenar texto formatado na variбvel 'dialog'.
		}
	}
	ShowPlayerDialog(playerid, 555, DIALOG_STYLE_MSGBOX, "Administradores Online:", dialog, "Fechar", #); // Imprimir informaзхes;
	return true;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)