[Ajuda] Comando /admins
#1

peguei 1 sistema de ocultar e aparecer no /admin

Topo:
PHP код:
#new HideAdm[MAX_PLAYERS]; 
Comando:
PHP код:
    if(strcmp(cmdtext, "/aparecer", true) == 0 || strcmp(cmdtext, "/reaparecer", true) == 0 || strcmp(cmdtext, "/ocultar", true) == 0)
    {
        if(
pAdmin[playerid] == 5 || HideAdm[playerid] == 1)
        {
            if(
HideAdm[playerid] == 1)
            {
                
HideAdm[playerid] = 0;
                
SendClientMessage(playerid,COLOR_GREEN,"Vocк estб visivel a todos no /admins!");
            }
            else
            {
                
HideAdm[playerid] = 1;
                
SendClientMessage(playerid,COLOR_GREEN,"Vocк estб invisivel no /admins!");
            }
        }
        return 
1;
    } 
Agora o /admnis
PHP код:
    if(!strcmp(cmdtext, "/admins", true))
    {
        
SendClientMessage(playerid,0x00FF40AA, ".:: - Adminis{3225EB}tradores Online - ::.");
        new 
count=0;
        for(new 
i=0; i<MAX_PLAYERS; i++)
    {
    if(
IsPlayerConnected(i))
    {
    if(
HideAdm[i] == 0)
    {
    if(
admin[i])
    {
    new 
str[256];
    new 
pname[24];
    
GetPlayerName(i, pname, 24);
    
format(file2, sizeof(file2), PASTA_CONTAS, pname);
    if(
pAdmin[i] == 1)
    {
    
format(str,sizeof(str),"{FFFF00}%s {33AA33}(%d) :: [Moderador]", pname,i);
    }
    if(
pAdmin[i] == 2)
    {
    
format(str,sizeof(str),"{FFFF00}%s {33AA33}(%d) :: [ADM Nivel 2]", pname,i);
    }
    if(
pAdmin[i] == 3)
    {
    
format(str,sizeof(str),"{FFFF00}%s {33AA33}(%d) :: [ADM Nivel 3]", pname,i);
    }
    if(
pAdmin[i] == 4)
    {
    
format(str,sizeof(str),"{FFFF00}%s {33AA33}(%d) :: [ADM NIVEL 4 / Sub-Dono]", pname,i);
    }
    if(
pAdmin[i] == 5)
    {
    
format(str,sizeof(str),"{FFFF00}%s {33AA33}(%d) :: [Fundador]", pname,i);
    }
    
SendClientMessage(playerid, 0x0080FFAA, str);
    
count++;
    }
    }
    }
    if(
count == 0)
    {
    
SendClientMessage(playerid, Vermelho, "(ERRO) Nгo hб administradores online no momento");
    }
    }
    return 
1;
    } 
Bom Botei assim, Porem quando eu digito /ocultar, ele oculta, mais ai digito "/admins"

e aparece 10 SendClientMessage "(ERRO) NГO HБ ADMINISTRADORES ONLINE"

Por que isso?
Reply
#2

pawn Код:
SendClientMessage(playerid,-1,Vermelho, "(ERRO) Nгo hб administradores online no momento");
simples
Reply
#3

Quote:
Originally Posted by Wellington1999
Посмотреть сообщение
pawn Код:
SendClientMessage(playerid,-1,Vermelho, "(ERRO) Nгo hб administradores online no momento");
simples
SendClientMessage deve ser usado assim:

pawn Код:
SendClientMessage(playerid, Cor, " " );
Mesmo assim botei e retornou o erro:

pawn Код:
error 035: argument type mismatch (argument 3)
Reply
#4

Porque vocк precisa usar a funзгo "break;" abaixo do SendClientMessage, senгo o loop vai ficar dando voltas na funзгo e refazendo ela...
Reply
#5

Bom obrigado a todos, sу faltava por 1
pawn Код:
return 1;
em baixo do sendclientmessage + valeu
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)