PHP код:
publics: LoadProperty()
{
static rows, fields;
cache_get_data(rows, fields);
new temp[64],i=0;
if(rows)
{
for(new he = 0;he < rows; he++)
{
cache_get_row(he, 0, temp), HouseInfo[he][hID] = strval(temp);
cache_get_row(he, 1, temp), HouseInfo[he][hEntrancex] = floatstr(temp);
cache_get_row(he, 2, temp), HouseInfo[he][hEntrancey] = floatstr(temp);
cache_get_row(he, 3, temp), HouseInfo[he][hEntrancez] = floatstr(temp);
cache_get_row(he, 4, temp), HouseInfo[he][hExitx] = floatstr(temp);
cache_get_row(he, 5, temp), HouseInfo[he][hExity] = floatstr(temp);
cache_get_row(he, 6, temp), HouseInfo[he][hExitz] = floatstr(temp);
cache_get_row(he, 7, temp), strmid(HouseInfo[he][hOwner], temp, 0, strlen(temp), 255);
cache_get_row(he, 8, temp), HouseInfo[he][hValue] = strval(temp);
cache_get_row(he, 9, temp), HouseInfo[he][hHel] = strval(temp);
cache_get_row(he, 10, temp), HouseInfo[he][hInt] = strval(temp);
cache_get_row(he, 11, temp), HouseInfo[he][hLock] = strval(temp);
cache_get_row(he, 12, temp), HouseInfo[he][hOwned] = strval(temp);
cache_get_row(he, 13, temp), HouseInfo[he][hTakings] = strval(temp);
cache_get_row(he, 14, temp), HouseInfo[he][hVec] = strval(temp);
cache_get_row(he, 15, temp), HouseInfo[he][hVcol1] = strval(temp);
cache_get_row(he, 16, temp), HouseInfo[he][hVcol2] = strval(temp);
cache_get_row(he, 17, temp), HouseInfo[he][hKlass] = strval(temp);
cache_get_row(he, 18, temp), HouseInfo[he][hVehSost] = strval(temp);
cache_get_row(he, 19, temp), HouseInfo[he][hCarx] = floatstr(temp);
cache_get_row(he, 20, temp), HouseInfo[he][hCary] = floatstr(temp);
cache_get_row(he, 21, temp), HouseInfo[he][hCarz] = floatstr(temp);
cache_get_row(he, 22, temp), HouseInfo[he][hCarc] = floatstr(temp);
cache_get_row(he, 23, temp), HouseInfo[he][hMats] = strval(temp);
cache_get_row(he, 24, temp), HouseInfo[he][hStyle] = strval(temp);
cache_get_row(he, 25, temp), HouseInfo[he][hSost] = strval(temp);
i++;
if(HouseInfo[he][hOwned] == 0)
{
HouseInfo[he][hPickup] = CreatePickup(1273, 23, HouseInfo[he][hEntrancex], HouseInfo[he][hEntrancey], HouseInfo[he][hEntrancez],-1);
HouseInfo[he][hMIcon] = CreateDynamicMapIcon(HouseInfo[he][hEntrancex], HouseInfo[he][hEntrancey], HouseInfo[he][hEntrancez], 31, COLOR_WHITE, 0, -1, -1, 50.0);
}
if(HouseInfo[he][hOwned] == 1)
{
HouseInfo[he][hPickup] = CreatePickup(1272, 23, HouseInfo[he][hEntrancex], HouseInfo[he][hEntrancey], HouseInfo[he][hEntrancez],-1);
HouseInfo[he][hMIcon] = CreateDynamicMapIcon(HouseInfo[he][hEntrancex], HouseInfo[he][hEntrancey], HouseInfo[he][hEntrancez], 32, COLOR_WHITE, 0, -1, -1, 50.0);
}
}
printf("[V] Loaded %d houses",i);
}
else printf("[X] Houses not loaded");
return true;
}