31.08.2016, 10:01
title.
PHP код:
enum HouseInfo
{
HouseNumber,
hOwner[35],
hLocation[35],
Float:hX,
Float:hY,
Float:hZ,
}
new House[200][HouseInfo];
PHP код:
forward LoadHouses();
public LoadHouses()
{
if(!cache_num_rows()) return 1;
new string[200];
for(new i=0; i<cache_get_row_count(); i++)
{
House[i][HouseNumber] = cache_get_field_content_int(i,"hID");
cache_get_field_content(i,"hOwner",House[i][hOwner]);
cache_get_field_content(i,"hLocation",House[i][hLocation]);
House[i][hX] = cache_get_field_content_float(i,"hX");
House[i][hY] = cache_get_field_content_float(i,"hY");
House[i][hZ] = cache_get_field_content_float(i,"hZ");
format(string,sizeof(string),"(%i) %s's House - %s",House[i][HouseNumber],House[i][hOwner],House[i][hLocation]);
Create3DTextLabel(string,-1,House[i][hX],House[i][hY],House[i][hZ],20,0,0);
}
return 1;
}