[Ajuda] cmd /darvip
#1

Coe Galera ... To com um problema.
Quando Coloco esse /cmd no GM ele da um monte de erro mas os erros nao tem nada a ver com cmd.

CMD:

pawn Код:
if(strcmp(cmd, "/darvip", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
                SendClientMessage(playerid, COLOR_GRAD2, "USE: /darvip [ id ] [ Nivel ]");
                return 1;
            }
            new Float:plocx,Float:plocy,Float:plocz;
            new plo;
            plo = ReturnUser(tmp);
            if (IsPlayerConnected(plo))
            {
                if(plo != INVALID_PLAYER_ID)
                {
                    if (PlayerInfo[playerid][pAdmin] >= 1)
                    {
                        if(admtrampando[playerid] < 1)
                        {
                            SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo estб trabalhando! (/jogar)");
                            return 1;
                        }
                        if(PlayerInfo[playerid][pAdmin] >= 1338)
                        {
                             new vipnome[MAX_PLAYER_NAME];
                             GetPlayerName(giveplayerid,vipnome,sizeof(vipnome));
                             PlayerInfo[giveplayerid][pVIP] = quantidade;
                             new year, month,day;
                             getdate(year, month, day);
                             new hour, minute;
                             gettime(hour,minute);
                             format(string, sizeof(string), "%s deu vip ao %s nнvel %d ( %d/%d/%d - %d:%d)",editarnome,vipnome,quantidade,year, month, day,hour, minute);
                             VipsLog(string);
                             ABroadCast(COLOR_LIGHTRED,string,1);
                        }
                        else
                        {
                            SendClientMessage(playerid, COLOR_GRAD1, "   Voce nгo esta autorizado a usar este comando!");
                    }
                }
            }
            else
            {
                format(string, sizeof(string), "%d Player Nao Esta Conectado.", plo);
                SendClientMessage(playerid, COLOR_GRAD1, string);
            }
        }
        return 1;
    }

Sera que foi alguma coisa que eu fiz errado??

Obrigado Por aqueles que mi ajudarem!!!!!
Reply
#2

Posta os erros cara
Reply
#3

Faltou uma chave no par do primeiro else .


Troque seu comando por este :


pawn Код:
if(strcmp(cmd, "/darvip", true) == 0)
    {
        tmp = strtok(cmdtext, idx);
        if(!strlen(tmp))    return SendClientMessage(playerid, COLOR_GRAD2, "USE: /darvip [ id ] [ Nivel ]");
        new plo = ReturnUser(tmp);
        tmp = strtok(cmdtext, idx);
        if(!strlen(tmp))    return SendClientMessage(playerid, COLOR_GRAD2, "USE: /darvip [ id ] [ Nivel ]");
        new nivel = strval(tmp);
        if(!IsPlayerConnected(plo)) return SendClientMessage(playerid, COLOR_GRAD1, "O jogador nгo estб conectado.");
        if(admtrampando[playerid] < 1)  return SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo estб trabalhando! (/jogar)");
        if(PlayerInfo[playerid][pAdmin] < 1338)    return SendClientMessage(playerid, COLOR_GRAD1, "Voce nгo esta autorizado a usar este comando!");
        new NickName[MAX_PLAYER_NAME];
        GetPlayerName(playerid, NickName, MAX_PLAYER_NAME);
        new vipnome[MAX_PLAYER_NAME];
        GetPlayerName(giveplayerid,vipnome,sizeof(vipnome));
        PlayerInfo[giveplayerid][pVIP] = nivel;
        new year, month,day;
        getdate(year, month, day);
        new hour, minute;
        gettime(hour,minute);
        format(string, sizeof(string), "%s deu vip ao %s nнvel %d ( %d/%d/%d - %d:%d)",NickName,vipnome,nivel,year, month, day,hour, minute);
        VipsLog(string);
        ABroadCast(COLOR_LIGHTRED,string,1);
        return 1;
    }


Espero ter ajudado .
Reply
#4

Reply
#5

Quote:
Originally Posted by rjjj
Посмотреть сообщение
Faltou uma chave no par do primeiro else .


Troque seu comando por este :


pawn Код:
if(strcmp(cmd, "/darvip", true) == 0)
    {
        tmp = strtok(cmdtext, idx);
        if(!strlen(tmp))    return SendClientMessage(playerid, COLOR_GRAD2, "USE: /darvip [ id ] [ Nivel ]");
        new plo = ReturnUser(tmp);
        tmp = strtok(cmdtext, idx);
        if(!strlen(tmp))    return SendClientMessage(playerid, COLOR_GRAD2, "USE: /darvip [ id ] [ Nivel ]");
        new nivel = strval(tmp);
        if(!IsPlayerConnected(plo)) return SendClientMessage(playerid, COLOR_GRAD1, "O jogador nгo estб conectado.");
        if(admtrampando[playerid] < 1)  return SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo estб trabalhando! (/jogar)");
        if(PlayerInfo[playerid][pAdmin] < 1338)    return SendClientMessage(playerid, COLOR_GRAD1, "Voce nгo esta autorizado a usar este comando!");
        new NickName[MAX_PLAYER_NAME];
        GetPlayerName(playerid, NickName, MAX_PLAYER_NAME);
        new vipnome[MAX_PLAYER_NAME];
        GetPlayerName(giveplayerid,vipnome,sizeof(vipnome));
        PlayerInfo[giveplayerid][pVIP] = nivel;
        new year, month,day;
        getdate(year, month, day);
        new hour, minute;
        gettime(hour,minute);
        format(string, sizeof(string), "%s deu vip ao %s nнvel %d ( %d/%d/%d - %d:%d)",NickName,vipnome,nivel,year, month, day,hour, minute);
        VipsLog(string);
        ABroadCast(COLOR_LIGHTRED,string,1);
        return 1;
    }


Espero ter ajudado .
kkkkkk tbm desconfiava disso mas eu contava e recontava e dava a msm coisa.

vlw
Reply
#6

Nessas horas NOTEPAD++ owna!!
Reply
#7

Quote:
Originally Posted by paulor
Посмотреть сообщение
Nessas horas NOTEPAD++ owna!!
Nem tem mais isso no nosso PC .
E Como sempre Tito e o desatualizado KKKKKKK
Reply
#8

Quote:
Originally Posted by Don_Speed
Посмотреть сообщение
Nem tem mais isso no nosso PC .
E Como sempre Tito e o desatualizado KKKKKKK


Ta Tirando nao fico 24 Hrs na frente do computador igual voce.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)