[Ajuda] BUG ?
#1

Eu Estou como admin level (1342) mais fala que eu nao tenho permiзгo de usar o comando
Esse sгo os 2 /darsocio que eu achei no meu gm

pawn Код:
if(strcmp(cmd, "/darsocio", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
                SendClientMessage(playerid, COLOR_GRAD2, "USE: /darsocio [id]");
                return true;
            }
            new para1;
            para1 = ReturnUser(tmp);
            tmp = strtok(cmdtext, idx);
            GetPlayerName(playerid, sendername, 256);
            if (strcmp(sendername,"Alien_CarboN",true)==0)
            {
                if(IsPlayerConnected(para1))
                {
                    if(para1 != INVALID_PLAYER_ID)
                    {
                        GetPlayerName(para1, giveplayer, sizeof(giveplayer));
                        GetPlayerName(playerid, sendername, sizeof(sendername));
                        PlayerInfo[para1][pSocio] = 1;
                        format(string, sizeof(string), "Vocк ganhou Sуcio do admin %s", sendername);
                        SendClientMessage(para1, COLOR_LIGHTBLUE, string);
                        format(string, sizeof(string), "Vocк deu VIP socio para %s.", giveplayer);
                        SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
                    }
                }
            }
            else
            {
                SendClientMessage(playerid, COLOR_GRAD1, "   Vocк nгo esta autorizado a usar este comando!");
            }
        }
        return true;
    }
    if(strcmp(cmd, "/retirarsocio", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
                SendClientMessage(playerid, COLOR_GRAD2, "USE: /retirarsocio [id]");
                return true;
            }
            new para1;
            para1 = ReturnUser(tmp);
            tmp = strtok(cmdtext, idx);
            GetPlayerName(playerid, sendername, 256);
            if (strcmp(sendername,"Alien_CarboN",true)==0)
            {
                if(IsPlayerConnected(para1))
                {
                    if(para1 != INVALID_PLAYER_ID)
                    {
                        GetPlayerName(para1, giveplayer, sizeof(giveplayer));
                        GetPlayerName(playerid, sendername, sizeof(sendername));
                        PlayerInfo[para1][pSocio] = 0;
                        format(string, sizeof(string), "Seu Socio Foi retirado pelo adm %s", sendername);
                        SendClientMessage(para1, COLOR_LIGHTBLUE, string);
                        format(string, sizeof(string), "Vocк retirou o Socio de %s.", giveplayer);
                        SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
                    }
                }
            }
            else
            {
                SendClientMessage(playerid, COLOR_GRAD1, "   Vocк nгo esta autorizado a usar este comando!");
            }
        }
        return true;
    }


pawn Код:
/*if(strcmp(cmd, "/darsocio", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
                SendClientMessage(playerid, COLOR_GRAD2, "USE: /darsocio [id]");
                return true;
            }
            new para1;
            para1 = ReturnUser(tmp);
            tmp = strtok(cmdtext, idx);
            if (PlayerInfo[playerid][pAdmin] >= SUB_GERENTE)
            {
                if(IsPlayerConnected(para1))
                {
                    if(para1 != INVALID_PLAYER_ID)
                    {
                        GetPlayerName(para1, giveplayer, sizeof(giveplayer));
                        GetPlayerName(playerid, sendername, sizeof(sendername));
                        PlayerInfo[para1][pSocio] = 1;
                        format(string, sizeof(string), "   Vocк ganhou VIP socio do admin %s", PlayerName(playerid));
                        SendClientMessage(para1, COLOR_LIGHTBLUE, string);
                        format(string, sizeof(string), "   Vocк deu VIP socio para %s.", giveplayer);
                        SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
                    }
                }
            }
            else
            {
                SendClientMessage(playerid, COLOR_GRAD1, "   Vocк nгo esta autorizado a usar este comando!");
            }
        }
        return true;
    }
    if(strcmp(cmd, "/retirarsocio", true) == 0)
    {
        SendClientMessage(playerid, COLOR_GRAD1, "   Vocк deve usar /retirarvip!");
        return true;
    }*/
