[HELP] Server lags after use cmd and chose GUI in mySQL
#1

Can anyone help I would explain more in skype if someone have a time for me short problem display :Server lags after you use cmd and press GUI, that GUI which you press should show you a objects (furniture system) in your house, but if you in bussines then server not lag GUI pop faster and everything alright. I use mySQL if someone can help please PM me or smth I'll send a skype invite.

pawn Код:
CMD:furniture( playerid, params[ ] )
{
    new
        rado = 0;
    if( IsPlayerInHouse( playerid ) || IsPlayerInBusiness( playerid ) )
    {
        rado = 1;
        ShowPlayerDialog( playerid, 115, DIALOG_STYLE_LIST,"Baldш valdymas",
                "Pirkti baldus\nEsami baldai", "Pasirinkti","Uюdaryti" );

    }
    if( rado == 0 )
        return SendClientMessage( playerid, COLOR_GREY,"Jыs neesate name arba neturite teisлs redaguoti baldus. " );

    return true;
}
pawn Код:
else if ( dialogid == 115 )
    {
        if( !response )
            return true;

        switch( listitem )
        {
            case 0: // Baldш pirkimas
            {
                ShowPlayerDialog( playerid, 116, DIALOG_STYLE_LIST,"Baldш pirkimas",
                "VIRTUVЛS BALDAI\n\
                VONIOS BALDAI\n\
                SPINTOS, LENTYNOS\n\
                LOVOS, РVIESOS\n\
                STALAI, KЛDЛS\n\
                DURYS, LANGAI\n\
                SIENOS, SIENШ STAKTAI\n\
                DEKORACINIAI BALDAI\n\
                KITA\n\
                ELEKTRONIKA"
, "Pasirinkti","Uюdaryti" );
            }
            case 1: // Esami baldai
            {
                new
                    slot = 0,
                    rado = 0;

                if(IsPlayerInHouse( playerid ))
                {
                    for( new fid; fid < MAX_FURNITURES; fid++ )
                    {
                        if( HouseFurniture[ fid ][ fHouseId ] == hInfo[ GetPlayerHouse( playerid ) ][ hID ] )
                        {
                            format( string, sizeof( string ), "%sBaldas %d: %s\n", string, slot, HouseFurniture[ fid ][ fName ] );
                            PlayerSlots[ playerid ][ slot ] = fid;
                            slot++;
                            rado = 1;
                        }
                    }
                }
                    if( rado != 0 )
                    ShowPlayerDialog( playerid, 127, DIALOG_STYLE_LIST,"Baldш sаraрas", string, "Redaguoti", "<--" );
                else
                    SendClientMessage( playerid, COLOR_WHITE,"Jыs neturite baldш. " );
            }
            case 2:
                {
                    new
                        slot = 0,
                        rado = 0;

                 if(IsPlayerInBusiness( playerid ))
                {
                    for( new fid; fid < MAX_FURNITURES; fid++ )
                    {
                        if( BizzFurniture[ fid ][ fHouseId ] == bInfo[ GetPlayerBusiness( playerid ) ][ bID ] )
                        {
                            format( string, sizeof( string ), "%sBaldas %d: %s\n", string, slot, BizzFurniture[ fid ][ fName ] );
                            PlayerSlots[ playerid ][ slot ] = fid;
                            slot++;
                            rado = 1;
                        }
                    }
                }
                if( rado != 0 )
                    ShowPlayerDialog( playerid, 127, DIALOG_STYLE_LIST,"Baldш sаraрas", string, "Redaguoti", "<--" );
                else
                    SendClientMessage( playerid, COLOR_WHITE,"Jыs neturite baldш. " );
            }
        }
    }
     else if ( dialogid == 117 )
    {
        if( !response )
            return ShowPlayerDialog( playerid, 116, DIALOG_STYLE_LIST,"Baldш pirkimas",
                "VIRTUVЛS BALDAI\n\
                VONIOS BALDAI\n\
                SPINTOS, LENTYNOS\n\
                LOVOS, РVIESOS\n\
                STALAI, KЛDЛS\n\
                DURYS, LANGAI\n\
                SIENOS, SIENШ STAKTAI\n\
                DEKORACINIAI BALDAI\n\
                KITA\n\
                ELEKTRONIKA"
, "Pasirinkti","Uюdaryti" );

        new
            slot = 0;

        if( IsPlayerInHouse( playerid ) )
        {
            for( new fid = 0; fid < MAX_FURNITURES; fid++ )
            {
                if( HouseFurniture[ fid ][ fHouseId ] == hInfo[ GetPlayerHouse( playerid ) ][ hID ] )
                {
                    slot++;
                }
            }
        }
        else if( IsPlayerInBusiness( playerid ) )
        {
            for( new fid = 0; fid < MAX_FURNITURES; fid++ )
            {
                if( BizzFurniture[ fid ][ fHouseId ] == bInfo[ GetPlayerBusiness( playerid ) ][ bID ] )
                {
                    slot++;
                }
            }
        }
        if( slot >= 30 && pInfo[ playerid ][ pDonator ] < 1)
            return SendClientMessage( playerid, COLOR_WHITE, "Baldш limitas 30 baldш. ");
        else if( slot >= 50 && pInfo[ playerid ][ pDonator ] == 1 )
            return SendClientMessage( playerid, COLOR_WHITE, "Baldш limitas 50 baldш. ");
        else if( slot >= 100 && pInfo[ playerid ][ pDonator ] == 2 )
            return SendClientMessage( playerid, COLOR_WHITE, "Baldш limitas 100 baldш. ");
        else if( slot >= 150 && pInfo[ playerid ][ pDonator ] == 3 )
            return SendClientMessage( playerid, COLOR_WHITE, "Baldш limitas 150 baldш. ");

        switch( pFurGroup[ playerid ] )
        {
            case 0:
            {
                if( PlayerMoney[ playerid ] < FurnitureTechnika[ listitem ][ furPrice ] )
                    return SendClientMessage( playerid, COLOR_WHITE,"{00FF00}* {FFFFFF}Jums nepakanka pinigш.");

                format( string, sizeof string, "{FFFFFF}\t\tBaldo pirkimas.\n\
                Vietoje, kurioje stovite bus sukurtas baldas ir jб\n\
                iрkart galлsite pradлti redaguoti, keisti vietа\n\
                Grupл: {00FF00}Technika\n\
                {FFFFFF}Baldas: {00FF00}%s\n\
                {FFFFFF}Objekto Id: {00FF00}%d\n\
                {FFFFFF}Kaina: {00FF00}$%d{FFFFFF}\n\
                Spauskite {00FF00}Pirkti{FFFFFF} pirkimo patvirtinimui.\n\
                Spauskite {FF0000}Atрaukti{FFFFFF} pirkimo atрaukimui."
,
                FurnitureTechnika[ listitem ][ furName ],
                FurnitureTechnika[ listitem ][ furObject ],
                FurnitureTechnika[ listitem ][ furPrice ] );

                tmpbuy[ playerid ] = listitem;
                ShowPlayerDialog( playerid, 118,DIALOG_STYLE_MSGBOX, "Baldo pirkimas", string, "Pirkti", "Atрaukti" );
            }
            case 1:
            {
                if( PlayerMoney[ playerid ] < FurnitureComfort[ listitem ][ furPrice ] )
                    return SendClientMessage( playerid, COLOR_WHITE,"{00FF00}* {FFFFFF}Jums nepakanka pinigш.");

                format( string, sizeof string, "{FFFFFF}\t\tBaldo pirkimas.\n\
                Vietoje, kurioje stovite bus sukurtas baldas ir jб\n\
                iрkart galлsite pradлti redaguoti, keisti vietа\n\
                Grupл: {00FF00}Komforto baldai\n\
                {FFFFFF}Baldas: {00FF00}%s\n\
                {FFFFFF}Objekto Id: {00FF00}%d\n\
                {FFFFFF}Kaina: {00FF00}$%d{FFFFFF}\n\
                Spauskite {00FF00}Pirkti{FFFFFF} pirkimo patvirtinimui.\n\
                Spauskite {FF0000}Atрaukti{FFFFFF} pirkimo atрaukimui."
,
                FurnitureComfort[ listitem ][ furName ],
                FurnitureComfort[ listitem ][ furObject ],
                FurnitureComfort[ listitem ][ furPrice ] );

                tmpbuy[ playerid ] = listitem;
                ShowPlayerDialog( playerid, 118,DIALOG_STYLE_MSGBOX, "Baldo pirkimas", string, "Pirkti", "Atрaukti" );
            }
            case 2:
            {
                if( PlayerMoney[ playerid ] < FurnitureDecoration[ listitem ][ furPrice ] )
                    return SendClientMessage( playerid, COLOR_WHITE,"{00FF00}* {FFFFFF}Jums nepakanka pinigш.");

                format( string, sizeof string, "{FFFFFF}\t\tBaldo pirkimas.\n\
                Vietoje, kurioje stovite bus sukurtas baldas ir jб\n\
                iрkart galлsite pradлti redaguoti, keisti vietа\n\
                Grupл: {00FF00}Dekoracijos\n\
                {FFFFFF}Baldas: {00FF00}%s\n\
                {FFFFFF}Objekto Id: {00FF00}%d\n\
                {FFFFFF}Kaina: {00FF00}$%d{FFFFFF}\n\
                Spauskite {00FF00}Pirkti{FFFFFF} pirkimo patvirtinimui.\n\
                Spauskite {FF0000}Atрaukti{FFFFFF} pirkimo atрaukimui."
,
                FurnitureDecoration[ listitem ][ furName ],
                FurnitureDecoration[ listitem ][ furObject ],
                FurnitureDecoration[ listitem ][ furPrice ] );

                tmpbuy[ playerid ] = listitem;
                ShowPlayerDialog( playerid, 118,DIALOG_STYLE_MSGBOX, "Baldo pirkimas", string, "Pirkti", "Atрaukti" );
            }
            case 3:
            {
                if( PlayerMoney[ playerid ] < FurnitureFreet[ listitem ][ furPrice ] )
                    return SendClientMessage( playerid, COLOR_WHITE,"{00FF00}* {FFFFFF}Jums nepakanka pinigш.");

                format( string, sizeof string, "{FFFFFF}\t\tBaldo pirkimas.\n\
                Vietoje, kurioje stovite bus sukurtas baldas ir jб\n\
                iрkart galлsite pradлti redaguoti, keisti vietа\n\
                Grupл: {00FF00}Laisvalaikio\n\
                {FFFFFF}Baldas: {00FF00}%s\n\
                {FFFFFF}Objekto Id: {00FF00}%d\n\
                {FFFFFF}Kaina: {00FF00}$%d{FFFFFF}\n\
                Spauskite {00FF00}Pirkti{FFFFFF} pirkimo patvirtinimui.\n\
                Spauskite {FF0000}Atрaukti{FFFFFF} pirkimo atрaukimui."
,
                FurnitureFreet[ listitem ][ furName ],
                FurnitureFreet[ listitem ][ furObject ],
                FurnitureFreet[ listitem ][ furPrice ] );

                tmpbuy[ playerid ] = listitem;
                ShowPlayerDialog( playerid, 118,DIALOG_STYLE_MSGBOX, "Baldo pirkimas", string, "Pirkti", "Atрaukti" );
            }
            case 4:
            {
                if( PlayerMoney[ playerid ] < FurnitureLights[ listitem ][ furPrice ] )
                    return SendClientMessage( playerid, COLOR_WHITE,"{00FF00}* {FFFFFF}Jums nepakanka pinigш.");

                format( string, sizeof string, "{FFFFFF}\t\tBaldo pirkimas.\n\
                Vietoje, kurioje stovite bus sukurtas baldas ir jб\n\
                iрkart galлsite pradлti redaguoti, keisti vietа\n\
                Grupл: {00FF00}Рviesos\n\
                {FFFFFF}Baldas: {00FF00}%s\n\
                {FFFFFF}Objekto Id: {00FF00}%d\n\
                {FFFFFF}Kaina: {00FF00}$%d{FFFFFF}\n\
                Spauskite {00FF00}Pirkti{FFFFFF} pirkimo patvirtinimui.\n\
                Spauskite {FF0000}Atрaukti{FFFFFF} pirkimo atрaukimui."
,
                FurnitureLights[ listitem ][ furName ],
                FurnitureLights[ listitem ][ furObject ],
                FurnitureLights[ listitem ][ furPrice ] );

                tmpbuy[ playerid ] = listitem;
                ShowPlayerDialog( playerid, 118,DIALOG_STYLE_MSGBOX, "Baldo pirkimas", string, "Pirkti", "Atрaukti" );
            }
            case 5:
            {
                if( PlayerMoney[ playerid ] < FurnitureBath[ listitem ][ furPrice ] )
                    return SendClientMessage( playerid, COLOR_WHITE,"{00FF00}* {FFFFFF}Jums nepakanka pinigш.");

                format( string, sizeof string, "{FFFFFF}\t\tBaldo pirkimas.\n\
                Vietoje, kurioje stovite bus sukurtas baldas ir jб\n\
                iрkart galлsite pradлti redaguoti, keisti vietа\n\
                Grupл: {00FF00}Vonios\n\
                {FFFFFF}Baldas: {00FF00}%s\n\
                {FFFFFF}Objekto Id: {00FF00}%d\n\
                {FFFFFF}Kaina: {00FF00}$%d{FFFFFF}\n\
                Spauskite {00FF00}Pirkti{FFFFFF} pirkimo patvirtinimui.\n\
                Spauskite {FF0000}Atрaukti{FFFFFF} pirkimo atрaukimui."
,
                FurnitureBath[ listitem ][ furName ],
                FurnitureBath[ listitem ][ furObject ],
                FurnitureBath[ listitem ][ furPrice ] );

                tmpbuy[ playerid ] = listitem;
                ShowPlayerDialog( playerid, 118,DIALOG_STYLE_MSGBOX, "Baldo pirkimas", string, "Pirkti", "Atрaukti" );
            }
            case 6:
            {
                if( PlayerMoney[ playerid ] < FurnitureStorage[ listitem ][ furPrice ] )
                    return SendClientMessage( playerid, COLOR_WHITE,"{00FF00}* {FFFFFF}Jums nepakanka pinigш.");

                format( string, sizeof string, "{FFFFFF}\t\tBaldo pirkimas.\n\
                Vietoje, kurioje stovite bus sukurtas baldas ir jб\n\
                iрkart galлsite pradлti redaguoti, keisti vietа\n\
                Grupл: {00FF00}Durys\n\
                {FFFFFF}Baldas: {00FF00}%s\n\
                {FFFFFF}Objekto Id: {00FF00}%d\n\
                {FFFFFF}Kaina: {00FF00}$%d{FFFFFF}\n\
                Spauskite {00FF00}Pirkti{FFFFFF} pirkimo patvirtinimui.\n\
                Spauskite {FF0000}Atрaukti{FFFFFF} pirkimo atрaukimui."
,
                FurnitureStorage[ listitem ][ furName ],
                FurnitureStorage[ listitem ][ furObject ],
                FurnitureStorage[ listitem ][ furPrice ] );

                tmpbuy[ playerid ] = listitem;
                ShowPlayerDialog( playerid, 118,DIALOG_STYLE_MSGBOX, "Baldo pirkimas", string, "Pirkti", "Atрaukti" );
            }
            case 7:
            {
                if( PlayerMoney[ playerid ] < FurnitureStalai[ listitem ][ furPrice ] )
                    return SendClientMessage( playerid, COLOR_WHITE,"{00FF00}* {FFFFFF}Jums nepakanka pinigш.");

                format( string, sizeof string, "{FFFFFF}\t\tBaldo pirkimas.\n\
                Vietoje, kurioje stovite bus sukurtas baldas ir jб\n\
                iрkart galлsite pradлti redaguoti, keisti vietа\n\
                Grupл: {00FF00}Stalai\n\
                {FFFFFF}Baldas: {00FF00}%s\n\
                {FFFFFF}Objekto Id: {00FF00}%d\n\
                {FFFFFF}Kaina: {00FF00}$%d{FFFFFF}\n\
                Spauskite {00FF00}Pirkti{FFFFFF} pirkimo patvirtinimui.\n\
                Spauskite {FF0000}Atрaukti{FFFFFF} pirkimo atрaukimui."
,
                FurnitureStalai[ listitem ][ furName ],
                FurnitureStalai[ listitem ][ furObject ],
                FurnitureStalai[ listitem ][ furPrice ] );

                tmpbuy[ playerid ] = listitem;
                ShowPlayerDialog( playerid, 118,DIALOG_STYLE_MSGBOX, "Baldo pirkimas", string, "Pirkti", "Atрaukti" );
            }
            case 8:
            {
                if( PlayerMoney[ playerid ] < FurnitureStalai2[ listitem ][ furPrice ] )
                    return SendClientMessage( playerid, COLOR_WHITE,"{00FF00}* {FFFFFF}Jums nepakanka pinigш.");

                format( string, sizeof string, "{FFFFFF}\t\tBaldo pirkimas.\n\
                Vietoje, kurioje stovite bus sukurtas baldas ir jб\n\
                iрkart galлsite pradлti redaguoti, keisti vietа\n\
                Grupл: {00FF00}Stalai\n\
                {FFFFFF}Baldas: {00FF00}%s\n\
                {FFFFFF}Objekto Id: {00FF00}%d\n\
                {FFFFFF}Kaina: {00FF00}$%d{FFFFFF}\n\
                Spauskite {00FF00}Pirkti{FFFFFF} pirkimo patvirtinimui.\n\
                Spauskite {FF0000}Atрaukti{FFFFFF} pirkimo atрaukimui."
,
                FurnitureStalai2[ listitem ][ furName ],
                FurnitureStalai2[ listitem ][ furObject ],
                FurnitureStalai2[ listitem ][ furPrice ] );

                tmpbuy[ playerid ] = listitem;
                ShowPlayerDialog( playerid, 118,DIALOG_STYLE_MSGBOX, "Baldo pirkimas", string, "Pirkti", "Atрaukti" );
            }
            case 9:
            {
                if( PlayerMoney[ playerid ] < FurnitureStalai3[ listitem ][ furPrice ] )
                    return SendClientMessage( playerid, COLOR_WHITE,"{00FF00}* {FFFFFF}Jums nepakanka pinigш.");

                format( string, sizeof string, "{FFFFFF}\t\tBaldo pirkimas.\n\
                Vietoje, kurioje stovite bus sukurtas baldas ir jб\n\
                iрkart galлsite pradлti redaguoti, keisti vietа\n\
                Grupл: {00FF00}Stalai\n\
                {FFFFFF}Baldas: {00FF00}%s\n\
                {FFFFFF}Objekto Id: {00FF00}%d\n\
                {FFFFFF}Kaina: {00FF00}$%d{FFFFFF}\n\
                Spauskite {00FF00}Pirkti{FFFFFF} pirkimo patvirtinimui.\n\
                Spauskite {FF0000}Atрaukti{FFFFFF} pirkimo atрaukimui."
,
                FurnitureStalai3[ listitem ][ furName ],
                FurnitureStalai3[ listitem ][ furObject ],
                FurnitureStalai3[ listitem ][ furPrice ] );

                tmpbuy[ playerid ] = listitem;
                ShowPlayerDialog( playerid, 118,DIALOG_STYLE_MSGBOX, "Baldo pirkimas", string, "Pirkti", "Atрaukti" );
            }
        }
    }
    else if( dialogid == 118 )
    {
        if( !response )
            return SendClientMessage( playerid, COLOR_WHITE,"{00FF00}* {FFFFFF}Pirkimas atрauktas !");
        if( !IsPlayerInHouse( playerid ) && !IsPlayerInBusiness( playerid ) )
            return SendClientMessage( playerid, COLOR_WHITE,"{00FF00}* {FFFFFF}Turite bыti name ! " );

        switch( pFurGroup[ playerid ] )
        {
            case 0: // Technika
            {
                new
                    Float:fpPos[ 3 ];

                GetPlayerPos( playerid, fpPos[ 0 ], fpPos[ 1 ], fpPos[ 2 ] );
                if( PlayerMoney[ playerid ] < FurnitureTechnika[ tmpbuy[ playerid ] ][ furPrice ] )
                    return SendClientMessage( playerid, COLOR_WHITE,"Jums nepakanka pinigш.");

                SendClientMessage( playerid, COLOR_WHITE,"Baldas nupirktas ir padлtas. Dabar galite jб redaguoti !");
                if(IsPlayerInHouse(playerid))
                AddHouseFurniture( playerid, GetPlayerHouse( playerid ), FurnitureTechnika[ tmpbuy[ playerid ] ][ furObject ],FurnitureTechnika[ tmpbuy[ playerid ] ][ furName ],FurnitureTechnika[ tmpbuy[ playerid ] ][ furPrice ], fpPos[ 0 ], fpPos[ 1 ], fpPos[ 2 ], 0, 0 ,0 );
                else if(IsPlayerInBusiness(playerid))
                AddBizzFurniture( playerid, GetPlayerBusiness( playerid ), FurnitureTechnika[ tmpbuy[ playerid ] ][ furObject ],FurnitureTechnika[ tmpbuy[ playerid ] ][ furName ],FurnitureTechnika[ tmpbuy[ playerid ] ][ furPrice ], fpPos[ 0 ], fpPos[ 1 ], fpPos[ 2 ], 0, 0 ,0 );
                GivePlayerMoney( playerid, -FurnitureTechnika[ tmpbuy[ playerid ] ][ furPrice ] );
            }
            case 1: // Komforto baldai
            {
                new
                    Float:fpPos[ 3 ];

                GetPlayerPos( playerid, fpPos[ 0 ], fpPos[ 1 ], fpPos[ 2 ] );
                if( PlayerMoney[ playerid ] < FurnitureComfort[ tmpbuy[ playerid ] ][ furPrice ] )
                    return SendClientMessage( playerid, COLOR_WHITE,"Jums nepakanka pinigш.");

                SendClientMessage( playerid, COLOR_WHITE,"Baldas nupirktas ir padлtas. Dabar galite jб redaguoti !");
                if(IsPlayerInHouse(playerid))
                AddHouseFurniture( playerid, GetPlayerHouse( playerid ), FurnitureComfort[ tmpbuy[ playerid ] ][ furObject ],FurnitureComfort[ tmpbuy[ playerid ] ][ furName ],FurnitureComfort[ tmpbuy[ playerid ] ][ furPrice ], fpPos[ 0 ], fpPos[ 1 ], fpPos[ 2 ], 0, 0 ,0 );
                else if(IsPlayerInBusiness(playerid))
                AddBizzFurniture( playerid, GetPlayerBusiness( playerid ), FurnitureComfort[ tmpbuy[ playerid ] ][ furObject ],FurnitureComfort[ tmpbuy[ playerid ] ][ furName ],FurnitureComfort[ tmpbuy[ playerid ] ][ furPrice ], fpPos[ 0 ], fpPos[ 1 ], fpPos[ 2 ], 0, 0 ,0 );
                GivePlayerMoney( playerid, -FurnitureComfort[ tmpbuy[ playerid ] ][ furPrice ] );
            }
            case 2: // Dekoracijos
            {
                new
                       Float:fpPos[ 3 ];

                GetPlayerPos( playerid, fpPos[ 0 ], fpPos[ 1 ], fpPos[ 2 ] );
                if( PlayerMoney[ playerid ] < FurnitureDecoration[ tmpbuy[ playerid ] ][ furPrice ] )
                    return SendClientMessage( playerid, COLOR_WHITE,"Jums nepakanka pinigш.");

                SendClientMessage( playerid, COLOR_WHITE,"Baldas nupirktas ir padлtas. Dabar galite jб redaguoti !");
                if(IsPlayerInHouse(playerid))
                AddHouseFurniture( playerid, GetPlayerHouse( playerid ), FurnitureDecoration[ tmpbuy[ playerid ] ][ furObject ],FurnitureDecoration[ tmpbuy[ playerid ] ][ furName ],FurnitureDecoration[ tmpbuy[ playerid ] ][ furPrice ], fpPos[ 0 ], fpPos[ 1 ], fpPos[ 2 ], 0, 0 ,0 );
                else if(IsPlayerInBusiness(playerid))
                AddBizzFurniture( playerid, GetPlayerBusiness( playerid ), FurnitureDecoration[ tmpbuy[ playerid ] ][ furObject ],FurnitureDecoration[ tmpbuy[ playerid ] ][ furName ],FurnitureDecoration[ tmpbuy[ playerid ] ][ furPrice ], fpPos[ 0 ], fpPos[ 1 ], fpPos[ 2 ], 0, 0 ,0 );
                GivePlayerMoney( playerid, -FurnitureDecoration[ tmpbuy[ playerid ] ][ furPrice ] );
            }
            case 3: // Freet
            {
                new
                    Float:fpPos[ 3 ];

                GetPlayerPos( playerid, fpPos[ 0 ], fpPos[ 1 ], fpPos[ 2 ] );
                if( PlayerMoney[ playerid ] < FurnitureFreet[ tmpbuy[ playerid ] ][ furPrice ] )
                    return SendClientMessage( playerid, COLOR_WHITE,"Jums nepakanka pinigш.");

                SendClientMessage( playerid, COLOR_WHITE,"Baldas nupirktas ir padлtas. Dabar galite jб redaguoti !");
                if(IsPlayerInHouse(playerid))
                AddHouseFurniture( playerid, GetPlayerHouse( playerid ), FurnitureFreet[ tmpbuy[ playerid ] ][ furObject ],FurnitureFreet[ tmpbuy[ playerid ] ][ furName ],FurnitureFreet[ tmpbuy[ playerid ] ][ furPrice ], fpPos[ 0 ], fpPos[ 1 ], fpPos[ 2 ], 0, 0 ,0 );
                else if(IsPlayerInBusiness(playerid))
                AddBizzFurniture( playerid, GetPlayerBusiness( playerid ), FurnitureFreet[ tmpbuy[ playerid ] ][ furObject ],FurnitureFreet[ tmpbuy[ playerid ] ][ furName ],FurnitureFreet[ tmpbuy[ playerid ] ][ furPrice ], fpPos[ 0 ], fpPos[ 1 ], fpPos[ 2 ], 0, 0 ,0 );
                GivePlayerMoney( playerid, -FurnitureFreet[ tmpbuy[ playerid ] ][ furPrice ] );
            }
            case 4: // Рviesos
            {
                new
                    Float:fpPos[ 3 ];

                GetPlayerPos( playerid, fpPos[ 0 ], fpPos[ 1 ], fpPos[ 2 ] );
                if( PlayerMoney[ playerid ] < FurnitureLights[ tmpbuy[ playerid ] ][ furPrice ] )
                    return SendClientMessage( playerid, COLOR_WHITE,"Jums nepakanka pinigш.");

                SendClientMessage( playerid, COLOR_WHITE,"Baldas nupirktas ir padлtas. Dabar galite jб redaguoti !");
                if(IsPlayerInHouse(playerid))
                AddHouseFurniture( playerid, GetPlayerHouse( playerid ), FurnitureLights[ tmpbuy[ playerid ] ][ furObject ],FurnitureLights[ tmpbuy[ playerid ] ][ furName ],FurnitureLights[ tmpbuy[ playerid ] ][ furPrice ], fpPos[ 0 ], fpPos[ 1 ], fpPos[ 2 ], 0, 0 ,0 );
                else if(IsPlayerInBusiness(playerid))
                AddBizzFurniture( playerid, GetPlayerBusiness( playerid ), FurnitureLights[ tmpbuy[ playerid ] ][ furObject ],FurnitureLights[ tmpbuy[ playerid ] ][ furName ],FurnitureLights[ tmpbuy[ playerid ] ][ furPrice ], fpPos[ 0 ], fpPos[ 1 ], fpPos[ 2 ], 0, 0 ,0 );
                GivePlayerMoney( playerid, -FurnitureLights[ tmpbuy[ playerid ] ][ furPrice ] );
            }
            case 5: // Bath
            {
                new
                    Float:fpPos[ 3 ];

                GetPlayerPos( playerid, fpPos[ 0 ], fpPos[ 1 ], fpPos[ 2 ] );
                if( PlayerMoney[ playerid ] < FurnitureBath[ tmpbuy[ playerid ] ][ furPrice ] )
                    return SendClientMessage( playerid, COLOR_WHITE,"Jums nepakanka pinigш.");

                SendClientMessage( playerid, COLOR_WHITE,"Baldas nupirktas ir padлtas. Dabar galite jб redaguoti !");
                if(IsPlayerInHouse(playerid))
                AddHouseFurniture( playerid, GetPlayerHouse( playerid ), FurnitureBath[ tmpbuy[ playerid ] ][ furObject ],FurnitureBath[ tmpbuy[ playerid ] ][ furName ],FurnitureBath[ tmpbuy[ playerid ] ][ furPrice ], fpPos[ 0 ], fpPos[ 1 ], fpPos[ 2 ], 0, 0 ,0 );
                else if(IsPlayerInBusiness(playerid))
                AddBizzFurniture( playerid, GetPlayerBusiness( playerid ), FurnitureBath[ tmpbuy[ playerid ] ][ furObject ],FurnitureBath[ tmpbuy[ playerid ] ][ furName ],FurnitureBath[ tmpbuy[ playerid ] ][ furPrice ], fpPos[ 0 ], fpPos[ 1 ], fpPos[ 2 ], 0, 0 ,0 );
                GivePlayerMoney( playerid, -FurnitureBath[ tmpbuy[ playerid ] ][ furPrice ] );
            }
            case 6:
            {
                new
                    Float:fpPos[ 3 ];

                GetPlayerPos( playerid, fpPos[ 0 ], fpPos[ 1 ], fpPos[ 2 ] );
                if( PlayerMoney[ playerid ] < FurnitureStorage[ tmpbuy[ playerid ] ][ furPrice ] )
                    return SendClientMessage( playerid, COLOR_WHITE,"Jums nepakanka pinigш.");

                SendClientMessage( playerid, COLOR_WHITE,"Baldas nupirktas ir padлtas. Dabar galite jб redaguoti !");
                if(IsPlayerInHouse(playerid))
                AddHouseFurniture( playerid, GetPlayerHouse( playerid ), FurnitureStorage[ tmpbuy[ playerid ] ][ furObject ],FurnitureStorage[ tmpbuy[ playerid ] ][ furName ],FurnitureStorage[ tmpbuy[ playerid ] ][ furPrice ], fpPos[ 0 ], fpPos[ 1 ], fpPos[ 2 ], 0, 0 ,0 );
                else if(IsPlayerInBusiness(playerid))
                AddBizzFurniture( playerid, GetPlayerBusiness( playerid ), FurnitureStorage[ tmpbuy[ playerid ] ][ furObject ],FurnitureStorage[ tmpbuy[ playerid ] ][ furName ],FurnitureStorage[ tmpbuy[ playerid ] ][ furPrice ], fpPos[ 0 ], fpPos[ 1 ], fpPos[ 2 ], 0, 0 ,0 );
                GivePlayerMoney( playerid, -FurnitureStorage[ tmpbuy[ playerid ] ][ furPrice ] );
            }
            case 7:
            {
                new
                    Float:fpPos[ 3 ];

                GetPlayerPos( playerid, fpPos[ 0 ], fpPos[ 1 ], fpPos[ 2 ] );
                if( PlayerMoney[ playerid ] < FurnitureStalai[ tmpbuy[ playerid ] ][ furPrice ] )
                    return SendClientMessage( playerid, COLOR_WHITE,"Jums nepakanka pinigш.");

                SendClientMessage( playerid, COLOR_WHITE,"Baldas nupirktas ir padлtas. Dabar galite jб redaguoti !");
                if(IsPlayerInHouse(playerid))
                AddHouseFurniture( playerid, GetPlayerHouse( playerid ), FurnitureStalai[ tmpbuy[ playerid ] ][ furObject ],FurnitureStalai[ tmpbuy[ playerid ] ][ furName ],FurnitureStalai[ tmpbuy[ playerid ] ][ furPrice ], fpPos[ 0 ], fpPos[ 1 ], fpPos[ 2 ], 0, 0 ,0 );
                else if(IsPlayerInBusiness(playerid))
                AddBizzFurniture( playerid, GetPlayerBusiness( playerid ), FurnitureStalai[ tmpbuy[ playerid ] ][ furObject ],FurnitureStalai[ tmpbuy[ playerid ] ][ furName ],FurnitureStalai[ tmpbuy[ playerid ] ][ furPrice ], fpPos[ 0 ], fpPos[ 1 ], fpPos[ 2 ], 0, 0 ,0 );
                GivePlayerMoney( playerid, -FurnitureStalai[ tmpbuy[ playerid ] ][ furPrice ] );
            }
            case 8:
            {
                new
                    Float:fpPos[ 3 ];

                GetPlayerPos( playerid, fpPos[ 0 ], fpPos[ 1 ], fpPos[ 2 ] );
                if( PlayerMoney[ playerid ] < FurnitureStalai2[ tmpbuy[ playerid ] ][ furPrice ] )
                    return SendClientMessage( playerid, COLOR_WHITE,"Jums nepakanka pinigш.");

                SendClientMessage( playerid, COLOR_WHITE,"Baldas nupirktas ir padлtas. Dabar galite jб redaguoti !");
                if(IsPlayerInHouse(playerid))
                AddHouseFurniture( playerid, GetPlayerHouse( playerid ), FurnitureStalai2[ tmpbuy[ playerid ] ][ furObject ],FurnitureStalai2[ tmpbuy[ playerid ] ][ furName ],FurnitureStalai2[ tmpbuy[ playerid ] ][ furPrice ], fpPos[ 0 ], fpPos[ 1 ], fpPos[ 2 ], 0, 0 ,0 );
                else if(IsPlayerInBusiness(playerid))
                AddBizzFurniture( playerid, GetPlayerBusiness( playerid ), FurnitureStalai2[ tmpbuy[ playerid ] ][ furObject ],FurnitureStalai2[ tmpbuy[ playerid ] ][ furName ],FurnitureStalai2[ tmpbuy[ playerid ] ][ furPrice ], fpPos[ 0 ], fpPos[ 1 ], fpPos[ 2 ], 0, 0 ,0 );
                GivePlayerMoney( playerid, -FurnitureStalai2[ tmpbuy[ playerid ] ][ furPrice ] );
            }
            case 9:
            {
                new
                    Float:fpPos[ 3 ];

                GetPlayerPos( playerid, fpPos[ 0 ], fpPos[ 1 ], fpPos[ 2 ] );
                if( PlayerMoney[ playerid ] < FurnitureStalai3[ tmpbuy[ playerid ] ][ furPrice ] )
                    return SendClientMessage( playerid, COLOR_WHITE,"Jums nepakanka pinigш.");

                SendClientMessage( playerid, COLOR_WHITE,"Baldas nupirktas ir padлtas. Dabar galite jб redaguoti !");
                if(IsPlayerInHouse(playerid))
                AddHouseFurniture( playerid, GetPlayerHouse( playerid ), FurnitureStalai3[ tmpbuy[ playerid ] ][ furObject ],FurnitureStalai3[ tmpbuy[ playerid ] ][ furName ],FurnitureStalai3[ tmpbuy[ playerid ] ][ furPrice ], fpPos[ 0 ], fpPos[ 1 ], fpPos[ 2 ], 0, 0 ,0 );
                else if(IsPlayerInBusiness(playerid))
                AddBizzFurniture( playerid, GetPlayerBusiness( playerid ), FurnitureStalai3[ tmpbuy[ playerid ] ][ furObject ],FurnitureStalai3[ tmpbuy[ playerid ] ][ furName ],FurnitureStalai3[ tmpbuy[ playerid ] ][ furPrice ], fpPos[ 0 ], fpPos[ 1 ], fpPos[ 2 ], 0, 0 ,0 );
                GivePlayerMoney( playerid, -FurnitureStalai3[ tmpbuy[ playerid ] ][ furPrice ] );
            }
        }
    }
    else if( dialogid == 116 )
    {
        if( !response )
            return true;
        switch( listitem )
        {
            case 0: // VIRTUVЛS BALDAI
            {
                for ( new i = 0; i < MAX_TECHNIKA; i++ )
                {
                    if( i == 0 )
                        format(string, sizeof( string ),"[Object: %d ]%s - $%d\n",
                                                        FurnitureTechnika[ i ][ furObject ],
                                                        FurnitureTechnika[ i ][ furName   ],
                                                        FurnitureTechnika[ i ][ furPrice ] );
                    else if( i != 0 )
                        format(string, sizeof( string ),"%s[Object: %d ]%s - $%d\n", string,
                                                        FurnitureTechnika[ i ][ furObject ],
                                                        FurnitureTechnika[ i ][ furName   ],
                                                        FurnitureTechnika[ i ][ furPrice ] );
                }
                ShowPlayerDialog( playerid, 117, DIALOG_STYLE_LIST,"Baldш sаraрas", string, "Pirkti", "<--" );
                pFurGroup[ playerid ] = 0;
            }
            case 1: // VONIOS BALDAI
            {
                for ( new i = 0; i < MAX_COMFORT; i++ )
                {
                    if( i == 0 )
                        format(string, sizeof( string ),"[Object: %d ]%s - $%d\n",
                                                        FurnitureComfort[ i ][ furObject ],
                                                        FurnitureComfort[ i ][ furName   ],
                                                        FurnitureComfort[ i ][ furPrice ] );
                    else if( i != 0 )
                        format(string, sizeof( string ),"%s[Object: %d ]%s - $%d\n", string,
                                                        FurnitureComfort[ i ][ furObject ],
                                                        FurnitureComfort[ i ][ furName   ],
                                                        FurnitureComfort[ i ][ furPrice ] );
                }
                ShowPlayerDialog( playerid, 117, DIALOG_STYLE_LIST,"Baldш sаraрas", string, "Pirkti", "<--" );
                pFurGroup[ playerid ] = 1;
            }
            case 2: // SPINTOS, LENTYNOS
            {
                for ( new i = 0; i < MAX_DECORATION; i++ )
                {
                    if( i == 0 )
                        format(string, sizeof( string ),"[Object: %d ]%s - $%d\n",
                                                        FurnitureDecoration[ i ][ furObject ],
                                                        FurnitureDecoration[ i ][ furName   ],
                                                        FurnitureDecoration[ i ][ furPrice ] );
                    else if( i != 0 )
                        format(string, sizeof( string ),"%s[Object: %d ]%s - $%d\n", string,
                                                        FurnitureDecoration[ i ][ furObject ],
                                                        FurnitureDecoration[ i ][ furName   ],
                                                        FurnitureDecoration[ i ][ furPrice ] );
                }
                ShowPlayerDialog( playerid, 117, DIALOG_STYLE_LIST,"Baldш sаraрas", string, "Pirkti", "<--" );
                pFurGroup[ playerid ] = 2;
            }
            case 3: // LOVOS, РVIESOS
            {
                for ( new i = 0; i < MAX_FREET; i++ )
                {
                    if( i == 0 )
                        format(string, sizeof( string ),"[Object: %d ]%s - $%d\n",
                                                        FurnitureFreet[ i ][ furObject ],
                                                        FurnitureFreet[ i ][ furName   ],
                                                        FurnitureFreet[ i ][ furPrice ] );
                    else if( i != 0 )
                        format(string, sizeof( string ),"%s[Object: %d ]%s - $%d\n", string,
                                                        FurnitureFreet[ i ][ furObject ],
                                                        FurnitureFreet[ i ][ furName   ],
                                                        FurnitureFreet[ i ][ furPrice ] );
                }
                ShowPlayerDialog( playerid, 117, DIALOG_STYLE_LIST,"Baldш sаraрas", string, "Pirkti", "<--" );
                pFurGroup[ playerid ] = 3;
            }
            case 4: // STALAI, KЛDЛS
            {
                for ( new i = 0; i < MAX_LIGHTS; i++ )
                {
                    if( i == 0 )
                        format(string, sizeof( string ),"[Object: %d ]%s - $%d\n",
                                                        FurnitureLights[ i ][ furObject ],
                                                        FurnitureLights[ i ][ furName   ],
                                                        FurnitureLights[ i ][ furPrice ] );
                    else if( i != 0 )
                        format(string, sizeof( string ),"%s[Object: %d ]%s - $%d\n", string,
                                                        FurnitureLights[ i ][ furObject ],
                                                        FurnitureLights[ i ][ furName   ],
                                                        FurnitureLights[ i ][ furPrice ] );
                }
                ShowPlayerDialog( playerid, 117, DIALOG_STYLE_LIST,"Baldш sаraрas", string, "Pirkti", "<--" );
                pFurGroup[ playerid ] = 4;
            }
            case 5: // DURYS, LANGAI
            {
                for ( new i = 0; i < MAX_BATH; i++ )
                {
                    if( i == 0 )
                        format(string, sizeof( string ),"[Object: %d ]%s - $%d\n",
                                                        FurnitureBath[ i ][ furObject ],
                                                        FurnitureBath[ i ][ furName   ],
                                                        FurnitureBath[ i ][ furPrice ] );
                    else if( i != 0 )
                        format(string, sizeof( string ),"%s[Object: %d ]%s - $%d\n", string,
                                                        FurnitureBath[ i ][ furObject ],
                                                        FurnitureBath[ i ][ furName   ],
                                                        FurnitureBath[ i ][ furPrice ] );
                }
                ShowPlayerDialog( playerid, 117, DIALOG_STYLE_LIST,"Baldш sаraрas", string, "Pirkti", "<--" );
                pFurGroup[ playerid ] = 5;
            }
            case 6: // SIENOS, SIENШ STAKTAI
            {
                for ( new i = 0; i < MAX_STORAGE; i++ )
                {
                    if( i == 0 )
                        format(string, sizeof( string ),"[Object: %d ]%s - $%d\n",
                                                        FurnitureStorage[ i ][ furObject ],
                                                        FurnitureStorage[ i ][ furName   ],
                                                        FurnitureStorage[ i ][ furPrice ] );
                    else if( i != 0 )
                        format(string, sizeof( string ),"%s[Object: %d ]%s - $%d\n", string,
                                                        FurnitureStorage[ i ][ furObject ],
                                                        FurnitureStorage[ i ][ furName   ],
                                                        FurnitureStorage[ i ][ furPrice ] );
                }
                ShowPlayerDialog( playerid, 117, DIALOG_STYLE_LIST,"Baldш sаraрas", string, "Pirkti", "<--" );
                pFurGroup[ playerid ] = 6;
            }
            case 7: // DEKORACINIAI BALDAI
            {
                for ( new i = 0; i < MAX_STALAI; i++ )
                {
                    if( i == 0 )
                        format(string, sizeof( string ),"[Object: %d ]%s - $%d\n",
                                                        FurnitureStalai[ i ][ furObject ],
                                                        FurnitureStalai[ i ][ furName   ],
                                                        FurnitureStalai[ i ][ furPrice ] );
                    else if( i != 0 )
                        format(string, sizeof( string ),"%s[Object: %d ]%s - $%d\n", string,
                                                        FurnitureStalai[ i ][ furObject ],
                                                        FurnitureStalai[ i ][ furName   ],
                                                        FurnitureStalai[ i ][ furPrice ] );
                }
                ShowPlayerDialog( playerid, 117, DIALOG_STYLE_LIST,"Baldш sаraрas", string, "Pirkti", "<--" );
                pFurGroup[ playerid ] = 7;
            }
            case 8: // KITA
            {
                for ( new i = 0; i < MAX_STALAI2; i++ )
                {
                    if( i == 0 )
                        format(string, sizeof( string ),"[Object: %d ]%s - $%d\n",
                                                        FurnitureStalai2[ i ][ furObject ],
                                                        FurnitureStalai2[ i ][ furName   ],
                                                        FurnitureStalai2[ i ][ furPrice ] );
                    else if( i != 0 )
                        format(string, sizeof( string ),"%s[Object: %d ]%s - $%d\n", string,
                                                        FurnitureStalai2[ i ][ furObject ],
                                                        FurnitureStalai2[ i ][ furName   ],
                                                        FurnitureStalai2[ i ][ furPrice ] );
                }
                ShowPlayerDialog( playerid, 117, DIALOG_STYLE_LIST,"Baldш sаraрas", string, "Pirkti", "<--" );
                pFurGroup[ playerid ] = 8;
            }
            case 9: // ELEKTRONIKA
            {
                for ( new i = 0; i < MAX_STALAI3; i++ )
                {
                    if( i == 0 )
                        format(string, sizeof( string ),"[Object: %d ]%s - $%d\n",
                                                        FurnitureStalai3[ i ][ furObject ],
                                                        FurnitureStalai3[ i ][ furName   ],
                                                        FurnitureStalai3[ i ][ furPrice ] );
                    else if( i != 0 )
                        format(string, sizeof( string ),"%s[Object: %d ]%s - $%d\n", string,
                                                        FurnitureStalai3[ i ][ furObject ],
                                                        FurnitureStalai3[ i ][ furName   ],
                                                        FurnitureStalai3[ i ][ furPrice ] );
                }
                ShowPlayerDialog( playerid, 117, DIALOG_STYLE_LIST,"Baldш sаraрas", string, "Pirkti", "<--" );
                pFurGroup[ playerid ] = 9;
            }
        }
    }
All stocks and else I changed like bussines, so I don't know what to do next, please help.
Reply
#2

anyone?
Reply
#3

pawn Код:
#define     MAX_FURNITURES 100000
#define     MAX_HFURNS     10000
When I make 10000 It won't lag so much but it's too small for server 10k objects in houses.
Reply
#4

10k objects in all houses? That's too much!

For one house 15 objects are enough. Put a limit!
Reply
#5

No it's not for one house, it's for all furniture objects in all houses.
Reply
#6

Maybe someone can take a little bit of your time and check it please!
Reply
#7

Update your steamer plugin
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)