Оптимизация
#3

PHP код:
stock LoadHouse()
{
    new 
time GetTickCount();
    
mysql_query("SELECT * FROM "TABLE_HOUSE" ORDER BY  "TABLE_HOUSE".`ID` ASC ");
    
mysql_store_result();
    for(new 
1TOTALHOUSEi++)
    {
        
strmid(BizzInfo[i][bOwner],"The_State",0,strlen("The_State"),24);
    }
    if (
mysql_num_rows() > 0)
    {
        for(new 
idx 1idx <= mysql_num_rows(); idx++)
        {
            
mysql_fetch_row(query);
            
sscanf(query"p<|>iffffffs[24]iiiiis[5]iiiiffffiii",
            
HouseInfo[idx][hID],
            
HouseInfo[idx][hEnterX],
            
HouseInfo[idx][hEnterY],
            
HouseInfo[idx][hEnterZ],
            
HouseInfo[idx][hExitX],
            
HouseInfo[idx][hExitY],
            
HouseInfo[idx][hExitZ],
            
HouseInfo[idx][hOwner],
            
HouseInfo[idx][hValue],
            
HouseInfo[idx][hInt],
            
HouseInfo[idx][hLock],
            
HouseInfo[idx][hOwned],
            
HouseInfo[idx][hTakings],
            
HouseInfo[idx][hClass],
            
HouseInfo[idx][hPaycash],
            
HouseInfo[idx][hMIcon],
            
HouseInfo[idx][hVirtWorld],
            
HouseInfo[idx][hHealme],
            
HouseInfo[idx][hCarX],
            
HouseInfo[idx][hCarY],
            
HouseInfo[idx][hCarZ],
            
HouseInfo[idx][hCarA],
            
HouseInfo[idx][hSafe],
            
HouseInfo[idx][hDrugs],
            
HouseInfo[idx][hMoney]);
            
TOTALHOUSE++;
            
HouseInfo[idx][hRobhouse] = false;
            if (
HouseInfo[idx][hOwned] == 0)
            {
                
HouseInfo[idx][hPickup] = CreatePickup(127323HouseInfo[idx][hEnterX], HouseInfo[idx][hEnterY], HouseInfo[idx][hEnterZ]);
                
HouseInfo[idx][hMIcon] = CreateDynamicMapIcon(HouseInfo[idx][hEnterX], HouseInfo[idx][hEnterY], HouseInfo[idx][hEnterZ], 310, -1, -1, -1100.0);
            }
            if (
HouseInfo[idx][hOwned] == 1)
            {
                
HouseInfo[idx][hPickup] = CreatePickup(127223HouseInfo[idx][hEnterX ], HouseInfo[idx][hEnterY ], HouseInfo[idx][hEnterZ]);
                
HouseInfo[idx][hMIcon] = CreateDynamicMapIcon(HouseInfo[idx][hEnterX], HouseInfo[idx][hEnterY], HouseInfo[idx][hEnterZ], 320, -1, -1, -1100.0);
            }
        }
    }
    
mysql_free_result();
    
printf("---------------------------------------------------------");
    
printf(" [Загрузка домов]: Было загружено - %d потрачено %d (ms)"TOTALHOUSE,GetTickCount() - time);
    return 
1;

Reply


Messages In This Thread
Оптимизация - by Size - 24.03.2014, 06:56
Re: Оптимизация - by Stepashka - 24.03.2014, 07:12
Re: Оптимизация - by Size - 24.03.2014, 07:45
Re: Оптимизация - by Stepashka - 24.03.2014, 08:34
Re: Оптимизация - by Size - 24.03.2014, 08:54
Re: Оптимизация - by Stepashka - 24.03.2014, 09:29
Re: Оптимизация - by Size - 24.03.2014, 11:30
Re: Оптимизация - by Stepashka - 24.03.2014, 11:41
Re: Оптимизация - by Daea - 24.03.2014, 12:21

Forum Jump:


Users browsing this thread: 3 Guest(s)