How to optimize this!
#1

'm doing a furniture system , and I want to display a list of furniture that has a home but the array is too large to be displayed.

Код:
#define MAX_FURNITURE (1000) // max objects
#define MAX_HOUSE_FURNITURE (20) // max objects per house
this is the command I'm doing to display objects that have a home.

PHP код:
CMD:furniture(playeridparams[])
{
    static
        
houseid = -1;
    if ((
houseid House_Inside(playerid)) != -&& House_IsOwner(playeridhouseid))
    {
        new 
count;
        
        static
            
muebles[MAX_HOUSE_FURNITURE];
           for(new 
0,MAX_FURNITURE;<= j;i++)
        {
            if (
count MAX_HOUSE_FURNITURE && FurnitureData[i][furnitureExists] && FurnitureData[i][furnitureHouse] == houseid)
            {
                
ListedFurniture[playerid][count++] = i;
                
muebles[i] = FurnitureData[i][furnitureModel];
            }
        }
        if (
count) {
            
ShowModelSelectionMenu(playerid"Muebles"MODEL_SELECTION_MUEBLESmueblessizeof(muebles), -16.00.0, -55.00.91);
         }
         else 
SendErrorMessage(playerid"esta casa no tiene muebles.");
    }
    else 
SendErrorMessage(playerid"no estбs en el interior de tu casa.");
    return 
1;

the problem is that the array is too big, and I do not see how to optimize to show correctly the list.
pd: sorry for my bad English :P
Reply


Messages In This Thread
How to optimize this! - by StreK - 13.05.2016, 22:24
Re: How to optimize this! - by Micko123 - 14.05.2016, 05:47
Re: How to optimize this! - by BiosMarcel - 14.05.2016, 09:07
Re: How to optimize this! - by Micko123 - 14.05.2016, 10:15
Re: How to optimize this! - by BiosMarcel - 14.05.2016, 10:29
Re: How to optimize this! - by F1N4L - 14.05.2016, 12:22
Re: How to optimize this! - by BiosMarcel - 14.05.2016, 12:25

Forum Jump:


Users browsing this thread: 1 Guest(s)