[Ajuda] Comando /Admins
#1

Olб! criei um /admins no improviso e gostaria de adicionar um comando onde se o adm ficar ausente,mostrasse no dialog o "Ausente". Ele apenas mostra o "online" o tempo inteiro. Obrigado a quem ajudar!!!

PHP код:
dcmd_admins(playerid,params[]) {
#pragma unused params
//Alertar admins para quem digitar o comando /admins
if(PlayerInfo[playerid][Level] < 1){
new 
pname[MAX_PLAYER_NAME],SACSB[100];GetPlayerName(playeridpnameMAX_PLAYER_NAME);
format(SACSBsizeof(SACSB), "| CMDS-LOG | %s[%i] digitou /ADMINS"pnameplayerid);
CallRemoteFunction("MessageToAdmins","is",yellow,SACSB);}
//Estrutura do comando /admins
new Adms[650],ADMsDialog[810],ADMsDialog2[810],Name[MAX_PLAYER_NAME],level,admscount;
for(new 
i,GetMaxPlayers();a;i++)
{
    if(
IsPlayerConnected(i))
    {
        if(
PlayerInfo[i][Level] > 0)
        {
        if(
PlayerInfo[i][Level] == 1)
            {
                if(
AdmHidden[i] == false || PlayerInfo[playerid][Level] > 0)
                {
                    
level PlayerInfo[i][Level];
                    
GetPlayerName(iNamesizeof(Name));
                    if(
admscount 15format(Admssizeof(Adms), "%s\t{FFFF00}Ajudante\t{00FF00}Online\n%s",Name,Adms);
                    
admscount++;
              }
            }
        if(
PlayerInfo[i][Level] == 2)
            {
                if(
AdmHidden[i] == false || PlayerInfo[playerid][Level] > 0)
                {
                    
level PlayerInfo[i][Level];
                    
GetPlayerName(iNamesizeof(Name));
                    if(
admscount 15format(Admssizeof(Adms), "%s\t{FF8C00}Moderador(a)\t{00FF00}Online\n%s",Name,Adms);
                    
admscount++;
              }
            }
             if(
PlayerInfo[i][Level] == 3)
            {
                if(
AdmHidden[i] == false || PlayerInfo[playerid][Level] > 0)
                {
                    
level PlayerInfo[i][Level];
                    
GetPlayerName(iNamesizeof(Name));
                    if(
admscount 15format(Admssizeof(Adms), "%s\t{FF4500}Sub-Administrador(a)\t{00FF00}Online\n%s",Name,Adms);
                    
admscount++;
              }
            }
      
           if(
PlayerInfo[i][Level] == 4)
            {
                if(
AdmHidden[i] == false || PlayerInfo[playerid][Level] > 0)
                {
                    
level PlayerInfo[i][Level];
                    
GetPlayerName(iNamesizeof(Name));
                    if(
admscount 15format(Admssizeof(Adms), "%s\t{008bce}Administrador(a)\t{00FF00}Online\n%s",Name,Adms);
                    
admscount++;
              }
            }
            if(
PlayerInfo[i][Level] == 5)
            {
                if(
AdmHidden[i] == false || PlayerInfo[playerid][Level] > 0)
                {
       
GetPlayerName(iNamesizeof(Name));
                    if(
admscount 15format(Admssizeof(Adms), "%s\n%s\t{32CD32}Staff\t{00FF00}Online\n",Adms,Name);
                    
admscount++;
                }
            }
            else
            {
             if(
AdmHidden[i] == false || PlayerInfo[playerid][Level] > 0)
                {
                    
level PlayerInfo[i][Level];
                    
GetPlayerName(iNamesizeof(Name));
                 
//   if(admscount < 15) format(Adms, sizeof(Adms), "{1E90FF}%s[%i] \tNнvel: %i \t{00FF00}Online\n%s",Name,i,level,Adms);
                    
admscount++;
                }
            }
        }
    }
}
if(
admscount 0)
format(ADMsDialogsizeof(ADMsDialog), "{FFFFFF}Admin\t{FFFFFF}Cargo\t{FFFFFF}Status\n%s",Adms);
else
format(ADMsDialog2sizeof(ADMsDialog2), "{FF0000}Infelizmente a equipe da administraзгo nгo estб online no momento!",Adms);
ShowPlayerDialog(playerid,1000,DIALOG_STYLE_TABLIST_HEADERS,"Admins",ADMsDialog,"Fechar","");
ShowPlayerDialog(playerid,1000,DIALOG_STYLE_MSGBOX,"Admins",ADMsDialog2,"Fechar","");
return 
1;} 
Reply


Messages In This Thread
Comando /Admins - by Hake - 13.12.2018, 11:42
Re: Comando /Admins - by JeffSantos2 - 13.12.2018, 12:41
Re: Comando /Admins - by Hake - 13.12.2018, 14:14
Re: Comando /Admins - by JeffSantos2 - 14.12.2018, 11:56

Forum Jump:


Users browsing this thread: 1 Guest(s)