[ajuda] /comprarcarro
#1

bvem galera й o seguinte meu /comprarcarro ta bugado quando eu compro um carro para a minha casa ao ivez de deletar o antigo ele cria outro em cima do que eu ja tinha isso tudo com os carros das casa gostaria se saber o que devo mudar no codigo para ele deletar o carro antigo obg qualquer ajuda й bem vinda...

codigo:
pawn Код:
if (strcmp(cmd, "/comprarcarro", true) == 0 || strcmp(cmd, "/trocarcarro", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            new House = PlayerInfo[playerid][pPHousekey];
            GetPlayerName(playerid, playername, sizeof(playername));
            if (House != 255 && strcmp(playername, HouseInfo[PlayerInfo[playerid][pPHousekey]][hOwner], true) == 0)
            {
                new gunid[16];
                tmp = strtok(cmdtext, idx);
                if(!strlen(tmp))
                {
                    MSGPLAYER(playerid, COLOR_WHITE, "|______________ Novos Carros,Preзo R$100000 ______________|");
                    MSGPLAYER(playerid, COLOR_GRAD2,"USE: /comprarcarro [nomedocarro]");
                    MSGPLAYER(playerid, 0xFFFF66F, "Carros: | blistac | clover | elegant | emperor | glendale | greenwood | stafford | mountainbike |");
                    MSGPLAYER(playerid, 0xFFFF66F, "Carros: | huntley | jester | landstalker | merit | nebula | sabre | stratum | hornet | bike |");
                    MSGPLAYER(playerid, 0xFFFF66F, "Carros: | sunrise | tahoma | uranus | blade | flash | buffalo | phoenix | sultan | bf-injection |");
                    MSGPLAYER(playerid, 0x33FF00FF, "Carros VIP's: | limozine | elegy | hotknife | bandito | nrg500 | zr350 | premier |");
                    MSGPLAYER(playerid, 0x33FF00FF, "Carros VIP's: | bullet | turismo | infernus | cheetah | savanna | comet |");
                    return 1;
                }
                strmid(gunid, tmp, 0, strlen(cmdtext), 255);
                if (GetPlayerMoney(playerid) > 100000)
                {
                    new carid = PlayerInfo[playerid][pPHousekey]+totalveiculosh;
                    if(strcmp(gunid, "limozine", true, strlen(gunid)) == 0)
                    {
                        if(PlayerInfo[playerid][pVIP] < 1)
                        {
                            MSGPLAYER(playerid, COLOR_GREY, "   Vocк nгo й membro vip !");
                            return 1;
                        }
                        MSGPLAYER(playerid, COLOR_GRAD6, "Atualizaзгo: Vocк trocou o carro da sua casa para Limozine");
                        HouseInfo[House][hVec] = 409;
                        DestroyVehicle(carid);
                        CreateVehicle(HouseInfo[House][hVec], HouseCarSpawns[House][0], HouseCarSpawns[House][1], HouseCarSpawns[House][2], HouseCarSpawns[House][3], HouseInfo[House][hVcol1], HouseInfo[House][hVcol2], 6000000);
                    }
                    if(strcmp(gunid, "premier", true, strlen(gunid)) == 0)
                    {
                        if(PlayerInfo[playerid][pVIP] < 1)
                        {
                            MSGPLAYER(playerid, COLOR_GREY, "   Vocк nгo й membro vip !");
                            return 1;
                        }
                        MSGPLAYER(playerid, COLOR_GRAD6, "Atualizaзгo: Vocк trocou o carro da sua casa para Premier");
                        HouseInfo[House][hVec] = 426;
                        DestroyVehicle(carid);
                        CreateVehicle(HouseInfo[House][hVec], HouseCarSpawns[House][0], HouseCarSpawns[House][1], HouseCarSpawns[House][2], HouseCarSpawns[House][3], HouseInfo[House][hVcol1], HouseInfo[House][hVcol2], 6000000);
                    }
                    else if(strcmp(gunid, "hotknife", true, strlen(gunid)) == 0)
                    {
                        if(PlayerInfo[playerid][pVIP] < 1)
                        {
                            MSGPLAYER(playerid, COLOR_GREY, "   Vocк nгo й membro vip !");
                            return 1;
                        }
                        MSGPLAYER(playerid, COLOR_GRAD6, "Atualizaзгo: Vocк trocou o carro da sua casa para Hotknife");
                        HouseInfo[House][hVec] = 434;
                        DestroyVehicle(carid);
                        CreateVehicle(HouseInfo[House][hVec], HouseCarSpawns[House][0], HouseCarSpawns[House][1], HouseCarSpawns[House][2], HouseCarSpawns[House][3], HouseInfo[House][hVcol1], HouseInfo[House][hVcol2], 6000000);
                    }
                    else if(strcmp(gunid, "comet", true, strlen(gunid)) == 0)
                    {
                        if(PlayerInfo[playerid][pVIP] < 1)
                        {
                            MSGPLAYER(playerid, COLOR_GREY, "   Vocк nгo й membro vip !");
                            return 1;
                        }
                        MSGPLAYER(playerid, COLOR_GRAD6, "Atualizaзгo: Vocк trocou o carro da sua casa para Comet");
                        HouseInfo[House][hVec] = 480;
                        DestroyVehicle(carid);
                        CreateVehicle(HouseInfo[House][hVec], HouseCarSpawns[House][0], HouseCarSpawns[House][1], HouseCarSpawns[House][2], HouseCarSpawns[House][3], HouseInfo[House][hVcol1], HouseInfo[House][hVcol2], 6000000);
                    }
                    else if(strcmp(gunid, "zr350", true, strlen(gunid)) == 0)
                    {
                        if(PlayerInfo[playerid][pVIP] < 1)
                        {
                            MSGPLAYER(playerid, COLOR_GREY, "   Vocк nгo й membro vip !");
                            return 1;
                        }
                        MSGPLAYER(playerid, COLOR_GRAD6, "Atualizaзгo: Vocк trocou o carro da sua casa para o ZR-350");
                        HouseInfo[House][hVec] = 477;
                        DestroyVehicle(carid);
                        CreateVehicle(HouseInfo[House][hVec], HouseCarSpawns[House][0], HouseCarSpawns[House][1], HouseCarSpawns[House][2], HouseCarSpawns[House][3], HouseInfo[House][hVcol1], HouseInfo[House][hVcol2], 6000000);
                    }
                    else if(strcmp(gunid, "nrg500", true, strlen(gunid)) == 0)
                    {
                        if(PlayerInfo[playerid][pVIP] < 1)
                        {
                            MSGPLAYER(playerid, COLOR_GREY, "   Vocк nгo й membro vip !");
                            return 1;
                        }
                        MSGPLAYER(playerid, COLOR_GRAD6, "Atualizaзгo: Vocк trocou o carro da sua casa para a moto nrg500");
                        HouseInfo[House][hVec] = 522;
                        DestroyVehicle(carid);
                        CreateVehicle(HouseInfo[House][hVec], HouseCarSpawns[House][0], HouseCarSpawns[House][1], HouseCarSpawns[House][2], HouseCarSpawns[House][3], HouseInfo[House][hVcol1], HouseInfo[House][hVcol2], 6000000);
                    }
                    else if(strcmp(gunid, "bandito", true, strlen(gunid)) == 0)
                    {
                        if(PlayerInfo[playerid][pVIP] < 1)
                        {
                            MSGPLAYER(playerid, COLOR_GREY, "   Vocк nгo й membro vip !");
                            return 1;
                        }
                        MSGPLAYER(playerid, COLOR_GRAD6, "Atualizaзгo: Vocк trocou o carro da sua casa para o Bandito");
                        HouseInfo[House][hVec] = 568;
                        DestroyVehicle(carid);
                        CreateVehicle(HouseInfo[House][hVec], HouseCarSpawns[House][0], HouseCarSpawns[House][1], HouseCarSpawns[House][2], HouseCarSpawns[House][3], HouseInfo[House][hVcol1], HouseInfo[House][hVcol2], 6000000);
                    }
                    else if(strcmp(gunid, "elegy", true, strlen(gunid)) == 0)
                    {
                        if(PlayerInfo[playerid][pVIP] < 1)
                        {
                            MSGPLAYER(playerid, COLOR_GREY, "   Vocк nгo й membro vip !");
                            return 1;
                        }
                        MSGPLAYER(playerid, COLOR_GRAD6, "Atualizaзгo: Vocк trocou o carro da sua casa para o Elegy");
                        HouseInfo[House][hVec] = 562;
                        DestroyVehicle(carid);
                        CreateVehicle(HouseInfo[House][hVec], HouseCarSpawns[House][0], HouseCarSpawns[House][1], HouseCarSpawns[House][2], HouseCarSpawns[House][3], HouseInfo[House][hVcol1], HouseInfo[House][hVcol2], 6000000);
                    }
                    else if(strcmp(gunid, "bullet", true, strlen(gunid)) == 0)
                    {
                        if(PlayerInfo[playerid][pVIP] < 1)
                        {
                            MSGPLAYER(playerid, COLOR_GREY, "   Vocк nгo й membro vip !");
                            return 1;
                        }
                        MSGPLAYER(playerid, COLOR_GRAD6, "Atualizaзгo: Vocк trocou o carro da sua casa para o Bullet");
                        HouseInfo[House][hVec] = 541;
                        DestroyVehicle(carid);
                        CreateVehicle(HouseInfo[House][hVec], HouseCarSpawns[House][0], HouseCarSpawns[House][1], HouseCarSpawns[House][2], HouseCarSpawns[House][3], HouseInfo[House][hVcol1], HouseInfo[House][hVcol2], 6000000);
                    }
                    else if(strcmp(gunid, "turismo", true, strlen(gunid)) == 0)
                    {
                        if(PlayerInfo[playerid][pVIP] < 1)
                        {
                            MSGPLAYER(playerid, COLOR_GREY, "   Vocк nгo й membro vip !");
                            return 1;
                        }
                        MSGPLAYER(playerid, COLOR_GRAD6, "Atualizaзгo: Vocк trocou o carro da sua casa para o Turismo");
                        HouseInfo[House][hVec] = 451;
                        DestroyVehicle(carid);
                        CreateVehicle(HouseInfo[House][hVec], HouseCarSpawns[House][0], HouseCarSpawns[House][1], HouseCarSpawns[House][2], HouseCarSpawns[House][3], HouseInfo[House][hVcol1], HouseInfo[House][hVcol2], 6000000);
                    }
                    else if(strcmp(gunid, "infernus", true, strlen(gunid)) == 0)
                    {
                        if(PlayerInfo[playerid][pVIP] < 1)
                        {
                            MSGPLAYER(playerid, COLOR_GREY, "   Vocк nгo й membro vip !");
                            return 1;
                        }
                        MSGPLAYER(playerid, COLOR_GRAD6, "Atualizaзгo: Vocк trocou o carro da sua casa para o Infernus");
                        HouseInfo[House][hVec] = 411;
                        DestroyVehicle(carid);
                        CreateVehicle(HouseInfo[House][hVec], HouseCarSpawns[House][0], HouseCarSpawns[House][1], HouseCarSpawns[House][2], HouseCarSpawns[House][3], HouseInfo[House][hVcol1], HouseInfo[House][hVcol2], 6000000);
                    }
                    else if(strcmp(gunid, "cheetah", true, strlen(gunid)) == 0)
                    {
                        if(PlayerInfo[playerid][pVIP] < 1)
                        {
                            MSGPLAYER(playerid, COLOR_GREY, "   Vocк nгo й membro vip !");
                            return 1;
                        }
                        MSGPLAYER(playerid, COLOR_GRAD6, "Atualizaзгo: Vocк trocou o carro da sua casa para o Cheetah");
                        HouseInfo[House][hVec] = 415;
                        DestroyVehicle(carid);
                        CreateVehicle(HouseInfo[House][hVec], HouseCarSpawns[House][0], HouseCarSpawns[House][1], HouseCarSpawns[House][2], HouseCarSpawns[House][3], HouseInfo[House][hVcol1], HouseInfo[House][hVcol2], 6000000);
                    }
                    else if(strcmp(gunid, "savanna", true, strlen(gunid)) == 0)
                    {
                        if(PlayerInfo[playerid][pVIP] < 1)
                        {
                            MSGPLAYER(playerid, COLOR_GREY, "   Vocк nгo й membro vip !");
                            return 1;
                        }
                        MSGPLAYER(playerid, COLOR_GRAD6, "Atualizaзгo: Vocк trocou o carro da sua casa para o Savanna");
                        HouseInfo[House][hVec] = 567;
                        DestroyVehicle(carid);
                        CreateVehicle(HouseInfo[House][hVec], HouseCarSpawns[House][0], HouseCarSpawns[House][1], HouseCarSpawns[House][2], HouseCarSpawns[House][3], HouseInfo[House][hVcol1], HouseInfo[House][hVcol2], 6000000);
                    }
                    else if(strcmp(gunid, "blistac", true, strlen(gunid)) == 0)
                    {
                        MSGPLAYER(playerid, COLOR_GRAD6, "Atualizaзгo: Vocк trocou o carro da sua casa para o Blista Compact");
                        HouseInfo[House][hVec] = 496;
                        DestroyVehicle(carid);
                        CreateVehicle(HouseInfo[House][hVec], HouseCarSpawns[House][0], HouseCarSpawns[House][1], HouseCarSpawns[House][2], HouseCarSpawns[House][3], HouseInfo[House][hVcol1], HouseInfo[House][hVcol2], 6000000);
                    }
                    else if(strcmp(gunid, "stafford", true, strlen(gunid)) == 0)
                    {
                        MSGPLAYER(playerid, COLOR_GRAD6, "Atualizaзгo: Vocк trocou o carro da sua casa para o Stafford");
                        HouseInfo[House][hVec] = 580;
                        DestroyVehicle(carid);
                        CreateVehicle(HouseInfo[House][hVec], HouseCarSpawns[House][0], HouseCarSpawns[House][1], HouseCarSpawns[House][2], HouseCarSpawns[House][3], HouseInfo[House][hVcol1], HouseInfo[House][hVcol2], 6000000);
                    }
                    else if(strcmp(gunid, "clover", true, strlen(gunid)) == 0)
                    {
                        MSGPLAYER(playerid, COLOR_GRAD6, "Atualizaзгo: Vocк trocou o carro da sua casa para o Clover");
                        HouseInfo[House][hVec] = 542;
                        DestroyVehicle(carid);
                        CreateVehicle(HouseInfo[House][hVec], HouseCarSpawns[House][0], HouseCarSpawns[House][1], HouseCarSpawns[House][2], HouseCarSpawns[House][3], HouseInfo[House][hVcol1], HouseInfo[House][hVcol2], 6000000);
                    }
                    else if(strcmp(gunid, "sultan", true, strlen(gunid)) == 0)
                    {
                        MSGPLAYER(playerid, COLOR_GRAD6, "Atualizaзгo: Vocк trocou o carro da sua casa para o Sultan");
                        HouseInfo[House][hVec] = 560;
                        DestroyVehicle(carid);
                        CreateVehicle(HouseInfo[House][hVec], HouseCarSpawns[House][0], HouseCarSpawns[House][1], HouseCarSpawns[House][2], HouseCarSpawns[House][3], HouseInfo[House][hVcol1], HouseInfo[House][hVcol2], 6000000);
                    }
                    else if(strcmp(gunid, "elegant", true, strlen(gunid)) == 0)
                    {
                        MSGPLAYER(playerid, COLOR_GRAD6, "Atualizaзгo: Vocк trocou o carro da sua casa para o Elegant");
                        HouseInfo[House][hVec] = 507;
                        DestroyVehicle(carid);
                        CreateVehicle(HouseInfo[House][hVec], HouseCarSpawns[House][0], HouseCarSpawns[House][1], HouseCarSpawns[House][2], HouseCarSpawns[House][3], HouseInfo[House][hVcol1], HouseInfo[House][hVcol2], 6000000);
                    }
                    else if(strcmp(gunid, "hornet", true, strlen(gunid)) == 0)
                    {
                        MSGPLAYER(playerid, COLOR_GRAD6, "Atualizaзгo: Vocк trocou o carro da sua casa para o Hornet");
                        HouseInfo[House][hVec] = 521;
                        DestroyVehicle(carid);
                        CreateVehicle(HouseInfo[House][hVec], HouseCarSpawns[House][0], HouseCarSpawns[House][1], HouseCarSpawns[House][2], HouseCarSpawns[House][3], HouseInfo[House][hVcol1], HouseInfo[House][hVcol2], 6000000);
                    }
                    else if(strcmp(gunid, "phoenix", true, strlen(gunid)) == 0)
                    {
                        MSGPLAYER(playerid, COLOR_GRAD6, "Atualizaзгo: Vocк trocou o carro da sua casa para o Phoenix");
                        HouseInfo[House][hVec] = 603;
                        DestroyVehicle(carid);
                        CreateVehicle(HouseInfo[House][hVec], HouseCarSpawns[House][0], HouseCarSpawns[House][1], HouseCarSpawns[House][2], HouseCarSpawns[House][3], HouseInfo[House][hVcol1], HouseInfo[House][hVcol2], 6000000);
                    }
                    else if(strcmp(gunid, "emperor", true, strlen(gunid)) == 0)
                    {
                        MSGPLAYER(playerid, COLOR_GRAD6, "Atualizaзгo: Vocк trocou o carro da sua casa para o Emperor");
                        HouseInfo[House][hVec] = 585;
                        DestroyVehicle(carid);
                        CreateVehicle(HouseInfo[House][hVec], HouseCarSpawns[House][0], HouseCarSpawns[House][1], HouseCarSpawns[House][2], HouseCarSpawns[House][3], HouseInfo[House][hVcol1], HouseInfo[House][hVcol2], 6000000);
                    }
                    else if(strcmp(gunid, "glendale", true, strlen(gunid)) == 0)
                    {
                        MSGPLAYER(playerid, COLOR_GRAD6, "Atualizaзгo: Vocк trocou o carro da sua casa para o Glendale");
                        HouseInfo[House][hVec] = 466;
                        DestroyVehicle(carid);
                        CreateVehicle(HouseInfo[House][hVec], HouseCarSpawns[House][0], HouseCarSpawns[House][1], HouseCarSpawns[House][2], HouseCarSpawns[House][3], HouseInfo[House][hVcol1], HouseInfo[House][hVcol2], 6000000);
                    }
                    else if(strcmp(gunid, "greenwood", true, strlen(gunid)) == 0)
                    {
                        MSGPLAYER(playerid, COLOR_GRAD6, "Atualizaзгo: Vocк trocou o carro da sua casa para o Greenwood");
                        HouseInfo[House][hVec] = 492;
                        DestroyVehicle(carid);
                        CreateVehicle(HouseInfo[House][hVec], HouseCarSpawns[House][0], HouseCarSpawns[House][1], HouseCarSpawns[House][2], HouseCarSpawns[House][3], HouseInfo[House][hVcol1], HouseInfo[House][hVcol2], 6000000);
                    }
                    else if(strcmp(gunid, "huntley", true, strlen(gunid)) == 0)
                    {
                        MSGPLAYER(playerid, COLOR_GRAD6, "Atualizaзгo: Vocк trocou o carro da sua casa para o Huntley");
                        HouseInfo[House][hVec] = 579;
                        DestroyVehicle(carid);
                        CreateVehicle(HouseInfo[House][hVec], HouseCarSpawns[House][0], HouseCarSpawns[House][1], HouseCarSpawns[House][2], HouseCarSpawns[House][3], HouseInfo[House][hVcol1], HouseInfo[House][hVcol2], 6000000);
                    }
                    else if(strcmp(gunid, "jester", true, strlen(gunid)) == 0)
                    {
                        MSGPLAYER(playerid, COLOR_GRAD6, "Atualizaзгo: Vocк trocou o carro da sua casa para o Jester");
                        HouseInfo[House][hVec] = 559;
                        DestroyVehicle(carid);
                        CreateVehicle(HouseInfo[House][hVec], HouseCarSpawns[House][0], HouseCarSpawns[House][1], HouseCarSpawns[House][2], HouseCarSpawns[House][3], HouseInfo[House][hVcol1], HouseInfo[House][hVcol2], 6000000);
                    }
                    else if(strcmp(gunid, "landstalker", true, strlen(gunid)) == 0)
                    {
                        MSGPLAYER(playerid, COLOR_GRAD6, "Atualizaзгo: Vocк trocou o carro da sua casa para o Landstalker");
                        HouseInfo[House][hVec] = 400;
                        DestroyVehicle(carid);
                        CreateVehicle(HouseInfo[House][hVec], HouseCarSpawns[House][0], HouseCarSpawns[House][1], HouseCarSpawns[House][2], HouseCarSpawns[House][3], HouseInfo[House][hVcol1], HouseInfo[House][hVcol2], 6000000);
                    }
                    else if(strcmp(gunid, "merit", true, strlen(gunid)) == 0)
                    {
                        MSGPLAYER(playerid, COLOR_GRAD6, "Atualizaзгo: Vocк trocou o carro da sua casa para o Merit");
                        HouseInfo[House][hVec] = 551;
                        DestroyVehicle(carid);
                        CreateVehicle(HouseInfo[House][hVec], HouseCarSpawns[House][0], HouseCarSpawns[House][1], HouseCarSpawns[House][2], HouseCarSpawns[House][3], HouseInfo[House][hVcol1], HouseInfo[House][hVcol2], 6000000);
                    }
                    else if(strcmp(gunid, "nebula", true, strlen(gunid)) == 0)
                    {
                        MSGPLAYER(playerid, COLOR_GRAD6, "Atualizaзгo: Vocк trocou o carro da sua casa para o Nebula");
                        HouseInfo[House][hVec] = 516;
                        DestroyVehicle(carid);
                        CreateVehicle(HouseInfo[House][hVec], HouseCarSpawns[House][0], HouseCarSpawns[House][1], HouseCarSpawns[House][2], HouseCarSpawns[House][3], HouseInfo[House][hVcol1], HouseInfo[House][hVcol2], 6000000);
                    }
                    else if(strcmp(gunid, "sabre", true, strlen(gunid)) == 0)
                    {
                        MSGPLAYER(playerid, COLOR_GRAD6, "Atualizaзгo: Vocк trocou o carro da sua casa para o Sabre");
                        HouseInfo[House][hVec] = 475;
                        DestroyVehicle(carid);
                        CreateVehicle(HouseInfo[House][hVec], HouseCarSpawns[House][0], HouseCarSpawns[House][1], HouseCarSpawns[House][2], HouseCarSpawns[House][3], HouseInfo[House][hVcol1], HouseInfo[House][hVcol2], 6000000);
                    }
                    else if(strcmp(gunid, "stratum", true, strlen(gunid)) == 0)
                    {
                        MSGPLAYER(playerid, COLOR_GRAD6, "Atualizaзгo: Vocк trocou o carro da sua casa para o Stratum");
                        HouseInfo[House][hVec] = 561;
                        DestroyVehicle(carid);
                        CreateVehicle(HouseInfo[House][hVec], HouseCarSpawns[House][0], HouseCarSpawns[House][1], HouseCarSpawns[House][2], HouseCarSpawns[House][3], HouseInfo[House][hVcol1], HouseInfo[House][hVcol2], 6000000);
                    }
                    else if(strcmp(gunid, "sunrise", true, strlen(gunid)) == 0)
                    {
                        MSGPLAYER(playerid, COLOR_GRAD6, "Atualizaзгo: Vocк trocou o carro da sua casa para o Sunrise");
                        HouseInfo[House][hVec] = 550;
                        DestroyVehicle(carid);
                        CreateVehicle(HouseInfo[House][hVec], HouseCarSpawns[House][0], HouseCarSpawns[House][1], HouseCarSpawns[House][2], HouseCarSpawns[House][3], HouseInfo[House][hVcol1], HouseInfo[House][hVcol2], 6000000);
                    }
                    else if(strcmp(gunid, "tahoma", true, strlen(gunid)) == 0)
                    {
                        MSGPLAYER(playerid, COLOR_GRAD6, "Atualizaзгo: Vocк trocou o carro da sua casa para o Tahoma");
                        HouseInfo[House][hVec] = 566;
                        DestroyVehicle(carid);
                        CreateVehicle(HouseInfo[House][hVec], HouseCarSpawns[House][0], HouseCarSpawns[House][1], HouseCarSpawns[House][2], HouseCarSpawns[House][3], HouseInfo[House][hVcol1], HouseInfo[House][hVcol2], 6000000);
                    }
                    else if(strcmp(gunid, "uranus", true, strlen(gunid)) == 0)
                    {
                        MSGPLAYER(playerid, COLOR_GRAD6, "Atualizaзгo: Vocк trocou o carro da sua casa para o Uranus");
                        HouseInfo[House][hVec] = 558;
                        DestroyVehicle(carid);
                        CreateVehicle(HouseInfo[House][hVec], HouseCarSpawns[House][0], HouseCarSpawns[House][1], HouseCarSpawns[House][2], HouseCarSpawns[House][3], HouseInfo[House][hVcol1], HouseInfo[House][hVcol2], 6000000);
                    }
                    else if(strcmp(gunid, "blade", true, strlen(gunid)) == 0)
                    {
                        MSGPLAYER(playerid, COLOR_GRAD6, "Atualizaзгo: Vocк trocou o carro da sua casa para o Blade");
                        HouseInfo[House][hVec] = 536;
                        DestroyVehicle(carid);
                        CreateVehicle(HouseInfo[House][hVec], HouseCarSpawns[House][0], HouseCarSpawns[House][1], HouseCarSpawns[House][2], HouseCarSpawns[House][3], HouseInfo[House][hVcol1], HouseInfo[House][hVcol2], 6000000);
                    }
                    else if(strcmp(gunid, "flash", true, strlen(gunid)) == 0)
                    {
                        MSGPLAYER(playerid, COLOR_GRAD6, "Atualizaзгo: Vocк trocou o carro da sua casa para o Flash");
                        HouseInfo[House][hVec] = 565;
                        DestroyVehicle(carid);
                        CreateVehicle(HouseInfo[House][hVec], HouseCarSpawns[House][0], HouseCarSpawns[House][1], HouseCarSpawns[House][2], HouseCarSpawns[House][3], HouseInfo[House][hVcol1], HouseInfo[House][hVcol2], 6000000);
                    }
                    else if(strcmp(gunid, "buffalo", true, strlen(gunid)) == 0)
                    {
                        MSGPLAYER(playerid, COLOR_GRAD6, "Atualizaзгo: Vocк trocou o carro da sua casa para o Buffalo");
                        HouseInfo[House][hVec] = 402;
                        DestroyVehicle(carid);
                        CreateVehicle(HouseInfo[House][hVec], HouseCarSpawns[House][0], HouseCarSpawns[House][1], HouseCarSpawns[House][2], HouseCarSpawns[House][3], HouseInfo[House][hVcol1], HouseInfo[House][hVcol2], 6000000);
                    }
                    else if(strcmp(gunid, "bf-injection", true, strlen(gunid)) == 0)
                    {
                        MSGPLAYER(playerid, COLOR_GRAD6, "Atualizaзгo: Vocк trocou o carro da sua casa para o BF Injection");
                        HouseInfo[House][hVec] = 424;
                        DestroyVehicle(carid);
                        CreateVehicle(HouseInfo[House][hVec], HouseCarSpawns[House][0], HouseCarSpawns[House][1], HouseCarSpawns[House][2], HouseCarSpawns[House][3], HouseInfo[House][hVcol1], HouseInfo[House][hVcol2], 6000000);
                    }
                    else if(strcmp(gunid, "bike", true, strlen(gunid)) == 0)
                    {
                        MSGPLAYER(playerid, COLOR_GRAD6, "Atualizaзгo: Vocк trocou o carro da sua casa para uma Bike");
                        HouseInfo[House][hVec] = 509;
                        DestroyVehicle(carid);
                        CreateVehicle(HouseInfo[House][hVec], HouseCarSpawns[House][0], HouseCarSpawns[House][1], HouseCarSpawns[House][2], HouseCarSpawns[House][3], HouseInfo[House][hVcol1], HouseInfo[House][hVcol2], 6000000);
                    }
                    else if(strcmp(gunid, "montainbike", true, strlen(gunid)) == 0)
                    {
                        MSGPLAYER(playerid, COLOR_GRAD6, "Atualizaзгo: Vocк trocou o carro da sua casa para uma Montain Bike");
                        HouseInfo[House][hVec] = 510;
                        DestroyVehicle(carid);
                        CreateVehicle(HouseInfo[House][hVec], HouseCarSpawns[House][0], HouseCarSpawns[House][1], HouseCarSpawns[House][2], HouseCarSpawns[House][3], HouseInfo[House][hVcol1], HouseInfo[House][hVcol2], 6000000);
                    }
                    else
                    {
                        MSGPLAYER(playerid, COLOR_GRAD2,"USE: /comprarcarro [nomedocarro]");
                        MSGPLAYER(playerid, 0xFFFF66F, "Carros: | blistac | clover | elegant | emperor | glendale | greenwood | stafford | mountainbike |");
                        MSGPLAYER(playerid, 0xFFFF66F, "Carros: | huntley | jester | landstalker | merit | nebula | sabre | stratum | hornet | bike |");
                        MSGPLAYER(playerid, 0xFFFF66F, "Carros: | sunrise | tahoma | uranus | blade | flash | buffalo | phoenix | sultan | bf-injection |");
                        MSGPLAYER(playerid, 0x33FF00FF, "Carros VIP's: | limozine | elegy | hotknife | bandito | nrg500 | zr350 | premier |");
                        MSGPLAYER(playerid, 0x33FF00FF, "Carros VIP's: | bullet | turismo | infernus | cheetah | savanna | comet |");
                        return 1;
                    }
                    MSGPLAYER(playerid, COLOR_GRAD6, "Vocк pagou R$100000, ele jб estб na sua casa!");
                    OnPropUpdate();
                    GivePlayerMoney(playerid,-100000);
                    SBizzInfo[5][sbTill] += 100000;
                    ExtortionSBiz(5, 100000);
                    PlayerPlaySound(giveplayerid, 1052, 0.0, 0.0, 0.0);
                }
                else
                {
                    MSGPLAYER(playerid, COLOR_GRAD2, "   Vocк nгo tem (R$100000)");
                    return 1;
                }
            }
            else
            {
                MSGPLAYER(playerid, COLOR_GRAD2, "   Vocк nгo tem uma casa");
                return 1;
            }
        }
        return 1;
    }
