Question

Приветствую, помогите закрывать ТД на Esc.

В public onplayerclickplayertextdriwe Добавил 

 

Спойлер

    if(_:playertextid == INVALID_TEXT_DRAW && pTemp[playerid][pSellCarSelect])
    {
            pTemp[playerid][pOff]++;
            pTemp[playerid][pSellCarSelect] = false;
            new carclass = GetPVarInt(playerid,"sellcarClass");
            DeletePVar(playerid,"sellcarID");
            DeletePVar(playerid,"sellcarClass");
            TogglePlayerControllable(playerid,1);
            SetPlayerVirtualWorld(playerid,0);
            SetPlayerInterior(playerid,0);
            PlayerTextDrawDestroy(playerid,pTemp[playerid][pSellCarText]);
            SetCameraBehindPlayer(playerid);
            pTemp[playerid][pJustTP] = true;
            switch(carclass)
            {
                case 0: SetPlayerPos(playerid,555.1915,-1293.4724,17.2482);
                case 1: SetPlayerPos(playerid,-1955.4077,296.6946,35.4688);
                case 2: SetPlayerPos(playerid,1658.9636,2198.3733,10.8203);
                case 3: SetPlayerPos(playerid,2131.2488,-1149.5587,24.2475);
            }
            for(new t = 0; t < 16; t++) PlayerTextDrawHide(playerid, PTD_autosalon[playerid][t]);
    }

 

всё равно не закрывается

Share this post


Link to post

5 answers to this question

  • 0
public OnPlayerClickPlayerTextDraw(playerid, PlayerText:playertextid) 
{
    if(playertextid == PlayerText:INVALID_TEXT_DRAW && pTemp[playerid][pSellCarSelect])
    {
        // ваш код выше
        for(new t = 0; t < 16; t++) PlayerTextDrawHide(playerid, PTD_autosalon[t]);
        return 1;
    }
    return 1;
}

 

Share this post


Link to post
  • 0

@Holmo  Не закрывает всё равноScreenshot_13.thumb.png.2c484a404301bd01a4e5a600679007bf.png

Share this post


Link to post
  • 0
1 час назад, amazonite сказал:

@Holmo  Не закрывает всё равноScreenshot_13.thumb.png.2c484a404301bd01a4e5a600679007bf.png

я же вам тогда отвечал с кодом, у вас все работало, вроде код не поменялся, и по коду похоже, что табуляция нарушена у мода, если можно полный паблик скиньте.

Share this post


Link to post
  • 0

TS Posted (edited) · Report post

@danya_white  Привет, да бро ты мне тогда помог но это другой мод, вроде тот же код но всё равно не закрывается, просто пропадает курсор мыши. 

 

Спойлер

