public LoadProperty()
{
housess = cache_num_rows();
for(new i = 1; i <= housess; i++)
{
new h = i - 1;
HouseInfo[hID] = cache_get_field_content_int(h, "ID");
HouseInfo[hEntrancex] = cache_get_field_content_float(h, "Entrancex");
HouseInfo[hEntrancey] = cache_get_field_content_float(h, "Entrancey");
HouseInfo[hEntrancez] = cache_get_field_content_float(h, "Entrancez");
HouseInfo[hExitx] = cache_get_field_content_float(h, "Exitx");
HouseInfo[hExity] = cache_get_field_content_float(h, "Exity");
HouseInfo[hExitz] = cache_get_field_content_float(h, "Exitz");
cache_get_field_content(h, "Owner", HouseInfo[hOwner], SQL, 130);
cache_get_field_content(h, "Discription", HouseInfo[hDiscription], SQL, 130);
HouseInfo[hValue] = cache_get_field_content_int(h, "Value");
HouseInfo[hHel] = cache_get_field_content_int(h, "Hel");
HouseInfo[hArm] = cache_get_field_content_int(h, "Arm");
HouseInfo[hInterior] = cache_get_field_content_int(h, "Interior");
HouseInfo[hLock] = cache_get_field_content_int(h, "Lockk");
HouseInfo[hOwned] = cache_get_field_content_int(h, "Owned");
HouseInfo[hRent] = cache_get_field_content_int(h, "Rent");
HouseInfo[hRentabil] = cache_get_field_content_int(h, "Rentabil");
HouseInfo[hTakings] = cache_get_field_content_int(h, "Takings");
HouseInfo[hLevel] = cache_get_field_content_int(h, "Level");
HouseInfo[hVirtual] = cache_get_field_content_int(h, "Virtual");
}
for(new i = 1; i <= housess; i++)
{
OnPropTextdrawUpdate(1, i);
}
printf("Houses: %d", housess);
}
public LoadSystems()
{
new query[128];
mysql_format(SQL, query, sizeof(query), "SELECT * FROM `houses`");
mysql_tquery(SQL, query, "LoadProperty", "");
mysql_format(SQL, query, sizeof(query), "SELECT * FROM `bizz`");
mysql_tquery(SQL, query, "LoadBizz", "");
mysql_format(SQL, query, sizeof(query), "SELECT * FROM `pcbit`");
mysql_tquery(SQL, query, "LoadPC", "");
LoadTurfs();
for(new i = 0; i < sizeof(TurfInfo); i++)
{
Turfs = GangZoneCreateEx(TurfInfo[zMinX],TurfInfo[zMinY],TurfInfo[zMaxX],TurfInfo[zMaxY],TurfInfo[zID],1.0);
}
mysql_format(SQL, query, sizeof(query), "SELECT * FROM `factions`");
mysql_tquery(SQL, query, "LoadDynamicFactions", "");
mysql_format(SQL, query, sizeof(query), "SELECT * FROM `cars`");
mysql_tquery(SQL, query, "LoadCar", "");
mysql_format(SQL, query, sizeof(query), "SELECT * FROM `stock`");
mysql_tquery(SQL, query, "LoadStock", "");
mysql_format(SQL, query, sizeof(query), "SELECT * FROM `stock`");
mysql_tquery(SQL, query, "LoadDSVeh", "");
mysql_format(SQL, query, sizeof(query), "SELECT * FROM `clans`");
mysql_tquery(SQL, query, "LoadClanInfo", "");
}