PHP код:
publics OnHouseLoad()
{
new timeRun = GetTickCount();
new rows, fields;
cache_get_data(rows, fields, mysql_connect_ID);
if(rows)
{
for(new idx = 1; idx <= rows; idx++)
{
HouseInfo[idx][hID] = cache_get_field_content_int(idx-1, "id");
HouseInfo[idx][hOwned] = cache_get_field_content_int(idx-1, "home_active");
HouseInfo[idx][hClose] = cache_get_field_content_int(idx-1, "house_open");
cache_get_field_content(idx-1, "player_is_home", HouseInfo[idx][hOwener], mysql_connect_ID, 24);
HouseInfo[idx][hEnterX][0] = cache_get_field_content_float(idx-1, "EnterX");
HouseInfo[idx][hEnterY][0] = cache_get_field_content_float(idx-1, "EnterY");
HouseInfo[idx][hEnterZ][0] = cache_get_field_content_float(idx-1, "EnterZ");
HouseInfo[idx][hEnterX][1] = cache_get_field_content_float(idx-1, "ExitX");
HouseInfo[idx][hEnterY][1] = cache_get_field_content_float(idx-1, "ExitY");
HouseInfo[idx][hEnterZ][1] = cache_get_field_content_float(idx-1, "ExitZ");
HouseInfo[idx][hEnterZ][2] = cache_get_field_content_float(idx-1, "CarX");
HouseInfo[idx][hEnterX][2] = cache_get_field_content_float(idx-1, "CarY");
HouseInfo[idx][hEnterY][2] = cache_get_field_content_float(idx-1, "CarZ");
HouseInfo[idx][hCarA] = cache_get_field_content_float(idx-1, "CarA");
HouseInfo[idx][hPrice] = cache_get_field_content_int(idx-1, "housePrice");
HouseInfo[idx][hInt] = cache_get_field_content_int(idx-1, "HouseInter");
HouseInfo[idx][hClass] = cache_get_field_content_int(idx-1, "HouseClass");
switch(!HouseInfo[idx][hOwned])
{
case 0:
{
HouseInfo[idx][hPickupID] = CreatePickup(19522, 23, HouseInfo[idx][hEnterX][0], HouseInfo[idx][hEnterY][0], HouseInfo[idx][hEnterZ][0], -1);
HouseInfo[idx][hIconID] = CreateDynamicMapIcon(HouseInfo[idx][hEnterX][0], HouseInfo[idx][hEnterY][0], HouseInfo[idx][hEnterZ][0], 31, COLOR_WHITE, 0, -1, -1, 200.0);
}
case 1:
{
HouseInfo[idx][hPickupID] = CreatePickup(1273, 23, HouseInfo[idx][hEnterX][0], HouseInfo[idx][hEnterY][0], HouseInfo[idx][hEnterZ][0], -1);
HouseInfo[idx][hIconID] = CreateDynamicMapIcon(HouseInfo[idx][hEnterX][0], HouseInfo[idx][hEnterY][0], HouseInfo[idx][hEnterZ][0], 31, COLOR_WHITE, 0, -1, -1, 200.0);
}
}
TOTALHOUSES++;
}
}
else
{
}
}