Код:
public LoadGangTeritory()
{
for(new gID = 0; gID < MAX_GANGS; gID++)
{
Zone[gID][MinX] = cache_get_field_content_float(gID, "MinY", DB_Connect);
Zone[gID][MaxX] = cache_get_field_content_float(gID, "MaxX", DB_Connect);
Zone[gID][MinY] = cache_get_field_content_float(gID, "MinY", DB_Connect);
Zone[gID][MaxY] = cache_get_field_content_float(gID, "MaxY", DB_Connect);
//----------------------------------------------------------------------
// Zone[gID][Teritory] = GangZoneCreate(Zone[gID][MinX], Zone[gID][MinY], Zone[gID][MaxX], Zone[gID][MaxY]);
//----------------------------------------------------------------------
Gang[gID][CaptureX] = cache_get_field_content_float(gID, "CaptureX", DB_Connect);
Gang[gID][CaptureY] = cache_get_field_content_float(gID, "CaptureY", DB_Connect);
Gang[gID][CaptureZ] = cache_get_field_content_float(gID, "CaptureZ", DB_Connect);
//----------------------------------------------------------------------
Zone[gID][ID] = GangZoneCreate(Zone[gID][MinX], Zone[gID][MinY], Zone[gID][MaxX], Zone[gID][MaxY]);
//----------------------------------------------------------------------
CreateDynamicRectangle(Zone[gID][MinX], Zone[gID][MinY], Zone[gID][MaxX], Zone[gID][MaxY]);
//----------------------------------------------------------------------
}
return 1;
}
I'm put LoadGangTeritory() in OnGamemodeInit but not working....