custura's post in turfs bug was marked as the answer
Solved,
Turfs_Refresh(i)
{
if (i != -1 && TurfInfo[turfsExists])
{
Turfs = GangZoneCreate(TurfInfo[zMinX],TurfInfo[zMinY],TurfInfo[zMaxX],TurfInfo[zMaxY]);
}
return 1;
}
public LoadTurfs()
{
static
rows,
fields;
cache_get_data(rows, fields, g_iHandle);
for(new i = 1; i < rows; i ++) if (i < MAX_ZTURFS)
{
TurfInfo[turfsExists] = true;
TurfInfo[zID] = cache_get_field_int(i, "ID");
TurfInfo[zOwned] = cache_get_field_int(i, "Owned");
TurfInfo[zTime] = cache_get_field_int(i, "Time");
TurfInfo[zMinX] = cache_get_field_float(i, "MinX");
TurfInfo[zMinY] = cache_get_field_float(i, "MinY");
TurfInfo[zMaxX] = cache_get_field_float(i, "MaxX");
TurfInfo[zMaxY] = cache_get_field_float(i, "MaxY");
Turfs_Refresh(i);
}
printf( "Successfully Loaded [%d] Turfs", rows );
return true;
}
cu onplayerconnect-ul asa
for(new i; i < sizeof(TurfInfo); ++i)
{
if(TurfInfo[zOwned] == 6)
{
GangZoneShowForPlayer(playerid, Turfs, 0x198A1399); //Grove Street
}
if(TurfInfo[zOwned] == 7)
{
GangZoneShowForPlayer(playerid, Turfs, 0xB125E899); //Ballas
}
}
Nu prea imi pasa daca vrea sa ii arate turfurile sau nu, se supune :)))