[Ajuda] Porque Nгo Esta Pegando ?
#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


Messages In This Thread
Porque Nгo Esta Pegando ? - by Alisson Silva Alves - 23.12.2012, 23:39
Re: Porque Nгo Esta Pegando ? - by joaobgnc - 23.12.2012, 23:42
Re: Porque Nгo Esta Pegando ? - by EditPawn - 23.12.2012, 23:43
Re: Porque Nгo Esta Pegando ? - by Arthur_BiT - 23.12.2012, 23:44
Re: Porque Nгo Esta Pegando ? - by Alisson Silva Alves - 23.12.2012, 23:47
Re: Porque Nгo Esta Pegando ? - by EditPawn - 23.12.2012, 23:52
Re: Porque Nгo Esta Pegando ? - by Alisson Silva Alves - 23.12.2012, 23:54
Re: Porque Nгo Esta Pegando ? - by EditPawn - 23.12.2012, 23:56
Re: Porque Nгo Esta Pegando ? - by Alisson Silva Alves - 23.12.2012, 23:57
Re: Porque Nгo Esta Pegando ? - by EditPawn - 24.12.2012, 00:07

Forum Jump:


Users browsing this thread: 1 Guest(s)