[Ajuda] Unknown command.
#1

Aparece Unknown command. apуs digitar o comando /ang olhe o print !



CODIGO
PHP код:
    if(strcmp(cmd"/anunciogang"true) == || strcmp(cmd"/ang"true) == 0)
    {
        if(
IsPlayerConnected(playerid))
        {
            if(
GetPlayerOrg(playerid) == || GetPlayerOrg(playerid) == || GetPlayerOrg(playerid) == || GetPlayerOrg(playerid) == || GetPlayerOrg(playerid) == || GetPlayerOrg(playerid) == 10 || GetPlayerOrg(playerid) == 12 || GetPlayerOrg(playerid) == 13 || GetPlayerOrg(playerid) == 14
            
|| GetPlayerOrg(playerid) == 15 || GetPlayerOrg(playerid) == 17 || GetPlayerOrg(playerid) == 18 || GetPlayerOrg(playerid) == 19 || GetPlayerOrg(playerid) == 20 || GetPlayerOrg(playerid) == 21)
            {
                if(
PlayerInfo[playerid][pCargo] < 4)
                {
                    
SendClientMessage(playeridCOLOR_GREY"Voce precisa ter pelo menos cargo 4 para usar este comando!");
                    return 
1;
                }
                if(
PlayerInfo[playerid][pJailed] != 0)
                {
                   
SendClientMessage(playerid,COR_VAGOS," Vocк nгo pode mandar anuncios preso!");
                   return 
1;
                }
                new 
length strlen(cmdtext);
                while ((
idx length) && (cmdtext[idx] <= ' '))
                {
                    
idx++;
                }
                new 
offset idx;
                new 
result[64];
                while ((
idx length) && ((idx offset) < (sizeof(result) - 1)))
                {
                    
result[idx offset] = cmdtext[idx];
                    
idx++;
                }
                
result[idx offset] = EOS;
                if(!
strlen(result))
                {
                    
SendClientMessage(playeridCOLOR_GRAD2"USE: (/ang) ou (/anunciogang) [texto]");
                    return 
1;
                }
                if(
TentouDivulgar(result))
                {
                if(
cdivulgar[playerid] >= 6)
                {
                    
SendClientMessage(playeridCOLOR_LIGHTBLUE,"Aqui vocк nгo pode anunciar servidores!");
                    
SendClientMessage(playeridCOLOR_LIGHTBLUE,"Cuidado, Poderб ser banido.");
                    
SendClientMessage(playeridCOLOR_LIGHTBLUE,"Evite digitar muitos nъmeros consecutivos.");
                    
PlayerPlaySound(playerid11330.00.00.0);
                    
Kick(playerid);
                }
                
GetPlayerName(playeridplayernameMAX_PLAYER_NAME);
                
format(string128"AdmAviso: [%d]%s tentou divulgar: %s.",playerid,playername,result);
                
ABroadCast(COLOR_YELLOW,string,1);
                
DivulgouLog(string);
                
cdivulgar[playerid] += 1;
                return 
1;
                }
                if(
panunciogang == 1)
                {
                    
SendClientMessage(playerid,COLOR_GRAD2,"Espere 30 segundos para poder anunciar novamente!");
                    return 
1;
                }
                
GetPlayerName(playeridsendernameMAX_PLAYER_NAME);
                
format(string,sizeof(string),"[%s] Anuncio: %s  Jogador: %s[%d] - Cel:(%d)",NomeORG(playerid),result,sendername,playerid,PlayerInfo[playerid][pPnumber]);
                if(
GetPlayerOrg(playerid) == 5SendClientMessageToAll(COR_AZTECASstring);
                else if(
GetPlayerOrg(playerid) == 6SendClientMessageToAll(COR_TALstring);
                else if(
GetPlayerOrg(playerid) == 7SendClientMessageToAll(COR_PREstring);
                else if(
GetPlayerOrg(playerid) == 8SendClientMessageToAll(COR_HITMANstring);
                else if(
GetPlayerOrg(playerid) == 9SendClientMessageToAll(COR_REPstring);
                else if(
GetPlayerOrg(playerid) == 10SendClientMessageToAll(COR_TAXIstring);
                else if(
GetPlayerOrg(playerid) == 12SendClientMessageToAll(COR_COSAstring);
                else if(
GetPlayerOrg(playerid) == 13SendClientMessageToAll(COR_YAKstring);
                else if(
GetPlayerOrg(playerid) == 14SendClientMessageToAll(COR_GROstring);
                else if(
GetPlayerOrg(playerid) == 15SendClientMessageToAll(COR_ALstring);
                else if(
GetPlayerOrg(playerid) == 17SendClientMessageToAll(COR_BALLASstring);
                else if(
GetPlayerOrg(playerid) == 18SendClientMessageToAll(COR_VAGOSstring);
                else if(
GetPlayerOrg(playerid) == 19SendClientMessageToAll(COR_COMANDOVERMELHOstring);
                else if(
GetPlayerOrg(playerid) == 20SendClientMessageToAll(COR_PCCstring);
                else if(
GetPlayerOrg(playerid) == 21SendClientMessageToAll(COR_SOCIOOstring);
                print(string);
                
SBizzInfo[3][sbTill] += 100;
                
ExtortionSBiz(4100);
                
panunciogang 1;
                
SetTimer("AnuncioGang"300000);
            }
        }
        return 
1;
    } 
Reply
#2

Tenta assim isso resolveu meu caso uma vez
pawn Код:
if(strcmp(cmd, "/anunciogang", true) == 0 || strcmp(cmd, "/ang", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            if(GetPlayerOrg(playerid) == 5 || GetPlayerOrg(playerid) == 6 || GetPlayerOrg(playerid) == 7 || GetPlayerOrg(playerid) == 8 || GetPlayerOrg(playerid) == 9 || GetPlayerOrg(playerid) == 10 || GetPlayerOrg(playerid) == 12 || GetPlayerOrg(playerid) == 13 || GetPlayerOrg(playerid) == 14
            || GetPlayerOrg(playerid) == 15 || GetPlayerOrg(playerid) == 17 || GetPlayerOrg(playerid) == 18 || GetPlayerOrg(playerid) == 19 || GetPlayerOrg(playerid) == 20 || GetPlayerOrg(playerid) == 21)
            {
                if(PlayerInfo[playerid][pCargo] < 4)
                {
                    SendClientMessage(playerid, COLOR_GREY, "Voce precisa ter pelo menos cargo 4 para usar este comando!");
                    return 1;
                }
                if(PlayerInfo[playerid][pJailed] != 0)
                {
                   SendClientMessage(playerid,COR_VAGOS," Vocк nгo pode mandar anuncios preso!");
                   return 1;
                }
                new length = strlen(cmdtext);
                while ((idx < length) && (cmdtext[idx] <= ' '))
                {
                    idx++;
                }
                new offset = idx;
                new result[64];
                while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
                {
                    result[idx - offset] = cmdtext[idx];
                    idx++;
                }
                result[idx - offset] = EOS;
                if(!strlen(result))
                {
                    SendClientMessage(playerid, COLOR_GRAD2, "USE: (/ang) ou (/anunciogang) [texto]");
                    return 1;
                }
                if(TentouDivulgar(result))
                {
                if(cdivulgar[playerid] >= 6)
                {
                    SendClientMessage(playerid, COLOR_LIGHTBLUE,"Aqui vocк nгo pode anunciar servidores!");
                    SendClientMessage(playerid, COLOR_LIGHTBLUE,"Cuidado, Poderб ser banido.");
                    SendClientMessage(playerid, COLOR_LIGHTBLUE,"Evite digitar muitos nъmeros consecutivos.");
                    PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0);
                    Kick(playerid);
                }
                GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
                format(string, 128, "AdmAviso: [%d]%s tentou divulgar: %s.",playerid,playername,result);
                ABroadCast(COLOR_YELLOW,string,1);
                DivulgouLog(string);
                cdivulgar[playerid] += 1;
                return 1;
                }
                if(panunciogang == 1)
                {
                    SendClientMessage(playerid,COLOR_GRAD2,"Espere 30 segundos para poder anunciar novamente!");
                    return 1;
                }
                GetPlayerName(playerid, sendername, MAX_PLAYER_NAME);
                format(string,sizeof(string),"[%s] Anuncio: %s  Jogador: %s[%d] - Cel:(%d)",NomeORG(playerid),result,sendername,playerid,PlayerInfo[playerid][pPnumber]);
                if(GetPlayerOrg(playerid) == 5) SendClientMessageToAll(COR_AZTECAS, string);
                else if(GetPlayerOrg(playerid) == 6) SendClientMessageToAll(COR_TAL, string);
                else if(GetPlayerOrg(playerid) == 7) SendClientMessageToAll(COR_PRE, string);
                else if(GetPlayerOrg(playerid) == 8) SendClientMessageToAll(COR_HITMAN, string);
                else if(GetPlayerOrg(playerid) == 9) SendClientMessageToAll(COR_REP, string);
                else if(GetPlayerOrg(playerid) == 10) SendClientMessageToAll(COR_TAXI, string);
                else if(GetPlayerOrg(playerid) == 12) SendClientMessageToAll(COR_COSA, string);
                else if(GetPlayerOrg(playerid) == 13) SendClientMessageToAll(COR_YAK, string);
                else if(GetPlayerOrg(playerid) == 14) SendClientMessageToAll(COR_GRO, string);
                else if(GetPlayerOrg(playerid) == 15) SendClientMessageToAll(COR_AL, string);
                else if(GetPlayerOrg(playerid) == 17) SendClientMessageToAll(COR_BALLAS, string);
                else if(GetPlayerOrg(playerid) == 18) SendClientMessageToAll(COR_VAGOS, string);
                else if(GetPlayerOrg(playerid) == 19) SendClientMessageToAll(COR_COMANDOVERMELHO, string);
                else if(GetPlayerOrg(playerid) == 20) SendClientMessageToAll(COR_PCC, string);
                else if(GetPlayerOrg(playerid) == 21) SendClientMessageToAll(COR_SOCIOO, string);
                print(string);
                SBizzInfo[3][sbTill] += 100;
                ExtortionSBiz(4, 100);
                panunciogang = 1;
                SetTimer("AnuncioGang", 30000, 0);
            }
        }
        return 0;
    }
Reply
#3

Quote:
Originally Posted by wender_sousa
Посмотреть сообщение
Tenta assim isso resolveu meu caso uma vez
pawn Код:
if(strcmp(cmd, "/anunciogang", true) == 0 || strcmp(cmd, "/ang", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            if(GetPlayerOrg(playerid) == 5 || GetPlayerOrg(playerid) == 6 || GetPlayerOrg(playerid) == 7 || GetPlayerOrg(playerid) == 8 || GetPlayerOrg(playerid) == 9 || GetPlayerOrg(playerid) == 10 || GetPlayerOrg(playerid) == 12 || GetPlayerOrg(playerid) == 13 || GetPlayerOrg(playerid) == 14
            || GetPlayerOrg(playerid) == 15 || GetPlayerOrg(playerid) == 17 || GetPlayerOrg(playerid) == 18 || GetPlayerOrg(playerid) == 19 || GetPlayerOrg(playerid) == 20 || GetPlayerOrg(playerid) == 21)
            {
                if(PlayerInfo[playerid][pCargo] < 4)
                {
                    SendClientMessage(playerid, COLOR_GREY, "Voce precisa ter pelo menos cargo 4 para usar este comando!");
                    return 1;
                }
                if(PlayerInfo[playerid][pJailed] != 0)
                {
                   SendClientMessage(playerid,COR_VAGOS," Vocк nгo pode mandar anuncios preso!");
                   return 1;
                }
                new length = strlen(cmdtext);
                while ((idx < length) && (cmdtext[idx] <= ' '))
                {
                    idx++;
                }
                new offset = idx;
                new result[64];
                while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
                {
                    result[idx - offset] = cmdtext[idx];
                    idx++;
                }
                result[idx - offset] = EOS;
                if(!strlen(result))
                {
                    SendClientMessage(playerid, COLOR_GRAD2, "USE: (/ang) ou (/anunciogang) [texto]");
                    return 1;
                }
                if(TentouDivulgar(result))
                {
                if(cdivulgar[playerid] >= 6)
                {
                    SendClientMessage(playerid, COLOR_LIGHTBLUE,"Aqui vocк nгo pode anunciar servidores!");
                    SendClientMessage(playerid, COLOR_LIGHTBLUE,"Cuidado, Poderб ser banido.");
                    SendClientMessage(playerid, COLOR_LIGHTBLUE,"Evite digitar muitos nъmeros consecutivos.");
                    PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0);
                    Kick(playerid);
                }
                GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
                format(string, 128, "AdmAviso: [%d]%s tentou divulgar: %s.",playerid,playername,result);
                ABroadCast(COLOR_YELLOW,string,1);
                DivulgouLog(string);
                cdivulgar[playerid] += 1;
                return 1;
                }
                if(panunciogang == 1)
                {
                    SendClientMessage(playerid,COLOR_GRAD2,"Espere 30 segundos para poder anunciar novamente!");
                    return 1;
                }
                GetPlayerName(playerid, sendername, MAX_PLAYER_NAME);
                format(string,sizeof(string),"[%s] Anuncio: %s  Jogador: %s[%d] - Cel:(%d)",NomeORG(playerid),result,sendername,playerid,PlayerInfo[playerid][pPnumber]);
                if(GetPlayerOrg(playerid) == 5) SendClientMessageToAll(COR_AZTECAS, string);
                else if(GetPlayerOrg(playerid) == 6) SendClientMessageToAll(COR_TAL, string);
                else if(GetPlayerOrg(playerid) == 7) SendClientMessageToAll(COR_PRE, string);
                else if(GetPlayerOrg(playerid) == 8) SendClientMessageToAll(COR_HITMAN, string);
                else if(GetPlayerOrg(playerid) == 9) SendClientMessageToAll(COR_REP, string);
                else if(GetPlayerOrg(playerid) == 10) SendClientMessageToAll(COR_TAXI, string);
                else if(GetPlayerOrg(playerid) == 12) SendClientMessageToAll(COR_COSA, string);
                else if(GetPlayerOrg(playerid) == 13) SendClientMessageToAll(COR_YAK, string);
                else if(GetPlayerOrg(playerid) == 14) SendClientMessageToAll(COR_GRO, string);
                else if(GetPlayerOrg(playerid) == 15) SendClientMessageToAll(COR_AL, string);
                else if(GetPlayerOrg(playerid) == 17) SendClientMessageToAll(COR_BALLAS, string);
                else if(GetPlayerOrg(playerid) == 18) SendClientMessageToAll(COR_VAGOS, string);
                else if(GetPlayerOrg(playerid) == 19) SendClientMessageToAll(COR_COMANDOVERMELHO, string);
                else if(GetPlayerOrg(playerid) == 20) SendClientMessageToAll(COR_PCC, string);
                else if(GetPlayerOrg(playerid) == 21) SendClientMessageToAll(COR_SOCIOO, string);
                print(string);
                SBizzInfo[3][sbTill] += 100;
                ExtortionSBiz(4, 100);
                panunciogang = 1;
                SetTimer("AnuncioGang", 30000, 0);
            }
        }
        return 0;
    }
Ainda continua mano
Reply
#4

pawn Код:
if (strcmp(cmd, "/anunciogang", true) == 0 || strcmp(cmd, "/ang", true) == 0)
{
    if (IsPlayerConnected(playerid))
    {
        if (GetPlayerOrg(playerid) == 5 || GetPlayerOrg(playerid) == 6 || GetPlayerOrg(playerid) == 7 || GetPlayerOrg(playerid) == 8 || GetPlayerOrg(playerid) == 9 || GetPlayerOrg(playerid) == 10 || GetPlayerOrg(playerid) == 12 || GetPlayerOrg(playerid) == 13 || GetPlayerOrg(playerid) == 14 || GetPlayerOrg(playerid) == 15 || GetPlayerOrg(playerid) == 17 || GetPlayerOrg(playerid) == 18 || GetPlayerOrg(playerid) == 19 || GetPlayerOrg(playerid) == 20 || GetPlayerOrg(playerid) == 21)
        {
            if (PlayerInfo[playerid][pCargo] < 4)
            {
                SendClientMessage(playerid, COLOR_GREY, "Voce precisa ter pelo menos cargo 4 para usar este comando!");
                return 1;
            }
            if (PlayerInfo[playerid][pJailed] != 0)
            {
                SendClientMessage(playerid, COR_VAGOS, " Vocк nгo pode mandar anuncios preso!");
                return 1;
            }
            new length = strlen(cmdtext);
            while ((idx < length) && (cmdtext[idx] <= ' '))
            {
                idx++;
            }
            new offset = idx;
            new result[64];
            while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
            {
                result[idx - offset] = cmdtext[idx];
                idx++;
            }
            result[idx - offset] = EOS;
            if (!strlen(result))
            {
                SendClientMessage(playerid, COLOR_GRAD2, "USE: (/ang) ou (/anunciogang) [texto]");
                return 1;
            }
            if (TentouDivulgar(result))
            {
                if (cdivulgar[playerid] >= 6)
                {
                    SendClientMessage(playerid, COLOR_LIGHTBLUE, "Aqui vocк nгo pode anunciar servidores!");
                    SendClientMessage(playerid, COLOR_LIGHTBLUE, "Cuidado, Poderб ser banido.");
                    SendClientMessage(playerid, COLOR_LIGHTBLUE, "Evite digitar muitos nъmeros consecutivos.");
                    PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0);
                    Kick(playerid);
                }
                GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
                format(string, 128, "AdmAviso: [%d]%s tentou divulgar: %s.", playerid, playername, result);
                ABroadCast(COLOR_YELLOW, string, 1);
                DivulgouLog(string);
                cdivulgar[playerid] += 1;
                return 1;
            }
            if (panunciogang == 1)
            {
                SendClientMessage(playerid, COLOR_GRAD2, "Espere 30 segundos para poder anunciar novamente!");
                return 1;
            }
            GetPlayerName(playerid, sendername, MAX_PLAYER_NAME);
            format(string, sizeof(string), "[%s] Anuncio: %s  Jogador: %s[%d] - Cel:(%d)", NomeORG(playerid), result, sendername, playerid, PlayerInfo[playerid][pPnumber]);
            if (GetPlayerOrg(playerid) == 5) SendClientMessageToAll(COR_AZTECAS, string);
            else if (GetPlayerOrg(playerid) == 6) SendClientMessageToAll(COR_TAL, string);
            else if (GetPlayerOrg(playerid) == 7) SendClientMessageToAll(COR_PRE, string);
            else if (GetPlayerOrg(playerid) == 8) SendClientMessageToAll(COR_HITMAN, string);
            else if (GetPlayerOrg(playerid) == 9) SendClientMessageToAll(COR_REP, string);
            else if (GetPlayerOrg(playerid) == 10) SendClientMessageToAll(COR_TAXI, string);
            else if (GetPlayerOrg(playerid) == 12) SendClientMessageToAll(COR_COSA, string);
            else if (GetPlayerOrg(playerid) == 13) SendClientMessageToAll(COR_YAK, string);
            else if (GetPlayerOrg(playerid) == 14) SendClientMessageToAll(COR_GRO, string);
            else if (GetPlayerOrg(playerid) == 15) SendClientMessageToAll(COR_AL, string);
            else if (GetPlayerOrg(playerid) == 17) SendClientMessageToAll(COR_BALLAS, string);
            else if (GetPlayerOrg(playerid) == 18) SendClientMessageToAll(COR_VAGOS, string);
            else if (GetPlayerOrg(playerid) == 19) SendClientMessageToAll(COR_COMANDOVERMELHO, string);
            else if (GetPlayerOrg(playerid) == 20) SendClientMessageToAll(COR_PCC, string);
            else if (GetPlayerOrg(playerid) == 21) SendClientMessageToAll(COR_SOCIOO, string);
            print(string);
            SBizzInfo[3][sbTill] += 100;
            ExtortionSBiz(4, 100);
            panunciogang = 1;
            SetTimer("AnuncioGang", 30000, 0);
            return 1;
        }
    }
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)