Reply
#2

Outro tуpico?
vou reportar jб#
-zoa, odeio prejudicar os outros..
sabe ali onde tб escrito Alien_CarboN ?
substitui pelo seu nome
Reply
#3

aa desculpa nгo sabia que nao podia criar outro top



o CarboN e meu mesmo so deixei o Alien mais ja mudei xD
Reply
#4

Gamemode do halls neh.. nгo tirou os crйditos neh?
vc podia substituir essa linha para uma linha pedindo lvl de adm 1339+
Reply
#5

KK


VO LA TESTAR VLW ME AJUDO MUITO OMICAEL
Reply
#6

Nas chamadas da funзгo strcmp efetuadas para comparar o nome do jogador com determinado nome, passe false como terceiro argumento em vez de true .



Espero ter ajudado .
Reply
#7

Nao mudo ta o mesmo erro


vc nao pode usar esse comando
Reply
#8

Alisson,
1 verifique se vocк tem 2 /darsocio
2 subistitua a linha com o nome la, bote if (PlayerInfo[playerid][pAdmin] >= 1341)


se n der certo, substitua seu comando por este:
pawn Код:
if(strcmp(cmd, "/darsocio", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
                SendClientMessage(playerid, COLOR_GRAD2, "USE: /darsocio [id]");
                return true;
            }
            new para1;
            para1 = ReturnUser(tmp);
            tmp = strtok(cmdtext, idx);
            GetPlayerName(playerid, sendername, 256);
            if (PlayerInfo[playerid][pAdmin] >= 1341)
            {
                if(IsPlayerConnected(para1))
                {
                    if(para1 != INVALID_PLAYER_ID)
                    {
                        GetPlayerName(para1, giveplayer, sizeof(giveplayer));
                        GetPlayerName(playerid, sendername, sizeof(sendername));
                        PlayerInfo[para1][pSocio] = 1;
                        format(string, sizeof(string), "Vocк ganhou Sуcio do admin %s", sendername);
                        SendClientMessage(para1, COLOR_LIGHTBLUE, string);
                        format(string, sizeof(string), "Vocк deu VIP socio para %s.", giveplayer);
                        SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
                    }
                }
            }
            else
            {
                SendClientMessage(playerid, COLOR_GRAD1, "   Vocк nгo esta autorizado a usar este comando!");
            }
        }
        return true;
    }
Se ainda n der, delete o seu .amx e mande compilar dnv.
Reply
#9

Tenho 2 CMD /Darsocio

pawn Код:
if(strcmp(cmd, "/darsocio", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
                SendClientMessage(playerid, COLOR_GRAD2, "USE: /darsocio [id]");
                return true;
            }
            new para1;
            para1 = ReturnUser(tmp);
            tmp = strtok(cmdtext, idx);
            GetPlayerName(playerid, sendername, 256);
            if (strcmp(sendername,"Alien_CarboN",true)==0)
            {
                if(IsPlayerConnected(para1))
                {
                    if(para1 != INVALID_PLAYER_ID)
                    {
                        GetPlayerName(para1, giveplayer, sizeof(giveplayer));
                        GetPlayerName(playerid, sendername, sizeof(sendername));
                        PlayerInfo[para1][pSocio] = 1;
                        format(string, sizeof(string), "Vocк ganhou Sуcio do admin %s", sendername);
                        SendClientMessage(para1, COLOR_LIGHTBLUE, string);
                        format(string, sizeof(string), "Vocк deu VIP socio para %s.", giveplayer);
                        SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
                    }
                }
            }
            else
            {
                SendClientMessage(playerid, COLOR_GRAD1, "   Vocк nгo esta autorizado a usar este comando!");
            }
        }
        return true;
    }
    if(strcmp(cmd, "/retirarsocio", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
                SendClientMessage(playerid, COLOR_GRAD2, "USE: /retirarsocio [id]");
                return true;
            }
            new para1;
            para1 = ReturnUser(tmp);
            tmp = strtok(cmdtext, idx);
            GetPlayerName(playerid, sendername, 256);
            if (strcmp(sendername,"Alien_CarboN",true)==0)
            {
                if(IsPlayerConnected(para1))
                {
                    if(para1 != INVALID_PLAYER_ID)
                    {
                        GetPlayerName(para1, giveplayer, sizeof(giveplayer));
                        GetPlayerName(playerid, sendername, sizeof(sendername));
                        PlayerInfo[para1][pSocio] = 0;
                        format(string, sizeof(string), "Seu Socio Foi retirado pelo adm %s", sendername);
                        SendClientMessage(para1, COLOR_LIGHTBLUE, string);
                        format(string, sizeof(string), "Vocк retirou o Socio de %s.", giveplayer);
                        SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
                    }
                }
            }
            else
            {
                SendClientMessage(playerid, COLOR_GRAD1, "   Vocк nгo esta autorizado a usar este comando!");
            }
        }
        return true;
    }


