DaEL
Новичок
PHP:
stock LoadGangZone()
{
mysql_function_query(dbHandle, "SELECT * FROM `gangzone`", true, "OnGangZonesLoad", "");
return true;
}
public OnGangZonesLoad()
{
new time = GetTickCount();
new temp[140], rows, fields;
cache_get_data(rows, fields, dbHandle);
if(rows)
{
for(new idx = 0; idx < rows; idx++)
{
cache_get_field_content(idx-1,"id",temp,dbHandle), GZInfo[idx][gID] = strval(temp);
cache_get_field_content(idx-1,"ginfo1",temp,dbHandle), GZInfo[idx][gCoords][0] = floatstr(temp);
cache_get_field_content(idx-1,"ginfo2",temp,dbHandle), GZInfo[idx][gCoords][1] = floatstr(temp);
cache_get_field_content(idx-1,"ginfo3",temp,dbHandle), GZInfo[idx][gCoords][2] = floatstr(temp);
cache_get_field_content(idx-1,"ginfo4",temp,dbHandle), GZInfo[idx][gCoords][3] = floatstr(temp);
cache_get_field_content(idx-1,"fraction",temp,dbHandle), GZInfo[idx][gFrakVlad] = strval(temp);
GZInfo[idx][gID] = GangZoneCreate(GZInfo[idx][gCoords][0], GZInfo[idx][gCoords][1], GZInfo[idx][gCoords][2], GZInfo[idx][gCoords][3]);
ZoneOnBattle[idx] = false;
GZSafeTime[idx] = 0;
TotalGz++;
}
}
printf("[Загрузка ганг зон]: <%d>. Времени затрачено: <%d мс>", TotalGz, GetTickCount()-time);
return true;
}
Чтобы видеть скрытое содержание Зарегистрируйтесь на форуме!
В логах пишет что 130 ганг зон загружено, но на самом деле смотрите скрин что выходит.
Последнее редактирование:
