) and post it.
PHP код:
for(new h = 1; h < MAX_HOUSES; h++)
{
new house[64], query[1024];
mysql_format(zMySQL, query, sizeof(query), "SELECT * FROM `houses` WHERE `ID` = %d", h);
mysql_tquery(zMySQL, query, "LoadHouses", "i",h);
}
forward LoadHouses(houseid);
public LoadHouses(houseid)
{
cache_get_value_name(houseid, "Owner", HouseInfo[houseid][hOwner]);
cache_get_value_name_float(houseid, "X", HouseInfo[houseid][hX]);
cache_get_value_name_float(houseid, "Y", HouseInfo[houseid][hY]);
cache_get_value_name_float(houseid, "Z", HouseInfo[houseid][hZ]);
cache_get_value_name_float(houseid, "Int:X", HouseInfo[houseid][hiX]);
cache_get_value_name_float(houseid, "Int:Y", HouseInfo[houseid][hiY]);
cache_get_value_name_float(houseid, "Int:Z", HouseInfo[houseid][hiZ]);
cache_get_value_name_float(houseid, "X2", HouseInfo[houseid][hX2]);
cache_get_value_name_float(houseid, "Y2", HouseInfo[houseid][hY2]);
cache_get_value_name_float(houseid, "Z2", HouseInfo[houseid][hZ2]);
cache_get_value_name_float(houseid, "A2", HouseInfo[houseid][hA2]);
cache_get_value_name_float(houseid, "Int:X2", HouseInfo[houseid][hiX2]);
cache_get_value_name_float(houseid, "Int:Y2", HouseInfo[houseid][hiY2]);
cache_get_value_name_float(houseid, "Int:Z2", HouseInfo[houseid][hiZ2]);
cache_get_value_name_float(houseid, "Int:A2", HouseInfo[houseid][hiA2]);
cache_get_value_name_float(houseid, "Spawn:X", HouseInfo[houseid][hsX]);
cache_get_value_name_float(houseid, "Spawn:Y", HouseInfo[houseid][hsY]);
cache_get_value_name_float(houseid, "Spawn:Z", HouseInfo[houseid][hsZ]);
cache_get_value_name_float(houseid, "Spawn:A", HouseInfo[houseid][hsA]);
cache_get_value_name_int(houseid, "Interior", HouseInfo[houseid][hInt]);
cache_get_value_name_int(houseid, "World", HouseInfo[houseid][hVW]);
cache_get_value_name_int(houseid, "Price", HouseInfo[houseid][hPrice]);
cache_get_value_name_int(houseid, "Status", HouseInfo[houseid][hStatus]);
if( strcmp(HouseInfo[h][hOwner], "No", true) == 0 )
{
HouseInfo[h][hPickup] = CreatePickup(1273, 1, HouseInfo[h][hX], HouseInfo[h][hY], HouseInfo[h][hZ]);
HouseInfo[h][hIcon] = CreateDynamicMapIcon(HouseInfo[h][hX], HouseInfo[h][hY], HouseInfo[h][hZ], 31, 0,0,0);
}
else
{
HouseInfo[h][hPickup] = CreatePickup(19522, 1, HouseInfo[h][hX], HouseInfo[h][hY], HouseInfo[h][hZ]);
HouseInfo[h][hIcon] = CreateDynamicMapIcon(HouseInfo[h][hX], HouseInfo[h][hY], HouseInfo[h][hZ], 32, 0,0,0);
}
return 1;
}