[Ajuda] Destruir Veiculo
#1

Bom tava vendo aqui nao acho o erro, decidi pedi ajuda de vocкs

pawn Код:
if (strcmp(cmd, "/destruirid", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            if(PlayerInfo[playerid][pAdmin] < 3)
            {
                SendClientMessage(playerid, COLOR_GRAD1, "   Vocк nгo estб autorizado a usar este comando !");
                return true;
            }
   if(admtrampando[playerid] < 1 && PlayerInfo[playerid][pAdmin] != DONO)
            {
                SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo estб trabalhando! (/trabalhar)");
                return true;
            }
            new counter = 0;
            new result;
            new plyName[MAX_PLAYER_NAME];
            GetPlayerName(playerid, plyName, MAX_PLAYER_NAME);
            for(new i; i != MAX_VEHICLES; i++)
            {
                new dist = ChecarveiculoThiago(5, playerid, i);
                if(dist)
                {
                    result = i;
                    counter++;
                }
            }
            switch(counter)
            {
                case 0:
                {
                    SendClientMessage(playerid, COLOR_GREY, "   Nгo hб nenhum carro nesse raio!");
                }
                case 1:
                {
                    if(result < CAR_AMOUNT)
                    {
                        SendClientMessage(playerid, COLOR_GREY, "Vocк sу pode destruir veнculos criados");
                        return true;
                    }
                    new name[MAX_PLAYER_NAME];
                    GetPlayerName(playerid, name, sizeof(name));
                    DestroyVehicle(result);
                    format(string, sizeof(string), "Vocк destruiu o veнculo ID:[%d]", result);
                    SendClientMessage(playerid, COLOR_GREY, string);
                    if(admtrampando[playerid] == 1 && admhide[playerid] == 1)
                    {
                        format(string, sizeof(string), "AdmAviso: Carro ID:[%d] foi destruido Por: Homem_Aranha", result);
                        ABroadCast(COLOR_YELLOW,string,1);
                    }
                    else
                    {
                        format(string, sizeof(string), "AdmAviso: Carro ID:[%d] foi destruido Por: %s", result, name);
                        ABroadCast(COLOR_YELLOW,string,1);
                    }
                }
                default:
                {
                    SendClientMessage(playerid, COLOR_GREY, "   Foram encontrados mais de um carro nesse raio");
                }
            }
        }
        return true;
    }
sempre fala: Vocк sу pode destruir veнculos criados alguem sabe onde ta o erro?
Reply


Messages In This Thread
Destruir Veiculo - by Wallker - 10.08.2012, 23:11
Re: Destruir Veiculo - by Nill.Oliveira - 10.08.2012, 23:46
Re: Destruir Veiculo - by [BcSTotty_Munson - 10.08.2012, 23:47
Re: Destruir Veiculo - by @Riichard - 10.08.2012, 23:47
Re: Destruir Veiculo - by Wallker - 10.08.2012, 23:53
Re: Destruir Veiculo - by Nill.Oliveira - 11.08.2012, 00:00
Re: Destruir Veiculo - by Wallker - 11.08.2012, 00:05
Re: Destruir Veiculo - by Victor' - 11.08.2012, 00:16
Re: Destruir Veiculo - by Wallker - 11.08.2012, 00:19
Re: Destruir Veiculo - by Victor' - 11.08.2012, 00:24

Forum Jump:


Users browsing this thread: 1 Guest(s)