Reply
#2

ninguem sabe?
Reply
#3

Tente colocar este codigo :


Код:
if (strcmp(cmd, "/comprarcarro", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
			new house = PlayerInfo[playerid][pPhousekey];
			GetPlayerName(playerid, playername, sizeof(playername));
			new str[256];
			if (house != 255)
			{
                if(strcmp(playername, HouseInfo[PlayerInfo[playerid][pPhousekey]][hOwner], true) != 0 && strcmp(PlayerInfo[playerid][pMarriedTo], HouseInfo[PlayerInfo[playerid][pPhousekey]][hOwner], true) != 0)
				{
					SendClientMessage(playerid, COLOR_GREY, "    Vocк nгo tem uma casa !");
					return 1;
				}
				new gunid[16];
				tmp = strtok(cmdtext, idx);
				if(!strlen(tmp))
				{
                    SendClientMessage(playerid, COLOR_GREEN,"______________________________________");
                    SendClientMessage(playerid, COLOR_WHITE,"*** Atualizaзгo mobiliбria ***");
					format(string, sizeof(string), "USO:  [nome]");
					SendClientMessage(playerid, COLOR_WHITE,string);
					SendClientMessage(playerid, COLOR_GRAD3, "Carros: Greenwood - Grendale - Emperor - Elegant - Blistacompact - Clover - Stratum - Sabre - Uranus");
					SendClientMessage(playerid, COLOR_GRAD3, "Carros: Landstalker - Merit - Nebula - Tahoma - Hermes - Stallion - Sunrise - Yosemite - Sanchez");
					SendClientMessage(playerid, COLOR_GRAD3, "Carros: Admiral - Blade - Savanna - Buccanee - Pony - Elegant - Esperant - Feltze - PCJ600 - Huntley");
					SendClientMessage(playerid, COLOR_GRAD3, "Carros: Regina - Remington - Solair - Vincent - Virgo - Voodoo - Washing - Hustler - Peren - Rancher - Sultan");
                    SendClientMessage(playerid, COLOR_GRAD3, "Carros: Alpha - Banshee - Bfinject - Broadway - Buffalo - Bullet - Cheetah - Club - Comet");
					SendClientMessage(playerid, COLOR_GRAD3, "Carros: Elegy - Euros - Flash - Infernus - Jester - Mesa - MonsterB - Hotring - Nrg-500 - Bandito");
					SendClientMessage(playerid, COLOR_GRAD3, "Carros: Supergt - Turismo - Windsor - Zr350 - (Fcr-900) - Phoenix - Sentinel");
					SendClientMessage(playerid, COLOR_GRAD3, "Carros: Hotknife - Bandito - MonsterB - Hotring - (Nrg-500) - Quad");
					return 1;
				}
				if(SBizzInfo[5][sbProducts] == 0)
				{
					GameTextForPlayer(playerid, "~r~fim de estoque", 5000, 1);
					return 1;
				}
				strmid(gunid, tmp, 0, strlen(cmdtext), 255);
				if(GetPlayerGP(playerid) >= 100000)
				{
					if(strcmp(gunid, "greenwood",true) == 0){HouseInfo[house][hVec] = 492;}
					else if(strcmp(gunid, "grendale",true) == 0){HouseInfo[house][hVec] = 466;}
					else if(strcmp(gunid, "emperor",true) == 0){HouseInfo[house][hVec] = 585;}
					else if(strcmp(gunid, "elegant",true) == 0){HouseInfo[house][hVec] = 507;}
					else if(strcmp(gunid, "blistacompact",true) == 0){HouseInfo[house][hVec] = 496;}
					else if(strcmp(gunid, "clover",true) == 0){HouseInfo[house][hVec] = 542;}
					else if(strcmp(gunid, "stratum",true) == 0){HouseInfo[house][hVec] = 561;}
					else if(strcmp(gunid, "sabre",true) == 0){HouseInfo[house][hVec] = 475;}
					else if(strcmp(gunid, "uranus",true) == 0){HouseInfo[house][hVec] = 558;}
					else if(strcmp(gunid, "huntley",true) == 0){HouseInfo[house][hVec] = 579;}
					else if(strcmp(gunid, "landstalker",true) == 0){HouseInfo[house][hVec] = 400;}
					else if(strcmp(gunid, "merit",true) == 0){HouseInfo[house][hVec] = 551;}
					else if(strcmp(gunid, "nebula",true) == 0){HouseInfo[house][hVec] = 516;}
					else if(strcmp(gunid, "tahoma",true) == 0){HouseInfo[house][hVec] = 566;}
					else if(strcmp(gunid, "hermes",true) == 0){HouseInfo[house][hVec] = 474;}
					else if(strcmp(gunid, "stallion",true) == 0){HouseInfo[house][hVec] = 439;}
					else if(strcmp(gunid, "sunrise",true) == 0){HouseInfo[house][hVec] = 550;}
					else if(strcmp(gunid, "yosemite",true) == 0){HouseInfo[house][hVec] = 554;}
					else if(strcmp(gunid, "pcj600",true) == 0){HouseInfo[house][hVec] = 461;}
					else if(strcmp(gunid, "admiral",true) == 0){HouseInfo[house][hVec] = 445;}
					else if(strcmp(gunid, "blade",true) == 0){HouseInfo[house][hVec] = 536;}
					else if(strcmp(gunid, "savanna",true) == 0){HouseInfo[house][hVec] = 567;}
					else if(strcmp(gunid, "buccanee",true) == 0){HouseInfo[house][hVec] = 518;}
					else if(strcmp(gunid, "pony",true) == 0){HouseInfo[house][hVec] = 413;}
					else if(strcmp(gunid, "elegant",true) == 0){HouseInfo[house][hVec] = 507;}
					else if(strcmp(gunid, "esperant",true) == 0){HouseInfo[house][hVec] = 419;}
					else if(strcmp(gunid, "feltze",true) == 0){HouseInfo[house][hVec] = 533;}
					else if(strcmp(gunid, "regina",true) == 0){HouseInfo[house][hVec] = 479;}
					else if(strcmp(gunid, "remigton",true) == 0){HouseInfo[house][hVec] = 534;}
					else if(strcmp(gunid, "solair",true) == 0){HouseInfo[house][hVec] = 458;}
					else if(strcmp(gunid, "vincent",true) == 0){HouseInfo[house][hVec] = 540;}
					else if(strcmp(gunid, "virgo",true) == 0){HouseInfo[house][hVec] = 491;}
					else if(strcmp(gunid, "voodoo",true) == 0){HouseInfo[house][hVec] = 412;}
					else if(strcmp(gunid, "washing",true) == 0){HouseInfo[house][hVec] = 421;}
					else if(strcmp(gunid, "hustler",true) == 0){HouseInfo[house][hVec] = 545;}
					else if(strcmp(gunid, "peren",true) == 0){HouseInfo[house][hVec] = 404;}
					else if(strcmp(gunid, "rancher",true) == 0){HouseInfo[house][hVec] = 489;}
     				else if(strcmp(gunid, "sanchez",true) == 0){HouseInfo[house][hVec] = 468;}
     				else if(strcmp(gunid, "sultan",true) == 0){HouseInfo[house][hVec] = 560;}
					else if(strcmp(gunid, "alpha",true) == 0){HouseInfo[house][hVec] = 602;}
                    else if(strcmp(gunid, "banshee",true) == 0){HouseInfo[house][hVec] = 429;}
                    else if(strcmp(gunid, "bfinject",true) == 0){HouseInfo[house][hVec] = 424;}
                    else if(strcmp(gunid, "broadway",true) == 0){HouseInfo[house][hVec] = 575;}
                    else if(strcmp(gunid, "buffalo",true) == 0){HouseInfo[house][hVec] = 402;}
                    else if(strcmp(gunid, "bullet",true) == 0){HouseInfo[house][hVec] = 541;}
                    else if(strcmp(gunid, "cheetah",true) == 0){HouseInfo[house][hVec] = 415;}
                    else if(strcmp(gunid, "elegy",true) == 0){HouseInfo[house][hVec] = 562;}
                    else if(strcmp(gunid, "euros",true) == 0){HouseInfo[house][hVec] = 587;}
					else if(strcmp(gunid, "flash",true) == 0){HouseInfo[house][hVec] = 565;}
                    else if(strcmp(gunid, "infernus",true) == 0){HouseInfo[house][hVec] = 411;}
                    else if(strcmp(gunid, "jester",true) == 0){HouseInfo[house][hVec] = 559;}
                    else if(strcmp(gunid, "mesa",true) == 0){HouseInfo[house][hVec] = 500;}
                    else if(strcmp(gunid, "phoenix",true) == 0){HouseInfo[house][hVec] = 603;}
                    else if(strcmp(gunid, "sentinel",true) == 0){HouseInfo[house][hVec] = 405;}
                    else if(strcmp(gunid, "club",true) == 0){HouseInfo[house][hVec] = 589;}
					else if(strcmp(gunid, "comet",true) == 0){HouseInfo[house][hVec] = 480;}
                    else if(strcmp(gunid, "supergt",true) == 0){HouseInfo[house][hVec] = 506;}
					else if(strcmp(gunid, "turismo",true) == 0){HouseInfo[house][hVec] = 451;}
					else if(strcmp(gunid, "windsor",true) == 0){HouseInfo[house][hVec] = 555;}
					else if(strcmp(gunid, "zr350",true) == 0){HouseInfo[house][hVec] = 477;}
					else if(strcmp(gunid, "fcr-900",true) == 0){HouseInfo[house][hVec] = 521;}
					else if(strcmp(gunid, "hotknife",true) == 0){HouseInfo[house][hVec] = 434;}
					else if(strcmp(gunid, "bandito",true) == 0){HouseInfo[house][hVec] = 568;}
					else if(strcmp(gunid, "monsterb",true) == 0){HouseInfo[house][hVec] = 557;}
					else if(strcmp(gunid, "hotring",true) == 0){HouseInfo[house][hVec] = 494;}
					else if(strcmp(gunid, "nrg-500",true) == 0){HouseInfo[house][hVec] = 522;}
					else if(strcmp(gunid, "quad",true) == 0){HouseInfo[house][hVec] = 471;
					}
    				else
					{
						SendClientMessage(playerid, COLOR_GRAD2, "    (Error 01) Carro invбlido.");
						return 1;
					}
     				format(str, 256, "Nova atualizaзгo: Seu veнculo domiciliar й agora um %s", gunid);
					SendClientMessage(playerid, COLOR_WHITE, str);
					SendClientMessage(playerid, COLOR_GRAD6, "Seu carro serб entregue no prуximo GMX, (R$-100000)");
					OnPropUpdate();
					if(PlayerInfo[playerid][pDonateRank] < 1)
					{
					    GivePlayerGP(playerid,-100000);
					}
					SBizzInfo[5][sbTill] += 3000;
					ExtortionSBiz(5, 3000);
					SBizzInfo[5][sbProducts]--;
		    		PlayerPlaySound(giveplayerid, 1052, 0.0, 0.0, 0.0);
				}
				else
				{
					if(PlayerInfo[playerid][pDonateRank] < 1)
					{
					    SendClientMessage(playerid, COLOR_GRAD2, "   Vocк nгo pode pagб-lo (R$100000)");
					    return 1;
					}
					format(str, 256, "Nova atualizaзгo: Seu veнculo domiciliar й agora um %s", gunid);
					SendClientMessage(playerid, COLOR_WHITE, str);
					SendClientMessage(playerid, COLOR_GRAD6, "Seu carro serб entregue no prуximo GMX, (R$-100000)");
					OnPropUpdate();
					if(PlayerInfo[playerid][pDonateRank] < 1)
					{
					    GivePlayerGP(playerid,-100000);
					}
					SBizzInfo[5][sbTill] += 3000;
					ExtortionSBiz(5, 3000);
					SBizzInfo[5][sbProducts]--;
		    		PlayerPlaySound(giveplayerid, 1052, 0.0, 0.0, 0.0);
				}
			}
			else
			{
		        if(PlayerInfo[playerid][pDonateRank] < 1)
		        {
				    SendClientMessage(playerid, COLOR_GRAD2, "   Vocк nгo tem uma casa.");
				    return 1;
				}
			}
		}
		return 1;
	}
Reply
#4

@edit
Desculpe o FLood foi pq postei 2 vezes sem querer :S
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)