SA-MP Forums

Go Back   SA-MP Forums > Non-English > Languages > Português/Portuguese

Reply
 
Thread Tools Display Modes
Old 30/07/2018, 10:07 PM   #1
LeonardoMD
Big Clucker
 
Join Date: May 2018
Posts: 91
Reputation: 0
Default SERVER: Unknowm Command

Ao executar o comando /admins, aparece SERVER: Unknowm Command
Código do /Admins:


pawn Code:
if(!strcmp(cmdtext, "/admins", true))
    {
    new Counts;
    new const Ranks[][] =
    {
    "{FFFF00}Ajudante",
    "{FF8C00}Moderador(a)",
    "{009ACD}Administrador(a)",
    "{FF0000}Sub-Staff",
    "{03FF35}Staff{FFFFFF}"
    };
    new const PlayerAfk[][] =
    {
    "Online",
    "{FF0000}Ausente"
    };

    new STR[9999];
    new STX[3005], adminon;
    format(STR, sizeof(STR), "Admin\tCargo\tStatus\n");
    for(new x = 0, y = GetMaxPlayers(); x != y; x++)
     {
    if(!IsPlayerConnected(x)) continue;
    if(admin[x])
    {
    new NickName[25];
    GetPlayerName(x, NickName, 25);
    if(pAdmin[x] >= 1 && pAdmin[x] <= 5)
    {
    format(STR, 500, "%s{FFFFFF}%s {FFFFFF}  \t%s{FFFFFF}  {FFFFFF}\t{00A600}%s{FFFFFF}\n", STR, NickName, Ranks[pAdmin[x] - 1], PlayerAfk[AFK[x] - 0]);
    adminon++;
    }
    Counts++;
     }
    }
    //teste
    if(adminon == 0)
    {
    ShowPlayerDialog(playerid, 500, DIALOG_STYLE_MSGBOX, "{FFFFFF}Admins [ {FF0000}0{FFFFFF} ]", "{FF0000}Não há membros da Administração online no momento !", "Fechar", "");
    PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
    }
    else if(adminon == 1)
    {
    ShowPlayerDialog(playerid, 128, DIALOG_STYLE_TABLIST_HEADERS, "{FFFFFF}Admins Online [ {328E0A}1 {FFFFFF}]", STR, "Fechar", "");
    PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
    }
    else
    {
    //teste
    format(STX, 500, "{FFFFFF}Admins Online [ {328E0A}%d{FFFFFF} ]", adminon);
    ShowPlayerDialog(playerid, 500, DIALOG_STYLE_TABLIST_HEADERS, STX, STR, "Fechar", "");
    PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
    }
    return 1;
    }
LeonardoMD is offline   Reply With Quote
Old 30/07/2018, 10:29 PM   #2
rolex
Big Clucker
 
rolex's Avatar
 
Join Date: Nov 2008
Location: Brazil
Posts: 160
Reputation: 28
Default Re: SERVER: Unknowm Command

Cara, faz muito tempo que não fuço no pawn, mas tenta isso..


