03.04.2015, 02:21
Код:
public OnHousesLoad(houseid)
{
new tempString[128];
hInfo[houseid][hID] = cache_get_field_content_int(0, "hID");
if(hInfo[houseid][hID] > 0)
{
hInfo[houseid][owned] = cache_get_field_content_int(0, "owned");
cache_get_field_content(0, "owner", tempString);
format(hInfo[houseid][owner], 128, "%s", tempString);
cache_get_field_content(0, "address", tempString);
format(hInfo[houseid][address], 128, "%s", tempString);
hInfo[houseid][cost] = cache_get_field_content_int(0, "cost");
hInfo[houseid][Int] = cache_get_field_content_int(0, "Int");
hInfo[houseid][hX] = cache_get_field_content_float(0, "hX");
hInfo[houseid][hY] = cache_get_field_content_float(0, "hY");
hInfo[houseid][hZ] = cache_get_field_content_float(0, "hZ");
hInfo[houseid][tX] = cache_get_field_content_float(0, "tX");
hInfo[houseid][tY] = cache_get_field_content_float(0, "tY");
hInfo[houseid][tZ] = cache_get_field_content_float(0, "tZ");
hPickup[houseid] = CreateDynamicPickup(1273,1,hInfo[houseid][hX],hInfo[houseid][hY],hInfo[houseid][hZ]);
House[houseid] = CreateDynamic3DTextLabel(hInfo[houseid][address], COLOR_GREEN, hInfo[houseid][hX], hInfo[houseid][hY], hInfo[houseid][hZ] + 1.0, 50);
Houses++;
printf("%d Houses Have Been Loaded.",Houses);
}
return 1;
}

