[Ajuda] Alguem me ajuda no /destruirid
#1

bom pessoal quando crio um carro pelo comando /cveh nгo consigo destruir o mesmo porque diz que nгo hб carro criado !

Cveh: http://pastebin.com/rBEit8Ad
Destruirid (NAO PEGA): http://pastebin.com/8zFVA0jP
Reply
#2

Tenta assim:
pawn Код:
if(!strcmp("/destruirid", cmdtext, true))
        {
                if(IsPlayerConnected(playerid))
            {
                if(PlayerInfo[playerid][pAdmin] < 3)
                        {
                            SendClientMessage(playerid, COLOR_GRAD1, "   Vocк nгo estб autorizado a usar este comando !");
                            return 1;
                        }
                        if(admtrampando[playerid] < 1 && PlayerInfo[playerid][pAdmin] != 1342 && PlayerInfo[playerid][pAdmin] != 1341)
                        {
                                SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo estб trabalhando! (/trabalhar)");
                                return 1;
                        }
                        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 = ChecarveiculoBGL(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 1;
                                    }
                                        new name[MAX_PLAYER_NAME];
                                    GetPlayerName(playerid, name, sizeof(name));
                                    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: Chuck", 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);
                                        }
                                        DestroyVehicle(result);
                                        CreatedCar --;
                                }
                                default:
                                {
                                        SendClientMessage(playerid, COLOR_GREY, "   Foram encontrados mais de um carro nesse raio");
                                }
                        }
                }
                return 1;
        }
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)