[Ajuda] /Admins em dialog
#1

Olб sou novo no samp nгo sei muitas coisas do panw queria ajuda de vcs como colocar /admins em dialog tentei muito mais nгo conseguir obrigando !


Код:
	if(!strcmp(cmd, "/admins", true) || !strcmp(cmd, "/mods", true) || !strcmp(cmd, "/administradores", true) || !strcmp(cmd, "/moderadores", true))
	{
	    SendClientMessage(playerid, COR_BRANCO, "Equipe da Staff's disponнveis:");
        new
			adml, adm, mdr, hlp, crg
		;
        foreach(Player, i)
        {
			if(WE_GetInt(f(i), "AdminL") == 1)
			{
				if(aInfo[i][Oculto] == false)
				{
				    adml ++;
 					format(string, sizeof(string), "~ %s [ID:%d] {00FF7F}Dono", PlayerName(i), i);
 					SendClientMessage(playerid, -1, string);
				}
			}
			if(aInfo[i][Admin] == 1 && WE_GetInt(f(i), "AdminL") == 0)
			{
				if(aInfo[i][Oculto] == false)
				{
				    adm ++;
 					format(string, sizeof(string), "~ %s [ID:%d] {1E90FF}Administrador", PlayerName(i), i);
 					SendClientMessage(playerid, -1, string);
				}
			}
  			if(aInfo[i][Moderador] == 1 && WE_GetInt(f(i), "AdminL") == 0)
			{
				if(aInfo[i][Oculto] == false)
				{
				    mdr ++;
 					format(string, sizeof(string), "~ %s [ID:%d] {00FF7F}Moderador", PlayerName(i), i);
 					SendClientMessage(playerid, -1, string);
				}
			}
   			if(aInfo[i][Ajudante] == 1 && WE_GetInt(f(i), "AdminL") == 0)
			{
				if(aInfo[i][Oculto] == false)
				{
				    hlp ++;
 					format(string, sizeof(string), "~ %s [ID:%d] {FFA500}Ajudante", PlayerName(i), i);
 					SendClientMessage(playerid, -1, string);
				}
			}
   			if(aInfo[i][Corregedor] == 1 && WE_GetInt(f(i), "AdminL") == 0)
			{
				if(aInfo[i][Oculto] == false)
				{
				    crg ++;
 					format(string, sizeof(string), "~ %s [ID:%d] {00BFFF}Corregedor", PlayerName(i), i);
 					SendClientMessage(playerid, -1, string);
				}
			}
        }
        if(adm == 0 && mdr == 0 && adml == 0 && hlp == 0 && crg == 0) return SendClientMessage(playerid, COR_BRANCO, "Nenhum Administrador(a) {00FF7F}online {FFFFFF}no Momento !");
		return 1;
	}
Reply
#2

Mano, pega esse cуdigo como base, basta adaptar ele б sua GM, EXEMPLO: Na minha mostra cargo/Funзгo, creio que a sua nгo, entгo tu sу tera que fazer leves adaptaзхes..

