Houses aren't loading again..
#3

PHP код:
// OnGameModeInit
mysql_tquery(dbHandle"SELECT * FROM `houses`;""OnhousesLoad""");
forward OnhousesLoad();
public 
OnhousesLoad()
{
    new 
rows cache_num_rows(), Houselabel[128];
    if(
rows)
    {
        for(new 
0rowsi++)
        {
            
cache_get_value_name_float(i"HouseEX"hInfo[i][HouseEX]);
            
cache_get_value_name_float(i"HouseEY"hInfo[i][HouseEX]);
            
cache_get_value_name_float(i"HouseEZ"hInfo[i][HouseEX]);
            
cache_get_value_name(i"HouseTitle"hInfo[i][HouseTitle], 50);
            
cache_get_value_name_int(i"HouseOwned"hInfo[i][HouseOwned]);
            
cache_get_value_name(i"HouseOwner"hInfo[i][HouseOwner], MAX_PLAYER_NAME);
            
cache_get_value_name_int(i"HousePassworded"hInfo[i][HousePassworded]);
            
cache_get_value_name(i"HousePassword"hInfo[i][HousePassword], 128);
            
cache_get_value_name_int(i"HousePrice"hInfo[i][HousePrice]);
            
               if(
hInfo[i][HouseOwned] == 0)
            {
                 
format(Houselabelsizeof(Houselabel), "{FFD700}House Title(%i): {FFFFFF}%s\n{FFD700}House Owner: {FFFFFF}No-one\n {FFD700}House Price: {FFFFFF}$%d"hInfo[i][HouseID], hInfo[i][HouseTitle], hInfo[i][HousePrice]);
                
hInfo[i][HouseDetails] = CreateDynamic3DTextLabel(Houselabel0xFFFFFFhInfo[i][HouseEX], hInfo[i][HouseEY], hInfo[i][HouseEZ], 15.000,15.0);
                
hInfo[i][HouseCP] = CreateDynamicCP(hInfo[i][HouseEX], hInfo[i][HouseEY], hInfo[i][HouseEZ], 10015);
            }
            else if(
hInfo[i][HouseOwned] == 1)
            {
                
format(Houselabelsizeof(Houselabel), "{FFD700}House Title(%i): {FFFFFF}%s\n{FFD700}House Owner: {FFFFFF}%s\n {FFD700}House Price: {FFFFFF}$%d"hInfo[i][HouseID], hInfo[i][HouseTitle], hInfo[i][HousePrice]);
                
hInfo[i][HouseDetails] = CreateDynamic3DTextLabel(Houselabel0xFFFFFFhInfo[i][HouseEX], hInfo[i][HouseEY], hInfo[i][HouseEZ], 15.00,  015.0);
                
hInfo[i][HouseCP] = CreateDynamicCP(hInfo[i][HouseEX], hInfo[i][HouseEY], hInfo[i][HouseEZ], 10,  015);
            }
        }
        
printf("Total houses loaded: %d"rows);
    }
    return 
1;

Reply


Messages In This Thread
Houses aren't loading again.. - by div - 04.07.2018, 09:11
Re: Houses aren't loading again.. - by div - 04.07.2018, 15:23
Re: Houses aren't loading again.. - by kovac - 04.07.2018, 16:17

Forum Jump:


Users browsing this thread: 1 Guest(s)