PHP Code:
if(!strcmp(cmdtext"/admins"true))
{
    new const 
Ranks[][] =
    {
        
"{FFFF00}Ajudante",
        
"{FF8C00}Moderador(a)",
        
"{009ACD}Administrador(a)",
        
"{FF0000}Sub-Staff",
        
"{03FF35}Staff{FFFFFF}"
    
};

    new const 
PlayerAfk[][] =
    {
        
"Online",
        
"{FF0000}Ausente"
    
};

    new 
STR[256], STX[256], adminonNickName[MAX_PLAYER_NAME], Counts;
    
format(STRsizeof(STR), "Admin\tCargo\tStatus\n");
    for(new 
0GetMaxPlayers(); != yx++)
    {
        if(
admin[x])
        {
            
GetPlayerName(xNickNamesizeof(NickName));
            if(
>= pAdmin[x] > 0)
            {
                
format(STRsizeof(STR), "%s{FFFFFF}%s {FFFFFF}  \t%s{FFFFFF}  {FFFFFF}\t{00A600}%s{FFFFFF}\n"STRNickNameRanks[pAdmin[x] - 1], PlayerAfk[AFK[x] - 0]);
                
adminon++;
            }
        
Counts++;
         }
    }
    
//teste
    
if(adminon == 0)
    {
        
ShowPlayerDialog(playerid500DIALOG_STYLE_MSGBOX"{FFFFFF}Admins [ {FF0000}0{FFFFFF} ]""{FF0000}Não há membros da Administração online no momento !""Fechar""");
        
PlayerPlaySound(playerid10570.00.00.0);
    }
    else
    {
        
format(STXsizeof(STX), "{FFFFFF}Admins Online [ {328E0A}%s {FFFFFF}]"Counts);
        
ShowPlayerDialog(playerid128DIALOG_STYLE_TABLIST_HEADERSSTXSTR"Fechar""");
        
PlayerPlaySound(playerid10570.00.00.0);
    }
    return 
1;

e porfavor, começa a usar ZCMD..
__________________
County Of Angels Roleplay
rolex is offline   Reply With Quote
Old 30/07/2018, 11:11 PM   #3
LeonardoMD
Big Clucker
 
Join Date: May 2018
Posts: 91
Reputation: 0
Default Re: SERVER: Unknowm Command

Quote:
Originally Posted by rolex View Post
Cara, faz muito tempo que não fuço no pawn, mas tenta isso..


PHP Code:
if(!strcmp(cmdtext"/admins"true))
{
    new const 
Ranks[][] =
    {
        
"{FFFF00}Ajudante",
        
"{FF8C00}Moderador(a)",
        
"{009ACD}Administrador(a)",
        
"{FF0000}Sub-Staff",
        
"{03FF35}Staff{FFFFFF}"
    
};

    new const 
PlayerAfk[][] =
    {
        
"Online",
        
"{FF0000}Ausente"
    
};

    new 
STR[256], STX[256], adminonNickName[MAX_PLAYER_NAME], Counts;
    
format(STRsizeof(STR), "Admin\tCargo\tStatus\n");
    for(new 
0GetMaxPlayers(); != yx++)
    {
        if(
admin[x])
        {
            
GetPlayerName(xNickNamesizeof(NickName));
            if(
>= pAdmin[x] > 0)
            {
                
format(STRsizeof(STR), "%s{FFFFFF}%s {FFFFFF}  \t%s{FFFFFF}  {FFFFFF}\t{00A600}%s{FFFFFF}\n"STRNickNameRanks[pAdmin[x] - 1], PlayerAfk[AFK[x] - 0]);
                
adminon++;
            }
        
Counts++;
         }
    }
    
//teste
    
if(adminon == 0)
    {
        
ShowPlayerDialog(playerid500DIALOG_STYLE_MSGBOX"{FFFFFF}Admins [ {FF0000}0{FFFFFF} ]""{FF0000}Não há membros da Administração online no momento !""Fechar""");
        
PlayerPlaySound(playerid10570.00.00.0);
    }
    else
    {
        
format(STXsizeof(STX), "{FFFFFF}Admins Online [ {328E0A}%s {FFFFFF}]"Counts);
        
ShowPlayerDialog(playerid128DIALOG_STYLE_TABLIST_HEADERSSTXSTR"Fechar""");
        
PlayerPlaySound(playerid10570.00.00.0);
    }
    return 
1;

e porfavor, começa a usar ZCMD..
O comando agora funcionou, porém só está aparecendo três admins, mesmo que tenha mais de três online.
LeonardoMD is offline   Reply With Quote
Old 30/07/2018, 11:15 PM   #4
LeonardoMD
Big Clucker
 
Join Date: May 2018
Posts: 91
Reputation: 0
Default Re: SERVER: Unknowm Command

E no terceiro admin não aparece se está online ou ausente.
LeonardoMD is offline   Reply With Quote
Old 30/07/2018, 11:50 PM   #5
Surak
Little Clucker
 
Join Date: Jun 2018
Posts: 19
Reputation: 0
Default Re: SERVER: Unknowm Command

Quote:
Originally Posted by LeonardoMD View Post
E no terceiro admin não aparece se está online ou ausente.
manda esse comando ai para mim estou precisando
Surak is offline   Reply With Quote
Old 31/07/2018, 12:02 AM   #6
SIZET
Big Clucker
 
SIZET's Avatar
 
Join Date: Jul 2018
Posts: 106
Reputation: 5
Default Re: SERVER: Unknowm Command

@Surak

O comando que eu desenvolvi para você ele tem os 2 sistemas AFK/Admin se ele te mandar vc terá os mesmo erros que vc tem agora.

@Leonardo

Muda os valores das variáveis STR[256] STX[256] coloque um valor maior nelas.
SIZET is offline   Reply With Quote
Old 31/07/2018, 12:07 AM   #7
Surak
Little Clucker
 
Join Date: Jun 2018
Posts: 19
Reputation: 0
Default Re: SERVER: Unknowm Command

Quote:
Originally Posted by SIZET View Post
@Surak

O comando que eu desenvolvi para você ele tem os 2 sistemas AFK/Admin se ele te mandar vc terá os mesmo erros que vc tem agora.

@Leonardo

Muda os valores das variáveis STR[256] STX[256] coloque um valor maior nelas.
PlayerInfo n consigo por isso :/ não sei oque usar.. e como ta na minha gm já que ela é diferente :V n consigo identificar
Surak is offline   Reply With Quote
Old 31/07/2018, 01:25 PM   #8
rolex
Big Clucker
 
rolex's Avatar
 
Join Date: Nov 2008
Location: Brazil
Posts: 160
Reputation: 28
Default Re: SERVER: Unknowm Command

muda o valor das strings pra 500. e NUNCA MAIS USA "9999" ou "3000" pra uma string, pelo amor de Jeová!
__________________
County Of Angels Roleplay
rolex is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Ajuda] SERVER: Unknowm Command LeonardoMD Português/Portuguese 19 26/06/2018 11:41 PM
Help with YCMD proces command and problem with "Server:Unknown command JoDe Scripting Help 1 20/04/2018 12:12 PM
[Ajuda] Ajuda, Server unknowm Liipiinhow Português/Portuguese 28 22/01/2014 10:35 PM
i had this command in my gamemode, when i type this in game,it tells server unknow command? Chrisli520 Scripting Help 3 24/11/2013 10:02 AM
Executed ZCMD command returns SERVER: Unknown Command SexTourist Scripting Help 12 03/01/2012 03:38 PM


All times are GMT. The time now is 06:18 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.