PHP код:
if(!strcmp(cmd"/admins"true) || !strcmp(cmd"/mods"true) || !strcmp(cmd"/administradores"true) || !strcmp(cmd"/moderadores"true))
    {
    static 
string[3000];
     
string[0] = EOS;
    new 
bool:sucess false;
    foreach(
Playeri)
    {
        if(
PlayerInfo[i][pAdmin] > 0)
        {
             
GetPlayerName(isendernamesizeof(sendername));
            if(
admhide[i] == 0)
            {
                if(
admtrampando[i] == 1)
                {
                    switch(
PlayerInfo[i][pAdmin])
                    {
                        case 
1337format(string,sizeof(string),"%s {FFFFFF}%s {B4B5B7}Nнvel:[{FFFFFF}Master{B4B5B7}] Funзгo:[{FFFFFF}%s{B4B5B7}]\n",stringsendername,PlayerInfo[i][pFuncao]);
                        case 
3001format(string,sizeof(string),"%s {FFFFFF}%s {B4B5B7}Nнvel:[{FFFFFF}Subdono{B4B5B7}] Funзгo:[{FFFFFF}%s{B4B5B7}]\n",string,sendername,PlayerInfo[i][pFuncao]);
                        case 
5000format(string,sizeof(string),"%s {FFFFFF}%s {B4B5B7}Nнvel:[{FFFFFF}Fundador{B4B5B7}] Funзгo:[{FFFFFF}%s{B4B5B7}]\n",string,sendername,PlayerInfo[i][pFuncao]);
                        case 
1338format(string,sizeof(string),"%s {FFFFFF}%s {B4B5B7}Nнvel:[{FFFFFF}Gerente{B4B5B7}] Funзгo:[{FFFFFF}%s{B4B5B7}]\n",string,sendername,PlayerInfo[i][pFuncao]);
                        default: 
format(string,sizeof(string),"%s {FFFFFF}%s {B4B5B7}Nнvel:[{FFFFFF}%d{B4B5B7}] Funзгo:[{FFFFFF}%s{B4B5B7}]\n",stringsendername,PlayerInfo[i][pAdmin],PlayerInfo[i][pFuncao]);
                    }
                    if(!
sucesssucess true;
                }
                else
                {
                    switch(
PlayerInfo[i][pAdmin])
                    {
                        case 
1337format(string,sizeof(string),"%s {FFFFFF}%s {B4B5B7}Nнvel:[{FFFFFF}Master{B4B5B7}] Funзгo:[{FFFFFF}%s{B4B5B7}] {FFFFFF}[Jogando]\n"string,sendername,PlayerInfo[i][pFuncao]);
                        case 
3001format(string,sizeof(string),"%s {FFFFFF}%s {B4B5B7}Nнvel:[{FFFFFF}Subdono{B4B5B7}] Funзгo:[{FFFFFF}%s{B4B5B7}] {FFFFFF}[Jogando]\n"string,sendername,PlayerInfo[i][pFuncao]);
                        case 
5000format(string,sizeof(string),"%s {FFFFFF}%s {B4B5B7}Nнvel:[{FFFFFF}Fundador{B4B5B7}] Funзгo:[{FFFFFF}%s{B4B5B7}] {FFFFFF}[Jogando]\n"string,sendername,PlayerInfo[i][pFuncao]);
                        case 
1338format(string,sizeof(string),"%s {FFFFFF}%s {B4B5B7}Nнvel:[{FFFFFF}Gerente{B4B5B7}] Funзгo:[{FFFFFF}%s{B4B5B7}] {FFFFFF}[Jogando]\n"string,sendername,PlayerInfo[i][pFuncao]);
                        default: 
format(string,sizeof(string),"%s {FFFFFF}%s {B4B5B7}Nнvel:[{FFFFFF}%d{B4B5B7}] Funзгo:[{FFFFFF}%s{B4B5B7}] {FFFFFF}[Jogando]\n"stringsendernamePlayerInfo[i][pAdmin],PlayerInfo[i][pFuncao]);
                    }
                    if(!
sucesssucess true;
                }
            }
        }
        if(
PlayerInfo[i][pAdminTemp] > 0)
        {
            if(
admhide[i] == 0)
            {
                
format(string,sizeof(string),"%s {FFFFFF}%s {B4B5B7}Nнvel:[{FFFFFF}Temporбrio{B4B5B7}] {FFFFFF}%s\n",stringsendername, (admtrampando[i] == ? ("") : ("Jogando")));
                if(!
sucesssucess true;
            }
        }
    }
    if(
sucessShowPlayerDialog(playerid1010DIALOG_STYLE_LIST"Administradores Online",string,"Confirmar","Cancelar");
    else 
SendClientMessage(playerid0xFF0000FF,"Erro: Nenhum administrador estб online.");
    return 
true;

Reply
#3

Obrigado mano vou testa !
Reply
#4

Quote:
Originally Posted by Eiffel
Посмотреть сообщение
Mano, pega esse cуdigo como base, basta adaptar ele б sua GM, EXEMPLO: Na minha mostra cargo/Funзгo, creio que a sua nгo, entгo tu sу tera que fazer leves adaptaзхes..

PHP код:
if(!strcmp(cmd"/admins"true) || !strcmp(cmd"/mods"true) || !strcmp(cmd"/administradores"true) || !strcmp(cmd"/moderadores"true))
    {
    static 
string[3000];
     
string[0] = EOS;
    new 
bool:sucess false;
    foreach(
Playeri)
    {
        if(
PlayerInfo[i][pAdmin] > 0)
        {
             
GetPlayerName(isendernamesizeof(sendername));
            if(
admhide[i] == 0)
            {
                if(
admtrampando[i] == 1)
                {
                    switch(
PlayerInfo[i][pAdmin])
                    {
                        case 
1337format(string,sizeof(string),"%s {FFFFFF}%s {B4B5B7}Nнvel:[{FFFFFF}Master{B4B5B7}] Funзгo:[{FFFFFF}%s{B4B5B7}]\n",stringsendername,PlayerInfo[i][pFuncao]);
                        case 
3001format(string,sizeof(string),"%s {FFFFFF}%s {B4B5B7}Nнvel:[{FFFFFF}Subdono{B4B5B7}] Funзгo:[{FFFFFF}%s{B4B5B7}]\n",string,sendername,PlayerInfo[i][pFuncao]);
                        case 
5000format(string,sizeof(string),"%s {FFFFFF}%s {B4B5B7}Nнvel:[{FFFFFF}Fundador{B4B5B7}] Funзгo:[{FFFFFF}%s{B4B5B7}]\n",string,sendername,PlayerInfo[i][pFuncao]);
                        case 
1338format(string,sizeof(string),"%s {FFFFFF}%s {B4B5B7}Nнvel:[{FFFFFF}Gerente{B4B5B7}] Funзгo:[{FFFFFF}%s{B4B5B7}]\n",string,sendername,PlayerInfo[i][pFuncao]);
                        default: 
format(string,sizeof(string),"%s {FFFFFF}%s {B4B5B7}Nнvel:[{FFFFFF}%d{B4B5B7}] Funзгo:[{FFFFFF}%s{B4B5B7}]\n",stringsendername,PlayerInfo[i][pAdmin],PlayerInfo[i][pFuncao]);
                    }
                    if(!
sucesssucess true;
                }
                else
                {
                    switch(
PlayerInfo[i][pAdmin])
                    {
                        case 
1337format(string,sizeof(string),"%s {FFFFFF}%s {B4B5B7}Nнvel:[{FFFFFF}Master{B4B5B7}] Funзгo:[{FFFFFF}%s{B4B5B7}] {FFFFFF}[Jogando]\n"string,sendername,PlayerInfo[i][pFuncao]);
                        case 
3001format(string,sizeof(string),"%s {FFFFFF}%s {B4B5B7}Nнvel:[{FFFFFF}Subdono{B4B5B7}] Funзгo:[{FFFFFF}%s{B4B5B7}] {FFFFFF}[Jogando]\n"string,sendername,PlayerInfo[i][pFuncao]);
                        case 
5000format(string,sizeof(string),"%s {FFFFFF}%s {B4B5B7}Nнvel:[{FFFFFF}Fundador{B4B5B7}] Funзгo:[{FFFFFF}%s{B4B5B7}] {FFFFFF}[Jogando]\n"string,sendername,PlayerInfo[i][pFuncao]);
                        case 
1338format(string,sizeof(string),"%s {FFFFFF}%s {B4B5B7}Nнvel:[{FFFFFF}Gerente{B4B5B7}] Funзгo:[{FFFFFF}%s{B4B5B7}] {FFFFFF}[Jogando]\n"string,sendername,PlayerInfo[i][pFuncao]);
                        default: 
format(string,sizeof(string),"%s {FFFFFF}%s {B4B5B7}Nнvel:[{FFFFFF}%d{B4B5B7}] Funзгo:[{FFFFFF}%s{B4B5B7}] {FFFFFF}[Jogando]\n"stringsendernamePlayerInfo[i][pAdmin],PlayerInfo[i][pFuncao]);
                    }
                    if(!
sucesssucess true;
                }
            }
        }
        if(
PlayerInfo[i][pAdminTemp] > 0)
        {
            if(
admhide[i] == 0)
            {
                
format(string,sizeof(string),"%s {FFFFFF}%s {B4B5B7}Nнvel:[{FFFFFF}Temporбrio{B4B5B7}] {FFFFFF}%s\n",stringsendername, (admtrampando[i] == ? ("") : ("Jogando")));
                if(!
sucesssucess true;
            }
        }
    }
    if(
sucessShowPlayerDialog(playerid1010DIALOG_STYLE_LIST"Administradores Online",string,"Confirmar","Cancelar");
    else 
SendClientMessage(playerid0xFF0000FF,"Erro: Nenhum administrador estб online.");
    return 
true;

Mano tentei de todo jeito nгo deu !! alguem pode me ajuda pf !!
Reply
#5

Meu pai?
Reply
#6

Код:
	if(strcmp("/admins",Comando,true) == 0)
	{
	    new status[15];
	    SendClientMessage(playerid,COR_VERMELHO,"Admins online:");
		for(new i = 0; i < MAX_PLAYERS; i++)
		{
			if(IsPlayerConnected(i))
			{
		    	new frm[120];
		    	if(Admin[i] > 0)
		    	{
		        	if(aAjudando[i] == 0){Inserir(status,"Jogando");}
					else{Inserir(status,"{EF21DB}Ajudando{4DD3FB}");}
		  			format(frm,sizeof(frm),"Admin: %s | Cargo: %s,Nome(playerid),Cargos_ADM(Admin[playerid]));
		        	SendClientMessage(playerid,COR_AZUL_CLARO,frm);
		    	}
			}
		}
		return 1;
	}
Use como base, adapte as suas variбveis, seja feliz
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)