pawn Код:
//----------------------------------[MAKEADMIN]------------------------------------------------
if(strcmp(cmd, "/darsocio", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
                SendClientMessage(playerid, COLOR_GRAD2, "USE: /darsocio [ ID ] [LEVEL ( 1 ~ 3000 )]");
                return 1;
            }
            new para1;
            new level;
            para1 = ReturnUser(tmp);
            tmp = strtok(cmdtext, idx);
            level = strval(tmp);
            printf("Level de Administrador: %d", PlayerInfo[playerid][pAdmin]);
            if (PlayerInfo[playerid][pAdmin] >= 1339)
            {
                if(IsPlayerConnected(para1))
                {
                    if(para1 != INVALID_PLAYER_ID)
                    {
                        GetPlayerName(para1, giveplayer, sizeof(giveplayer));
                        GetPlayerName(playerid, sendername, sizeof(sendername));
                        PlayerInfo[para1][pVip] = level;
                        printf("ADMIN CMD: %s promoveu %s para level %d de socio.", sendername, giveplayer, level);
                        format(string, sizeof(string), "   Vocк foi promovido para level %d de socio - Por %s", level, sendername);
                        SendClientMessage(para1, COLOR_LIGHTBLUE, string);
                        format(string, sizeof(string), "   Vocк promoveu o(a) %s Para o level %d de Socio.", giveplayer,level);
                        SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
                    }
                }
            }
            else
            {
                SendClientMessage(playerid, COLOR_GRAD1, "   Vocк nгo esta autorizado a usar este comando!");
            }
        }
        return 1;
    }
    if(strcmp(cmd, "/retirarsocio", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
                SendClientMessage(playerid, COLOR_GRAD2, "USE: /darsocio [id]");
                return 1;
            }
            new para1;
            para1 = ReturnUser(tmp);
            tmp = strtok(cmdtext, idx);
            if (PlayerInfo[playerid][pAdmin] >= 1339)
            {
                if(IsPlayerConnected(para1))
                {
                    if(para1 != INVALID_PLAYER_ID)
                    {
                        GetPlayerName(para1, giveplayer, sizeof(giveplayer));
                        GetPlayerName(playerid, sendername, sizeof(sendername));
                        PlayerInfo[para1][pSocio] = 0;
                        format(string, sizeof(string), "Seu Socio Foi retirado pelo adm %s", sendername);
                        SendClientMessage(para1, COLOR_LIGHTBLUE, string);
                        format(string, sizeof(string), "Vocк retirou o Socio de %s.", giveplayer);
                        SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
                    }
                }
            }
            else
            {
                SendClientMessage(playerid, COLOR_GRAD1, "   Vocк nгo esta autorizado a usar este comando!");
            }
        }
        return 1;
{
Reply
#10

Vocк mandou o /dar e /retirar juntos no primeiro cуdigo.
Apague o segundo e substitua o primeiro pelo comando que mandei neste mesmo tуpico.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)