21.05.2014, 19:34
Код:
public OnQueryFinish(resultid, extraid, ConnectionHandle)
{
new szRows, szFields;
if(resultid != THREAD_NO_RESULT)
{
cache_get_data(szRows, szFields);
}
switch(resultid)
{
case THREAD_LOAD_HOUSES:
{
if(szRows)
{
new temp[130], totalhouses;
for(new i = 0; i < szRows; i++)
{
new houseID;
cache_get_field_content(i, "HouseIDz", temp);
houseID = strval(temp);
cache_get_field_content(i, "house_Tag", temp);
format(HouseData[houseID][house_Tag], 50, "%s", temp);
cache_get_field_content(i, "house_Owner", temp);
format(HouseData[houseID][house_Owner], 50, "%s", temp);
cache_get_field_content(i, "house_X", temp);
HouseData[houseID][house_OutsidePosition][0] = floatstr(temp);
cache_get_field_content(i, "house_Y", temp);
HouseData[houseID][house_OutsidePosition][1] = floatstr(temp);
cache_get_field_content(i, "house_Z", temp);
HouseData[houseID][house_OutsidePosition][2] = floatstr(temp);
cache_get_field_content(i, "house_A", temp);
HouseData[houseID][house_OutsidePosition][3] = floatstr(temp);
cache_get_field_content(i, "house_Owned", temp);
HouseData[houseID][house_Owned] = strval(temp);
cache_get_field_content(i, "house_Value", temp);
HouseData[houseID][house_Value] = strval(temp);
cache_get_field_content(i, "house_Level", temp);
HouseData[houseID][house_Level] = strval(temp);
cache_get_field_content(i, "house_Locked", temp);
HouseData[houseID][house_Locked] = strval(temp);
cache_get_field_content(i, "house_OutsideINT", temp);
HouseData[houseID][house_OutsideVW] = strval(temp);
cache_get_field_content(i, "house_OutsideINT", temp);
HouseData[houseID][house_OutsideINT] = strval(temp);
HouseData[houseID][house_Taken] = 1;
SetHouseInterior(houseID);
UpdateHouseLabel(houseID);
totalhouses ++;
}
printf("Chill Role Play - Loaded %i houses", totalhouses);
}
}


