PHP код:
fpublic LoadHouse()
{
LoadAllHouse = 0;
new
rows,
fields,
time = GetTickCount();
cache_get_data(rows, fields, mysql_connBD);
if(rows)
{
for(new h = 1; h < rows; h++)
{
hInfo[h][hID] = cache_get_field_content_int(h, "ID", mysql_connBD);
hInfo[h][hOwner] = cache_get_field_content_int(h, "OWNER", mysql_connBD);
hInfo[h][hSell] = cache_get_field_content_int(h, "SELL", mysql_connBD);
hInfo[h][hEnterX] = cache_get_field_content_float(h, "ENTERX", mysql_connBD);
hInfo[h][hEnterY] = cache_get_field_content_float(h, "ENTERY", mysql_connBD);
hInfo[h][hEnterZ] = cache_get_field_content_float(h, "ENTERZ", mysql_connBD);
hInfo[h][hExitX] = cache_get_field_content_float(h, "EXITX", mysql_connBD);
hInfo[h][hExitY] = cache_get_field_content_float(h, "EXITY", mysql_connBD);
hInfo[h][hExitZ] = cache_get_field_content_float(h, "EXITZ", mysql_connBD);
hInfo[h][hInterier] = cache_get_field_content_int(h, "INTERIER", mysql_connBD);
hInfo[h][hPrice] = cache_get_field_content_int(h, "PRICE", mysql_connBD);
hInfo[h][hClass] = cache_get_field_content_int(h, "CLASS", mysql_connBD);
hInfo[h][hLock] = cache_get_field_content_int(h, "LOCK", mysql_connBD);
LoadAllHouse++;
if(hInfo[h][hSell] == 0)
{
static const h_null[] = "Номер дома: %d\nКласс дома: %s\nСтоимость: %d";
new h_buff[sizeof(h_null) + ((3-2) + (10-2) + (20-2))];
format(h_buff, sizeof(h_buff), h_null, hInfo[h][hID], house_class[hInfo[h][hClass]], hInfo[h][hPrice]);
hInfo[h][hPickup] = CreatePickup(19471, 1, hInfo[h][hEnterX], hInfo[h][hEnterY], hInfo[h][hEnterZ], -1);
hInfo[h][hText] = Create3DTextLabel(h_buff, 0xFFFFFF, hInfo[h][hEnterX], hInfo[h][hEnterY], hInfo[h][hEnterZ], 10.0, 0);
}
else
{
static const h_null[] = "Номер дома: %d\nВладелец: %s\n";
new h_buff[sizeof(h_null) + ((3-2) + (MAX_PLAYER_NAME-2))];
format(h_buff, sizeof(h_buff), h_null, hInfo[h][hID], hInfo[h][hOwner]);
hInfo[h][hPickup] = CreatePickup(1272, 1, hInfo[h][hEnterX], hInfo[h][hEnterY], hInfo[h][hEnterZ], -1);
hInfo[h][hText] = Create3DTextLabel(h_buff, 0xFFFFFF, hInfo[h][hEnterX], hInfo[h][hEnterY], hInfo[h][hEnterZ], 10.0, 0);
}
}
printf("[LOADING HOUSES]: <%d>. [TIME LOADING]: <%d>", LoadAllHouse, GetTickCount()-time);
}
return true;
}