public OnPlayerClickPlayerTextDraw(playerid, PlayerText:playertextid)
{
    if(playertextid == SelectItem[playerid][5])
    {
        ShowPlayerDialog(playerid,dDropAcs,0,"Èíâåíòàðü","{FFFFFF}Âû äåéñòâèòåëüíî õîòèòå âûêèíóòü ýòîò ïðåäìåò?Äëÿ ïîäòâåðæäåíèÿ íàæìèòå '{"#cYELLOW"}Âûêèíóòü{FFFFFF}'","Âûêèíóòü","Îòìåíà");
    }
    else if(playertextid == SelectItem[playerid][2])
    {
        SendHelp(playerid,"Ïîäîéäèòå ê ñâîáîäíîé ïàëàòêå íà ðûíêå");//SELL
    }
    else if(playertextid == SelectItem[playerid][8])
    {
        new k = pTemp[playerid][pSelectInv]-1;
        // Øëÿïû/êåïêè
        if(pTemp[playerid][pAcsInv][k] == 19161 ||
        pTemp[playerid][pAcsInv][k] == 19162 ||
        pTemp[playerid][pAcsInv][k] == 18636 ||
        pTemp[playerid][pAcsInv][k] == 19100 ||
        pTemp[playerid][pAcsInv][k] == 18947 ||
        pTemp[playerid][pAcsInv][k] == 18949 ||
        pTemp[playerid][pAcsInv][k] == 18950 ||
        pTemp[playerid][pAcsInv][k] == 18951 ||
        pTemp[playerid][pAcsInv][k] == 18948)
        {
            if(pData[playerid][pAcshead] != 1649return SendErr(playerid,"Ñíèìèòå àêññåñóàð, ÷òîáû îäåòü íîâûé");
            pData[playerid][pAcshead] = pTemp[playerid][pAcsInv][k];
            pTemp[playerid][pAcsInv][k] = 1649;
            UpdatePlayerData(playerid,"acshead",pData[playerid][pAcshead]);
            LoadPlayerAcses(playerid);
        }
        SaveInventory(playerid);
        for(new i;i<64; i++)
        {
            PlayerTextDrawHide(playerid,INVacs[playerid][i]);
        }
        if(pTemp[playerid][pSelectInv] > 0)
        {
            for(new i;i<10;i++) PlayerTextDrawHide(playerid,SelectItem[playerid][i]);
            PlayerTextDrawHide(playerid,SelectColor[playerid][pTemp[playerid][pSelectInv]]);
            pTemp[playerid][pSelectInv] = 0;
        }
        else if(pTemp[playerid][pSelectUsedInv] > 0)
        {
            for(new i;i<7;i++) PlayerTextDrawHide(playerid,Select_Used[playerid][i]);
            pTemp[playerid][pSelectUsedInv] = 0;
        }
        CancelSelectTextDraw(playerid);
        pTemp[playerid][pInvOpen] = 0;
        SendSucc(playerid,"Âû óñïåøíî íàäåëè àêññåñóàð");
    }
    if(playertextid == INVacs[playerid][55])
    {
        if(pData[playerid][pAcshead] == 1649return 1;
        if(pTemp[playerid][pSelectUsedInv] == 0)
        {
            for(new i;i<7;i++)
            {
                PlayerTextDrawShow(playerid,Select_Used[playerid][i]);
            }
            pTemp[playerid][pSelectUsedInv] = 1;
        }
        else if(pTemp[playerid][pSelectInv] > 0)
        {
            for(new i;i<10;i++) PlayerTextDrawHide(playerid,SelectItem[playerid][i]);
            PlayerTextDrawHide(playerid,SelectColor[playerid][pTemp[playerid][pSelectInv]]);
            pTemp[playerid][pSelectInv] = 0;
        }
        else if(pTemp[playerid][pSelectUsedInv] > 0)
        {
            for(new i;i<7;i++) PlayerTextDrawHide(playerid,Select_Used[playerid][i]);
            pTemp[playerid][pSelectUsedInv] = 0;
        }
    }
    //
    else if(playertextid == Select_Used[playerid][2])
    {
        ShowPlayerDialog(playerid,dDropInv,0,"Èíâåíòàðü","{"#cW"}Âû äåéñòâèòåëüíî õîòèòå âûêèíóòü ýòîò ïðåäìåò?Äëÿ ïîäòâåðæäåíèÿ íàæìèòå '{"#cY"}Âûêèíóòü{"#cW"}'","Âûêèíóòü","Îòìåíà");
        
    }
    //
    else if(playertextid == Select_Used[playerid][5])
    {
        if(pTemp[playerid][pAcsInv][0] == 1649 &&
           pTemp[playerid][pAcsInv][1] == 1649 &&
           pTemp[playerid][pAcsInv][2] == 1649 &&
           pTemp[playerid][pAcsInv][3] == 1649 &&
           pTemp[playerid][pAcsInv][4] == 1649 &&
           pTemp[playerid][pAcsInv][5] == 1649 &&
           pTemp[playerid][pAcsInv][6] == 1649 &&
           pTemp[playerid][pAcsInv][7] == 1649 &&
           pTemp[playerid][pAcsInv][8] == 1649 &&
           pTemp[playerid][pAcsInv][9] == 1649 &&
           pTemp[playerid][pAcsInv][10] == 1649 &&
           pTemp[playerid][pAcsInv][11] == 1649 &&
           pTemp[playerid][pAcsInv][12] == 1649 &&
           pTemp[playerid][pAcsInv][13] == 1649 &&
           pTemp[playerid][pAcsInv][14] == 1649 &&
           pTemp[playerid][pAcsInv][15] == 1649return SendErr(playerid," èíâåíòàðå íåò ìåñòà");
        SendSucc(playerid,"Ïðåäìåò óñïåøíî ñíÿò");
        for(new i;i<64; i++)
        {
            PlayerTextDrawHide(playerid,INVacs[playerid][i]);
        }
        if(pTemp[playerid][pSelectInv] > 0)
        {
            for(new i;i<10;i++) PlayerTextDrawHide(playerid,SelectItem[playerid][i]);
            PlayerTextDrawHide(playerid,SelectColor[playerid][pTemp[playerid][pSelectInv]]);
            pTemp[playerid][pSelectInv] = 0;
        }
        else if(pTemp[playerid][pSelectUsedInv] > 0)
        {
            for(new i;i<7;i++) PlayerTextDrawHide(playerid,Select_Used[playerid][i]);
            pTemp[playerid][pSelectUsedInv] = 0;
        }
        CancelSelectTextDraw(playerid);
        pTemp[playerid][pInvOpen] = 0;
        if(pTemp[playerid][pAcsInv][0] == 1649return pTemp[playerid][pAcsInv][0] = pData[playerid][pAcshead], pData[playerid][pAcshead] = 1649,UpdatePlayerData(playerid,"acshead",pData[playerid][pAcshead]),SaveInventory(playerid),RemovePlayerAttachedObject(playerid, 7);
        if(pTemp[playerid][pAcsInv][1] == 1649return pTemp[playerid][pAcsInv][1] = pData[playerid][pAcshead], pData[playerid][pAcshead] = 1649,UpdatePlayerData(playerid,"acshead",pData[playerid][pAcshead]),SaveInventory(playerid),RemovePlayerAttachedObject(playerid, 7);
        if(pTemp[playerid][pAcsInv][2] == 1649return pTemp[playerid][pAcsInv][2] = pData[playerid][pAcshead], pData[playerid][pAcshead] = 1649,UpdatePlayerData(playerid,"acshead",pData[playerid][pAcshead]),SaveInventory(playerid),RemovePlayerAttachedObject(playerid, 7);
        if(pTemp[playerid][pAcsInv][3] == 1649return pTemp[playerid][pAcsInv][3] = pData[playerid][pAcshead], pData[playerid][pAcshead] = 1649,UpdatePlayerData(playerid,"acshead",pData[playerid][pAcshead]),SaveInventory(playerid),RemovePlayerAttachedObject(playerid, 7);
        if(pTemp[playerid][pAcsInv][4] == 1649return pTemp[playerid][pAcsInv][4] = pData[playerid][pAcshead], pData[playerid][pAcshead] = 1649,UpdatePlayerData(playerid,"acshead",pData[playerid][pAcshead]),SaveInventory(playerid),RemovePlayerAttachedObject(playerid, 7);
        if(pTemp[playerid][pAcsInv][5] == 1649return pTemp[playerid][pAcsInv][5] = pData[playerid][pAcshead], pData[playerid][pAcshead] = 1649,UpdatePlayerData(playerid,"acshead",pData[playerid][pAcshead]),SaveInventory(playerid),RemovePlayerAttachedObject(playerid, 7);
        if(pTemp[playerid][pAcsInv][6] == 1649return pTemp[playerid][pAcsInv][6] = pData[playerid][pAcshead], pData[playerid][pAcshead] = 1649,UpdatePlayerData(playerid,"acshead",pData[playerid][pAcshead]),SaveInventory(playerid),RemovePlayerAttachedObject(playerid, 7);
        if(pTemp[playerid][pAcsInv][7] == 1649return pTemp[playerid][pAcsInv][7] = pData[playerid][pAcshead], pData[playerid][pAcshead] = 1649,UpdatePlayerData(playerid,"acshead",pData[playerid][pAcshead]),SaveInventory(playerid),RemovePlayerAttachedObject(playerid, 7);
        if(pTemp[playerid][pAcsInv][8] == 1649return pTemp[playerid][pAcsInv][8] = pData[playerid][pAcshead], pData[playerid][pAcshead] = 1649,UpdatePlayerData(playerid,"acshead",pData[playerid][pAcshead]),SaveInventory(playerid),RemovePlayerAttachedObject(playerid, 7);
        if(pTemp[playerid][pAcsInv][9] == 1649return pTemp[playerid][pAcsInv][9] = pData[playerid][pAcshead], pData[playerid][pAcshead] = 1649,UpdatePlayerData(playerid,"acshead",pData[playerid][pAcshead]),SaveInventory(playerid),RemovePlayerAttachedObject(playerid, 7);
        if(pTemp[playerid][pAcsInv][10] == 1649return pTemp[playerid][pAcsInv][10] = pData[playerid][pAcshead], pData[playerid][pAcshead] = 1649,UpdatePlayerData(playerid,"acshead",pData[playerid][pAcshead]),SaveInventory(playerid),RemovePlayerAttachedObject(playerid, 7);
        if(pTemp[playerid][pAcsInv][11] == 1649return pTemp[playerid][pAcsInv][11] = pData[playerid][pAcshead], pData[playerid][pAcshead] = 1649,UpdatePlayerData(playerid,"acshead",pData[playerid][pAcshead]),SaveInventory(playerid),RemovePlayerAttachedObject(playerid, 7);
        if(pTemp[playerid][pAcsInv][12] == 1649return pTemp[playerid][pAcsInv][12] = pData[playerid][pAcshead], pData[playerid][pAcshead] = 1649,UpdatePlayerData(playerid,"acshead",pData[playerid][pAcshead]),SaveInventory(playerid),RemovePlayerAttachedObject(playerid, 7);
        if(pTemp[playerid][pAcsInv][13] == 1649return pTemp[playerid][pAcsInv][13] = pData[playerid][pAcshead], pData[playerid][pAcshead] = 1649,UpdatePlayerData(playerid,"acshead",pData[playerid][pAcshead]),SaveInventory(playerid),RemovePlayerAttachedObject(playerid, 7);
        if(pTemp[playerid][pAcsInv][14] == 1649return pTemp[playerid][pAcsInv][14] = pData[playerid][pAcshead], pData[playerid][pAcshead] = 1649,UpdatePlayerData(playerid,"acshead",pData[playerid][pAcshead]),SaveInventory(playerid),RemovePlayerAttachedObject(playerid, 7);
        if(pTemp[playerid][pAcsInv][15] == 1649return pTemp[playerid][pAcsInv][15] = pData[playerid][pAcshead], pData[playerid][pAcshead] = 1649,UpdatePlayerData(playerid,"acshead",pData[playerid][pAcshead]),SaveInventory(playerid),RemovePlayerAttachedObject(playerid, 7);
    }
    /*if(playertextid == INVacs[playerid][55])
    {
        SendHelp(playerid,"[55]");
    }
    if(playertextid == INVacs[playerid][54])
    {
        SendHelp(playerid,"[54]");
    }
    if(playertextid == INVacs[playerid][53])
    {
        SendHelp(playerid,"[53]");
    }
    if(playertextid == INVacs[playerid][52])
    {
        SendHelp(playerid,"[52]");
    }
    if(playertextid == INVacs[playerid][51])
    {
        SendHelp(playerid,"[51]");
    }
    if(playertextid == INVacs[playerid][50])
    {
        SendHelp(playerid,"[50]");
    }
    if(playertextid == INVacs[playerid][49])
    {
        SendHelp(playerid,"[49]");
    }*/
    
    if(playertextid == INVacs[playerid][40])
    {
        new k = 0;
        if(pTemp[playerid][pAcsInv][k] == 1649return 1;
        if(pTemp[playerid][pSelectInv] == 0)
        {
            for(new i;i<10;i++)
            {
                PlayerTextDrawShow(playerid,SelectItem[playerid][i]);
            }
            pTemp[playerid][pSelectInv] = k+1;
            PlayerTextDrawShow(playerid,SelectColor[playerid][k+1]);
        }
        else if(pTemp[playerid][pSelectInv] > 0)
        {
            for(new i;i<10;i++) PlayerTextDrawHide(playerid,SelectItem[playerid][i]);
            PlayerTextDrawHide(playerid,SelectColor[playerid][pTemp[playerid][pSelectInv]]);
            pTemp[playerid][pSelectInv] = 0;
        }
        else if(pTemp[playerid][pSelectUsedInv] > 0)
        {
            for(new i;i<7;i++) PlayerTextDrawHide(playerid,Select_Used[playerid][i]);
            pTemp[playerid][pSelectUsedInv] = 0;
        }
    }
    if(playertextid == INVacs[playerid][39])
    {
        new k = 1;
        if(pTemp[playerid][pAcsInv][k] == 1649return 1;
        if(pTemp[playerid][pSelectInv] == 0)
        {
            for(new i;i<10;i++) PlayerTextDrawShow(playerid,SelectItem[playerid][i]);
            pTemp[playerid][pSelectInv] = k+1;
            PlayerTextDrawShow(playerid,SelectColor[playerid][k+1]);
        }
        else if(pTemp[playerid][pSelectInv] > 0)
        {
            for(new i;i<10;i++) PlayerTextDrawHide(playerid,SelectItem[playerid][i]);
            PlayerTextDrawHide(playerid,SelectColor[playerid][pTemp[playerid][pSelectInv]]);
            pTemp[playerid][pSelectInv] = 0;
        }
        else if(pTemp[playerid][pSelectUsedInv] > 0)
        {
            for(new i;i<7;i++) PlayerTextDrawHide(playerid,Select_Used[playerid][i]);
            pTemp[playerid][pSelectUsedInv] = 0;
        }
    }
    if(playertextid == PlayerText:INVALID_TEXT_DRAW && pTemp[playerid][pSellCarSelect])
    {
            pTemp[playerid][pOff]++;
            pTemp[playerid][pSellCarSelect] = false;
            new carclass = GetPVarInt(playerid,"sellcarClass");
            DeletePVar(playerid,"sellcarID");
            DeletePVar(playerid,"sellcarClass");
            TogglePlayerControllable(playerid,1);
            SetPlayerVirtualWorld(playerid,0);
            SetPlayerInterior(playerid,0);
            PlayerTextDrawDestroy(playerid,pTemp[playerid][pSellCarText]);
            SetCameraBehindPlayer(playerid);
            pTemp[playerid][pJustTP] = true;
            switch(carclass)
            {
                case 0: SetPlayerPos(playerid,555.1915,-1293.4724,17.2482);
                case 1: SetPlayerPos(playerid,-1955.4077,296.6946,35.4688);
                case 2: SetPlayerPos(playerid,1658.9636,2198.3733,10.8203);
                case 3: SetPlayerPos(playerid,2131.2488,-1149.5587,24.2475);
            }
            for(new t = 0; t < 16; t++) PlayerTextDrawHide(playerid, PTD_autosalon[playerid][t]);
    }
    if(playertextid == INVacs[playerid][38])
    {
        new k = 2;
        if(pTemp[playerid][pAcsInv][k] == 1649return 1;
        if(pTemp[playerid][pSelectInv] == 0)
        {
            for(new i;i<10;i++) PlayerTextDrawShow(playerid,SelectItem[playerid][i]);
            pTemp[playerid][pSelectInv] = k+1;
            PlayerTextDrawShow(playerid,SelectColor[playerid][k+1]);
        }
        else if(pTemp[playerid][pSelectInv] > 0)
        {
            for(new i;i<10;i++) PlayerTextDrawHide(playerid,SelectItem[playerid][i]);
            PlayerTextDrawHide(playerid,SelectColor[playerid][pTemp[playerid][pSelectInv]]);
            pTemp[playerid][pSelectInv] = 0;
        }
        else if(pTemp[playerid][pSelectUsedInv] > 0)
        {
            for(new i;i<7;i++) PlayerTextDrawHide(playerid,Select_Used[playerid][i]);
            pTemp[playerid][pSelectUsedInv] = 0;
        }
    }
    if(playertextid == INVacs[playerid][37])
    {
        new k = 3;
        if(pTemp[playerid][pAcsInv][k] == 1649return 1;
        if(pTemp[playerid][pSelectInv] == 0)
        {
            for(new i;i<10;i++) PlayerTextDrawShow(playerid,SelectItem[playerid][i]);
            pTemp[playerid][pSelectInv] = k+1;
            PlayerTextDrawShow(playerid,SelectColor[playerid][k+1]);
        }
        else if(pTemp[playerid][pSelectInv] > 0)
        {
            for(new i;i<10;i++) PlayerTextDrawHide(playerid,SelectItem[playerid][i]);
            PlayerTextDrawHide(playerid,SelectColor[playerid][pTemp[playerid][pSelectInv]]);
            pTemp[playerid][pSelectInv] = 0;
        }
        else if(pTemp[playerid][pSelectUsedInv] > 0)
        {
            for(new i;i<7;i++) PlayerTextDrawHide(playerid,Select_Used[playerid][i]);
            pTemp[playerid][pSelectUsedInv] = 0;
        }
    }
    if(playertextid == INVacs[playerid][36])
    {
        new k = 4;
        if(pTemp[playerid][pAcsInv][k] == 1649return 1;
        if(pTemp[playerid][pSelectInv] == 0)
        {
            for(new i;i<10;i++) PlayerTextDrawShow(playerid,SelectItem[playerid][i]);
            pTemp[playerid][pSelectInv] = k+1;
            PlayerTextDrawShow(playerid,SelectColor[playerid][pTemp[playerid][pSelectInv]]);
        }
        else if(pTemp[playerid][pSelectInv] > 0)
        {
            for(new i;i<10;i++) PlayerTextDrawHide(playerid,SelectItem[playerid][i]);
            PlayerTextDrawHide(playerid,SelectColor[playerid][pTemp[playerid][pSelectInv]]);
            pTemp[playerid][pSelectInv] = 0;
        }
        else if(pTemp[playerid][pSelectUsedInv] > 0)
        {
            for(new i;i<7;i++) PlayerTextDrawHide(playerid,Select_Used[playerid][i]);
            pTemp[playerid][pSelectUsedInv] = 0;
        }
    }
    if(playertextid == INVacs[playerid][35])
    {
        new k = 5;
        if(pTemp[playerid][pAcsInv][k] == 1649return 1;
        if(pTemp[playerid][pSelectInv] == 0)
        {
            for(new i;i<10;i++) PlayerTextDrawShow(playerid,SelectItem[playerid][i]);
            pTemp[playerid][pSelectInv] = k+1;
            PlayerTextDrawShow(playerid,SelectColor[playerid][k+1]);
        }
        else if(pTemp[playerid][pSelectInv] > 0)
        {
            for(new i;i<10;i++) PlayerTextDrawHide(playerid,SelectItem[playerid][i]);
            PlayerTextDrawHide(playerid,SelectColor[playerid][pTemp[playerid][pSelectInv]]);
            pTemp[playerid][pSelectInv] = 0;
        }
        else if(pTemp[playerid][pSelectUsedInv] > 0)
        {
            for(new i;i<7;i++) PlayerTextDrawHide(playerid,Select_Used[playerid][i]);
            pTemp[playerid][pSelectUsedInv] = 0;
        }
    }
    if(playertextid == INVacs[playerid][34])
    {
        new k = 6;
        if(pTemp[playerid][pAcsInv][k] == 1649return 1;
        if(pTemp[playerid][pSelectInv] == 0)
        {
            for(new i;i<10;i++) PlayerTextDrawShow(playerid,SelectItem[playerid][i]);
            pTemp[playerid][pSelectInv] = k+1;
            PlayerTextDrawShow(playerid,SelectColor[playerid][k+1]);
        }
        else if(pTemp[playerid][pSelectInv] > 0)
        {
            for(new i;i<10;i++) PlayerTextDrawHide(playerid,SelectItem[playerid][i]);
            PlayerTextDrawHide(playerid,SelectColor[playerid][pTemp[playerid][pSelectInv]]);
            pTemp[playerid][pSelectInv] = 0;
        }
        else if(pTemp[playerid][pSelectUsedInv] > 0)
        {
            for(new i;i<7;i++) PlayerTextDrawHide(playerid,Select_Used[playerid][i]);
            pTemp[playerid][pSelectUsedInv] = 0;
        }
    }
    if(playertextid == INVacs[playerid][33])
    {
        new k = 7;
        if(pTemp[playerid][pAcsInv][k] == 1649return 1;
        if(pTemp[playerid][pSelectInv] == 0)
        {
            for(new i;i<10;i++) PlayerTextDrawShow(playerid,SelectItem[playerid][i]);
            pTemp[playerid][pSelectInv] = k+1;
            PlayerTextDrawShow(playerid,SelectColor[playerid][k+1]);
        }
        else if(pTemp[playerid][pSelectInv] > 0)
        {
            for(new i;i<10;i++) PlayerTextDrawHide(playerid,SelectItem[playerid][i]);
            PlayerTextDrawHide(playerid,SelectColor[playerid][pTemp[playerid][pSelectInv]]);
            pTemp[playerid][pSelectInv] = 0;
        }
        else if(pTemp[playerid][pSelectUsedInv] > 0)
        {
            for(new i;i<7;i++) PlayerTextDrawHide(playerid,Select_Used[playerid][i]);
            pTemp[playerid][pSelectUsedInv] = 0;
        }
    }
    if(playertextid == INVacs[playerid][32])
    {
        new k = 8;
        if(pTemp[playerid][pAcsInv][k] == 1649return 1;
        if(pTemp[playerid][pSelectInv] == 0)
        {
            for(new i;i<10;i++) PlayerTextDrawShow(playerid,SelectItem[playerid][i]);
            pTemp[playerid][pSelectInv] = k+1;
            PlayerTextDrawShow(playerid,SelectColor[playerid][k+1]);
        }
        else if(pTemp[playerid][pSelectInv] > 0)
        {
            for(new i;i<10;i++) PlayerTextDrawHide(playerid,SelectItem[playerid][i]);
            PlayerTextDrawHide(playerid,SelectColor[playerid][pTemp[playerid][pSelectInv]]);
            pTemp[playerid][pSelectInv] = 0;
        }
        else if(pTemp[playerid][pSelectUsedInv] > 0)
        {
            for(new i;i<7;i++) PlayerTextDrawHide(playerid,Select_Used[playerid][i]);
            pTemp[playerid][pSelectUsedInv] = 0;
        }
    }
    if(playertextid == INVacs[playerid][31])
    {
        new k = 9;
        if(pTemp[playerid][pAcsInv][k] == 1649return 1;
        if(pTemp[playerid][pSelectInv] == 0)
        {
            for(new i;i<10;i++) PlayerTextDrawShow(playerid,SelectItem[playerid][i]);
            pTemp[playerid][pSelectInv] = k+1;
            PlayerTextDrawShow(playerid,SelectColor[playerid][k+1]);
        }
        else if(pTemp[playerid][pSelectInv] > 0)
        {
            for(new i;i<10;i++) PlayerTextDrawHide(playerid,SelectItem[playerid][i]);
            PlayerTextDrawHide(playerid,SelectColor[playerid][pTemp[playerid][pSelectInv]]);
            pTemp[playerid][pSelectInv] = 0;
        }
        else if(pTemp[playerid][pSelectUsedInv] > 0)
        {
            for(new i;i<7;i++) PlayerTextDrawHide(playerid,Select_Used[playerid][i]);
            pTemp[playerid][pSelectUsedInv] = 0;
        }
    }
    if(playertextid == INVacs[playerid][30])
    {
        new k = 10;
        if(pTemp[playerid][pAcsInv][k] == 1649return 1;
        if(pTemp[playerid][pSelectInv] == 0)
        {
            for(new i;i<10;i++) PlayerTextDrawShow(playerid,SelectItem[playerid][i]);
            pTemp[playerid][pSelectInv] = k+1;
            PlayerTextDrawShow(playerid,SelectColor[playerid][k+1]);
        }
        else if(pTemp[playerid][pSelectInv] > 0)
        {
            for(new i;i<10;i++) PlayerTextDrawHide(playerid,SelectItem[playerid][i]);
            PlayerTextDrawHide(playerid,SelectColor[playerid][pTemp[playerid][pSelectInv]]);
            pTemp[playerid][pSelectInv] = 0;
        }
        else if(pTemp[playerid][pSelectUsedInv] > 0)
        {
            for(new i;i<7;i++) PlayerTextDrawHide(playerid,Select_Used[playerid][i]);
            pTemp[playerid][pSelectUsedInv] = 0;
        }
    }
    if(playertextid == INVacs[playerid][29])
    {
        new k = 11;
        if(pTemp[playerid][pAcsInv][k] == 1649return 1;
        if(pTemp[playerid][pSelectInv] == 0)
        {
            for(new i;i<10;i++) PlayerTextDrawShow(playerid,SelectItem[playerid][i]);
            pTemp[playerid][pSelectInv] = k+1;
            PlayerTextDrawShow(playerid,SelectColor[playerid][k+1]);
        }
        else if(pTemp[playerid][pSelectInv] > 0)
        {
            for(new i;i<10;i++) PlayerTextDrawHide(playerid,SelectItem[playerid][i]);
            PlayerTextDrawHide(playerid,SelectColor[playerid][pTemp[playerid][pSelectInv]]);
            pTemp[playerid][pSelectInv] = 0;
        }
        else if(pTemp[playerid][pSelectUsedInv] > 0)
        {
            for(new i;i<7;i++) PlayerTextDrawHide(playerid,Select_Used[playerid][i]);
            pTemp[playerid][pSelectUsedInv] = 0;
        }
    }
    if(playertextid == INVacs[playerid][28])
    {
        new k = 12;
        if(pTemp[playerid][pAcsInv][k] == 1649return 1;
        if(pTemp[playerid][pSelectInv] == 0)
        {
            for(new i;i<10;i++) PlayerTextDrawShow(playerid,SelectItem[playerid][i]);
            pTemp[playerid][pSelectInv] = k+1;
            PlayerTextDrawShow(playerid,SelectColor[playerid][k+1]);
        }
        else if(pTemp[playerid][pSelectInv] > 0)
        {
            for(new i;i<10;i++) PlayerTextDrawHide(playerid,SelectItem[playerid][i]);
            PlayerTextDrawHide(playerid,SelectColor[playerid][pTemp[playerid][pSelectInv]]);
            pTemp[playerid][pSelectInv] = 0;
        }
        else if(pTemp[playerid][pSelectUsedInv] > 0)
        {
            for(new i;i<7;i++) PlayerTextDrawHide(playerid,Select_Used[playerid][i]);
            pTemp[playerid][pSelectUsedInv] = 0;
        }
    }
    if(playertextid == INVacs[playerid][27])
    {
        new k = 13;
        if(pTemp[playerid][pAcsInv][k] == 1649return 1;
        if(pTemp[playerid][pSelectInv] == 0)
        {
            for(new i;i<10;i++) PlayerTextDrawShow(playerid,SelectItem[playerid][i]);
            pTemp[playerid][pSelectInv] = k+1;
            PlayerTextDrawShow(playerid,SelectColor[playerid][k+1]);
        }
        else if(pTemp[playerid][pSelectInv] > 0)
        {
            for(new i;i<10;i++) PlayerTextDrawHide(playerid,SelectItem[playerid][i]);
            PlayerTextDrawHide(playerid,SelectColor[playerid][pTemp[playerid][pSelectInv]]);
            pTemp[playerid][pSelectInv] = 0;
        }
        else if(pTemp[playerid][pSelectUsedInv] > 0)
        {
            for(new i;i<7;i++) PlayerTextDrawHide(playerid,Select_Used[playerid][i]);
            pTemp[playerid][pSelectUsedInv] = 0;
        }
    }
    if(playertextid == INVacs[playerid][26])
    {
        new k = 14;
        if(pTemp[playerid][pAcsInv][k] == 1649return 1;
        if(pTemp[playerid][pSelectInv] == 0)
        {
            for(new i;i<10;i++) PlayerTextDrawShow(playerid,SelectItem[playerid][i]);
            pTemp[playerid][pSelectInv] = k+1;
            PlayerTextDrawShow(playerid,SelectColor[playerid][k+1]);
        }
        else if(pTemp[playerid][pSelectInv] > 0)
        {
            for(new i;i<10;i++) PlayerTextDrawHide(playerid,SelectItem[playerid][i]);
            PlayerTextDrawHide(playerid,SelectColor[playerid][pTemp[playerid][pSelectInv]]);
            pTemp[playerid][pSelectInv] = 0;
        }
        else if(pTemp[playerid][pSelectUsedInv] > 0)
        {
            for(new i;i<7;i++) PlayerTextDrawHide(playerid,Select_Used[playerid][i]);
            pTemp[playerid][pSelectUsedInv] = 0;
        }
    }
    if(playertextid == INVacs[playerid][25])
    {
        new k = 15;
        if(pTemp[playerid][pAcsInv][k] == 1649return 1;
        if(pTemp[playerid][pSelectInv] == 0)
        {
            for(new i;i<10;i++) PlayerTextDrawShow(playerid,SelectItem[playerid][i]);
            pTemp[playerid][pSelectInv] = k+1;
            PlayerTextDrawShow(playerid,SelectColor[playerid][k+1]);
        }
        else if(pTemp[playerid][pSelectInv] > 0)
        {
            for(new i;i<10;i++) PlayerTextDrawHide(playerid,SelectItem[playerid][i]);
            PlayerTextDrawHide(playerid,SelectColor[playerid][pTemp[playerid][pSelectInv]]);
            pTemp[playerid][pSelectInv] = 0;
        }
        else if(pTemp[playerid][pSelectUsedInv] > 0)
        {
            for(new i;i<7;i++) PlayerTextDrawHide(playerid,Select_Used[playerid][i]);
            pTemp[playerid][pSelectUsedInv] = 0;
        }
    }
    if(playertextid == UabloFerm[playerid][7])
    {
        for(new i;i<18; i++)
        {
            PlayerTextDrawHide(playerid,UabloFerm[playerid][i]);
        }
        ClearAnimations(playerid);
        ApplyAnimation(playerid,"PED","IDLE_tired",4.1,0,1,1,0,1);
        CancelSelectTextDraw(playerid);
    }
    else if(playertextid == Orange_PTD[playerid][3])
    {
        for(new i;i<18; i++)
        {
            PlayerTextDrawHide(playerid,Orange_PTD[playerid][i]);
        }
        ClearAnimations(playerid);
        ApplyAnimation(playerid,"PED","IDLE_tired",4.1,0,1,1,0,1);
        CancelSelectTextDraw(playerid);
    }
    else if(playertextid == SawmillJob[playerid][9])
    {
        for(new i;i<12; i++)
        {
            PlayerTextDrawHide(playerid,SawmillJob[playerid][i]);
        }
        ClearAnimations(playerid);
        ApplyAnimation(playerid,"PED","IDLE_tired",4.1,0,1,1,0,1);
        CancelSelectTextDraw(playerid);
    }
    else if(playertextid >= UabloFerm[playerid][8] && playertextid <= UabloFerm[playerid][17])
    {
        for(new i;i<18; i++)
        {
            PlayerTextDrawHide(playerid,UabloFerm[playerid][i]);
        }
        CancelSelectTextDraw(playerid);
        SetPVarInt(playerid, "UabloStart"1);
        for(new i = 0; i < 38; i++)
        {
            if(IsPlayerInRangeOfPoint(playerid, 2.0, ObjectTree[i][0],ObjectTree[i][1],ObjectTree[i][2]+5))
            {
                pTemp[playerid][pFerma] += 1;
                if(pTemp[playerid][pFerma] >= 10)
                {
                    SetTimerEx("UabloFermaTimeFinal",5200,false,"i",playerid);
                }
                if(pTemp[playerid][pFerma] > 0)
                {
                    SetTimerEx("UabloFermaTime",500,false,"i",playerid);
                    SetPVarInt(playerid, "fludkey", gettime() + 4);
                    if(gTreeHealth[i] > 0)
                    {
                         gTreeHealth[i] -= 1;
                         return 1;
                    }
                    else
                    {
                        SetTimerEx("TreeVost",90000,false,"i", i);
                        gTreeStatus[i] = false;
                        gTreeHealth[i] = 0;
                        DestroyDynamicObject(gTree[i]);
                        gTree[i] = CreateDynamicObject(888, ObjectTree[i][0], ObjectTree[i][1], ObjectTree[i][2]+40.000000.000000.00000);
                        SendClientMessage(playerid, CYELLOW, "• [Ïîäñêàçêà]{"#cWHITE"} Íà ýòîì äåðåâå áîëüøå íåò ÿáëîê.");
                        SetPlayerSpecialAction(playerid ,SPECIAL_ACTION_NONE);
                        ApplyAnimation(playerid,"PED","IDLE_tired",4.1,0,1,1,0,1);
                        return 1;
                    }
                }
            }
        }
        return true;
    }
    else if(playertextid >= Orange_PTD[playerid][8] && playertextid <= Orange_PTD[playerid][17])
    {
        for(new i;i<18; i++)
        {
            PlayerTextDrawHide(playerid,Orange_PTD[playerid][i]);
        }
        CancelSelectTextDraw(playerid);
        SetPVarInt(playerid, "OrangeStart"1);
        for(new i = 0; i < 16; i++)
        {
            if(IsPlayerInRangeOfPoint(playerid, 2.0, OrangeTree[i][0],OrangeTree[i][1],OrangeTree[i][2]+5))
            {
                pTemp[playerid][pFerma] += 1;
                if(pTemp[playerid][pFerma] >= 10)
                {
                    SetTimerEx("OrangeFermaTimeFinal",5200,false,"i",playerid);
                }
                if(pTemp[playerid][pFerma] > 0)
                {
                    SetTimerEx("OrangeFermaTime",500,false,"i",playerid);
                    SetPVarInt(playerid, "fludkey", gettime() + 4);
                    if(gOrangeHealth[i] > 0)
                    {
                         gOrangeHealth[i] -= 1;
                         return 1;
                    }
                    else
                    {
                        SetTimerEx("OrangeVost",120000,false,"i", i);//2 ìèíóòû
                        gOrangeStatus[i] = false;
                        gOrangeHealth[i] = 0;
                        DestroyDynamicObject(gOrange[i]);
                        gOrange[i] = CreateDynamicObject(888, OrangeTree[i][0], OrangeTree[i][1], OrangeTree[i][2]+30.000000.000000.00000);
                        SendClientMessage(playerid, CYELLOW, "• [Ïîäñêàçêà]{"#cWHITE"} Íà ýòîì äåðåâå áîëüøå íåò àïåëüñèíîâ.");
                        SetPlayerSpecialAction(playerid ,SPECIAL_ACTION_NONE);
                        ApplyAnimation(playerid,"PED","IDLE_tired",4.1,0,1,1,0,1);
                        return 1;
                    }
                }
            }
        }
        return true;
    }
    else if(playertextid == SawmillJob[playerid][4])
    {
        for(new i;i<12; i++)
        {
            PlayerTextDrawHide(playerid,SawmillJob[playerid][i]);
        }
        CancelSelectTextDraw(playerid);
        SetPVarInt(playerid, "LesStart"1);
        for(new i = 0; i < 10; i++)
        {
            if(IsPlayerInRangeOfPoint(playerid, 4.0, SawmillTree[i][0],SawmillTree[i][1],SawmillTree[i][2]))
            {
                rubildrova[playerid] ++;
                if(rubildrova[playerid] == 5)
                {
                    if(GetPVarInt(playerid, "hunter"))
                    {
                        SetTimerEx("SawmillFinal",14000,false,"i",playerid);
                    }
                    if(GetPVarInt(playerid, "patriot"))
                    {
                        SetTimerEx("SawmillFinal",10000,false,"i",playerid);
                    }
                    if(GetPVarInt(playerid, "husqvarna"))
                    {
                        SetTimerEx("SawmillFinal",6000,false,"i",playerid);
                    }
                    SetTimerEx("SawmillTime",500,false,"i",playerid);
                    if(IsPlayerAttachedObjectSlotUsed(playerid, 0)) RemovePlayerAttachedObject(playerid,0);
                    if(IsPlayerAttachedObjectSlotUsed(playerid, 1)) RemovePlayerAttachedObject(playerid,1);
                    SetPlayerAttachedObject(playerid,0,341,6);
                }
                if(rubildrova[playerid] < 5)
                {
                    if(IsPlayerAttachedObjectSlotUsed(playerid, 0)) RemovePlayerAttachedObject(playerid,0);
                    if(IsPlayerAttachedObjectSlotUsed(playerid, 1)) RemovePlayerAttachedObject(playerid,1);
                    SetPlayerAttachedObject(playerid,0,341,6);
                    SetTimerEx("SawmillTime",500,false,"i",playerid);
                    SetPVarInt(playerid, "fludkey", gettime() + 4);
                }
            }
        }
        return true;
    }
    else if(playertextid == Shaxta_TD[playerid][21])
    {
        for(new i;i<26; i++)
        {
            PlayerTextDrawHide(playerid,Shaxta_TD[playerid][i]);
        }
        DeletePVar(playerid, "ShaxtaUgol");
        DeletePVar(playerid, "ShaxtaJelezo");
        DeletePVar(playerid, "ShaxtaMed");
        CancelSelectTextDraw(playerid);
        SetPVarInt(playerid,"Shaxta_TD",0);
    }
    else if(playertextid == Shaxta_TD[playerid][0])//1 Áîëüøîé êàìåíü!!!
    {
        if(IsPlayerInAnyVehicle(playerid)) return 1;
        if(GetPlayerVirtualWorld(playerid) != 0return NewKick(playerid);
        ClearAnimations(playerid);
        ApplyAnimation(playerid,"BASEBALL","Bat_4",4.1,1,0,0,1,8000);
        DisablePlayerCheckpoint(playerid);
        switch(GetPVarInt(playerid,"mineTunnel"))
        {
            case 0:SetPVarInt(playerid,"mineCountKG",30+random(50));
        }
        SetTimerEx("MeniLoaded",8000,false,"i",playerid);
        for(new i;i<26; i++)
        {
            PlayerTextDrawHide(playerid,Shaxta_TD[playerid][i]);
        }
        CancelSelectTextDraw(playerid);
        return true;
    }
    else if(playertextid == Shaxta_TD[playerid][2])//1 Ìàëûé êàìåíü!!!
    {
        if(IsPlayerInAnyVehicle(playerid)) return 1;
        if(GetPlayerVirtualWorld(playerid) != 0return NewKick(playerid);
        ClearAnimations(playerid);
        ApplyAnimation(playerid,"BASEBALL","Bat_4",4.1,1,0,0,1,8000);
        DisablePlayerCheckpoint(playerid);
        switch(GetPVarInt(playerid,"mineTunnel"))
        {
            case 0:SetPVarInt(playerid,"mineCountKG",15+random(30));
        }
        SetTimerEx("MeniLoaded",8000,false,"i",playerid);
        for(new i;i<26; i++)
        {
            PlayerTextDrawHide(playerid,Shaxta_TD[playerid][i]);
        }
        CancelSelectTextDraw(playerid);
        return true;
    }
    /*else if(playertextid == Shaxta_TD[playerid][14])//2 Áîëüøîé êàìåíü!!!
    {
        if(IsPlayerInAnyVehicle(playerid)) return 1;
        if(GetPlayerVirtualWorld(playerid) != 0) return NewKick(playerid);
        ClearAnimations(playerid);
        ApplyAnimation(playerid,"BASEBALL","Bat_4",4.1,1,0,0,1,8000);
        DisablePlayerCheckpoint(playerid);
        switch(GetPVarInt(playerid,"mineTunnel"))
        {
            case 0:SetPVarInt(playerid,"mineCountKG",15+random(35));
        }
        SetTimerEx("MeniLoaded",8000,false,"i",playerid);
        for(new i;i<22; i++)
        {
            PlayerTextDrawHide(playerid,Shaxta_TD[playerid][i]);
        }
        CancelSelectTextDraw(playerid);
        return true;
    }
    else if(playertextid == Shaxta_TD[playerid][15])//2 Ìàëûé êàìåíü!!!
    {
        if(IsPlayerInAnyVehicle(playerid)) return 1;
        if(GetPlayerVirtualWorld(playerid) != 0) return NewKick(playerid);
        ClearAnimations(playerid);
        ApplyAnimation(playerid,"BASEBALL","Bat_4",4.1,1,0,0,1,8000);
        DisablePlayerCheckpoint(playerid);
        switch(GetPVarInt(playerid,"mineTunnel"))
        {
            case 0:SetPVarInt(playerid,"mineCountKG",10+random(20));
        }
        SetTimerEx("MeniLoaded",8000,false,"i",playerid);
        for(new i;i<22; i++)
        {
            PlayerTextDrawHide(playerid,Shaxta_TD[playerid][i]);
        }
        CancelSelectTextDraw(playerid);
        return true;
    }
    else if(playertextid == Shaxta_TD[playerid][18])//3 Áîëüøîé êàìåíü!!!
    {
        if(IsPlayerInAnyVehicle(playerid)) return 1;
        if(GetPlayerVirtualWorld(playerid) != 0) return NewKick(playerid);
        ClearAnimations(playerid);
        ApplyAnimation(playerid,"BASEBALL","Bat_4",4.1,1,0,0,1,8000);
        DisablePlayerCheckpoint(playerid);
        switch(GetPVarInt(playerid,"mineTunnel"))
        {
            case 0:SetPVarInt(playerid,"mineCountKG",21+random(39));
        }
        SetTimerEx("MeniLoaded",8000,false,"i",playerid);
        for(new i;i<22; i++)
        {
            PlayerTextDrawHide(playerid,Shaxta_TD[playerid][i]);
        }
        CancelSelectTextDraw(playerid);
        return true;
    }
    else if(playertextid == Shaxta_TD[playerid][19])//3 Ìàëûé êàìåíü!!!
    {
        if(IsPlayerInAnyVehicle(playerid)) return 1;
        if(GetPlayerVirtualWorld(playerid) != 0) return NewKick(playerid);
        ClearAnimations(playerid);
        ApplyAnimation(playerid,"BASEBALL","Bat_4",4.1,1,0,0,1,8000);
        DisablePlayerCheckpoint(playerid);
        switch(GetPVarInt(playerid,"mineTunnel"))
        {
            case 0:SetPVarInt(playerid,"mineCountKG",13+random(44));
        }
        SetTimerEx("MeniLoaded",8000,false,"i",playerid);
        for(new i;i<22; i++)
        {
            PlayerTextDrawHide(playerid,Shaxta_TD[playerid][i]);
        }
        CancelSelectTextDraw(playerid);
        return true;
    }*/
    /*else if(playertextid == Inventory[playerid][30])
    {
        CancelSelectTextDrawEx(playerid);
        for(new i;i<32; i++)
        {
            PlayerTextDrawHide(playerid,Inventory[playerid][i]);
        }
    }
    else if(playertextid == Inventory[playerid][2])
    {
        if(pData[playerid][pAcshead] == 0) return SendClientMessage(playerid,CGRAY," äàííîì ñëîòå íåò àêñåññóàðîâ");
    }
    else if(playertextid == Inventory[playerid][3])
    {
        if(pData[playerid][pAcshead] == 0) return SendClientMessage(playerid,CGRAY," äàííîì ñëîòå íåò àêñåññóàðîâ");
        ShowPlayerDialog(playerid,dDropInv,0,"Èíâåíòàðü","{"#cW"}Âû äåéñòâèòåëüíî õîòèòå âûêèíóòü ýòîò ïðåäìåò?Äëÿ ïîäòâåðæäåíèÿ íàæìèòå '{"#cY"}Âûêèíóòü{"#cW"}'","Âûêèíóòü","Îòìåíà");
    }*/
    else if(playertextid == CarPTS[playerid][8])
    {
        for(new i;i<11; i++)
        {
            PlayerTextDrawHide(playerid,CarPTS[playerid][i]);
        }
        CancelSelectTextDrawEx(playerid);
    }
    else if(playertextid == PTD_autosalon[playerid][12])
    {
            pTemp[playerid][pOff]++;
            pTemp[playerid][pSellCarSelect] = false;
            new carclass = GetPVarInt(playerid,"sellcarClass");
            DeletePVar(playerid,"sellcarID");
            DeletePVar(playerid,"sellcarClass");
            DeletePVar(playerid, "buyhelicopter");
            TogglePlayerControllable(playerid,1);
            SetPlayerVirtualWorld(playerid,0);
            SetPlayerInterior(playerid,0);
            SetCameraBehindPlayer(playerid);
            pTemp[playerid][pJustTP] = true;
            CancelSelectTextDrawEx(playerid);
            for(new t = 0; t < 16; t++) PlayerTextDrawHide(playerid, PTD_autosalon[playerid][t]);
            switch(carclass)
            {
                case 0: { SetPlayerPosEx(playerid,555.1915,-1293.4724,17.2482); return true; }
                case 1: { SetPlayerPosEx(playerid,-1953.7623,301.0858,35.4687); return true; }
                case 2: { SetPlayerPosEx(playerid,1658.5024,2199.9299,10.8203); return true; }
                case 3: { SetPlayerPosEx(playerid,2131.6928,-1151.0418,24.0896); return true; }
                case 4: { SetPlayerPosEx(playerid,1999.2209,-2244.3149,13.5469); return true; }
            }
            return true;
    }
    else if(playertextid == PTD_autosalon[playerid][10])
    {
            new carclass = GetPVarInt(playerid,"sellcarClass");
            new carid = GetPVarInt(playerid,"sellcarID");
            new Float:x, Float:y, Float:z, Float:x2, Float:y2, Float:z2;
            GetVehiclePos(carid,x,y,z);
            if(aSellCar[carclass] == carid && carclass != 4) carid = aSellCar[carclass+1]-1//Ïåðâàÿ ìàøèíà
            else if (aSellCar[carclass] == carid && carclass == 4) carid = aSellCar[carclass+1];
            else carid--;
            SetPVarInt(playerid,"sellcarID",carid);
            GetVehiclePos(carid,x2,y2,z2);
            InterpolateCameraLookAt(playerid,x,y,z,x2,y2,z2,1300,CAMERA_MOVE);
            if(!GetPVarInt(playerid, "buyhelicopter"))
            {
                y = y + 5.0;
                z = z + 1.0;
                y2 = y2 + 5.0;
                z2 = z2 + 1.0;
            }
            else
            {
                y = y + 10.0;
                z = z + 1.0;
                y2 = y2 + 10.0;
                z2 = z2 + 1.0;
            }
            InterpolateCameraPos(playerid,x,y,z,x2,y2,z2,1300,CAMERA_MOVE);
            pTemp[playerid][pSellCarSelect] = false;
            SetTimerEx("AbleToSelectCar",1200,false,"i",playerid);
            new model = GetVehicleModel(carid);
            new modelid = model - 400;
            new mes[256];
            format(mes,sizeof(mes),"~b~%s",gTransport[modelid][trName]);
            PlayerTextDrawSetString(playerid,PTD_autosalon[playerid][5],mes);
            format(mes,sizeof(mes),"~g~TANK:~w~ %d L",gTransport[modelid][trTank]);
            PlayerTextDrawSetString(playerid,PTD_autosalon[playerid][3],mes);
            format(mes,sizeof(mes),"~g~PRICE:~w~ $%d",gTransport[modelid][trPrice]);
            PlayerTextDrawSetString(playerid,PTD_autosalon[playerid][2],mes);
            format(mes,sizeof(mes),"~g~CONS.:~w~ %d l/100km",gTransport[modelid][trConsumption]);
            PlayerTextDrawSetString(playerid,PTD_autosalon[playerid][4],mes);
            return true;
    }
    else if(playertextid == PTD_autosalon[playerid][11])
    {
            new carclass = GetPVarInt(playerid,"sellcarClass");
            new carid = GetPVarInt(playerid,"sellcarID");
            new Float:x, Float:y, Float:z, Float:x2, Float:y2, Float:z2;
            GetVehiclePos(carid,x,y,z);
            if(carclass != 4 && aSellCar[carclass+1] == carid+1) carid = aSellCar[carclass]; //Ïîñëåäíÿÿ ìàøèíà
            else if(carclass == 4 && aSellCar[5] == carid) carid = aSellCar[carclass]; //Ïîñëåäíÿÿ ìàøèíà
            else carid++;
            SetPVarInt(playerid,"sellcarID",carid);
            GetVehiclePos(carid,x2,y2,z2);
            InterpolateCameraLookAt(playerid,x,y,z,x2,y2,z2,1300,CAMERA_MOVE);
            if(!GetPVarInt(playerid, "buyhelicopter"))
            {
                y = y + 5.0;
                z = z + 1.0;
                y2 = y2 + 5.0;
                z2 = z2 + 1.0;
            }
            else
            {
                y = y + 10.0;
                z = z + 1.0;
                y2 = y2 + 10.0;
                z2 = z2 + 1.0;
            }
            InterpolateCameraPos(playerid,x,y,z,x2,y2,z2,1300,CAMERA_MOVE);
            pTemp[playerid][pSellCarSelect] = false;
            SetTimerEx("AbleToSelectCar",1200,false,"i",playerid);
            new model = GetVehicleModel(carid);
            new modelid = model - 400;
            new mes[256];
            format(mes,sizeof(mes),"~b~%s",gTransport[modelid][trName]);
            PlayerTextDrawSetString(playerid,PTD_autosalon[playerid][5],mes);
            format(mes,sizeof(mes),"~g~TANK:~w~ %d L",gTransport[modelid][trTank]);
            PlayerTextDrawSetString(playerid,PTD_autosalon[playerid][3],mes);
            format(mes,sizeof(mes),"~g~PRICE:~w~ $%d",gTransport[modelid][trPrice]);
            PlayerTextDrawSetString(playerid,PTD_autosalon[playerid][2],mes);
            format(mes,sizeof(mes),"~g~CONS.:~w~ %d l/100km",gTransport[modelid][trConsumption]);
            PlayerTextDrawSetString(playerid,PTD_autosalon[playerid][4],mes);
            return true;
    }
    else if(playertextid == PTD_autosalon[playerid][13])
    {
            if(GetPVarInt(playerid, "buyhelicopter"))
            {
                if(pData[playerid][pVertID]) return SendClientMessage(playerid,CGRAY,"Âàì íóæíî ïðîäàòü ñâîþ àâèàòåõíèêó ïåðåä òåì êàê êóïèòü íîâóþ");
            }
            else
            {
                pTemp[playerid][pOff]++;
                if(!pData[playerid][pHouse]) return SendClientMessage(playerid,CGRAY,"Ó Âàñ íåò äîìà");
                if(pData[playerid][pCar]) return SendClientMessage(playerid,CGRAY,"Âàì íóæíî ïðîäàòü ñâîþ ìàøèíó ïåðåä òåì êàê êóïèòü íîâóþ");
            }
        
            new carid = GetPVarInt(playerid,"sellcarID");
            new model = GetVehicleModel(carid);
            new modelid = model - 400;
            if(GetPlayerMoneyEx(playerid) < gTransport[modelid][trPrice]) return SendClientMessage(playerid,CGRAY,"Ó Âàñ íåäîñòàòî÷íî äåíåã äëÿ ïîêóïêè ýòîãî ò/ñ");
            ShowPlayerDialog(playerid,dBuyCarC1,2,"Âûáåðèòå öâåò íîìåð 1","1.Áåëûé\n{505050}2.×åðíûé\n{"#cLIGHTBLUE"}3.Ãîëóáîé\n{"#cRED"}4.Êðàñíûé\n{"#cYELLOW"}5.Æåëòûé\n{"#cBLUE"}6. Ñèíèé\n{"#cGRAY"}7.Ñåðûé\n{"#cPINK"}8. Ðîçîâûé\n{f5f5dc}9.Áåæåâûé\n{ff00ff}10.Ïóðïóðíûé\n{"#cWHITE"}Äðóãîé...","OK","Âûõîä");
            return true;
    }
    return 1;
}

 

 

Edited by amazonite

Share this post


Link to post
  • 0

up

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0